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

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

Code Verification and Validation with PIL

In this example you will learn how to configure a Simulink model to run Processor-In-the-Loop (PIL) simulation. In a PIL simulation, the generated code runs on target hardware. The results of the PIL simulation are transferred to Simulink to verify the numerical equivalence of the simulation and the code generation results. The PIL verification process is a crucial part of the design cycle to ensure that the behavior of the deployment code matches the design.

Fonte e mais detalhes aqui

Drive with PID Control

In a vehicle using independent wheel control, applying the same power to each wheel generally does not result in the vehicle moving straight. This is caused by mechanical and surface differences experienced by each of the wheels. To reduce deviation in the vehicle heading, a better approach is to use a closed-loop controller which adjusts the power applied to two motors based on the difference in their rates of rotation. One such controller is a well-known proportional-integral-derivative (PID) controller.

Fonte e mais detalhes aqui

Line Follower Application for Arduino® Robot

Simulink Support Package for Arduino Hardware enables you to create and run Simulink models on Arduino Robot. This Robot has two Leonardo (ATmega32u4) based boards: Arduino Robot Motor Board and Arduino Robot Control Board. The Arduino Robot Control Board has peripherals such as Analog Input Pins, Digital Input/ Output Pins, PWM, Keypad, Potentiometer (POT), Compass, Buzzer, etc. The Arduino Robot Motor Board has peripherals such as Analog Input Pins, Digital Input/ Output Pins, PWM, Motor Driver, Motors, Wheels, Trimming Potentiometer (TRIM), IR sensors, etc. For more details, refer to the Arduino Robot website.

Fonte e mais detalhes aqui

Computer Vision: Code examples

Object Detection, Recognition and Classification
Image Category Classification Using Deep Learning new
Object Detection In A Cluttered Scene Using Point Feature Matching
Face Detection and Tracking
Image Category Classification Using Bag of Features
Image Retrieval Using Customized Bag of Features
Detecting Cars Using Gaussian Mixture Models
Automatically Detect and Recognize Text in Natural Images
Recognize Text Using Optical Character Recognition (OCR)
Digit Classification Using HOG Features
Abandoned Object Detection
Pattern Matching
Scene Change Detection
Object Tracking
Camera Calibration and 3D Vision
Image Registration and Video Analysis
System Design in Simulink
HDL and Code Generation

Fonte e mais detalhes aqui

Computer Vision System Toolbox

Computer Vision System Toolbox™ provides algorithms, functions, and apps for designing and simulating computer vision and video processing systems. You can perform feature detection, extraction, and matching; object detection and tracking; motion estimation; and video processing. For 3-D computer vision, the system toolbox supports camera calibration, stereo vision, 3-D reconstruction, and 3-D point cloud processing. With machine learning based frameworks, you can train object detection, object recognition, and image retrieval systems. Algorithms are available as MATLAB® functions, System objects, and Simulink® blocks.

Fonte e mais detalhes aqui