+ All Categories
Home > Documents > Digital implementation to Analog compensator

Digital implementation to Analog compensator

Date post: 28-Nov-2014
Category:
Upload: kartik
View: 92 times
Download: 4 times
Share this document with a friend
11
DIGITAL IMPLEMENTATION TO ANALOG COMPENSATORS Design of an Equivalent Digital Compensator By Kartik.M.Banagar (1MS08ME076)
Transcript
Page 1: Digital implementation to Analog compensator

DIGITAL IMPLEMENTATION TO ANALOG COMPENSATORS

Design of an Equivalent Digital Compensator

By Kartik.M.Banagar (1MS08ME076)

Page 2: Digital implementation to Analog compensator

Digital implementation to Analog Compensator

Kartik.M.Banagar6th Semester, Mechanical DeptSubject: 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.

1 st approach – to design an analog compensator and then transform it into a digital one. It performs the discretization after the design.

2 nd approach - first transforms analog plants into digital plants and then carries out design using digital techniques. It performs the discretization before the design

1

Page 3: Digital implementation to Analog compensator

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 .

2

Page 4: Digital implementation to Analog compensator

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];% 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 byu = [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

3

Page 5: Digital implementation to Analog compensator

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 = 11 0 0

C = 2 -4

G = 0.0314 -0.575 H= 0.19170.1917 0.7982 0.0673

To compute its transfer function, we type[num,den] = ss2tf (da,db,c,d, 1)

Then MATLAB will yieldC(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.

4

Page 6: Digital implementation to Analog compensator

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) }

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.

5

Page 7: Digital implementation to Analog compensator

The reason for the disappearance of the dynamics:

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.

6

Page 8: Digital implementation to Analog compensator

Given below are few more example for better graphical inference.

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

7


Recommended