Title: An Introduction to Simulink
1An Introduction to Simulink
2Configuration 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
- Experiment with the ODE Solver parameters to
make things appear correctly.
3Setting 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.
4Starting 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.
5Solver Configuration Parameters
- Solver Options
- Type Variable-step
- Solver discrete (no continuous-states)
- Max Step Size 0.5 lt- 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
6Connecting 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.
7Displaying 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
8Documenting 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
9A Simple Example Displaying a Chirp Signal in
Simulink
The Model -gt
10Chirp 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
11Configuration Parameters
Notice the Fixed-step size of 0.1.
12After Running the Simulation
After clicking on Autoscale, it all appears to
be working.
13Aliasing Due to Insufficient Sampling
After changing the Fixed-step size to 1 ...
TOO LARGE!