Вы находитесь на странице: 1из 3

Sudhakar Kumar 2020EE20 Date:05/11/2020

DIGITAL CONTROL SYSTEM (EE21102)


Assignment No: 01

QUESTION NO: 1

Consider a closed loop discrete time control system as shown in figure below. Design a
digital controller such that Step response will be found out using PID controllers.
Sampling time will be taken as Ts = 1sec. Suppose that for controller values are given as
Kp = 1, Ki = 0.2 and kd = 0.2. Study the step response of the following PID Controllers.

MATLAB CODE: 1

s = tf('s');
Gp = 1/(s*(s+1));
H = c2d(Gp,1,'ZOH') %sampling time is 1 sec
z = tf('z',1);
Gc = 1+0.2*z/(z-1)+0.2*(z-1)/z; %PID controller TF in DT domain
G = series(Gc,H);
cl = feedback(G,1)
plot(step(cl),'-o') %plotting curve with dash and zero
xlabel('time(sec)')
ylabel('amplitude')
title('step response of Plant')

OUTPUT:

Plant transfer function with zero order hold

H=

0.3679 z + 0.2642
----------------------
z^2 - 1.368 z + 0.3679

Sample time: 1 second


Discrete-time transfer function

cl =

0.515 z^3 - 0.1451 z^2 - 0.2964 z + 0.05285


------------------------------------------------
z^4 - 1.853 z^3 + 1.591 z^2 - 0.6642 z + 0.05285

Sample time: 1 second


Discrete-time transfer function

STEP RESPONSE PLOT OF SYSTEM:

COMMENTS:

 ZOH: Zero order hold


 C2d : Converts continuous time domain to discrete time domain
 Series: Series connection of two blocks
 Feedback: Negative feedback interconnection of model
QUESTION NO: 2

Consider the closed loop discrete control system as shown in figure. Design a Digital
controller such that the dominant closed loop poles have Damping Ratio = 0.5, Settling
time is 2sec for 2% tolerance band. Sampling time period of system (Ts) is 0.2 sec.

MATLAB CODE:

For uncompensated system:


s = tf('s');
g = 1/(s*(s+1));
G = c2d(g,0.2,'ZOH')
Cl = feedback(G,1)
subplot(2,1,1)
pzmap(Cl)
title('Pole-zero map of uncompensated sys')
subplot(2,1,2)
rlocus(Cl)
xlabel('time(sec)')
ylabel('amplitude')
title('root locus of CLTF of uncompensated sys')

OUTPUT:
G=
0.01873 z + 0.01752
----------------------
z^2 - 1.819 z + 0.8187

Sample time: 0.2 seconds


Discrete-time transfer function.

Cl =
0.01873 z + 0.01752
--------------------
z^2 - 1.8 z + 0.8363

Sample time: 0.2 seconds


Discrete-time transfer function

p=
0.9000 + 0.1620i
0.9000 - 0.1620i
z=
-0.9355

For system with Controller:


s = tf('s');
g = 1/(s*(s+1));
G = c2d(g,0.2,'ZOH')
z = tf('z');
Gd = 10.76 * (z-0.82)/(z-0.253)
Gc = Gd*G
Gc_cl = feedback(Gc,1)
subplot(2,1,1)
pzmap(Gc_cl)
title('Pole-zero map with controller')
subplot(2,1,2)
rlocus(Gc_cl)
xlabel('time(sec)')
ylabel('amplitude')
title('root locus of CLTF with controller')

OUTPUT:

Gd =
10.76 z - 8.823
---------------
z - 0.253

Sample time: unspecified


Discrete-time transfer function

Gc =
0.2015 z^2 + 0.02328 z - 0.1546
----------------------------------
z^3 - 2.072 z^2 + 1.279 z - 0.2071

Sample time: 0.2 seconds


Discrete-time transfer function

Gc_cl =
0.2015 z^2 + 0.02328 z - 0.1546
---------------------------------
z^3 - 1.87 z^2 + 1.302 z - 0.3617

Sample time: 0.2 seconds


Discrete-time transfer function

p=
0.8205 + 0.0000i
0.5248 + 0.4067i
0.5248 - 0.4067i

z=
-0.9355
0.8200

Вам также может понравиться