Converting Harness-Driven Models to Use Harness-Free External Inputs

This example shows how to convert a harness model that uses a Signal Builder block as an input to a harness-free model with root inports. The example collects data from the harness model and stores it in MAT-files, for use by the harness-free model. After storing the data, the example removes the Signal Builder block from the harness model and adds root inports to create a harness-free model. Then, the data in the MAT-files is mapped to the root inports of the model.

Fonte e mais detalhes aqui

Thermal Model of a House

This example shows how to use Simulink® to create the thermal model of a house. This system models the outdoor environment, the thermal characteristics of the house, and the house heating system.

The sldemo_househeat_data.m file initializes data in the model workspace. To make changes, you can edit the model workspace directly or edit the file and re-load the model workspace. To view the model workspace, select View > Model Explorer from the Simulink editor.

Fonte e mais detalhes aqui

Anti-Windup Control Using a PID Controller

This example shows how to use anti-windup schemes to prevent integration wind-up in PID controllers when the actuators are saturated. We use the PID Controller block in Simulink® which features two built-in anti-windup methods, back-calculation and clamping, as well as a tracking mode to handle more complex scenarios.

The plant to be controlled is a saturated first-order process with dead-time.

We start by opening the model.

Fonte e mais detalhes aqui

Getting Started with Arduino® Hardware

Simulink Support Package for Arduino Hardware enables you to create and run Simulink models on Arduino board. The target includes a library of Simulink blocks for configuring and accessing Arduino sensors, actuators and communication interfaces. Additionally, the target enables you to monitor and tune algorithms running on Arduino board from the same Simulink models from which you developed the algorithms.

Fonte e mais detalhes aqui

Communicating with Arduino® Hardware

Simulink Support Package for Arduino Hardware enables you to monitor and tune algorithms running on Arduino board from the same Simulink® models from which you developed the algorithms.

In this example you will learn how to tune and monitor the algorithm in real time as it is executing. When you are developing algorithms, it is often necessary to determine appropriate values of critical algorithm parameters in an iterative fashion. For example, a surveillance algorithm that measures motion energy in a room may use a threshold to determine an intruder in the presence of ambient noise. If the threshold value is set too low, the algorithm may erroneously interpret any movement as an intruder. If the threshold value is set too high, the algorithm may not be able to detect any movement at all. In such cases, the right threshold value may be obtained by trying different values until the desired algorithm performance is reached. This iterative process is called parameter tuning.

Fonte e mais detalhes aqui

Servo Control

Simulink Support Package for Arduino Hardware enables you to create and run Simulink® models on Arduino board. The target includes a library of Simulink blocks for configuring and accessing Arduino sensors, actuators and communication interfaces.

In this example you will learn how to create Simulink model that controls a standard servo motor. In a standard servo motor, the shaft position can be precisely set, usually between 0 and 180 degrees. Servo motors are used in many industrial, military and consumer applications and products.

Fonte e mais detalhes aqui

Using Ethernet Shield with Arduino® Hardware

Simulink Support Package for Arduino hardware enables you to create and run Simulink® models on Arduino board. The target includes a library of Simulink blocks for configuring and accessing Arduino sensors, actuators, and communication interfaces.

In this example you will learn how to create Simulink models receiving TCP/IP or UDP messages from a remote host and sending TCP/IP or UDP messages to a remote host, identified with a unique IP address and port number.

Fonte e mais detalhes aqui

Using WiFi Shield with Arduino® Hardware

Simulink Support Package for Arduino hardware enables you to create and run Simulink® models on Arduino board. The target includes a library of Simulink blocks for configuring and accessing Arduino sensors, actuators, and communication interfaces.

In this example, you will learn how to create Simulink models receiving TCP/IP or UDP messages from a remote host and sending TCP/IP or UDP messages to a remote host, identified with a unique IP address and port number.

Fonte e mais detalhes aqui

Read temperature from an I2C based sensor using Arduino® Hardware

Simulink Support Package for Arduino Hardware enables you to use the I2C interface to communicate with I2C based devices.

In this example, you will learn how to communicate to the Sparkfun digital temperature sensor TMP102. This sensor is interfaced with the Arduino board using the I2C bus. By default, it will send a 12-bit temperature value with a resolution of 0.0625 degree Celsius. You can configure this sensor to an Extended mode that provides 13-bit temperature measurements. For more details about the device, refer to the TMP102 datasheet.

Fonte e mais detalhes aqui

Communicating with an SPI based EEPROM using Arduino® Hardware

Simulink Support Package for Arduino Hardware enables you to use the SPI interface to communicate with SPI based devices.

In this example, you will learn how to communicate to an EEPROM interfaced to the Arduino board via SPI. The example uses the 256kB “ON Semiconductor EEPROM CAT25256”. This device uses a standard SPI protocol that is common to many other EEPROMs provided by different vendors. Make sure yours is compatible to the one used in this example. For more details about the device, refer to the CAT25256 datasheet.

Fonte e mais detalhes aqui