CT Shail PDF
CT Shail PDF
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [1]
AIM: - To Study Programs related to transfer function,
partial fraction expansion and roots
Problem – 1:
Create a transfer function object for the fourth order differential equation
is as mentioned below. Then display the object properties and extract the
numerator and denominator polynomials from the transfer function object
and display them as row vectors. Draw a pole zero plot.
G(s) = Y(s)
X(s)
Differential : d2y + 5dy + 4y = d4x + 12dx3 + 69dx2 + 198dx + 201x
Equation dt2 dt dt4 dt3 dt2 dt
Program :
Output :
Transfer function:
s^2 + 5 s + 4
-----------------------------------
s^4 + 12 s^3 + 69 s^2 + 198 s + 201
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [2]
Name: ' '
Notes: {}
UserData: []
num =
0 0 1 5 4
den =
1 12 69 198 201
Pole-Zero Map
4
1
Imaginary Axis
-1
-2
-3
-4
-4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0
Real Axis
Problem - 2 :
For the system given in problem-1 obtain the model of G(s) as ZPK
object then extract its zeros poles gain and show that they are same as
obtained in if object.
Program :
num=[1 5 4];
den=[1 12 69 198 201];
sys = tf(num,den)
H=zpk(sys) % Create (or convert to) zero-pole-gain format
[z p k]=zpkdata(sys,'v') % Quick access to zero-pole-gain data & returns
the
[z p k]=zpkdata(H,'v') zeros, poles & gain for the LTI model sys
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [3]
Output :
Transfer function:
s^2 + 5 s + 4
-----------------------------------
s^4 + 12 s^3 + 69 s^2 + 198 s + 201
Zero/pole/gain:
(s+4) (s+1)
------------------------------------
(s+3.97) (s+2.03) (s^2 + 6s + 24.94)
z=
-4
-1
p=
-3.0000 + 3.9926i
-3.0000 - 3.9926i
-3.9700
-2.0300
k=
1
z=
-4
-1
p=
-3.0000 + 3.9926i
-3.0000 - 3.9926i
-3.9700
-2.0300
k=
1
Problem – 3:
Program :
num=[1 5 4];
den=[1 12 69 198 201];
sys = tf(num,den)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [4]
[r,p,k]=residue(num,den) % Partial-fraction expansion. Finds the residues,
poles and direct term of a partial fraction
expansion
r=roots(num) % Computes the roots of the polynomial
Output :
Transfer function:
s^2 + 5 s + 4
-----------------------------------
s^4 + 12 s^3 + 69 s^2 + 198 s + 201
r=
0.0296 - 0.1331i
0.0296 + 0.1331i
0.0027
-0.0620
p=
-3.0000 + 3.9926i
-3.0000 - 3.9926i
-3.9700
-2.0300
k=
[]
r=
-4
-1
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [5]
PRACTICAL - 2
AIM: - To Study Programs for
transient response analysis.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [6]
AIM: - To Study Programs for transient response
analysis.
Problem – 1:
Create the transfer function in matlab and determine its poles and zeros,
perform partial fraction expansion of G(s) & plot the impulse response of
the system.
Program :
num=[3 24 53 33]
den=[1 8 17 10]
sys=tf(num,den)
SYS=zpk(sys)
[z p k]=zpkdata(sys,'v')
[r p k]=residue(num,den)
impulse(sys) % plots the impulse response of the LTI model
Output :
num =
3 24 55 44
den =
1 8 17 10
Transfer function:
3 s^3 + 24 s^2 + 55 s + 44
--------------------------
s^3 + 8 s^2 + 17 s + 10
Zero/pole/gain:
3 (s+4.836) (s^2 + 3.164s + 3.033)
----------------------------------
(s+5) (s+2) (s+1)
z=
-4.8363
-1.5819 + 0.7282i
-1.5819 - 0.7282i
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [7]
p=
-5.0000
-2.0000
-1.0000
k=
3
r=
-0.5000
-2.0000
2.5000
p=
-5.0000
-2.0000
-1.0000
k=
3
Impulse Response
0.8
0.7
0.6
0.5
Amplitude
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7 8
Time (sec)
Problem – 2 :
The T.F. of a system is
G(s) = 2s + 5 .
s (s + 8s2 - s +8)
3
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [8]
Plot the step response of the system and determine the system dc gain.
U( t ) = 0 ;t<0
2 ; t ≥ 0 and t < 2
0.5 ; t ≥ 2
Program :
num=[2 5];
den=conv([1 0], [1 8 -1 8]); % Convolution and polynomial multiplication.
sys=tf(num, den)
t=[0:.01:10];
'Response Vector Y for t vector'
y=step(sys,t)
dc_gain=dcgain(sys) % DC gain of LTI models.
pause % Wait for user response to strike any key before
plot(t,y) continuing.
grid % Grid lines. Sets the x,y & z grid properties of
the current axes.
axis([0 10 0 5]) % axis([xmin xmax ymin ymax]) sets scaling for the x-
and y-axes.
Output :
num =
2 5
den =
1 11 41 61 30 0
Transfer function:
2s+5
-------------------------------------
s^5 + 11 s^4 + 41 s^3 + 61 s^2 + 30 s
dc_gain =
Inf
z1 =
-2.5000
wn =
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [9]
0
1.0000
2.0000
3.0000
5.0000
d=
-1
1
1
1
1
u=
1
system with dc gian of Inf
5
4.5
3.5
2.5
1.5
1 Zeta = 1
0.5
0
0 1 2 3 4 5 6 7 8 9 10
Problem – 3:
Find the zero state response of the system given to the input.
G(s) = 3s + 2 .
2s +6s + 9s2 + 6s +1
4 3
Program :
num=[3 2]
den=[1 2 2 3 5]
g=tf(num,den)
t=[0:0.1:4]; % Defines the range for vector t.
u(1:20,1)=2*ones(20,1) % ones(m, n) or ones([m, n]) is an MXN matrix of ones.
u(21:41,1)=0.5*ones(21,1)
y=lsim(g,u,t)
plot(t,y,t,u) % PLOT(X,Y) plots vector Y versus vector X.
text(1.15,1,' \leftarrow y(t)','FontSize',18)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [10]
text(1.9,1.6,' \leftarrow u(t) ','FontSize',18)
xlabel('TIME -->') % X-axis label.
ylabel('AMPLITUDE -->') % Y-axis label.
title('ZERO STATE RESPONCE') % Adds graph title.
Output :
num = 3 2
den = 1 2 2 3 5
Transfer function:
3s+2
-----------------------------
s^4 + 2 s^3 + 2 s^2 + 3 s + 5
u=
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
2 2
u=
2.0000 2.0000 2.0000 2.0000 2.0000 2.0000 2.0000 2.0000
2.0000 2.0000 2.0000 2.0000 2.0000 2.0000 2.0000 2.0000
2.0000 2.0000 2.0000 2.0000 0.5000 0.5000 0.5000 0.5000
0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000
0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000
0.5000
y=
0 0.0010 0.0075 0.0244 0.0558 0.1050 0.1748 0.2671 0.3831
0.5235 0.6880 0.8759 1.0855 1.3146 1.5604 1.8191 2.0868
2.3585 2.6290 2.8925 3.1429 3.3730 3.5728 3.7319 3.8406
3.8898 3.8715 3.7785 3.6046 3.3453 2.9973 2.5590 2.0304
1.4135 0.7123 -0.0671 -0.9167 -1.8261 -2.7830 -3.7729 -
4.7792
2
u(t)
1 y(t)
AMPLITUDE -->
-1
-2
-3
-4
-5
0 0.5 1 1.5 2 2.5 3 3.5 4
TIME -->
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [11]
PRACTICAL - 3
AIM: - To Study programs for series,
parallel and feedback system.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [12]
AIM :- To Study programs for series, parallel and
feedback system.
Problem – 1:
Create the series connection denoted by transfer function T(S) of the two
systems whose transfer functions are G1(s) and G2(s).
G1(s) = 2s + 9 . G2(s) = 5s .
s+3 (s - 1)
Give both TF and ZPK forms of the series connection and plot
the unit step response of G1, G2 and T (separately & also
combined).
Program :
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [13]
text(4,1000,' \leftarrow T','FontSize',15)
xlabel('TIME -->')
ylabel('AMPLITUDE -->')
title('step response OF T')
subplot(4,1,4);
step(G1,G2,T,t) % STEP(SYS1,SYS2,..,T) plots the step response of multiple LTI
models SYS1,SYS2,.. on a single plot. The time vector T is optional.
Output :
Transfer function:
2s+9
-------
s+3
Transfer function:
5s
-----
s-1
Transfer function:
10 s^2 + 45 s
-------------
s^2 + 2 s - 3
Zero/pole/gain:
10 s (s+4.5)
------------
(s+3) (s-1)
z=
0
-4.5000
p=
-3.0000
1.0000
k=
10
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [14]
AMPLITUDE -->
step response OF G1
3
2.5
G1
2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time (sec)OF G2
AMPLITUDE -->
step response
1000
500 G2
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
response
4000
2000
0
T
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time (sec)
AMPLITUDE -->
2000
T
G2
0 G1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time (sec)
Problem – 2 :
1 ; H2(s) = H1(s) =
1 .
s-2 (s + 7)
Determine the zeros poles and gain of T(s) and compare them with the
corresponding parameters of H1(s) and H2(s) step response.
Program :
h1=tf([1],[1 -2])
h2=tf([1],[1 7])
h= parallel(h1,h2) % connects the two LTI models in parallel
x=zpk(h)
[z,p,k]=zpkdata(x,'v')
k=tfdata(h);
t=0:0.1:5;
subplot(3,1,1);
step(h1,t)
xlabel('TIME -->')
ylabel('AMPLITUDE -->')
title('step response OF h1')
subplot(3,1,2);
step(h2,t)
xlabel('TIME -->')
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [15]
ylabel('AMPLITUDE -->')
title('step response OF h2')
subplot(3,1,3);
step(h,t)
xlabel('TIME -->')
ylabel('AMPLITUDE -->')
title('step response OF h')
Output :
Transfer function:
1
-----
s-2
Transfer function:
1
-----
s+7
Transfer function:
2s+5
--------------
s^2 + 5 s - 14
Zero/pole/gain:
2 (s+2.5)
-----------
(s+7) (s-2)
z=
-2.5000
p=
-7
2
k=
2
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [16]
4 step response OF h1
x 10
AMPLITUDE -->
2
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
TIME --> (sec)
step response OF h2
AMPLITUDE -->
0.2
0.1
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
TIME --> (sec)
4
x 10 step response OF h
AMPLITUDE -->
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
TIME --> (sec)
Problem – 3 :
Obtain the response of the negative feedback system shown in fig and
find its step response.
R(s)
G1 C(s)
+
-
H1
Program :
G1=tf([1 1],[1])
H1=tf([1 0],[1])
sys=feedback(G1,H1) % Computes an LTI model for the closed-loop feedback
system. Negative feedback is assumed.
t=0:0.1:10;
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [17]
step(sys,t)
title('Step Response of System')
Output :
Transfer function:
s+1
Transfer function:
s
Transfer function:
s+1
-----------
s^2 + s + 1
1.2
0.8
Amplitude
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
Time (sec)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [18]
Problem – 4 :
G2
R(s) C(s)
G1 G3
H1
Obtain the step response of the overall system.
Program :
display('G1(s) :'); %Display text. DISPLAY(X) is called for the object X when the
semicolon is not used to terminate a statement & to display array.
G1=tf([1 2],[1])
display('H1(s) :');
H1=tf([1 0],[1])
display('G2(s) :');
G2=tf([1],[1])
display('G3(s) :');
G3=tf([1],[1 2])
G4=feedback(G1,H1);
G5=parallel(G2,G3);
display('Total Transfer Function T(s) :');
T=series(G4,G5)
t=0:0.01:10;
step(T,t)
xlabel('TIME -->')
ylabel('AMPLITUDE -->')
title('step response of system')
Output :
G1(s) :
Transfer function:
s+2
H1(s) :
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [19]
Transfer function:
s
G2(s) :
Transfer function:
1
G3(s) :
Transfer function:
1
-----
s+2
Total Transfer Function T(s) :
Transfer function:
s^2 + 5 s + 6
---------------------
s^3 + 4 s^2 + 5 s + 2
2.5
2
AMPLITUDE -->
1.5
0.5
0
0 1 2 3 4 5 6 7 8 9 10
TIME --> (sec)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [20]
PRACTICAL - 4
AIM: - To Study programs to find the time
response specifications.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [21]
AIM: - To Study programs to find the time response
specifications.
Problem – 1:
0.5s+2
Find time specifications & plot step & impulse response.
Program :
clc; % Clears the command window.
clear all; % Removes all variables, globals,
functions and MEX links from memory.
num= input('Enter Numerator Part : '); % R = INPUT('How many apples') gives
the user the prompt in the text string and
den = input('Enter Denominator Part :'); then waits for input from the keyboard.
sys=tf(num,den)
zpk(sys,'v')
[Wn,Z]=damp(sys); % Returns vectors containing natural frequency
& damping of linear system dynamics.
fi=atan(sqrt(1-(Z(1)^2))/Z(1));
Wd=Wn(1).*(sqrt(1-(Z(1)^2))); % Sqrt finds square root.
tr=((pi-fi)./(Wd)) % PI represents the magnitude of
ts=4./(Z(1).*Wn(1))
td=(1+((0.7).*Z(1)))./Wn(1)
subplot(2,1,1)
step(sys)
subplot(2,1,2)
impulse(sys)
Output :
Transfer function:
1
---------
0.5 s + 1
Zero/pole/gain:
2
-----
(s+2)
tr =
Inf
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [22]
ts =
2
td =
0.8500
Step Response
1
System: sys
Time (sec): 2
Amplitude
Amplitude: 0.982
0.5
0
0 0.5 1 1.5 2 2.5 3
Time (sec)
Impulse Response
2
1.5
Amplitude
0.5
0
0 0.5 1 1.5 2 2.5 3
Time (sec)
Problem – 2 :
Consider the second order system whose transfer functions are defined by
SYS(s) = 1 G(s) = . 1 H(s) = . 1 .
2 2 2
s +2s+1 s +4s+1 s +0.5s+1
Find time specifications & plot step & impulse response for all three
transfer functions. Compare time specification values and verify the
conclusion from the graph.
Program :
disp('Critically damped system : ');
sys=tf([1],[1 2 1])
zpk(sys,'v')
[Wn,Z]=damp(sys);
fi=atan(sqrt(1-(Z(1)^2))/Z(1));
Wd=Wn(1).*(sqrt(1-(Z(1)^2)));
tr=((pi-fi)./(Wd))
ts=4./(Z(1).*Wn(1))
td=(1+((0.7).*Z(1)))./Wn(1)
tp=pi./Wd
mp=exp(-(Z(1).*pi.*Wn(1))./Wd)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [23]
disp('Overdamped system : ');
G=tf([1],[1 4 1])
zpk(G,'v')
[Wn,Z]=damp(G);
fi=atan(sqrt(1-(Z(1)^2))/Z(1));
Wd=Wn(1).*(sqrt(1-(Z(1)^2)));
tr=((pi-fi)./(Wd))
ts=4./(Z(1).*Wn(1))
td=(1+((0.7).*Z(1)))./Wn(1)
tp=pi./Wd
mp=exp(-(Z(1).*pi.*Wn(1))./Wd)
disp('Underdamped system : ');
H=tf([1],[1 0.5 1])
zpk(H,'v')
[Wn,Z]=damp(H);
fi=atan(sqrt(1-(Z(1)^2))/Z(1));
Wd=Wn(1).*(sqrt(1-(Z(1)^2)));
tr=((pi-fi)./(Wd))
ts=4./(Z(1).*Wn(1))
td=(1+((0.7).*Z(1)))./Wn(1)
tp=pi./Wd
mp=exp(-(Z(1).*pi.*Wn(1))./Wd)
step(sys,G,H)
impulse(sys,G,H)
Output :
Critically damped system :
Transfer function:
1
-------------
s^2 + 2 s + 1
Zero/pole/gain:
1
-------
(s+1)^2
tr = Inf
ts = 4
td = 1.7000
tp = Inf
mp =0
Overdamped system :
Transfer function:
1
-------------
s^2 + 4 s + 1
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [24]
Zero/pole/gain:
1
--------------------
(s+3.732) (s+0.2679)
tr = Inf
ts = 14.9282
td = 6.3445
tp = Inf
mp = 0
Underdamped system :
Transfer function:
1
---------------
s^2 + 0.5 s + 1
Zero/pole/gain:
1
----------------
(s^2 + 0.5s + 1)
tr = 1.8833
ts = 16.0000
td = 1.1750
tp = 3.2446
mp = 0.4443
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [25]
Conclusion :
Rise time (tr) is very high (∞) for overdamped & critically damped
systems and is small (few ones) for underdamped & undamped systems.
Settling time (ts) is very high (∞) for undamped system and small (few
ones) for underdamped, overdamped & critically damped systems.
Practically, for any system rise time & settling time should be small.
Underdamped system satisfies this criteria. This can be verified from
above graphs.
Problem – 3 :
Consider the undamped system whose transfer functions is given by
H(s) = 1 .
2
s +1
Determine the time specifications and plot step & impulse response.
Program :
disp('Undamped system : ');
sys=tf([1],[1 0 1])
zpk(sys,'v')
t=0:0.01:15;
u=ones(size(t)); % Ones array. It is the matrix of same size as t and all ones.
[y t]=lsim(sys,u,t); % Plots the time response of the LTI model SYS to the input
signal described by U and T. U is a matrix with as many columns
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [26]
as inputs & whose i-th row specifies the input value at time T(i).
Y = LSIM(SYS,U,T) returns the output history Y. No plot is
drawn on the screen.
lsimplot(sys,u,t) % Simulate time response of LTI models to arbitrary inputs.
grid on; % Adds major grid lines to the current axes.
stepinfo(y,t) % S = STEPINFO(Y,T,YFINAL) takes step response data (T,Y)
& a steady-state value YFINAL and returns a structure S
containing the step response characteristics. - rise time,
settling time, SettlingMin, SettlingMax, % overshoot, %
undershoot, peak absolute value & peak time.
u=zeros(size(t)); % Zeros array. It is the matrix of same size as t and all zeros.
u(1)=1; % First element of input vector. Here, impulse signal is defined.
[y t]=lsim(sys,u,t);
lsiminfo(y,t) % Computes linear response characteristics such as settling time,
minimum & maximum values of Y & corresponding time.
lsimplot(sys,u,t)
u=sin(t); % Defines input vector as a sine function of time vector.
lsimplot(sys,u,t)
Output :
Undamped system :
Transfer function:
1
-------
s^2 + 1
Zero/pole/gain:
1
---------
(s^2 + 1)
ans =
RiseTime: 1.5918
SettlingTime: 14.9475
SettlingMin: 5.0731e-006
SettlingMax: 2.0000
Overshoot: 13.6564
Undershoot: 0
Peak: 2.0000
PeakTime: 3.1400
ans =
SettlingTime: 14.9554
Min: -0.0100
MinTime: 11
Max: 0.0100
MaxTime: 7.8600
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [27]
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [28]
Problem – 4 :
Consider the unity feedback system whose transfer functions is given by
G(s) = 20 .
s(1+4s)(1+s)
Find Kv for the type one feedback system shown in problem & simulate
the unit ramp response of the closed loop system. Calculate E ss using
formula & verify with the result obtained in Matlab.
Program :
clc;
clear all;
num=input('Enter Numerator Part : ');
den=input('Enter Denominator Part : ');
G=tf(num,den)
nums=conv([1 0],num);
sG=tf(nums,den)
sG=minreal(sG)
zpk(sG)
Kv=dcgain(sG)
ess=1./Kv
t=0:20:30000;
Y=step(G,t);
u=t;
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [29]
plot(t,Y,t,u)
grid on;
Output :
Transfer function:
1
-----------
s^2 + 1.1 s
Transfer function:
s
-----------
s^2 + 1.1 s
Transfer function:
1
-------
s + 1.1
Zero/pole/gain:
1
-------
(s+1.1)
Kv = 0.9091
ess = 1.1000
4
x 10
3
2.5
1.5
0.5
0
0 0.5 1 1.5 2 2.5 3
4
x 10
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [30]
PRACTICAL - 5
AIM: - To Study programs to find the
poles and stability of the system.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [31]
AIM: - To Study programs to find the poles and stability
of the system.
Find the poles of following transfer function G(s) and determine whether
the system is stable. Plot poles and zeros of G(s) in S- plane. Finally
demonstrate the system stability and simulating impulse response and
step response. Comment on the system stability.
Problem - 1 :
G(s) __ s2 - s - 2____
s3 + 7s2 + 20s + 24
Program :
clc;
clear all;
num=input('Enter the numerator : ');
den=input('Enter the denominator : ');
sys=tf(num,den)
x=zpk(sys)
subplot(3,1,1)
pzmap(sys)
t=0:0.001:2.5;
[z p k]=zpkdata(sys,'v')
subplot(3,1,2)
impulse(sys,t)
subplot(3,1,3)
step(sys,t)
cnt=0;
for i=1:length(p) % Counter setup by loop to check stability
if p(i)>0 by loop variable i for number of poles times.
cnt=cnt+1;
end
end
if(cnt==0)
disp('system is stable');
else
disp('system is unstable');
end
Output :
Enter the numerator : [1 -1 -2]
Enter the denominator : [1 7 20 24]
Transfer function:
s^2 - s - 2
-----------------------
s^3 + 7 s^2 + 20 s + 24
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [32]
Zero/pole/gain:
(s-2) (s+1)
--------------------
(s+3) (s^2 + 4s + 8)
z=
2
-1
p=
-3.0000
-2.0000 + 2.0000i
-2.0000 - 2.0000i
k=
1
system is stable
Pole-Zero Map
5
Imaginary Axis
-5
-3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Real Axis
Impulse Response
1
Amplitude
-1
0 0.5 1 1.5 2 2.5
Time (sec)
Step Response
0.2
Amplitude
-0.2
0 0.5 1 1.5 2 2.5
Time (sec)
Problem - 2 :
G(s) = s-1 .
5 4
3 2
s + S + 2s + 2s + 3s +5
Program :
clc;
clear all;
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [33]
close all;
num=input('Enter the numerator : ');
den=input('Enter the denominator : ');
sys=tf(num,den)
x=zpk(sys)
subplot(3,1,1)
pzmap(sys)
t=0:0.01:10;
[z p k]=zpkdata(sys,'v')
subplot(3,1,2)
impulse(sys,t)
subplot(3,1,3)
step(sys,t)
cnt=0;
for i=1:length(p)
if p(i)>0
cnt=cnt+1;
end
end
if(cnt==0)
disp('system is stable');
else
disp('system is unstable');
end
Output :
Transfer function:
s-1
------------------------------------------
s^5 + s^4 + 2 s^3 + 2 s^2 + 3 s + 5
Zero/pole/gain:
(s-1)
-------------------------------------------------------
(s+1.238) (s^2 - 1.441s + 1.878) (s^2 + 1.204s + 2.151)
z=
1
p=
0.7207 + 1.1656i
0.7207 - 1.1656i
-0.6018 + 1.3375i
-0.6018 - 1.3375i
-1.2378
k=
1
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [34]
system is unstable
Pole-Zero Map
2
Imaginary Axis
0
-2
-1.5 -1 -0.5 0 0.5 1
Real Axis
Impulse Response
200
Amplitude
-200
0 1 2 3 4 5 6 7 8 9 10
Time (sec)
Step Response
200
Amplitude
-200
0 1 2 3 4 5 6 7 8 9 10
Time (sec)
Problem - 3 :
G(s) = 1 .
5 4 3 2
s + 6s + 15s + 30s +44s + 24
Program :
clc;
clear all;
close all;
num=input('Enter the numerator : ');
den=input('Enter the denominator : ');
sys=tf(num,den)
x=zpk(sys)
subplot(3,1,1)
pzmap(sys)
t=0:0.01:20;
[z p k]=zpkdata(sys,'v')
subplot(3,1,2)
impulse(sys,t)
subplot(3,1,3)
step(sys,t)
cnt=0;
ms=0;
for i=1:length(p)
if (abs(real(p(i))/0.000001)) < 1 % Check whether absolute value of real
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [35]
part of pole is approximately zero (for M.S. system)
ms = ms +1;
else if p(i)>0
cnt=cnt+1;
end
end
end
if(cnt == 0)
if(ms == 0)
disp('system is stable');
else
disp('system is marginally stable');
end
else
disp('system is unstable');
end
Output :
Transfer function:
1
-----------------------------------------
s^5 + 6 s^4 + 15 s^3 + 30 s^2 + 44 s + 24
Zero/pole/gain:
1
---------------------------
(s+2) (s+3) (s+1) (s^2 + 4)
z=
Empty matrix: 0-by-1
p=
-0.0000 + 2.0000i
-0.0000 - 2.0000i
-3.0000
-2.0000
-1.0000
k=
1
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [36]
Pole-Zero Map
2
Imaginary Axis
0
-2
-3.5 -3 -2.5 -2 -1.5 -1 -0.5 0
Real Axis
Impulse Response
0.05
Amplitude
-0.05
0 2 4 6 8 10 12 14 16 18 20
Time (sec)
Step Response
0.1
Amplitude
0.05
0
0 2 4 6 8 10 12 14 16 18 20
Time (sec)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [37]
PRACTICAL - 6
AIM: - To Study programs related to
Bode plot
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [38]
AIM: - To Study programs related to Bode plot.
Problem – 1 :
Program :
Transfer function: 2
Transfer function: -5
mg1(:,:,1) = 2
pg1(:,:,1) = 0
Bode Diagram
14
12
Magnitude (dB)
10
6
180
135
Phase (deg)
90
45
0
0 1
10 10
Frequency (rad/sec)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [39]
Problem – 2 :
Program :
G=tf([1 0 0 ],[1])
bode(G)
Output :
Transfer function:
s^2
Bode Diagram
40
30
Magnitude (dB)
20
10
-10
181
180.5
Phase (deg)
180
179.5
179
0 1
10 10
Frequency (rad/sec)
Problem – 3 :
Program :
G=tf([1],[1 0 0 0])
bode(G)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [40]
Output :
Transfer function:
1
---
s^3
Bode Diagram
20
0
Magnitude (dB)
-20
-40
-60
-269
-269.5
Phase (deg)
-270
-270.5
-271
0 1
10 10
Frequency (rad/sec)
Problem – 4 :
Program :
G=tf([1 4],[1])
bode(G)
Output :
Transfer function:
s+4
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [41]
Bode Diagram
40
35
Magnitude (dB)
30
25
20
15
10
90
Phase (deg)
45
0
-1 0 1 2
10 10 10 10
Frequency (rad/sec)
Problem – 5 :
Program :
G=tf([1],[1 -5])
bode(G)
Output :
Bode Diagram
-10
-15
Magnitude (dB)
-20
-25
-30
-35
-40
-90
Phase (deg)
-135
-180
-1 0 1 2
10 10 10 10
Frequency (rad/sec)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [42]
Transfer function:
1
-----
s-5
Problem – 6 :
Example of Bode plot for Second Order Poles which indicates the error of
+13.97 dB for the value of = 0.1 in the system transfer function.
Program :
Output :
Bode Diagram
20
10
Magnitude (dB)
-10
-20
-30
-40
0
-45
Phase (deg)
-90
-135
-180
-1 0 1
10 10 10
Frequency (rad/sec)
Transfer function:
1
---------------
s^2 + 0.2 s + 1
Problem – 7 :
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [43]
Program :
G=tf([1],[1 22 40 0])
bode(G)
[Gm1,Pm1,Wcg1,Wcp1]=margin(G) %Computes the gain margin Gm, the phase
margin Pm, and the associated frequencies Wcg and Wcp.
Gm is absolute one in dB.
Output :
Transfer function:
80
-------------------
s^3 + 22 s^2 + 40 s
Gm1 =
11.0000
Pm1 =
47.4040
Wcg1 =
6.3246
Wcp1 =
1.5688
Bode Diagram
50
0
Magnitude (dB)
-50
-100
-150
-90
-135
Phase (deg)
-180
-225
-270
-1 0 1 2 3
10 10 10 10 10
Frequency (rad/sec)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [44]
PRACTICAL - 7
AIM: - To Study programs related to
Root locus
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [45]
AIM: - To Study programs related to Root Locus.
Problem – 1 :
G(s) = k .
s(s + 4)
Test a point s = -2 + j2.5 for its existence on root locus. Also find the
corresponding value of K.
Program :
G=tf([1],[1 4 0])
T=zpk(G)
dc_gain = dcgain(T) % Computes the steady-state (D.C. or low frequency) gain of
the LTI model
rlocus(G) % Plots root locus of the system.
[k, clroot]=rlocfind(G) % Find root locus gains for given set of roots. Click on
plot & get values of k & corresponding close loop poles.
Output :
Transfer function:
1
---------
s^2 + 4 s
Zero/pole/gain:
1
-------
s (s+4)
dc_gain =
Inf
k=
10.2112
clroot =
-2.0000 + 2.4922i
-2.0000 - 2.4922i
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [46]
Root Locus
2.5
1.5
0.5
Imaginary Axis
-0.5
-1
-1.5
-2
-2.5
-4.5 -4 -3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5
Real Axis
Problem – 2 :
G(s) = k .
s (s+1) (s+2)
Program :
G=tf([1],[1 3 2 0])
T=zpk(G)
dc_gain = dcgain(T)
P = pzoptions; % Set the grid to on in options
P.Grid = 'on'; % Create plot with the options specified by P
h = rlocusplot(G,P); % Computes and plots the root locus of the single-input,
single-output LTI model system
p = getoptions(h); % Get options for plot
setoptions(h,p); % Apply options to plot
title (['System with dc gain ', num2str(dc_gain)]) % insert title
% T = NUM2STR(X) converts the matrix X into a string
representation T with about 4 digits and an exponent if required.
This is useful for labeling plots with the TITLE, XLABEL,
YLABEL, and TEXT commands.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [47]
[k, clroot]=rlocfind(G)
Output :
Transfer function:
1
-----------------
s^3 + 3 s^2 + 2 s
Zero/pole/gain:
1
-------------
s (s+2) (s+1)
dc_gain =
Inf
k=
0.3850
clroot =
-2.1547
-0.4226 + 0.0066i
-0.4226 - 0.0066i
3 0.92
2
0.98
1
Imaginary Axis
7 6 5 4 3 2 1
0
-1
0.98
-2
-3 0.92
-4
0.84
0.72 0.6 0.46 0.3 0.16
-5
-7 -6 -5 -4 -3 -2 -1 0 1 2
Real Axis
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [48]
By theatrical calculation, s1 = -0.423 & s2 = -1.577 are the break away points. Since,
the break away point must lie between 0 & -1 here, it is clear that s1 = -0.423
corresponds to actual break away point with K = 0.385
Problem – 3 :
G(s) = k .
2
s (s+4)(s +4s+20)
Program :
G=tf([1],[1 3 2 0])
T=zpk(G)
dc_gain = dcgain(T)
P = pzoptions;
P.Grid = 'on';
h = rlocusplot(G,P);
p = getoptions(h);
setoptions(h,p);
title (['System with dc gain ', num2str(dc_gain)])
[k, clroot]=rlocfind(G)
Output :
Transfer function:
1
---------------------------
s^4 + 8 s^3 + 36 s^2 + 80 s
Zero/pole/gain:
1
-----------------------
s (s+4) (s^2 + 4s + 20)
dc_gain =
Inf
k=
259.1211
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [49]
clroot =
-3.9961 + 3.1598i
-3.9961 - 3.1598i
-0.0039 + 3.1598i
-0.0039 - 3.1598i
0.985 2
0.985 2
-5 0.94 4
6
0.86 8
-10
10
0.76 12
0.64 0.5 0.34 0.16
-15 14
-15 -10 -5 0 5 10 15
Real Axis
Problem – 4 :
Sketch the root locus diagram of a unity feedback control system having
open-loop transfer function
G(s) = k (s+1) .
Program :
G=tf([1],[1 3 2 0])
T=zpk(G)
dc_gain = dcgain(T)
P = pzoptions;
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [50]
P.Grid = 'on';
h = rlocusplot(G,P);
p = getoptions(h);
setoptions(h,p);
title (['System with dc gain ', num2str(dc_gain)])
sgrid(0.7, 10)
text(-15, 10 ,'Zeta line')
[k, clroot]=rlocfind(G)
Output :
Transfer function:
s+1
---------------------------
s^4 + 3 s^3 + 12 s^2 - 16 s
Zero/pole/gain:
(s+1)
-----------------------
s (s-1) (s^2 + 4s + 16)
dc_gain =
Inf
k=
35.8793
clroot =
0.0066 + 2.5731i
0.0066 - 2.5731i
-1.5066 + 1.7745i
-1.5066 - 1.7745i
k=
23.1331
clroot =
-1.5052 + 2.7135i
-1.5052 - 2.7135i
0.0052 + 1.5500i
0.0052 - 1.5500i
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [51]
Thus, kmar = 23.13 at mar =1.55
2.5
2.5
-5 0.97
5
7.5
-10 0.9
10
12.5
-15 0.8
15
0.66 0.52 0.4 0.26 0.12 17.5
-20
-20 -15 -10 -5 200 5 10
Real Axis
k=
1.7636
clroot =
-1.9707 + 3.4225i
-1.9707 - 3.4225i
0.8000
0.1413
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [52]
PRACTICAL - 8
AIM: - To Study programs related to
Nyquist plot & Nicholas plot
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [53]
AIM: - To Study programs related to Bode plot, Root
locus, Nyquist plot and Nicholas plot.
Problem - 1 :
Example of Nyquist plot.
Program :
G=tf([1],[1 1 0])
f=1:0.1:1000 ;
H=freqresp(G,f); % H = FREQRESP(SYS,W) computes the frequency
response H of the LTI model SYS at the frequencies
specified by the vector W.
Output :
Transfer function:
1
-------
s^2 + s
Nyquist Diagram
0.8
0.6
0.4
0.2
Imaginary Axis
-0.2
-0.4
-0.6
-0.8
-1 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0
Real Axis
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [54]
Problem - 2 :
Example of Nicholas plot.
Program :
Output :
Transfer function:
1
-----
s+2
Nichols Chart
40
0 dB
30 0.25 dB
0.5 dB
20 1 dB -1 dB
Open-Loop Gain (dB)
10 3 dB
-3 dB
6 dB
0 -6 dB
-10 -12 dB
-20 -20 dB
-30
-40 dB
-40
-360 -315 -270 -225 -180 -135 -90 -45 0
Open-Loop Phase (deg)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [55]
PRACTICAL - 9
AIM: - To Study the transient response
of R-C & R-L-C Series Circuit
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [56]
AIM: - To design & implement the first & second order
control system by taking in the account R-C & R-L-C
series circuit and to find its transient response.
Problem - 1 :
Consider the first order control system as shown in the circuit diagram.
Find out its transient response by applying square wave as an input &
also determine the resonant frequency.
Circuit Diagram :
R1
10k
C1
OFFTIME = 62.8uS 1n
DSTM1
CLK ONTIME = 62.8uS
DELAY = 0
STARTVAL = 1
OPPVAL = 0
Resonance frequency :
fr = 1 = 15.92 kHz . .
2 RC
-0.02
-0.04
-0.06
-0.08
-0.1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec) -4
x 10
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [57]
Problem -2 :
Consider the second order system as shown in the circuit diagram. Find
out its transient response by applying square wave as an input & also
determine the resonance frequency.
Circuit Diagram :
R1 L1
1 2
10k 1mH
C1
OFFTIME = 3.14uS 1n
DSTM1
CLK ONTIME = 3.14uS
DELAY = 0
STARTVAL = 1
OPPVAL = 0
Transfer Function :
When we take the output across the capacitor
1 = 1 .= .=
Program :
t=0:0.00000025:0.00001;
y=square(2*pi*1.5915e+005*t); %Generates square wave with frequency 159 kHz
plot(t,y)
sys=tf([1],[0.000001 0.00001 1])
lsimplot(sys,y,t)
Output :
Transfer function:
1
--------------------------------
1e-006 s^2 + 1e-005 s + 1
Resonance frequency :
fr = 1 . = 159.12 kHz
.
2LC
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [58]
Linear Simulation Results
1
0.8
T = 9.4 - 3.12 = 6.28 us
0.6 f = 159.15 kHz
0.4
System: sys System: sys
0.2 Time (sec): 3.12e-006 Time (sec): 9.4e-006
Amplitude: 4.86e-006 Amplitude: 1.48e-005
Amplitude
-0.2
-0.4
-0.6
-0.8
-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec) -5
x 10
s2LC .= = 10-6s2 .=
Output :
Transfer function:
1e-006 s^2
-------------------------
1e-006 s^2 + 1e-005 s + 1
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [59]
-4
x 10 Linear Simulation Results
2
1.5
0.5
Amplitude
-0.5
-1
-1.5
-2
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2
Time (sec)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [60]
PRACTICAL - 10
AIM: - Introduction to Simulink for
control system in matlab.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [61]
AIM: - Introduction to Simulink for control system in
matlab.
Problem -1 :
Find step response of first order closed loop system shown below.
Output :
Problem -2 :
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [62]
Output :
Problem -3 :
Find the response of the integrator circuit shown below whose input is
ramp signal.
Output :
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [63]
Problem -4 :
Find the step response of the second order circuit shown below.
Output :
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [64]
PRACTICAL - 9
AIM: - To Study programs related to controllability
and observability.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [65]
AIM: - To Study programs related to controllability
and observability.
Problem 1:
A control system is given by
A B
X1 3 0 0 X1 0 2
X2 = 0 1 0 X2 + 2 0 u1
X3 0 4 5 X3 0 1 u2
1 2 0 X1
Y= X2
0 1 0 X3
clc;
clear all;
a=[3 0 0;0 1 0;0 4 5];
b=[0 2;2 0;0 1];
c=[1 2 0;0 1 0];
x=rank([b a*b a^2*b])
OUTPUT-
x=
3
y=
3
Problem 2:
Consider the system
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [66]
X1 3 0 0 X1
X2 = 0 1 0 X2
X3 0 4 5 X3
X1
Y= 1 1 1 X2
X3
y1 1 1 1 X1
= X2
y2 1 3 2 X3
clc;
clear all;
a=[3 0 0;0 1 0;0 3 2];
b=[0];
c1=[1 1 1];
y1=rank([c1' a*c1' a^2*c1'])
OUTPUT-
y1 = 3
y2 = 3
Problem 3:
Consider the following state equation and output equation.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [67]
X1 -1 -3 -2 X1 3
X2 = 0 -2 1 X2 + 0 u
X3 1 0 -1 X3 1
X1
Y= 1 1 0 X2
X3
clc;
clear all;
a=[-1 -3 -2;0 -2 1;1 0 -1];
b=[3;0;1];
c=[1 1 0];
x=rank([b a*b a^2*b])
OUTPUT-
x=
3
y=
3
Problem 4:
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [68]
X1 -4 -1 X1 1
= + u
X2 2 -3 X2 3
X1
Y= 1 2
X3
clc;
clear all;
a=[-4 -1;2 -3];
b=[1;3];
c=[1 2];
d=[0];
z=ss(a,b,c,d);
G=tf(z)
OUTPUT-
Transfer function:
7 s + 28
--------------
s^2 + 7 s + 14
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [69]
PRACTICAL - 4
AIM: - To Study programs for Proportional Integral
and Proportional Integral Differential controller.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [70]
AIM: - To Study programs for Proportional Integral
and Proportional Integral Differential controller.
Problem – 1:
For the feedback control system shown in fig. with the process
and sensor model Gp(s) and H(s).
R(s)
Gc(s)
+ + Gp(s)
- +
Gp(s) = 4 .
(2s + 1) (0.55 + 1)
H (s) = 1 .
0.55 + 1
Design : -
1. Proportional Controller Gc(s).
2. Proportional Integral controller.
3. PID controller.
PROGRAM
Gp=tf([4], conv([2 1],[0.5 1]))
H=tf([1],[0.05 1])
t=[0:0.02:10]';
for KP=0.7:0.2:1.7;
T=feedback(KP*Gp,H,-1);
ys=step(T,t);
ref=dcgain(T);
%[Mo,tp,tr,ts,ess]=tstats(t,ys,ref);
%ymax=ys(find(t==tp));
%yss=ys(iength(ys));
%disp([KP ymax tp yss Mo])
plot(t,ys)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [71]
if ishold~=1, hold on, end
end
hold off
OUTPUT-
PROGRAM-
Gp=tf([4], conv([2 1],[0.5 1]))
H=tf([1],[0.05 1])
t=[0:0.02:10]';
KI=0.5%input('enter integral gain KI==>');
for KP=0.3:0.2:1.7
Kc=tf(KP*[1 KI],[1 0]);
T=feedback(Kc*Gp,H,-1);
ys=step(T,t);
%[Mo,tp,tr,ts,ess] = tstats(t,ys,1);
%ymax=ys(find(t==tp));
%yss=ys(iength(ys));
%disp([KP ymax tp yss Mo])
plot(t,ys)
if ishold~=1, hold on, end
end
hold off
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [72]
OUTPUT-
PROGRAM-
Gp=tf([4], conv([2 1],[0.5 1]))
H=tf([1],[0.05 1])
t=[0:0.02:10]';
KI=0.5%input('enter integral gain KI==>');
KD=0.3
for KP=0.3:0.2:1.7
Kc=tf(KP*[KD 1 KI],[1 0]);
T=feedback(Kc*Gp,H,-1);
ys=step(T,t);
%[Mo,tp,tr,ts,ess] = tstats(t,ys,1);
%ymax=ys(find(t==tp));
%yss=ys(iength(ys));
%disp([KP ymax tp yss Mo])
plot(t,ys)
if ishold~=1, hold on, end
end
hold off
OUTPUT-
Transfer function:
4
---------------
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [73]
s^2 + 2.5 s + 1
Transfer function:
1
----------
0.05 s + 1
KI =
0.5000
KD =
0.3000
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [74]
PRACTICAL - 7
AIM: - To Study programs Related to state Space
Model.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [75]
AIM: - Programs Related to state Space Model.
Problem 1: % Example of state space models.
OUTPUT-
a=
x1 x2 x3
x1 1 2 3
x2 1 0 1
x3 0 1 1
b= u1
x1 0
x2 0
x3 1
c=
x1 x2 x3
y1 1 -1.5 0
d=
u1
y1 0
Continuous-time model.
Transfer function:
1.5 s - 1
------------------------------
s^3 - 2 s^2 - 2 s + 6.014e-016
a=
x1 x2 x3
x1 2 1 -3.0069e-016
x2 2 0 0
x3 0 1 0
b=
u1
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [76]
x1 1
x2 0
x3 0
c=
x1 x2 x3
y1 0 0.75 -0.5
d=
u1
y1 0
Continuous-time model.
Zero/pole/gain:
1.5 (s-0.6667)
----------------------
s (s-2.732) (s+0.7321)
a=
x1 x2 x3
x1 2.7321 1.4371 0
x2 0 -0.73205 2
x3 0 0 3.0069e-016
b=
u1
x1 0
x2 0
x3 1.2247
c=
x1 x2 x3
y1 0.88007 0.61237 0
d=
u1
y1 0
Continuous-time model.
num =
0 0 1.5000 -1.0000
den =
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [77]
A1 =
1
0
0
C1 =
0 1.5000 -1.0000
D1 =
OUTPUT-
a=
x1 x2 x3
x1 1 2 3
x2 1 0 1
x3 0 1 1
b=
u1
x1 0
x2 0
x3 1
c=
x1 x2 x3
y1 1 -1.5 0
d=
u1
y1 0
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [78]
Continuous-time model.
zG =
0.6667
Pg =
2.7321
-0.7321
0.0000
Kg =
1.5000
poleG =
2.7321
-0.7321
0.0000
zeroG =
0.6667
Problem 3:
% Example for series, parallel and feedback of state model.
A1=[0 1; -3 -5];
B1=[0;1];
C1=[1 2];
D1=0;
A2=[-3 1; 0 -4];
B2=[0;4];
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [79]
C2=[3 0];
D2=2;
G1=ss(A1,B1,C1,D1)
G2=ss(A2,B2,C2,D2)
'series'
Ts=G1*G2
'parallel'
Tp=G1+G2
'feedback'
Tf=feedback(G1,G2)
OUTPUT-
a=
x1 x2
x1 0 1
x2 -3 -5
b=
u1
x1 0
x2 1
c=
x1 x2
y1 1 2
d=
u1
y1 0
Continuous-time model.
a=
x1 x2
x1 -3 1
x2 0 -4
b=
u1
x1 0
x2 4
c=
x1 x2
y1 3 0
d=
u1
y1 2
Continuous-time model.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [80]
ans =series
a=
x1 x2 x3 x4
x1 0 1 0 0
x2 -3 -5 3 0
x3 0 0 -3 1
x4 0 0 0 -4
b=
u1
x1 0
x2 2
x3 0
x4 4
c=
x1 x2 x3 x4
y1 1 2 0 0
d=
u1
y1 0
Continuous-time model.
ans = parallel
a=
x1 x2 x3 x4
x1 0 1 0 0
x2 -3 -5 0 0
x3 0 0 -3 1
x4 0 0 0 -4
b=
u1
x1 0
x2 1
x3 0
x4 4
c=
x1 x2 x3 x4
y1 1 2 3 0
d=
u1
y1 2
Continuous-time model.
ans = feedback
a=
x1 x2 x3 x4
x1 0 1 0 0
x2 -5 -9 -3 0
x3 0 0 -3 1
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [81]
x4 4 8 0 -4
b=
u1
x1 0
x2 1
x3 0
x4 0
c=
x1 x2 x3 x4
y1 1 2 0 0
d=
u1
y1 0
Continuous-time model.
a=
x1 x2 x3
x1 -2 -2.5 -0.5
x2 1 0 0
x3 0 1 0
b=
u1
x1 1
x2 0
x3 0
c=
x1 x2 x3
y1 0 1.5 1
d=
u1
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [82]
y1 0
Continuous-time model.
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [83]
GUJARAT
TECHNOLOGICAL
UNIVERSITY
EC DEPARTMENT
L.D. COLLE GE OF
ENGIN EE RING A H ME DA BA D-
380015
LABORATORY MANUAL
OF
CONTROL THEORY
(4th SEM. EC)
4th E.C. - L.D. College of Engineerin | Control System LAB MANUAL [85]