Introduction to SIMULINK
1. What is SIMULINK?
Simulink is a software package that enables you to model, simulate, and analyze systems whose outputs change over time. Such systems are often referred to as dynamic systems. Simulink can be used to explore the behavior of a wide range of real-world dynamic systems, including electrical circuits, shock absorbers, braking systems, and many other electrical, mechanical, and thermodynamic systems.
Simulating a dynamic system is a two-step process with Simulink. First, a user creates a block diagram, using the Simulink model editor, which graphically depicts time-dependent mathematical relationships among the system’s inputs, states, and outputs. The user then commands Simulink to simulate the system represented by the model from a specified start time to a specified stop time.
2. Getting Started in SIMULINK
Start up the Matlab (We use Matlab version 7 in this and the following experiments.), type “simulink” (small letters!!) in the command window.
In the “Simulink Library Browser” window, click “File”-> “New” -> “Model”
Simulate Sine wave
- Create a new model window by choosing “File”-> “New” -> “Model
- Drag “Sine Wave” block from “Simulink” -> “Sources” to the model window;
- Drag “Scope” block from “Simulink” -> “Sinks” to the model window;
- Left-press the mouse when the arrow becomes a single cross by moving the mouse near to the right side of “Sine Wave”; keep left button pressed and move the single cross to the left side of “Scope” until you see the single cross becomes double crosses; release the button and the tow parts are connected. Fig. 3 is the finished diagram
- Click “Simulation”-> “Simulation parameters …” and refer to Fig. 4 to set the simulation parameters
- Double click the “Sine Wave” and set the parameters as shown in Fig.5
- Press “Start simulation” to run the progra
- Double click the “Scope” and you should see the wave similar to Fig.
- Refer to Fig. 7 to set the parameters of “Scope” by press “Parameters” button on the display panel
- Right click on the scope; then choose “axes properties…” to set “Y” scales
- Now you should see the picture of Fig. 8