Professional Documents
Culture Documents
DCS - LY - ETRX - Yash Jain - 1412022 - A1 - Exp4
DCS - LY - ETRX - Yash Jain - 1412022 - A1 - Exp4
DCS - LY - ETRX - Yash Jain - 1412022 - A1 - Exp4
Experiment No: 4
Grade : AA / AB / BB / BC / CC / CD /DD
Theory:
For a given second order system, design a digital lag compensator to meet
following specifications:
CODE:
clc;
clear all;
close all;
s=tf('s')
Gs=1/((s+1)*((0.5*s)+1));
z=tf('z')
GZ=c2d(Gs,0.2,'zoh')
aug=[ 0.1,1];
gwss=bilin(ss(GZ),-1,'S_Tust',aug)
gw=tf(gwss);
bode(gw);
grid on;
title('uncompensated');
figure;
[Gm,Pm,Wgm,Wpm]=margin(gw)
%lag compensator
z=tf('z',0.1);
lag=(9*((83*z)-81))/((179*z)-177);
bode(lag);
grid on;
title('lag');
figure;
s= s
Continuous-time transfer function.
z= z
Sample time: unspecified
Discrete-time transfer function.
GZ =
0.03286 z + 0.0269
----------------------
z^2 - 1.489 z + 0.5488
a=
x1 x2
x1 6.833 -7.226
x2 13.17 -12.77
b=
u1
x1 3.292
x2 -3.292
c=
x1 x2
y1 0.007843 0.1119
d=
u1
y1 -0.001961
Gm = 16.7732
Pm =-180
Wgm = 12.0255
Wpm = 0
Department of Electronics Engineering
K. J. Somaiya College of Engineering, Mumbai-77
final =
WAVEFORMS:
One basic need of control system design is to obtain desired output value, these two
controller and compensator are there to fulfill this purpose. Ultimate aim is same for
both, but the difference is -
CONTROLLER: aim of controller design is to reduce the error between the reference
and the output signal which is fed back to the controller with input (reference) signal.
Controller is much more general term which refers to the block (an analogue/digital
processor) that is inserted to produce the desired behavioural closed-loop performance,
be it in the frequency domain, or in the time domain. The term controller is not linked
to any design technique in my opinion. A controller is a tool that forces the output
towards a certain direction in order to reduce the error .eg Proportional ,Integral,
derivative ,on-off,and PID's. on the other hand a compensator unit is employed to help
fix certain system characteristics that are outside of a proper operating range.eg lag
,lead and lag-lead compensators etc . a compensator can affect either the
magnitude,phase or both.