0% found this document useful (0 votes)
19 views

Control System Lab Mannual-1

The document describes experiments simulating poles and zeros of a transfer function and implementing time and frequency responses of a second-order underdamped system. It includes MATLAB code for defining transfer functions, plotting step responses for varying damping ratios, and analyzing frequency response characteristics. Key parameters such as damping ratio and natural frequency are defined, and results are visualized through various plots.

Uploaded by

kvdeepakrao126
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Control System Lab Mannual-1

The document describes experiments simulating poles and zeros of a transfer function and implementing time and frequency responses of a second-order underdamped system. It includes MATLAB code for defining transfer functions, plotting step responses for varying damping ratios, and analyzing frequency response characteristics. Key parameters such as damping ratio and natural frequency are defined, and results are visualized through various plots.

Uploaded by

kvdeepakrao126
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

EXPERIMENT NO 3: SIMULATION OF POLES AND ZEROS OF A TRANSFER

FUNCTION.
% Define the transfer function numerator and denominator coefficients
numerator = [1 1 3]; % coefficients of numerator
denominator = [1 2 1]; % coefficients of denominator
% Create a transfer function object
tf_sys = tf(n, d);
% Plot the poles and zeros of the transfer function figure;
pzmap(tf_sys);
title('Poles and Zeros of the Transfer Function');

n = [1 1 3] represents the polynomial. s2 + s+3

d = [1 2 1] represents the polynomial s2 +2 s +1.


EXPERIMENT NO 4: IMPLEMENT TIME RESPONSE SPECIFICATION OF A
SECOND ORDER UNDER DAMPED SYSTEM FOR DIFFERENT DAMPING
FACTORS.

In the above transfer function, the power of 's' is two in the denominator. That is
why the above transfer function is of a second order, and the system is said to
be the second order system

CODE:
e1=0.2;
wn=5;
n1=[wn^2];
d1=[1 2*e1*wn wn^2];
c1=tf(n1,d1);
t=0:0.01:5;
subplot(2,2,1);
step(c1,t);
grid;
e2=0.5;
wn=5;
n2=[wn^2];
d2=[1 2*e2*wn wn^2];
c2=tf(n2,d2);
t=0:0.01:5;
subplot(2,2,2);
step(c2,t);
grid;
e3=0.7;
wn=5;
n3=[wn^2];
d3=[1 2*e3*wn wn^2];
c3=tf(n3,d3);
t=0:0.01:5;
subplot(2,2,3);
step(c3,t);
grid;
e4=0.9;
wn=5;
n4=[wn^2];
d4=[1 2*e3*wn wn^2];
c4=tf(n4,d4);
t=0:0.01:5;
subplot(2,2,4);
step(c4,t);
grid;
figure(2)
step(c1,c2,c3,c4,'r--');
title('comparision of all the under damped responses');
legend({'e1=0.2','e2=0.5','e3=0.7','e4=0.9'});
legend('boxoff');
grid;
Explanation :
1. e1 = 0.2;
o Defines the damping ratio (ζζ) for the first system as 0.20.2.

2. wn = 5;
o Defines the natural frequency (ωnωn) as 5 rad/s5rad/s.

3. n1 = [wn^2];
o Defines the numerator of the transfer function as ωn2=25ωn2=25.
4. d1 = [1 2*e1*wn wn^2];
o Defines the denominator of the transfer function
as [1,2ζωn,ωn2]=[1,2,25][1,2ζωn,ωn2]=[1,2,25].
5. c1 = tf(n1, d1);
o Creates a transfer function object c1 using the numerator (n1) and
denominator (d1).
6. t = 0:0.01:5;
o Defines a time vector t from 00 to 55 seconds with a step size
of 0.010.01.
7. subplot(2, 2, 1);
o Creates a 2x2 grid of subplots and selects the first subplot for
plotting.
8. step(c1, t);
o Computes and plots the step response of the system c1 over the
time vector t.
9. grid;
o Adds a grid to the plot for better visualization.
EXPERIMENT NO 5: IMPLEMENT FREQUENCY RESPONSE OF A SECOND ORDER
SYSTEM.
zeta = 0.1; % damping ratio
omega_n = 10; % natural frequency
omega = logspace(-1, 2, 100);
H = (omega_n^2) ./ (omega.^2 - 2*zeta*omega_n*1i*omega +omega_n^2);
magnitude = abs(H);
phase = angle(H);
subplot(2,1,1);
loglog(omega, magnitude);
xlabel('Frequency (rad/s)');
ylabel('Magnitude');
title('Frequency Response - Magnitude');
grid on;
subplot(2,1,2);
semilogx(omega, rad2deg(phase));
xlabel('Frequency (rad/s)');
ylabel('Phase (degrees)');
title('Frequency Response - Phase');
grid on;

Zeta: Damping ratio. A value of 0.1 indicates an underdamped system (since


ζ<1\zeta < 1ζ<1).
omega_n: Natural frequency, set to 10 rad/s.
logspace(-1, 2, 100) generates 100 logarithmically spaced points from
10^{-1} = 0.1 to 10^2 = 100
This is useful for frequency response analysis over a wide range of frequencies.
abs(H) compute the magnitude (amplitude) of the frequency response.
angle(H) computes the phase in radians.
Subplot (2,1,1) divides the figure into 2 rows and 1 column and selects the first
plot.
loglog () plots both the x-axis and y-axis on a logarithmic scale for magnitude
response.
Grid on adds grid lines for better visualization.
subplot(2,1,2) selects the second plot for phase response.
Semi log () uses a logarithmic scale for the x-axis (frequency) and a linear scale
for the y-axis (phase).
rad2deg() converts phase from radians to degrees for easier interpretation.

You might also like