LabInstr EE370L Lab2
LabInstr EE370L Lab2
1. OBJECTIVE
In this laboratory exercise, you will practice block diagram reduction and simulating response
for various inputs for a transfer function using MATLAB.
3. BACKGROUND
k = 5;
num = [k];
den = [1, 1, k-2];
sys = tf(num, den);
z = zero(sys)
p = pole(sys)
r = roots(den)
figure(1), step(sys)
figure(2), impulse(sys)
System Response:
Example 2. Check the system responses when [a,b] = [0,1], [1,0], [0,0].
a=1; b=1;
num=[1,a];
den=[1,2*a,a^2+b^2];
sys=tf(num,den);
z=zero(sys)
p=pole(sys)
r=roots(den)
figure(1), step(sys)
figure(2),impulse(sys)
System Response:
4. LAB DELIVERIES
PRELAB:
2. Learn, exercise and understand the MATLAB code examples for the two system in Figure 2.1
and Figure 2.2.
3. Derive the transfer functions for the System 3 and System 4 as follows, respectively.
+ + Y(s)
+ s+4 + +
– –
0.5s
Figure 3. System 3
Figure 4. System 4
LAB EXPERIMENTS:
• Use both MATLAB coding to plot the responses with derived transfer function
• Use Simulink block diagram to run the simulations
• Compare the results
2. Use MATLAB to plot step and impulse response of System 4 with derived transfer function:
1) if [a, b, c, d] = [0, 1, 1, 1];
2) if [a, b, c, d] = [1, 1, 0, 0].
3) if [a, b, c, d] = [1, 1, 1, 1].
4) Compare and explain why these results of the 3 sets of variables are different?
5) Repeat Step 1) ~ 3) with Simulink block diagram, and compare the results.
POSTLAB REPORT:
I appreciate the help from faculty members and TAs during the composing of this instruction
manual. I would also thank students who provide valuable feedback so that we can offer better
higher education to the students.