You are on page 1of 13

EXPERIMENT -2

2.1 MULTI_BLOCK SYSTEMS:

Use * and + operators to connect four subsystems in the series/parallel arrangements show in
Diagram Verify that the overall poles of the transfer function are the union of the poles of the
individual transfer functions. Also, verify that the zeros of the overall transfer function do not
include the zeros of G1(s), G2(s) or G3(s), but do include the zero of G4(s). Plot the step response
of the overall transfer function as Figure 1. Compute the DCGAIN. What is your observation in
relation to step response?
𝐺1(𝑠) = 2𝑠+3 5𝑠2+2𝑠+1, 𝐺3(𝑠) = 2𝑠+6 𝑠2+𝑠+8 𝐺4(𝑠) = 𝑠+4 (𝑠+1)(𝑠2+4𝑠+1), G2(s) has a zero at s
= -2 and poles at s = -8, and -0.5 and a gain of 5.

BACKGROUND:
Each block in the multi-block systems represent the individual transfer functions. These blocks
are combined appropriately to form a single block that is single transfer function by using
mathematical operations.
When two blocks are in series then they can multiplied directly.
When two blocks are in parallel and summed by a summation then they can be added directly to
form single transfer function.
Using these two operations an overall single transfer function of the given multi-block system can
be found.

