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

Lab 1

The document contains MATLAB code for two different transfer functions, H(s), with specific coefficients and structures. It includes commands for generating Bode plots and calculating gain and phase margins for each transfer function. The output section indicates the results of the computations performed by the provided MATLAB code.

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)
12 views2 pages

Lab 1

The document contains MATLAB code for two different transfer functions, H(s), with specific coefficients and structures. It includes commands for generating Bode plots and calculating gain and phase margins for each transfer function. The output section indicates the results of the computations performed by the provided MATLAB code.

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 1

Name : Abedullah Ahmed Saeed Abd-Elhameed Karam


Code : 20210135

𝐻(𝑠) = 100 𝑆3 +12𝑆2𝑆+21𝑆+10

Code:

1 clc,clear; Matlab
2 s= tf('s');
3 q1 = (-100*s) / (s^3 + 12*s^2 + 21*s + 10);
4 bode(q1)
5 margin (q1)
6
7 grid on

output:

-1-
300𝑆(𝑆+5)
𝐻(𝑠) = (𝑆+1)(𝑆+30)

Code:

1 clc,clear; Matlab
2 n1 = [300 300*5 0];
3 d1 = conv([1 1], [1 30]);
4 q1 = tf(n1,d1);
5 bode(q1)
6 margin(q1)
7 grid on

output:

-2-

You might also like