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

Experiment 7 Digital Control Systems

Uploaded by

m.farhan.digital
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Experiment 7 Digital Control Systems

Uploaded by

m.farhan.digital
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 8

CONTROL SYSTEM LABORATORY

Department of Electrical Engineering, UET, Lahore.

Experiment 7 Digital Control Systems

Objectives

To explore the Properties of Digital Control Systems.

New MATLAB commands to learn in this experiment


Command Description
c2dm(n, d, Ts, ‘method’) Enter help c2dm in the Matlab Command Window for a detailed
description.
d2cm(n, d, Ts, ‘method’) Enter help d2cm in the Matlab Command Window for a detailed
description.

Procedure

Section-1

 A closed-loop samples system with unity feedback is shown below.

ZOH Plant
r(t) e(t) e*(t) 1 y(t)
Gc(s)
s (s + 1)
Ts

 The overall transfer function of this system can be determined using the MATLAB
function c2dm as following.

>>num = [1] ; %numerator of the plant Transfer function


>>den = [1 1 0]; %denominator of the plant Transfer function
>>[numd, dend] = c2dm(num, den, 0.001, ‘zoh’) ;

 Write the discrete transfer function of the system returned by the MATLAB.

numd =
dend = T(z) = Y(z)/R(z) = ----------------------

Experiment 7 Digital Control Systems Page 1 of 8


CONTROL SYSTEM LABORATORY
Department of Electrical Engineering, UET, Lahore.

 The discrete-time system can be converted back to the continuous time system using
MATLAB function d2cm as following.

>> [n, d] = d2cm(num, den, 0.01, ‘zoh’);

 Write the transfer function returned by the MATLAB.

n=
d= G(s) = ---------------------------

 The transfer function (in z-domain) as,

>>printsys(numd, dend, ‘z’) ;

 Write the transfer function returned in the previous step.

G(z) = -----------------------------

 The transfer function (in s-domain) as,

>>printsys(n, d, ‘s’) ;

 Write the transfer function returned in the previous step.

G(s) = -----------------------------

 Use a different sampling time (say 0.1) in the above step and see the transfer function
returned by the d2cm function.

G(s) = -------------------

Why it is different from the previous one?

Experiment 7 Digital Control Systems Page 2 of 8


CONTROL SYSTEM LABORATORY
Department of Electrical Engineering, UET, Lahore.

Section-2

In this section, you will find the closed-loop discrete transfer function of the system shown
in the beginning of this experiment. You will plot the step and impulse response of the
discrete-time system and then compare the response with the continuous-time system
(system without using a sampler and ZOH).

 Following commands are used to determine the closed-loop transfer function using
numerator numd and denominator numd you have found in previous steps. The third
argument of the function tf is the sampling time. (T=1sec is used the previous steps)

>>sysd = tf(numd, dend, 1) ;

 Write the closed-loop discrete-time transfer function returned by the previous step.

G(z) = ---------------------------------

 Following command can be used to calculate the closed-loop transfer function.

>>sysdcl = feedback(sysd, 1, -1) ;

where the third argument of the function feedback is the feedback gain (unity in this
case and the forth argument shows the negative feedback.

 Write the closed-loop discrete-time transfer function found in the previous step.

T(z) = Y(z)/R(z) = -----------------------------

numerator = [ ] denominator = [ ]

 Following command plots the discrete-time step response of the system.


Note: use the numerator and denominator you found in the previous step)

>>dstep([ ], [ ]) ;

 Sketch the discrete-time step response in the space given on the next page. Hold the
step-response figure by using command hold as you will plot the step-response of the
continuous-time system in the same figure in the next step.

 Now, use the following commands to plot the step-response of the continuous-time
system with unity feedback. (The system shown in the beginning without a ZOH and
sampler).

Experiment 7 Digital Control Systems Page 3 of 8


CONTROL SYSTEM LABORATORY
Department of Electrical Engineering, UET, Lahore.

>>sysc = tf([1], [1 1 0]) ;


>>syscl = feedback(sysc, 1, -1) ;
>>step(syscl) ;

 Use the final time in the function step equal to the final time of the discrete-time step-
response plotted earlier and sketch the step-response in the same space where you have
plotted the discrete-time step response. Use different color or line style to differentiate
between the two curves.

Step-response of the discreet-time system and continuous-time system.

Section-2

 Use the following command to plot the root-locus of the discrete-time system in the z-
plane shown below.

1.5

0.5

-0.5

-1

-1.5
-2 -1.5 -1 -0.5 0 0.5 1 1.5

Experiment 7 Digital Control Systems Page 4 of 8


CONTROL SYSTEM LABORATORY
Department of Electrical Engineering, UET, Lahore.

 Use the following command to plot the root-locus of the continuous-time system in the
s-plane shown below.

 Comment on the stability of discrete-time system based on the root-locus plot.

………………….………………………………………………………………………
………………….………………………………………………………………………
………………….
………………………………………………………………………………………….
………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….
………………………………………………………………………………………….
………………………………………………………………………

Experiment 7 Digital Control Systems Page 5 of 8


CONTROL SYSTEM LABORATORY
Department of Electrical Engineering, UET, Lahore.

 Comment on the stability of continuous-time system based on the root-locus plot.

………………….………………………………………………………………………
………………….………………………………………………………………………
………………….
………………………………………………………………………………………….
………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….
………………………………………………………………………………………….
………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………

 Calculate the sampling time T for which the discrete-time system is unstable.

T=

Closed-loop discrete-time transfer function for sampling time computed here.

Y(z)/R(z) = -------------------------------

Zeors = Poles =

You can compute zeros and poles using roots([polynomial]).

Experiment 7 Digital Control Systems Page 6 of 8


CONTROL SYSTEM LABORATORY
Department of Electrical Engineering, UET, Lahore.

Write your comments on this experiment.

………………….………………………………………………………………………
………………….………………………………………………………………………
………………….
………………………………………………………………………………………….
………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….
………………………………………………………………………………………….
………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….
………………………………………………………………………………………….
………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………
………………….………………………………………………………………………

Experiment 7 Digital Control Systems Page 7 of 8


CONTROL SYSTEM LABORATORY
Department of Electrical Engineering, UET, Lahore.

Checked by: Date:

Experiment 7 Digital Control Systems Page 8 of 8

You might also like