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

Digital Implementation To Analog Compensator

The document discusses designing a digital compensator equivalent to an analog compensator. It explains two approaches for the design and describes discretizing an analog plant and compensator. An example digital compensator is designed and its parameters are calculated and explained.

Uploaded by

Kartik
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views

Digital Implementation To Analog Compensator

The document discusses designing a digital compensator equivalent to an analog compensator. It explains two approaches for the design and describes discretizing an analog plant and compensator. An example digital compensator is designed and its parameters are calculated and explained.

Uploaded by

Kartik
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

DIGITAL IMPLEMENTATION TO

ANALOG COMPENSATORS

Design of an Equivalent Digital Compensator

By Kartik.M.Banagar (1MS08ME076)
Digital implementation to Analog Compensator
Kartik.M.Banagar
6th Semester, Mechanical Dept
Subject: Discrete Control System

Introduction
Plants of control systems are mostly analog systems .
However, because digital compensators have many advantages over analog
ones, we may be asked to design digital compensators to control analog
plants.

The problem is to find a digital system such that for any input e(t), the
output u(t) of the analog compensator and the output u(t) of the digital
compensator are roughly equal.

Approach
Consider the analog compensator with proper transfer function.

 It consists of three parts :


 an A/D converter.
 a digital system or an algorithm.
 a D/A converter .
 . There are two approaches to carrying out the design.

 1st approach – to design an analog compensator and then


transform it into a digital one. It performs the discretization
after the design.

 2nd approach - first transforms analog plants into digital plants


and then carries out design using digital techniques. It performs
the discretization before the design

1
2
 The output of the A/D converter is equals e(kT), the sample of e(t)
with sampling period T.
 We then have to search for a digital system which operates on e(kT)
to yield a sequence u(kT).
 The D/A converter then holds the value of u* constant until the arrival
of next data.
 Thus the output u*(t) of the digital compensator is obtained stepwise.
 The output of the analog compensator is generally not stepwise;
therefore, the best we can achieve is that u*(t) approximately equals
u(t).

In designing a digital system, ideally, for any input e(t), u*(kT) in the
above should equal the sample of u*(t). It is difficult, if not impossible, to
design such a digital compensator that holds for all e(t).
It is, however, quite simple to design such a digital compensator for
specific e(t) . Let the input e(t) be an impulse and a step function .

The following program was written to design a simple digital compensator


and varies parameters were calculated and explained in detail further.

% now consider the transfer function of an analog compensator


% TF C(s) = 2(s-2)/(s+1)(s+3)
% its digital impulse invariant compensator is obtained by using
% Z-transform and is G(z) = T(5z/z-e^-3T - 3z/z-e^-T)

num = [1 0 1.183];
den = [1 -.9 .150971];

3
% The compensator depends on the sampling period. Different
sampling periods yield different digital compensators. For a
sampling period of T = 0.5 seconds it leads us to

H = tf(num,den,0.5);
% the solution is given by
u = [1 zeros(1,5)];
x = filter(num,den,u);
nu=[2 -4];
de=[1 4 3];

[a,b,c,d] = tf2ss(nu,de); % to compute the state space variables

[da,db] = c2d(a,b,0.5); % now we discretize it

[num,den] = ss2tf (da,db,c,d, 1); % to compute it's transfer


function

Published with MATLAB® 7.10

OUTPUT:
Transfer function:
z2 + 1.183
-------------------
z2 - 0.9 z + 0.151
Sampling time: 0.5
(Graph Attached and other relevant data is attached)

A= -4 -3 B= 1
1 0 0

C= 2 -4

G= 0.0314 -0.575 H= 0.1917

4
0.1917 0.7982 0.0673

To compute its transfer function, we type


[num,den] = ss2tf (da,db,c,d, 1)
Then MATLAB will yield
C(z)= 0.1144z - 0.5219/ z^2 - 0.8297z + 0 .1353
This transfer function is the same as the above, other than the
discrepancy due to truncation errors. Therefore, step-invariant digital
compensators can be obtained using either transfer functions or state-
variable equations. In actual implementation, digital transfer functions must
be realized as state-variable equations.

Furthermore as we've seen that once an equivalent digital plant is


obtained, we can design a digital compensator to control the plant as shown
above or, more generally, design an algorithm and use a digital computer to
control the plant as shown below.

Importance of Digital Implementation

Consider the example:

G(s) = 101/(s+1)2 + 100 = 101/s2 + 2s + 101

Its step-invariant digital transfer function is given by

G(z) = (1-z-1) Z{ 101/ s(s2 + 2s + 101) }

5
where, we have used the z-transform. Now if the sampling period T is
chosen as 10T = 2∏, then cos 10T = 1, sin 10T = 0 and e-T = e-0.2∏ = 0.53

So the equation can further be reduced to transfer function with only one real pole,
whereas the original analog plant transfer function has a pair of complex-conjugate poles,
the figure below shows the unit-step responses.
We see that the oscillation in the analog plant does not appear in its step-invariant digital
plant. Thus, some dynamics of an analog plant may disappear from or become hidden in
its equivalent digital plant.

The reason for the disappearance of the dynamics:

6
It can easily be explained from the plot of z = e T, we know that it is not a one-to-
one mapping. If the sampling period T is chosen so that ∏/T equals half of the imaginary
part of the complex poles, then the complex poles will be mapped into real poles.
Furthermore, the two poles are mapped into the same location. This is the reason for the
disappearance of the dynamics. Knowing the reason, it becomes simple to avoid the
problem. Hence much convenient to control a digital design compensator.
If the sampling period is chosen to be small enough that the primary strip (the region
bounded between - ∏/T and ∏/T as shown below, it covers all poles of G(s), then no
dynamic will be lost in the sampling and its equivalent digital plant can be used in design.

Given below are few more example for better graphical inference.

7
Bibliography
 Analog and digital control design - Chi-Tsong Chen.
 Discrete Time control systems – Katsuhiko Ogata

You might also like