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

Final Matlab249

The document outlines tasks for the IV Semester of the Electrical & Electronics Engineering program, focusing on control systems and MATLAB coding. It includes problems related to PI and PID controller design, step response analysis, and the effects of varying controller gains on system performance. Each question is accompanied by MATLAB code for simulations and analysis of the control systems described.

Uploaded by

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

Final Matlab249

The document outlines tasks for the IV Semester of the Electrical & Electronics Engineering program, focusing on control systems and MATLAB coding. It includes problems related to PI and PID controller design, step response analysis, and the effects of varying controller gains on system performance. Each question is accompanied by MATLAB code for simulations and analysis of the control systems described.

Uploaded by

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

Department of Electrical & Electronics Engineering

Academic Year 2023-24

IV Semester

Faculty :
Dr. S B
Karajgi
Mrs. Minal salunke

Name : Shankar I B
USN: 01FE21BEE032
Div: A
Subject: LCS
Q1.Figure shows a second order control system with a plant controlled by a PI
controller. The controller gains Kp and Ki are to be determined so as to meet
the following: (i) Closed loop poles placed at (-4±jβ) (ii) Peak time of unit step
response is around 0.5 sec. For the above descriptions, (i) Express the design
specifications in terms of damping ratio (ζ) and natural angular oscillating
frequency (wn). Deduce the required relation for Kp and Ki in terms of ζ and
wn. (iii) Required gains Kp and Ki (iv) Settling time and rise time for these
settings.
MATLAB CODE:
%s1=-4+jb; alpha = 4

alpha=

4;

Tp=0.5

Wd=(pi/Tp);

Wn=sqrt(Wd^2+alpha

^2); geta=4/Wn;

Kp=(2*geta*Wn-4)/10

; Ki=Wn^2/10;

Ts=4/(geta*Wn);

theeta=atan(sqrt((1-(geta^2))/

geta^2)); Tr=(pi-theeta)/Wd;

s=tf('s');

G=(Kp+Ki/s)*(10/

(s+4)); H=1;

TF=G/(1+G*H);

step(TF,10);
Q2. Figure shows the depth control system of a submersible vehicle, where
K=0.5.(i) If K2=0.5 and gain K1 has limits 5 ≤ K1 ≤ 20, obtain the unit step
response with K1 selected for fasted response.(ii) If gain K1 is varied from 1.0
to 7.0 in steps of 1.0, determine the gain K2 values that give time constant ≤
0.1 and plot in the parameter plane K1 - K2. Also compute the corresponding
equivalent gain (Ke) and steady-state errors and comment on the effect of K1
variations on the steady-state error.
MATLAB CODE:

k=0.5;

k2=0.5;

k1_range=5:20; %for fastest response

k1=20; k1=20;

%TF=(k1*k)/(s+k1*k2+k1*k);

%let ke=k/(k+k2); and

Tou=1/(k1*(k+k2)); kep=k/(k+k2);

Tou=1/(k1*(k+k2));

%fot time constant <=0.1, find k2

values k1_values=1:1:7;

k2_values=0.1./k1_values;

ke=k./(k+k2_values);

ess=1-ke;

%plot k1-k2 on parameter plane;

plot(k1_values,k2_values); %blue line k1

vs k2 hold on

grid on

%plot of ke vs ess;

plot(ke,ess); %orange line ke vs

ess; hold off


Q3. Figure shows the model of Automatic Voltage Regulator (AVR) employed in
the field excitation control of a synchronous generator. It is required to design
a PI and PID controllers using Zeigler-Nichol’s tuning approach. Determine (i)
Ultimate gain (Kcu) and time period (Tu) by applying R-H criterion (ii) PI and
PID gain settings. For these controller settings, compute steady-state errors.
MATLAB CODE:

s=tf('s');

G=5/((0.1*s+1)*(0.4*s+1)*(s+

1)); H=1/(0.05*s+1);

TF=G/

(1+G*H); ku =

2.4313;

%to get wn, from routh array form auxillary equation of s^2 row

%AE=0.568*s^2 + 13.157 = 0, on solving we get s=(+or-)sqrt(-13.157/0.568);

wn=sqrt(13.157/0.568);

tu=2*pi/wn;

%for pi

controller

kp_pi=0.45*ku

;
ki_pi=0.5*ku/tu;

Gpi=kp_pi+ki_pi/s;

TF_pi=G*Gpi/(1+G*Gpi*H);

step(TF_pi,10); %blue colour pi

controller plot hold on

%for pid

controller

kp_pid=0.75*ku;

ki_pid=1.2*ku/tu;

kd_pid=0.075*ku

*tu;

Gpid=kp_pid+ki_pid/s+kd_pid*s;

TF_pid=G*Gpid/(1+G*Gpid*H);

step(TF_pid,10); %orange colour pid controller

plot hold off


Q4. Figure depicts the simplified model of an automobile cruise control system.
Design a PID controller that places two dominant closed loop poles at (-2±j4).
Choose the integral gain setting (Ki) as 10. If Ki is varied as 10, 20 and 30,
compute the location of third closed loop pole and comment on its effect on
overall system response.
MATLAB CODE:

a=2

b=

4;

s1=-a+b*i;

%Gc=Kp+Ki/s+Kd*s;

G=0.833*(1/(s1+1))*(40/(3*s1

+1)); H=0.03;

mn=-s1/(G*H);

m=real(mn);

n=imag(mn);

Ki=10;

Ki_range=10:10:30;

Kd=(Ki-m-n*(a/b))/

(a^2+b^2);

Kp=(n+2*a*b*Kd)/b;

s3a=-Ki/

60; s3b=-

20/60;

s3c=-

30/60;

for Ki=Ki_range

s=tf('s');

Gc=Kp+Ki/s+Kd*s

Gp=0.833*(1/(s+1))*(40/

(3*s+1)); H=0.03;

TF=(Gp*Gc)/(1+Gp*Gc*H);

hold on

step(TF,10); %blue Ki=10, red Ki=20,

orange Ki=30 end

hold off

You might also like