MATLAB CODE:
clear all;
clc;
% Obtaining transfer functions of each block
G1=tf([2,3],[5,2,1])
z=-2
p=[-8 -0.5]
k=5
G2=zpk(z,p,k)% Using zero pole method to obtain transfer function
G3=tf([2,6],[1,1,8])
G4=tf([1,4],[1,5,5,1])
% Finding the overall transfer function of the block diagram
T1=G1*G2 % G1 and G2 are in series
T2=T1+G3 % T1 and G3 are in parallel
disp('Overall transfer function of given block diagram:')
TF=T2*G4 %T2 and G4 are in series
% finding poles of TF
disp('poles of overall transfer function:')
P=pole(TF)
% finding the union of poles of individual transfer functions
U1=union(pole(G1),pole(G2));
U2=union(pole(G3),pole(G4));
disp('union of poles of individual transfer functions:')
U=union(U1,U2)
% sorting Poles
A=sort(P)
B=sort(U)
%Verifing if the poles of TF are as same as union of poles of individual
transfer functions
if A==B
disp('Overall poles of transfer function and union of poles of individual
transfer functions are same')
else
disp('poles are not same')
end
% Finding zeros of overall transfer function
disp('zeros of Overall transfer function:')
Z=zero(TF)
% finding zeros of individual transfer functions
disp('Zeros of G4 transfer function')
Z4=zero(G4)
disp('Zeros of G3 transfer function')
Z3=zero(G3)
disp('Zeros of G2 transfer function')
Z2=zero(G2)
disp('Zeros of G1 transfer function')
Z1=zero(G1)
disp('By observation zeros of overall transfer function doesnot include zeros
of G1,G2 and G3 but include zeros of G4')
% plotting step response of TF
figure
step(TF,'^')
grid on;
hold on
% finding DCGAIN
K=dcgain(TF)

MATLAB OUTPUT:
G1 = 2s+3
---------------
5 s^2 + 2 s + 1
Continuous-time transfer function.
G2 = 5 (s+2)
-------------
(s+8) (s+0.5)
Continuous-time zero/pole/gain model.
G3 = 2s+6
-----------
s^2 + s + 8
Continuous-time transfer function.
G4 = s+4
---------------------
s^3 + 5 s^2 + 5 s + 1
Continuous-time transfer function.
Overall transfer function of given block diagram:
TF = 2 (s+9.06) (s+4) (s+2.829) (s+0.9464) (s^2 + 0.06431s + 1.088)
(s+0.5) (s+0.2679) (s+1) (s+3.732) (s+8) (s^2 + 0.4s + 0.2) (s^2 + s + 8)
Continuous-time zero/pole/gain model.
poles of overall transfer function:
P = -0.2000 + 0.4000i
-0.2000 - 0.4000i
-8.0000 + 0.0000i
-0.5000 + 0.0000i
-0.5000 + 2.7839i
-0.5000 - 2.7839i
-3.7321 + 0.0000i
-1.0000 + 0.0000i
-0.2679 + 0.0000i
union of poles of individual transfer functions:
U = -0.2679 + 0.0000i
-0.2000 - 0.4000i
-0.2000 + 0.4000i
-0.5000 + 0.0000i
-1.0000 + 0.0000i
-0.5000 - 2.7839i
-0.5000 + 2.7839i
-3.7321 + 0.0000i
-8.0000 + 0.0000i
Overall poles of transfer function and union of poles of individual transfer functions are same.
zeros of Overall transfer function:
Z = -9.0598 + 0.0000i
-2.8295 + 0.0000i
-0.0322 + 1.0427i
-0.0322 - 1.0427i
-0.9464 + 0.0000i
-4.0000 + 0.0000i
Zeros of G4 transfer function
Z4 = -4
Zeros of G3 transfer function
Z3 = -3
Zeros of G2 transfer function
Z2 = -2
Zeros of G1 transfer function
Z1 = -1.5000
By observation zeros of overall transfer function doesn’t include zeros of G1,G2 and G3 but
include zeros of G4
K = 33.0000

INFERENCE:

Verified that the poles of overall transfer function are same as the union of poles individual
transfer functions. The zeros of overall transfer function does not include the zeros of G1, G2 and
G3 but does include zeros of G4. The step response of overall transfer function is observed and
the gain of the system is obtained as 33.
2.2 FEEDBACK SYSTEMS:

Use MATLAB to create a negative feedback system shown in Diagram 1 where G(𝑠) = 4𝑠+1
5𝑠2+2𝑠+1, H(𝑠) = 𝑠+6 𝑠2+4𝑠+11. Give closed-loop transfer function as a ratio of polynomials and
determine its zeros, poles and gain.
Compare the poles of the closed loop transfer function T(s) to the poles of G(s) and H(s).
Determine the stability of T(s). Also, verify that the zeros of T(s) are zeros of G(s) and poles of
H(s).

BACKGROUND:

Negative feedback opposes or subtracts from the input signals giving it many advantages in the
design and stabilization of control systems. For example, if the systems output changes for any
reason, then negative feedback affects the input in such a way as to counteract the change.

Feedback reduces the overall gain of a system with the degree of reduction being related to the
systems open-loop gain. Negative feedback also has effects of reducing distortion, noise, and
sensitivity to external changes as well as improving system bandwidth and input and output
impedances.

MATLAB CODE:
clear all;
clc;
% Forming Transfer functions
G=tf([4,1],[5,2,1])
H=tf([1,6],[1,4,11])
% Forming overall feedback Transfer function
TF=feedback(G,H)
% Finding zeros,poles and gain of overall transfer function
[z,p,k]=zpkdata(TF)
%Finding poles of each transfer function
Tp=pole(TF)
Gp=pole(G)
Hp=pole(H)
disp('There is no similarity between poles of transfer functions')
% Finding the zeros of each transfer function
Tz=zero(TF)
Gz=zero(G)
Hz=pole(H)
disp('zeros of feedback transfer function are same as the union of zerosof G
and poles of H')
% Finding the stability
disp('By observing the poles of TF lie on LHS, So the system is stable')

MATLAB OUTPUT:

TF = 4 s^3 + 17 s^2 + 48 s + 11

----------------------------------

5 s^4 + 22 s^3 + 68 s^2 + 51 s + 17

Continuous-time transfer function.

Tp = -1.7551 + 2.6573i

-1.7551 - 2.6573i

-0.4449 + 0.3706i

-0.4449 - 0.3706i

Gp = -0.2000 + 0.4000i

-0.2000 - 0.4000i

Hp = -2.0000 + 2.6458i

-2.0000 - 2.6458i

There is no similarity between poles of transfer functions

Tz = -2.0000 + 2.6458i

-2.0000 - 2.6458i
-0.2500 + 0.0000i

Gz = -0.2500

Hz = -2.0000 + 2.6458i

-2.0000 - 2.6458i

zeros of feedback transfer function are same as the union of zerosof G and poles of H.

By observing the poles of TF lie on LHS, So the system is stable.

INFERENCE:

Feedback system of given block diagram is found. The poles of the closed loop transfer function
are different from G and H. But the zeros are the union of G and H. By observation, the poles of
transfer function are on the LHS place that means the system is stable.

2.3 STATE SPACE ANALYSIS:

Use MATLAB to compute and plot the impulse and step response of the state space model A=[-2
-2.5 -0.5;1 0 0; 0 1 0];B=[1;0;0];c=[0 1.5 1];d=[0] then simulate and plot the state response
x(t)=[x1(t) x2 x3] When the input is u(t)=(2 0<=t<=2;0.5 t>=2) and initial condition is
x(0)=[1;0;2].

BACKGROUND:

State-Space representation is a mathematical model of a physical system as a set of input, output


and state variables related by first-order differential equations. It is applicable for MIMO systems.
The system description in this method consists of two parts: 1 Finding the equation(s) relating the
state variables to the input(s) (the state equation). 2 Finding the output variables in terms of the
state variables (the output equation). The state space description is capable of determining every
possible system variable (or output) from the knowledge of the input and the initial state
(conditions) of the system.
MATLAB CODE:

clear all;
clc;
% Displaying A,B,C,D matrices of State Space
A=[-2 -2.5 -0.5;1 0 0;0 1 0]
B=[1;0;0]
C=[0 1.5 1]
D=[0]
% Finding transfer function
sys=ss(A,B,C,D)
[num,den]=ss2tf(A,B,C,D);
TF=tf(num,den)
% Plotting Step and Impulse response of Transfer function
figure
step(TF)
grid on
impulse(TF)
grid on
x0=[1;0;2];
t=[0:0.02:10];% creating time vector
u=2*(1+0*t);% Input vector
for i=1:length(t)
if t(i)>=2
u(i)=0.5
end
end
% Plotting response of the transfer function for given input and with given
initial conditions
figure
y=lsim(TF,u,t,x0);
plot(t,y)
title("State Space response for given input")
xlabel('time')
ylabel('amplitude')
grid on
MATLAB OUTUT:
TF = 1.5 s + 1
-------------------------
s^3 + 2 s^2 + 2.5 s + 0.5
Continuous-time transfer function.

INFERENCE:
Transfer function of the given state space model is obtained and its step and impulse response are
observed. Also the response of the system is obtained for given input and initial conditions.
2.4 ROOT LOCUS:

Use MATLAB to draw the root locus for the feedback system whose open loop transfer function
K ( s  5)
is GH ( s)  and comment on the applicability of various properties of root
( s  1)(s  3)(s  12)
locus. Find the break-away point, and determine the value of closed loop poles for this K.

BACKGROUND:

This is a technique used as a stability criterion in the field of classical control theory. The root
locus plots the poles of the closed loop transfer function in the complex s-plane as a function of a
gain parameter. In addition to determining the stability of the system, the root locus can be used to
design the damping ratio (ζ) and natural frequency (ωn) of a feedback system. The point where the
poles break off the axis is called break away point.

MATLAB CODE:

clear all;
clc;
z=-5;
p=[-1 -3 -12];
k=1;
sys=zpk(z,p,k)
% Obtaining Transfer function
num=[1 5];
den=[1 16 51 36];
TF=tf(num,den);
% Finding breakaway points
a= poly2sym(num);
b= poly2sym(den);
diffa=diff(a);
diffb=diff(b);
p=(diffa*b-diffb*a);
q=sym2poly(p);
disp('Breakaway points are:')
BA=roots(q)
% plotting rootlocus
rlocus(sys)
hold on;
% plotting breakaway points
plot(BA,'*')

MATLAB OUTPUT:

sys = (s+5)

------------------

(s+1) (s+3) (s+12)

Continuous-time zero/pole/gain model.

Breakaway points are:

BA = -6.6894 + 2.6216i

-6.6894 - 2.6216i

-2.1213 + 0.0000i

INFERENCE:
For the given the system three breakaway points and closed loop poles are obtained. Also
obtained the root locus of the feedback system. Also observed various properties of root locus at
different gain points ,for example at K= 10.6, the damping ratio = 0.85, pole= -2.39+1.48i,
overshoot=0.628%.

You might also like