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

Assignment-5: %assignment Submitted by %name: Jeswin Tom Joseph %roll - No: CH17B052

The document contains an assignment submission with the following key points: 1. It analyzes the root locus, break-in points, and asymptotic angles of a transfer function. 2. It designs PI and P controllers for a process and compares their gain and phase margins. 3. It calculates gain and phase margins, designs PI controllers, and compares step responses for three systems using different controllers.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Assignment-5: %assignment Submitted by %name: Jeswin Tom Joseph %roll - No: CH17B052

The document contains an assignment submission with the following key points: 1. It analyzes the root locus, break-in points, and asymptotic angles of a transfer function. 2. It designs PI and P controllers for a process and compares their gain and phase margins. 3. It calculates gain and phase margins, designs PI controllers, and compares step responses for three systems using different controllers.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

ASSIGNMENT-5

%Assignment submitted by
%Name: Jeswin Tom Joseph
%Roll_no: CH17B052

1. The process is

The measuring element is

Effective open loop transfer function is

a.
The root locus sketch
Asymptotic Angles

here, P=4 and Z=2

Hence

Therefore, the asymptotic angles are

Centroid

Hence the centroid is at (-5,0)

Break in points

For break-in points, gain attains local maximum.

for local maxima, differentiating wrt s, and solve.

Differentiating and equating to zero, we have

Using a solver to solve the equations, we have

on real axis which is not a part 0f the root locus.

Hence,
Angle of arrival

Angle of arrival at a zero is

For the zero

Hence angle of arrival at

b.

%defining the transfer function


Gp = tf([1 4 8],[1 14 43 30 0]);

%root locus plot


hrl = rlocusplot(Gp);
%to increase visibility of plot
a_rl = findobj(gca,'type','line');
set(a_rl,'Linewidth',1,'Markersize',8)

c.

Using the 'rltool' command, we can find find the point at which the system achieves a damping

%rltool(Gp);

One of the poles is at -0.899+2.06i

%using rlocfind to get the gain


Kc_1=rlocfind(Gp,-0.899+2.06i)

Kc_1 = 27.4402

Hence

Further details are as shown in the following image.


d.

PI Controller is used.

For getting ultimate gain, we need to find the crossover point into RHP for the root locus.

The given transfer function is

For the PI controller, we have effective open loop transfer function as

assuming to br the design parameter

Since , we have

Finding the crossover point for the given open loop transfer function
%Defining the numerator and denominator part of transfer function
s=tf('s');
num1=s^2+4*s+8;
den1=s*(s+1)*(s+3)*(s+10);

%Effective Open loop Transfer function


Gs1=num1/(s*(den1+Kc_1*num1))

Gs1 =

s^2 + 4 s + 8
----------------------------------------------
s^5 + 14 s^4 + 70.44 s^3 + 139.8 s^2 + 219.5 s

Continuous-time transfer function.

%Root locus plot for the transfer function


Plot_1d=rlocusplot(Gs1)

Plot_1d =

resppack.rlplot

%to increase visibility of plot


a_r2 = findobj(gca,'type','line');
set(a_r2,'Linewidth',1,'Markersize',8)
%Finding crossover frequency and associated design parameter
[Gm1,~,Wc1,~] = margin(Gs1)

Gm1 = 156.0781
Wc1 = 3.9121

Clearly crossover frequency is 3.9121 rad/s

Hence, we have the ultimate equal to 156.0781.

2.

The process transfer function is

For a P type controller, assuming a gain of , we have the closed loop transfer function as

a.

The gain margin of the process is 8.2 dB.

Open Loop tranfer function,


Kc_2=1.0825;

%defining transfer function


Gp_2=tf([2 2],[10 7 1],'iodelay',2);
%defining PController
Gc_2a=Kc_2;
%defining the system
Lg_2a=series(Gc_2a,Gp_2)

Lg_2a =

2.165 s + 2.165
exp(-2*s) * ----------------
10 s^2 + 7 s + 1

Continuous-time transfer function.

%Plotting the bode plots for the system


Plot_2a=bodeplot(Lg_2a)

Plot_2a =

resppack.bodeplot

Plot_2a.showCharacteristic('MinimumStabilityMargins')
Clearly from the plot, the Phase margin is 69.3 degrees

b.

The PI controller to be designed has the form

Also,

Hence the transfer function is

