Priyanka Gotika, MathWorks
Build and simulate a model with Simulink®.
Let us see how you can get started with the Simulink modeling environment to build and simulate dynamic systems.
Use the Simulink start page accessible from the Home tab on the MATLAB tool strip to start creating new models using one of the shipping templates or examples.
For this video, I will use the simple simulation template to create a new model.
Simulate the model by pressing the ‘run’ button. Observe the output using the scope block.
A sine wave is generated using the input source block called sine wave and is amplified by a factor of two using the gain block. The saturation block helps place upper and lower bounds on the signal as seen in the scope.
For the sine wave amplification, let me choose a different gain factor. Simulink allows easy tuning of your model by setting the block parameters. Here I am going to change the Gain parameter of the Gain block to 3. Simulate the model again to observe the results.
Use the library browser to get any remaining blocks you need to continue building the model. The Library browser has libraries of blocks that you can choose from to model dynamic systems that are continuous in time, discrete in time or hybrid systems that have both continuous and discrete states.
For example, if we want to bring in an integrator block, simply search for the block, and drag and drop it into the model canvas. Alternatively, if you know the name of the block you want to add, search for it directly from the canvas by clicking once.
Simulate the model again to observe the result of integrating the sinewave input.
The library browser contains blocks from all the products that you have access to. You can quickly look at the documentation on how to use any of these blocks.
To learn more about how to use Simulink, you can look at other videos on the MathWorks website.
Recorded: 15 mar 2016