Use the model of the missile airframe presented in a number of published papers (References ,  and ) on the use of advanced control methods applied to missile autopilot design. The
Combine Stateflow® with Simulink® to efficiently model hybrid systems. This type of modeling is particularly useful for systems that have numerous possible operational modes based on
Simulate the working of an automatic climate control system in a car using Simulink® and Stateflow®. You can enter a temperature value you would like the air in the car to reach by double
Use two different approaches to modeling a bouncing ball using Simulink®.
Use an extended Kalman filter with the MATLAB® Function block in Simulink® to estimate an aircraft's position from radar measurements. The filter implementation is found in the MATLAB
Model an automotive drivetrain with Simulink®. Stateflow® enhances the Simulink model with its representation of the transmission control logic. Simulink provides a powerful
How zero crossings work in Simulink®. In this model, three shifted sine waves are fed into an absolute value block and saturation block. At exactly t = 5, the output of the switch block changes
Model a conceptual air traffic control (ATC) radar simulation based on the radar range equation.
Use the Control System Toolbox™ and Simulink® Control Design™ to interact with Simulink to design a digital pitch control for the aircraft. In this example, we will design the controller 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
Approximate nonlinear relationships of a type S thermocouple.
Simulate the electrical system of a vehicle using Simulink® and Simscape™ Power Systems™.
Model a simplified half-car model that includes an independent front and rear vertical suspension. The model also includes body pitch and bounce degrees of freedom. The example provides a
Use Simulink® to model a hydraulic cylinder. You can apply these concepts to applications where you need to model hydraulic behavior. See two related examples that use the same basic
Interface the vehicle climate control system with a model of the electrical system to examine the loading effects of the climate control system on the entire electrical system of the car.
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.
Model a simple model for an Anti-Lock Braking System (ABS). It simulates the dynamic behavior of a vehicle under hard braking conditions. The model represents a single wheel, which may be
Model six degrees of freedom motion in Simulink®. You can switch between using Euler Angles and Quaternions to model the equations of motion, using the Variant Subsystem block's "Variant >
Simulate a simple closed-loop control algorithm in Simulink® and how to run it on LEGO® MINDSTORMS® EV3™ hardware.
Enhance a version of the open-loop engine model (sldemo_engine - described in "Modeling Engine Timing Using Triggered Subsystems" example). This model, sldemo_enginewc, contains a
How clients, in this case three computers, can send jobs to a server, a printer, and receive status from that server. This example highlights how Simulink Functions can be called from
How the Simulink® Project's checks support upgrading from MDL format model files to SLX format. The default file format for Simulink models in R2012b and subsequent releases is SLX.
Model a four-cylinder spark ignition internal combustion engine from the throttle to the crankshaft output. We used well-defined physical principles supplemented, where appropriate,
The model of a permanent magnet DC motor. The mode logic and dynamics of the DC motor are both modeled using Stateflow.
This model shows a simple use of Simulink functions in Stateflow. Starting from R2008b, you can use Simulink function call subsystems in Stateflow just like other function objects such as
A model that demonstrates a basic temperature control simulation that allows you to enter the temperatures and the power of the air conditioner that you want to use.
Model a popular toy called "Newton's cradle" which consists of a row of seven identical balls which are hung from a common height. At rest they are arranged such that they just touch each other.
Models an intersection of two 1-way roads controlled by a Stateflow® traffic light system. The Stateflow® chart uses active state outputs and a mask. The behavior of the traffic lights is
The use of flow charts in a Stateflow® C chart to create C statements such as the FOR loop. This particular example shows how you can create a simple FOR Loop that defines an array variable. The
How a WHILE loop and a DO-WHILE can be implemented in Stateflow® in order to create a variable array. The equivalent statements in C-Code are as follows:
This model shows how you can schedule a Simulink algorithm using Stateflow.
This model shows a re-visit of the classic tetris game which has been shipping with Stateflow® to use some of the more modern programming paradigms and features. It shows the use of the
The use of flow charts in Stateflow® to create C or MATLAB® statements such as the IF - ELSE statement. This particular example shows how you can create a simple IF - ELSE statement in Stateflow.
The use of Simulink® and Stateflow® to model a hydraulic servomechanism controlled by a pulse-width modulated (PWM) solenoid. This type of motion control system is used in industrial,
The example shows the ability of Stateflow® to accept matrix input signals from Simulink® and also output matrix signals to Simulink. In this particular example, we are multiplying a [2x2]
This model shows how you can design switching controllers by combining the power of Stateflow and Simulink functions.
The State Transition Matrix view for a simple model of a debouncing logic that uses State Transition Tables in Stateflow® (new in R2012b).
Design a fault detection, isolation, and recovery (FDIR) application for a pair of aircraft elevators with redundant actuators. The fault detection control logic used in this model is the
Use Stateflow® to model a bang-bang control system that regulates the temperature of a boiler. The boiler dynamics are modeled in Simulink® in a boiler plant model.
Model a home alarm system including motion sensors. Like in modern alarm systems, if the system detects an intrusion, it allows a certain (small) time for the alarm to be disabled, otherwise
This model shows the basic semantics of absolute time temporal logic in Stateflow®.
This model shows a method for measuring the frequency response of a continuous time system (plant) using Stateflow®. It illustrates several features of Stateflow® such as the
This model shows how to define continuous time state variables and their derivatives in Stateflow®. The dynamics of a bouncing ball can be defined in terms of two continuous time variables,
The concept of a graphical function and how it can be used to simplify your Stateflow® model. In this example, we pass two inputs in the Stateflow chart. The first input is a sine wave with
The advantage of using the EVERY function to call a graphical function when certain events occur. Notice how complicated it becomes when you try to accomplish the same behavior without the
Model a launch abort system. An aircraft is launched into outer space. If an anomaly or fault occurs during the launch, the operation is aborted, and the aircraft is sent back down to Earth.
Phasor simulation of a 9-MW wind farm using Induction Generators (IG) driven by variable-pitch wind turbines.
A detailed model of a 100-kW array connected to a 25-kV grid via a DC-DC boost converter and a three-phase three-level VSC.
The measurement distortion due to saturation of a current transformer (CT).
The simulation of an H-bridge used to generate a chopped voltage and to control the speed of a DC motor.
An average model of a 100-kW array connected to a 25-kV grid via a DC-DC boost converter and a three-phase three-level VSC.
The Machine Load Flow tool of Powergui block to initialize an induction motor/diesel-generator system.
Model a lithium cell using the Simscape™ language to implement the elements of an equivalent circuit model with two RC branches. For the defining equations and their validation, see T.
A current-controlled 60-kW 6/4 SRM drive using the SRM specific model based on measured magnetization curves. 8/6 and 10/8 preset models are also presented with same control strategy.
Energy management systems for a fuel cell hybrid electric source.
The operation of two models of on load tap changer (OLTC) regulating transformer.
An ideal AC transformer plus full-wave bridge rectifier. It converts 120 volts AC to 12 volts DC. The transformer has a turns ratio of 14, stepping the supply down to 8.6 volts rms, i.e.
How the Simscape™ Foundation Library Asynchronous Sample & Hold block can be used to build components with more complex behaviors. The model implements a controllable PWM voltage source
An aircraft electrical power generation and distribution system. The AC power frequency is variable and depends of the engine speed
The operation of a typical transformerless photovoltaic (PV) residential system connected to the electrical utility grid.
Models a vapor-compression refrigeration cycle using two-phase fluid components. The compressor drives the R-134a refrigerant through a condenser, an expansion valve, and an
Phasor simulation of a 9 MW wind farm using Doubly-Fed Induction Generator (DFIG) driven by a wind turbine.
Use functions which analyze Simscape™ logging data to get harmonic magnitudes, calculate total harmonic distortion percentage and plot harmonic magnitudes. The model to which this
The use of the Three-Phase Transformer Inductance Matrix Type block to model a three-phase core-type saturable transformer. It also shows that using three single-phase transformers to
A detailed model of a 250-kW PV array connected to a 25-kV grid via a three-phase converter.
The usage of thermal blocks for developing a model of a long iron rod that is heated with a heat source through face A. Face B and the outer cylindrical surface are open to atmosphere and
Use Simulink® to model a toy quadcopter, based on the Parrot (R) series of mini-drones, to help estimate the snow levels on the MathWorks Apple Hill campus roof.
This model shows how to use MathWorks® products to address the technical and process challenges of aircraft design using the design of a lightweight aircraft.
Tune a PID controller for plants that cannot be linearized. You use the PID Tuner to identify a plant for a buck converter. Then tune the PID controller using the identified plant.
Estimate the parameters of a multi-domain DC servo motor model constructed using various physical modeling products.
Obtain a Linear Parameter Varying (LPV) approximation of a Simscape Power Systems™ model of a Boost Converter. The LPV representation allows quick analysis of average behavior at various
Use numerical optimization to tuning the controller parameters of a nonlinear system. In this example, we model a CE 152 Magnetic Levitation system where the controller is used to position a
Automatically generate a MATLAB function to solve a Design Optimization problem. You use the Response Optimization tool to define an optimization problem for a hydraulic cylinder design
Use Simulink® Design Optimization™ to optimize the controller of an inverted pendulum. The inverted pendulum is on a cart and the motion of the cart is controlled. The controller's
Use Simulink Control Design, using a drum boiler as an example application. Using the operating point search function, we illustrate model linearization as well as subsequent state
This model shows the simulation of multiple aircraft in formation flight, with emphasis on the necessary requirements and the realized benefits in making the simulation vectorized so that
This document describes how to use the Flight Simulation project template using Simulink® Projects. This template provides a framework for the collaborative development of a flight
Use Simulink® Design Optimization™ to estimate multiple parameters of a model by iterated estimations.
This model shows how to model the Wright Brother's 1903 Flyer modeled in Simulink®, Aerospace Blockset™ and Simulink® 3D Animation™ software. This model simulates the longitudinal motion
Use Simulink® Design Optimization™ to tune the gains of the PID controller (Kp, Ki, and Kd) and optimize the step response of the plant. To view the results, use the following steps.
This model shows how to compute true airspeed from indicated airspeed using the Ideal Airspeed Correction block. The Aerospace Blockset™ blocks are indicated in red.
This model shows how to model the DeHavilland Beaver using Simulink® and Aerospace Blockset™ software. It also shows how to use a pilot's joystick to fly the DeHavilland Beaver This model has
Trim and linearize an airframe using Simulink® Control Design™ software
Design a PI controller with frequency response estimated from a plant built in Simulink. This is an alternative PID design workflow when the linearized plant model is invalid for PID design
Tune multiple compensators (feedback and prefilter) to control a single loop.
Use Simulink® Design Optimization™ to optimize the temperature control of a heat exchanger around a temperature set-point.
Design an array of PID controllers for a nonlinear plant in Simulink that operates over a wide range of operating points.
Plot linearization of a Simulink model at particular conditions during simulation. The Simulink Control Design software provides blocks that you can add to Simulink models to compute and
Detect and track cars in a video sequence using optical flow estimation.
The basic structure of turbo codes, both at the transmitter and receiver ends, and characterizes their performance over a noisy channel using components from the Communications System
Beamform signals received by an array of microphones to extract a desired speech signal in a noisy environment. This Simulink® example is based on the MATLAB® example Acoustic Beamforming
Segment video in time. The algorithm in this example can be used to detect major changes in video streams, such as when a commercial begins and ends. It can be useful when editing video or when
This model shows how to simulate a phase-locked loop (PLL) frequency synthesizer. The model multiplies the frequency (synFr) of a reference signal by a constant synN/synM, to produce a
Track objects at a train station and to determine which ones remain stationary. Abandoned objects in public areas concern authorities since they might pose a security risk. Algorithms,
This model shows a satellite link, using the blocks from the Communications System Toolbox™ to simulate the following impairments:
This model shows how to use the Rayleigh and Rician multipath fading channel blocks from the Communications System Toolbox™. Rayleigh and Rician fading channels are useful models of
This model shows symbol timing adjustments using interpolation and numerically controlled oscillator (NCO) based control as part of clock recovery in a digital modem as described in the
This model shows the implementation of a QPSK transmitter and receiver. The receiver addresses practical issues in wireless communications, e.g. carrier frequency and phase offset,
Use sum of absolute differences (SAD) method for detecting motion in a video sequence. This example applies SAD independently to four quadrants of a video sequence. If motion is detected in a
Remove periodic noise from a video. In a video stream, periodic noise is typically caused by the presence of electrical or electromechanical interference during video acquisition or
This model shows part of the ETSI (European Telecommunications Standards Institute) EN 300 744 standard for terrestrial transmission of digital television signals. The standard
This model shows the full duplex communication between two Bluetooth® devices. Both data packets and voice packets can be transmitted between the two devices:
Detect and count cars in a video sequence using Gaussian mixture models (GMMs).
This model shows the state-of-the-art channel coding scheme used in the second generation Digital Video Broadcasting standard (DVB-S.2), planned to be deployed by DIRECTV in the United
This model shows an adaptive orthogonal space-time block code (OSTBC) transceiver system over a multiple-input multiple-output (MIMO) channel. The system uses a variable number of
Recognize traffic warning signs, such as Stop, Do Not Enter, and Yield, in a color video sequence.
This model shows transmission and reception of beacon frames in an 802.11 based wireless local area network (WLAN) as described in [ 1 ]. The beacon frame is a type of management frame. It
Detect and track road lane markers in a video sequence and notifies the driver if they are moving across a lane. The example illustrates how to use the Hough Transform, Hough Lines and Kalman
Model analog-to-digital conversion using a sigma-delta algorithm implementation.
Use the function fixpt_look1_func_plot to find the maximum absolute error for the simple lookup table whose breakpoints are 0, 0.25, and 1. The corresponding Y data points of the lookup
Open up the "Controller" subsystem. Notice that this model uses a Triggered Stateflow® Chart to do the "Enable" and "Setpoint" calculation. It uses a discrete PID Controller to compute the
Demonstrates how to use the Embedded Coder Support Package for STMicroelectronics Discovery Boards to run a Simulink® model on an STMicroelectronics STM32F4-Discovery board or
Generate a cosimulation model in of HDL Coder and integrate the generated HDL code into an HDL Verifier™ workflow. Automation of cosimulation model generation enables seamless
Model a controller and implement it on a Xilinx® Zynq™-7000 All Programmable SoC target. This example is based on a ZedBoard using an Analog Devices motor control FMC board. Note that if you do
Communicate with the FPGA IP core on the Zynq hardware using AXI4®-Lite protocol. AXI4 (Advanced eXtensible Interface 4) is an ARM® standard.
Model a three band parametric equalizer algorithm and run it on the ARM® Cortex M based STMicroelectronics® STM32 Discovery boards.
Use the GPIO blocks in the STMicroelectronics STM32F4-Discovery library to control the push-button and the LED's on the STMicroelectronics STM32F4-Discovery board.
Use Embedded Coder Support Package to run a Simulink® model on MSP-EXP430G2 LaunchPad using Energia Toolchain.
Use the Embedded Coder Support Package for ARM Cortex-M Processors to run a Simulink model on an ARM Cortex-M3 emulator provided by QEMU.
Utilize RAM resources in your FPGA design using HDL Coder™.
Build an LTE compliant OFDM Modulator and Detector for implementation with HDL Coder™, and use LTE System Toolbox™ to verify the HDL implementation model.
Use Embedded Coder Support Package for STMicroelectronics Discovery Boards for code verification and validation using PIL and External mode.
Use code replacement libraries for ARM Cortex-M processors to generate optimized code for the STMicroelectronics STM32F4-Discovery board.
Instantiate multiple top-level synchronous clock input ports in HDL Coder.
This model shows the code generated for a Stateflow chart which uses absolute time temporal logic. Simulate the model. Click on the scope to observe the "pulse" output.
The RSim target was designed to let you run batch simulations at the fastest possible speed. Using variable-step or fixed-step solvers with RSim combined with the use of a tunable parameter
Open up the "Controller" subsystem. Open the Stateflow® chart named "Control" chart inside it. This chart implements the control logic for starting and stopping the conveyer belt motor
This model shows how to integrate user defined function blocks, data types and global variables into generated structured text
Use HDL Coder™ to check, generate and verify HDL for a fixed-point CORDIC model implementing sin and cos trigonometric functions using the MATLAB Function Block.
This model shows how tunable parameters map to Structured Text by specifying them as Simulink.Parameter objects in MATLAB base workspace.
Use Xilinx® System Generator for DSP with HDL Coder™.
This model shows the code generated for a Feedforward PID Controller implemented using Simulink library blocks.
Communicate between two Simulink® Real-Time™ models over Ethernet.
Perform concurrent execution of a model on Simulink Real-Time. It displays the execution of each model thread using the Simulink Real-Time profiling tool.
Do an analog and digital IO loopback test using the Diamond Systems MM-32-AT (PC/104) Board.
This model shows how to use the frame-based acquisition mode of the UEI MF and MFS boards in multi-board configurations.
This model shows how to use the frame-based acquisition mode of the UEI MF and MFS boards. This example requires the DSP System Toolbox™.
The transmission and reception of J1939 data through a loopback connection of two CAN ports in a single target computer. The message data is Trip Distance Information. The Parameter Group
Analog IO using the General Standards PMC-ADADIO Board.
Capture and view video images from a Camera Link camera attached to the Bitflow™ Neon-CLB frame grabber board. Images are acquired with the model dxpcImMultiTarget running on the target
Control the velocity of a motor using EtherCAT communication.
Trace signals with an Simulink® Real-Time™ target scope. Target scopes are used to trace or display signals on a video monitor attached to the target computer. After the script builds and
This model shows how to do tone control audio processing using General Standards I/O boards. It requires the DSP System Toolbox™.
Control the position of a motor through an EtherCAT network.
This model shows how to use the Condor® PCI-1553 board as a Bus Controller (BC). The model creates and sends a sequence of two messages and collects the response data.
This model shows how to read from and write to shared/reflective memory using GE® Fanuc PCI-5565 boards. Both the PCI-5565PIORC and the (formerly VMIC) VMIPCI-5565 have been tested with
A closed-loop control system using two Simulink® Real-Time™ models communicating over shared memory. The controller and plant models run on separate target computers and run at different
Do an analog and digital IO loopback test using the National Instruments® PCI-6289 (M-series) board.
Use an Simulink® Real-Time™ file scope to log signal data to the file system on the target computer. Signals are logged during model execution. At the end of the run, the data is read from the
EtherCAT communication using the Beckhoff digital I/O terminals EL1004 and EL2004.
This model shows how to use a for loop to iterate through a frame one sample at a time when the minimum sample time is the frame completion time. This example requires DSP System Toolbox™.
Do freerun signal tracing using an Simulink® Real-Time™ host scope. After the script builds and downloads the oscillator model, xpcosc, to the target computer, it adds a scope of type 'host'
This model shows how to transmit data over an ARINC-429 bus using the CEI-830A Send and Receive blocks. For the Send blocks, the data must be packed (encoded) using the ARINC-429 Encode block.
EtherCAT communication using the Beckhoff® analog I/O terminals EL3062 and EL4002.
Requirements Management Interface (RMI) provides tools for creating and reviewing links between Simulink objects and requirements documents. This example illustrates linking model
Use Simulink® Design Verifier™ functions to log input signals, create a harness model, generate test cases for missing coverage, merge harness models, and execute test cases.
Use the Simulink Code Inspector to verify that code generated from models satisfies the source code objectives from DO-178C, Software Considerations in Airborne Systems and Equipment
Use Simulink® Verification and Validation™ component verification functions to log input signals, create a harness model, and execute test cases.
Use Simulink® Verification and Validation™ model coverage filters to exclude model items from coverage recording and justify missing coverage in reports.
Traceability management support in the MATLAB Editor is an extension of the Simulink-based Requirements Management Interface to allow associations between MATLAB code lines and
Use Simulink® Design Verifier™ functions to replace unsupported blocks and to how customize test vector generation for specific requirements.
Create and manage traceability associations for MATLAB® code lines in MATLAB files, using the Requirements Management Interface (RMI). This is similar to creating traceability
You can use Simulink to model your design requirements. For example, you can use verification blocks to specify desired system properties and model the design requirements. The
The Requirements Management Interface (RMI) provides tools for creating and reviewing links between Simulink objects and requirements documents. This example illustrates linking
Verify the seat belt reminder design model referenced in the top block above.
Verify the seat belt reminder design model referenced in the top block above.
How Simulink® Design Verifier™ can extend test cases with additional time steps to efficiently generate complete test suites.
Use Simulink Design Verifier to extend a test suite such that it satisfies missing model coverage. In this manner, you can reuse test data as you modify a model and limit test generation only to
Use the dialog box for coverage settings to enable coverage for a Simulink® model and adjust the type of information that is reported.
How Simulink® Design Verifier™ can target its analysis to a single subsystem within a continuous-time closed-loop simulation and generate test cases for missing coverage in that
Illustrates the use of the Coverage Results Explorer to simplify the generation of cumulative coverage data and reports spanning a set of multiple coverage runs.
Creates three test cases for an adjustable rate limiter and analyzes the resulting model coverage using the command-line API of the Model Coverage tool.
Find a property violation using Simulink Design Verifier property proving analysis.
The vr_octavia example shows the benefits of visualization of complex dynamic model in the virtual reality environment. It also shows Simulink® 3D Animation™ 3D off-line animation
Illustrates the possibility to convert generally available Digital Elevation Models into VRML format for use in virtual reality scenes.
Extends the vr_octavia example to show multiple-object scenario visualizations.
The vrmemb example shows how to use a MATLAB® generated 3-D graphic object with the Simulink® 3D Animation™. The famous membrane was generated by the logo function and saved in the VRML format
The vrcrane_joystick example illustrates how a Simulink® model can interact with a virtual world. The portal crane dynamics is modeled in Simulink and visualized in virtual reality. The
The vrplanets example shows the dynamic visualization of the first 4 planets of the Solar system, Moon orbiting around Earth and Sun rotating itself. The model uses the real properties of the
Illustrates use of the Simulink Report Generator to verify that a wing flutter suppression system design meets its design requirement. The example exploits the Report Generator's ability
The vrmanipul_stereo3d example shows a manipulator in active stereoscopic vision mode. It illustrates the effect of stereo rendering properties and the way how to work with the
Illustrates the use of the Simulink® 3D Animation™ MATLAB® interface. In a step-by-step tutorial, it shows commands for querying and manipulating virtual world objects. You will learn
The vrbounce example visualizes a ball bouncing from a floor. The ball deforms as it hits the floor keeping the volume of the ball constant. The deformation is achieved by modifying the scale
Use Simulink® Report Generator™ to compare XML files from two Simulink models. You can view the Simulink XML differences in the resulting report.
The vrpend example illustrates the various ways a dynamic model in Simulink® can interact with a virtual reality world. It is the model of 2-dimensional inverted pendulum controlled by a PID
Use Simulink® Report Generator™ to create a System Design Description report for a model. The report provides summary or detailed information about a system design represented by a
Extends the vr_octavia example and shows how to combine virtual reality canvas in one figure with other graphical user interface objects. In this case, three graphs are displayed under the
Illustrates the use of Simulink® 3D Animation™ MATLAB® interface to create 2D off-line animation files.
Illustrates the use of global coordinates in Simulink® 3D Animation™ models. Global coordinates can be used in the model in many ways for object tracking and manipulation, simple collision
Use Simulink® Report Generator™ to compare XML files from two Simulink models. You can view the truth table differences in a report.
Use Simulink® Report Generator™ to customize a System Design Description report for a model. The default version of the report provides information about a system design represented by a
Illustrates the use of the Simulink® 3D Animation™ with the MATLAB® interface for manipulating complex objects.
This model illustrates the use of Simulink® 3D Animation™ for virtual reality prototyping and testing the viability of designs before the implementation phase. Also, this example
Use Simulink® Report Generator™ to compare XML files from two Simulink models. You can view and merge the Simulink and Stateflow® XML differences in the resulting report.
This model represents a tutorial example described in the documentation. See the 'Displaying a Virtual World' chapter in the Simulink 3D Animation User's Guide.