AAE4006 Lab Sheet For Session 1
AAE4006 Lab Sheet For Session 1
Introduction to SIMULINK
Fig. 1
It isn't hard to understand that the logic flows from left to right (because of the
arrows), and that two inputs will be multiplied together to obtain the output. With
nothing more than a simple glance, you've understood what the computer has been
programmed to do.
Let's compare it with a warning-free, standards-compliant C code:
Fig. 2
Obviously, a visual representation of the code is much easier to understand and
maintain.
That's where visual programming comes the rescue. A graphical programming tool
can save countless hours of work in a job where explaining the code is as important
as a code without bugs, or where a bug can have disastrous (safety-critical) effects.
Simulink is such a tool.
SIMULINK is embedded in MATLAB.
1. Build a new Simulink file
Two ways to open the Simulink Start Page:
Fig. 3
Fig. 5
Click “Library Browser” to see a ton of blocks you may use.
Fig. 6
Find and drag the “Step” and “Scope” blocks into model browser. Connect them, and click the
“Run” button in the menu. After completion, double click the Scope, and check the result.
Fig. 7
Longitudinal equation:
B747 data:
System matrix in longitudinal direction for B747 (Note that the matrix below is a bit different
from that on Page 11, Lecture 5 due to the different unit. For instant, -9.8m/s2 = -32.2 ft/s2):
Control matrix:
Step 1: Build the following model using “State-space” block.
Fig. 8
Step 2: Double “State-space” block, and enter the matrices. Using semicolon to start another
row.
Fig. 9
Step 3: Set the simulation time as 10000 sec as shown in the menu in Fig. 8.
Step 4: Run the simulation and check the result by comparing the result with that on Page 12
Lecture 5, which is obtained using the M script.