LAB 2
Name : Abedullah Ahmed Saeed Abd-Elhameed Karam
Code : 20210135
Example-7.8.2
consider the system showin in figure, Desing a compensator such that the static velocity error constant is 4
sec− 1, phase margin is 50, and gain margin is 10dB or more. Plot unit-step and unit-ramp response curves of
the compensated system with MATLAB. Also, draw a Nyquist plot of the compensated system with
MATLAB. using the Nyquist stability criterion,verify that the system is stable.
Code:
1 clc,clear; Matlab
2 s = tf('s');
3 a = 0.1526;
4 l1 = 40* (s + 0.1)/s/(s^2+1);
5 Gc1=(a*s+1);
6 Go= Gc1*l1;
7 subplot(211)
8 bode(l1)
9 margin(l1)
10 grid on
11 subplot(212)
12 bode(Go)
13 margin(Go)
14 grid on
-1-
output:
-2-