0% found this document useful (0 votes)
10 views2 pages

Lab 2

The document outlines a lab exercise for designing a compensator to achieve specific performance criteria, including a static velocity error constant of 4 sec−1, a phase margin of 50, and a gain margin of at least 10dB. It includes MATLAB code for plotting the unit-step and unit-ramp response curves, as well as a Nyquist plot to verify system stability using the Nyquist stability criterion. The code provided initializes the system and generates the necessary plots for analysis.

Uploaded by

Mohamad Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Lab 2

The document outlines a lab exercise for designing a compensator to achieve specific performance criteria, including a static velocity error constant of 4 sec−1, a phase margin of 50, and a gain margin of at least 10dB. It includes MATLAB code for plotting the unit-step and unit-ramp response curves, as well as a Nyquist plot to verify system stability using the Nyquist stability criterion. The code provided initializes the system and generates the necessary plots for analysis.

Uploaded by

Mohamad Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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-

You might also like