x=fsolve(@gain_find,[1 11]);
%function to find the gain and frequency
function f=gain_find(x0)
Kp = 1.0825;
%defining the initial values
w = x0(1);
k = x0(2);
f(1) = 2*sqrt(w^2+1)*sqrt(Kp^2+(Kp/(w*k))^2)- (sqrt(25*w^2+1)*sqrt(4*w^2+1));
f(2) = pi+atan(w)-2*w +pi-atan(1/(w*k)) - atan(5*w) - atan(2*w) + 2*pi/3;
end

Equation solved.

fsolve completed because the vector of function values is near zero


as measured by the value of the function tolerance, and
the problem appears regular as measured by the gradient.

<stopping criteria details>


tau = x(2)

tau = 0.0334

Clearly,

%defining the PI controller


Kc_2b=Kc_2*(1+(1/(s*tau)))

Kc_2b =

0.03617 s + 1.083
-----------------
0.03342 s

Continuous-time transfer function.

%defining the transfer function


Lg_2b=Kc_2b*((2*(s+1)*exp(-2*s))/((5*s+1)*(2*s+1)))

Lg_2b =

0.07235 s^2 + 2.237 s + 2.165


exp(-2*s) * -----------------------------------
0.3342 s^3 + 0.2339 s^2 + 0.03342 s

Continuous-time transfer function.

%Plotting the bode diagrms to get Gain Margin


Plot_2b=bodeplot(Lg_2b)

Plot_2b =

resppack.bodeplot

Plot_2b.showCharacteristic('MinimumStabilityMargins')
Hence the corresponding Gain Margin is 3.37 dB

c.

Step response of the system

step(Lg_2b)
d.

The sensitivity function is

Here

Bode Sensitivity integral for P controller

%Finding the sensitivity integral for Gc_2a=Kc2=1.0825

%vector for finding the bode response


w = linspace(0.001,50, 1000000);

%Sensitivity integral for Kc2=1.0825


S_2d1 = 1/(1 + Gp_2*Kc_2);

%data points for computing the integral


[magnitude_2d1,~,~] = bode(S_2d1, w);
integral_2d1=trapz(l, log(abs(magnitude_2d1(:))))

integral_2d1 = -7.0842e-04

Clearly, we find that the sensitivity integral holds for a P controller

Bode Sensitivity integral for PI controller

%Finding the sensitivity integral for


Gc_2b=Kc2(1+1/(tau*s))=1.0825(1+1/(0.0334*s))

%Sensitivity integral for Kc2=1.0825


S_2d2 = 1/(1 + (Gp_2*Kc_2b));

%data points for computing the integral


[magnitude_2d2,~,~] = bode(S_2d2, w);
integral_2d2=trapz(l, log(abs(magnitude_2d2(:))))

integral_2d2 = -5.3354
3.

The given transfer function us

a.

Ignoring the delay, we can write the characteristic equation as

b.

The given transfer function us and controller is

%defining the transfer function


Gs_3=tf(2,[1 3 -10],'iodelay',1)

Gs_3 =

2
exp(-1*s) * --------------
s^2 + 3 s - 10

Continuous-time transfer function.


%plotting the nyquist diagrams to calculate frequency
Plot_3b=nyquistplot(Gs_3)

Plot_3b =

resppack.nyquistplot

Plot_3b.showCharacteristic('MinimumStabilityMargins')

Clearly from the plot we have

Hence

We know,

Therefore

c.

The two controllers are


Gc1=6;
Gc2=4.207;

%Transfer function neglecting delay term


Gs_3a=tf(2,[1 3 -10]);

%Specifying closed loop systems for both controllers


L_3a=Gc1*Gs_3a/(1+Gc1*Gs_3a);
L_3b=Gc2*Gs_3/(1+Gc2*Gs_3);

%Plotting step response of system with controller Gc1


Plot_3c1=stepplot(L_3a)

Plot_3c1 =

resppack.timeplot

Plot_3c1.showCharacteristic('PeakResponse')

%Plotting step response of system with controller Gc2


Plot_3c2=stepplot(L_3b)

Plot_3c2 =

resppack.timeplot

Plot_3c2.showCharacteristic('PeakResponse')
Clearly, from the plots, we can see that :

• For using a controller neglecting the delay term, the system is stable, with settling time
of 7 seconds.

• Using a controller renders the system unstable.

Using Pade's second order approximation

is a root of this equation,


Gc3=2.2105;

%Specifying closed loop system


L_3c=Gc3*Gs_3a/(1+Gc3*Gs_3a);

%Plotting step response of system with controller Gc3


Plot_3c3=stepplot(L_3c)

Plot_3c3 =

resppack.timeplot

Plot_3c3.showCharacteristic('PeakResponse')

From the plot, we can see that by using Pade's Second order approximation and controller the
system becomes unstable

You might also like