1 / 13

An Introduction to Simulink

An Introduction to Simulink. Marios S. Pattichis. Configuration Parameters. Simulink is designed to be a front-end tool for integrating ordinary differential equations (ODEs). So, you need to keep sampling issues in mind:

arleneg
Download Presentation

An Introduction to Simulink

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An Introduction to Simulink Marios S. Pattichis

  2. Configuration Parameters Simulink is designed to be a front-end tool for integrating ordinary differential equations (ODEs). So, you need to keep sampling issuesin mind: Experiment with the ODE “Solver” parameters to make things appear correctly.

  3. Setting the Configuration Parameters To start: 1. Click on the Simulink icon to open up Simulink in Matlab. 2. In the new model window, click on the configuration parameters.

  4. Starting and Ending Time Parameters Simulation time Start time: 0.0 End time: 100 Note that these times come from the “Sources” parameters. Keep in mind that the “Sources” are usually designed for continuous-time (not discrete time) simulations.

  5. Solver Configuration Parameters Solver Options Type: Variable-step Solver: discrete (no continuous-states) Max Step Size: 0.5 <- Set lower for better simulations! Or: Type: Fixed-step Solver: discrete (no continuous-states) Fixed Step Size (fundamental sample size): 0.5 Set lower “Fixed Step Size” for better simulations! The rest are not as important …

  6. Connecting Things 1. Hold down the Control key down. 2. Click on the “source” icon. 3. Click on the “sink” icon. 4. Press the left mouse key to make the connection.

  7. Displaying Things Can use the “scope” attached to any signal. • Use the “Autoscale” function that appears as binoculars in order to look at the results of the entire simulations • Click on the “X”, the “Y” or the “zoom” functions to look at any specific part of the simulation

  8. Documenting Your Work • Use “Alt” + “PrntScrn” to capture a window of your work • Then, in Word, simple use “Paste” to get the window of your simulation

  9. A Simple Example: Displaying a Chirp Signal in Simulink The Model ->

  10. Chirp Parameters Thus, the correct display should show a slowly varying sinusoid that is speeding up. From the source parameters: Start time = 0 End time = 100

  11. Configuration Parameters Notice the “Fixed-step size” of 0.1.

  12. After Running the Simulation After clicking on “Autoscale”, it all appears to be working.

  13. Aliasing Due to Insufficient Sampling After changing the “Fixed-step size” to 1 ... TOO LARGE!

More Related