Professional Documents
Culture Documents
How To Use Simulink
How To Use Simulink
ECE743
Jin-Woo Jung,
Ph. D. Student and GTA
Advisor: Prof. Ali Keyhani
ECE743
Simulink (*.mdl):
Schematic (Easy to model complicated systems)
Not easy to change parameters
Can not edit figures
ECE743
Aerospace Blockset
Real-Time Workshop
Communications Blockset
Report Generator
S-function demos
DSP Blockset
SimMechanics
Gauges Blockset
SimPowerSystems
1. Current Directory
Click Browser for folder
4 /36
ECE743
2. Starting Simulink
1). Click Simulink
5 /36
ECE743
6 /36
ECE743
7 /36
8 /36
ECE743
9 /36
ECE743
10/36
ECE743
11/36
ECE743
ECE743
7. Example 1
Four different Methods
Case 1: Only Matlab
Case 2: Matlab + Simulink: S-Function
1. S-function: asglpr3b.m
2. Simulink: Example_1.mdl
3. Plot: Plot_1.m
ECE743
14/36
ECE743
end
15/36
ECE743
16/36
ECE743
i1 [A]
10
0
0
0.1
0.2
0.3
0.4
0.5
i2 vs time
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
Vc vs time
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
Time
0.6
0.7
0.8
0.9
0.01
i2 [A]
0.005
0
-0.005
-0.01
0
Vc [V]
10
5
0
-5
0
17/36
ECE743
ECE743
if abs(flag)==1
sys(1:3)=A*x(1:3)+B*u;
elseif abs(flag)==3
sys(1:3)= x(1:3);
elseif flag==0
sys(1)=3;
sys(2)=0;
sys(3)=3;
sys(4)=1;
sys(5)=0;
sys(6)=0;
x0= [0; 0; 0];
else
sys=[];
end;
19/36
ECE743
20/36
ECE743
21/36
ECE743
Blank
22/36
ECE743
Click Parameters
Release Limit data points to last
23/36
ECE743
24/36
ECE743
25/36
ECE743
i1 [A]
10
0
0
0.1
0.2
0.3
0.4
0.5
i2 vs time
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
Vc vs time
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
Time
0.6
0.7
0.8
0.9
0.01
i2 [A]
0.005
0
-0.005
-0.01
0
Vc [V]
10
5
0
-5
0
26/36
ECE743
27/36
ECE743
28/36
ECE743
29/36
ECE743
30/36
ECE743
i1
10
0
0
0.1
0.2
0.3
0.4
0.5
i2 vs time
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
Vc vs time
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.01
0.005
i2
0
-0.005
-0.01
0
10
Vc
5
0
-5
0
31/36
ECE743
32/36
ECE743
33/36
ECE743
34/36
ECE743
ECE743
i1
10
0
0
0.1
0.2
0.3
0.4
0.5
i2 vs time
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
Vc vs time
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.01
0.005
i2
0
-0.005
-0.01
0
Vc
10
0
0
36/36
ECE743