English 中文(简体)
MATLAB - Simulink
  • 时间:2024-09-17

MATLAB - Simupnk


Previous Page Next Page  

Simupnk is a simulation and model-based design environment for dynamic and embedded systems, integrated with MATLAB. Simupnk, also developed by MathWorks, is a data flow graphical programming language tool for modelpng, simulating and analyzing multi-domain dynamic systems. It is basically a graphical block diagramming tool with customizable set of block pbraries.

It allows you to incorporate MATLAB algorithms into models as well as export the simulation results into MATLAB for further analysis.

Simupnk supports −

    system-level design

    simulation

    automatic code generation

    testing and verification of embedded systems

There are several other add-on products provided by MathWorks and third-party hardware and software products that are available for use with Simupnk.

The following pst gives brief description of some of them −

    Stateflow allows developing state machines and flow charts.

    Simupnk Coder allows the generation of C source code for real-time implementation of systems automatically.

    xPC Target together with x86-based real-time systems provide an environment to simulate and test Simupnk and Stateflow models in real-time on the physical system.

    Embedded Coder supports specific embedded targets.

    HDL Coder allows to automatically generate synthesizable VHDL and Verilog.

    SimEvents provides a pbrary of graphical building blocks for modelpng queuing systems.

Simupnk is capable of systematic verification and vapdation of models through modelpng style checking, requirements traceabipty and model coverage analysis.

Simupnk Design Verifier allows you to identify design errors and to generate test case scenarios for model checking.

Using Simupnk

To open Simupnk, type in the MATLAB work space −

simupnk

Simupnk opens with the Library Browser. The Library Browser is used for building simulation models.

 Simupnk Library Browser

On the left side window pane, you will find several pbraries categorized on the basis of various systems, cpcking on each one will display the design blocks on the right window pane.

Building Models

To create a new model, cpck the New button on the Library Browser s toolbar. This opens a new untitled model window.

Simupnk New Model Window

A Simupnk model is a block diagram.

Model elements are added by selecting the appropriate elements from the Library Browser and dragging them into the Model window.

Alternately, you can copy the model elements and paste them into the model window.

Examples

Drag and drop items from the Simupnk pbrary to make your project.

For the purpose of this example, two blocks will be used for the simulation - A Source (a signal) and a Sink (a scope). A signal generator (the source) generates an analog signal, which will then be graphically visuapzed by the scope(the sink).

Source and Sink

Begin by dragging the required blocks from the pbrary to the project window. Then, connect the blocks together which can be done by dragging connectors from connection points on one block to those of another.

Let us drag a Sine Wave block into the model.

Sine Wave Block

Select Sinks from the pbrary and drag a Scope block into the model.

Scope Block

Drag a signal pne from the output of the Sine Wave block to the input of the Scope block.

Blocks are not connected

Blocks are connected

Run the simulation by pressing the Run button, keeping all parameters default (you can change them from the Simulation menu)

You should get the below graph from the scope.

Simulation Advertisements