You are on page 1of 36

Digital Control Systems

You will learn in this part:

How to model digital systems


How to design the stability of digital systems
How to design digital systems to meet steady-state error specifications
How to design digital systems to meet transient response specifications using gain
adjustment,
How to design cascade compensation for digital systems.

INTRODUCTION
The digital control systems have been introduced in control system to improve the tracking
performance for complex systems. This is due to the price of devices that have been improved
dramatically during past decade. Figure below shows a block diagram of a single-loop digital
control system.

The digital computer (or micro-Controller, microprocessor) receives the error or only the
reference signal and performs calculations (program) in order to provide an output near or
equals the desired signal.

Advantages of digital computers: The use of digital computers in the control systems yields
the following advantages over analog control systems:

1. Reduced cost,
1|Page
2. Flexibility in response to design changes,
3. Noise immunity
4. Digital control systems are more suitable for Modern control systems.

From the tracking performance side, the analog control system exhibits good performances than
digital control system. Indeed, the digital control system will introduce a delay in the loop.

The loop (forward and feedback) contains both analog and digital signals must provide a means
for conversion from one form to other to be used by each subsystem. A device that converts
analog signal to digital signal is called Analog-to-Digital Converter (ADC). Conversely, a
device that converts digital signals to analog signals is called a Digital Analog Converter
(DAC).

Digital-To-Analog Conversion:
From the binary number each bit is
properly weighted voltages and are
summed together to yield analogue
output.

Analog-To-Digital Conversion:
ADC is not instantaneous and needs two-step process. There is a delay between the analog input
voltage and the output digital word. In ADC, the analog signal is first converted to a sampled
signal and then converted to a sequence of binary numbers, the digital signal.

The sampling rate must be at least twice the bandwidth of the signal. In figures below we see
the analog signal sampled at periodic intervals and held over the sampling interval by a device
called a zero-order-hold (Z-O-H) that yields a staircase approximation to the analog signal.
2|Page
After sampling and holding, the ADC converts the sample to a digital number (see figure c).

From figure b, we deduce that the difference between two levels is and for n bits where
23 2
M is the maximum voltage of the signal to be converted. Also from figure b, we can see that
there will be an error for each digitized analog value. We call this error the quantization error.


The quantization error is bounded by: || where n is the number of bits and M is the
2
maximum voltage. Note to reduce this quantization error, we have to increase the number of
bits used in word.

How to design a Controller:

3|Page
Digital Control System

Designed in S- Design in Z-domain


domain

G(z)
We have already
the controller D(s)
Design Using Root
Locus
Euler-
Approximation
D(z)

Difference equation
Difference equation

Simulation
Simulation

Real-time
Real-time
implementation
implementation

4|Page
For the approximation methods, used to convert the continuous controller to digital controller,
are: Euler method, Trapezoidal method etc and we can use forward or backward
approximation.
(+1)()
= this is a forward approximation,

()(1)
= this is a backward approximation. T is the sampling time.

Afterwards, the differential equation of the controller can be transformed to difference equation
where this difference equation can be easily programmed as a control algorithm.

Note that the sampling time T should be close to zero.

Example: PID controller.

Its assumed that we have already designed a continuous PID controller and we want to
implement it using a digital controller.

The transfer function of PID controller is:


() 1 1
() = = (1 + + ) () = + () + and =
()
1
+ + .

Using the backward approximation:

( )(1) ( )(1)
= ; =

and
() ( 1) ( 1) ( 2)

=

() 2 ( 1) + ( 2)
=
2
The difference equation of the controller is:

( ) = ( 1) + 1 + + ( ) 1 + 2 ( 1) + ( 2)

5|Page
Or
() = ( 1) + () ( 1) + ( 2)

Where = 1 + + ; = 1 + 2 and =

+2
Example: Find the digital controller to implement the compensator () = 70 for the
+10
1
plant () = using sample rate of 20Hz and 40Hz.
(+1)

MATLAB Code:
clear
% plant definition
numG=1;
denG=[1 1 0];
% continuous compensation
Ko=70;
a=2; % D(s) zero
b=10; % D(s) pole
numD=Ko*[1 a];
denD=[1 b];
num=conv(numG,numD);
den=conv(denG,denD);
[numcl,dencl]=feedback(num,den,1,1);
tf=1;
t=0:.01:tf;
yc=step(numcl,dencl,t);
subplot(2,1,1)
plot(t,yc,'-'),grid
axis([0 1 0 1.5])
hold on

% now do the digital case


Ws= 20; % Hz
T=1/Ws;
[numGd,denGd]=c2dm(numG,denG,T,'zoh');
numDd=Ko*[1 -(1-a*T)];
denDd=[1 -(1-b*T)];
numd=conv(numGd,numDd);
dend=conv(denGd,denDd);
[numcld,dencld]=feedback(numd,dend,1,1);

N=tf*Ws;
yd=dstep(numcld,dencld,N);
td=0:T:(N-1)*T;
plot(td,yd,'*')
plot(td,yd,'-')
ylabel('output y')
title('Fig. 3.2 Continuous and digital response
using Eulers method')
text(.25,.1,'*-----*-----* digital control')
text(.25,.3,'------------- analog control')
text(.35,.6,' (a) 20 Hz')

6|Page
hold off
Ws= 40; % Hz
T=1/Ws;
[numGd,denGd]=c2dm(numG,denG,T,'zoh');
numDd=Ko*[1 -(1-a*T)];
denDd=[1 -(1-b*T)];
numd=conv(numGd,numDd);
dend=conv(denGd,denDd);
[numcld,dencld]=feedback(numd,dend,1,1);

N=tf*Ws;
subplot(2,1,2)
plot(t,yc,'-'),grid
hold on
yd=dstep(numcld,dencld,N);
td=0:T:(N-1)*T;
plot(td,yd,'*')
plot(td,yd,'-')
xlabel('time (sec)')
ylabel('output y')
text(.25,.1,'*-----*-----* digital control')
text(.25,.3,'------------- analog control')
text(.35,.6,' (a) 40 Hz')
hold off
The step response of the process closed by a continuous controller and discrete controller for
different sampling rate.

Fig. 3.2 Continuous and digital response using Eulers method


1.5

1
output y

(a) 20 Hz
0.5

------------- analog control

*-----*-----* digital control


0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

1.5

1
output y

(a) 40 Hz
0.5

------------- analog control


*-----*-----* digital control
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
time (sec)

7|Page
Modeling the sampler:
Consider the models for sampling shown in figure below. The model is a switch turning on and
off at a uniform sampling rate.

In figure b sampling can also be considered to be a product of the time waveform to be sampled
() and a sampling function ().

8|Page
().
The time equation of the sampled waveform, Using the model shown above, we have:


= ()() = () ( ) ( )
=

Where k is an integer, T is the period of the pulse train and is the pulse width.

The output of an ideal sampler is:

9|Page

() = () ( )
=

Modeling the zero-order-hold:

To find the transfer function of the Z-O-H, just we send an impulse in the input and from the
output response; we can deduce the transfer function.

10 | P a g e
impulse

0 T

The output is: () = () = () ( ) Laplace transform is:

1 1 1
() = () = =

The Z-Transform:
Laplace transform of a sampled signal r*(t) is:

() =
= () ( ) () = = () ( )

() = = () ( )

=
= ()

its nonlinear. To overcome
the nonlinearity problem, we transform S-domain to another domain where the operator is
linear: Z- domain by setting: = .

The z-transform is defined as:


() = ()
=

Example: Determine the Z-transform of () = ()


Solution: () = with || 1
(1)2

11 | P a g e
1+1
Hint: use
=0 = .
1

- Z-transform of unit impulse: () =


=0 ()

= 0 = 1,
1
- Z-Transform of the unit-step: () =
=0 ()

=
=0

= ,
1 1
- Z-transform of the exponential function: () = () =
=0 =
1
1
=0( ) = = .
1 1


If = then () = .

- For general sinusoidal form: () = sin()


( )
() =
2 2 cos() + 2

12 | P a g e
Some Properties:

Z-transform from difference equation:


We use two-equalities:
1- (( + ) = () (1
=0 () )
2- (( ) = ()

Example: Find the Z-transform of the difference equation:


( + 2) = () + 1.7 ( + 1) 0.72 () with (1) = (2) = 0
Applying Z-transform to two sides of the equation, we obtain:

13 | P a g e
Z-transform from s-Domain:
1
1. Partial fraction: Knowing that Z-Transform of: ,
+
Thus,
0 1
() = + + () = 0 + 1 +
+0 +1 0 1

2
Example: Find the Z-transform of () =
2 +5 6

2. Using Residue:


() = () ()

=1

() =
=1

a. If = is a simple pole, then the ith residue is:



= lim ( ) ()

Example:
2
Find the Z-transform of () =
2 +5 6

b. If = is a multiple pole, then the ith residue is:


1 1
= (1)! lim ( ) () , for i=1,2,..
1

14 | P a g e
1
Example: Find the Z-transform of () =
2 (+1)

K1=

K2=

K3=

Thus,

The Inverse- Z-Transform


Knowing that:
1
or
+

The inverse z-Transform via partial fraction:


() ()
() = = + +
()
The inverse is:

() = + +
0.5
Example: Find the inverse z-transform of: () = (0.5)(0.7)

() 0.5 2.5 2.5 2.5 2.5


We have: = (0.5)(0.7) = + () = + , thus
0.5 0.7 0.5 0.7

() = 2.5 (0.5) + 2.5 (0.7)

15 | P a g e
The ideal sampled time function is:

() = () ( ) = (2.5 (0.5) + 2.5 (0.7) ) ( )


=0 =0

Plot by hand the function () for k=0, 1, 2 ..

The inverse z-transform using Residue:


() = () 1 () 1
=1

() =
=1

a. If z= is a simple pole, then the ith residue is:


= lim ( ) () 1

Example:
(1 )
Find the inverse Z-transform of () = (1)( )

16 | P a g e
b. If z= is a multiple pole of order q, then the jth residue is:

1 1
= (1)!
lim 1 {( ) () 1 } , for j=1,2,..

Example:
2 2
1 () = and 2 () =
(1)2 ( ) (1 1 )3

Solution:

Inverse Z-transform via power series method:



()
() = () = (0) + () 1 + (2) 2 + =
()
=0

The coefficient () can be determined by division of N(z) by D(z)


0.5 0.5
Example: Let () = (0.5)(0.7) =
2 1.5 +0.35

17 | P a g e
Transfer function of discrete System:

From the convolution theorem, we have: () = =0 ()( ), () =



=0 () = =0 =0 ()( ) let p = n- k n = p + k

18 | P a g e

() = () () = ()()
=0 =0
How to use MATLAB to write a transfer function

Available Commands for Continuous/Discrete Conversion


The commands c2d, d2c, and d2d perform continuous to discrete, discrete to
continuous, and discrete to discrete (resampling) conversions, respectively.
sysd = c2d(sysc,Ts) % Discretization w/ sample period Ts
sysc = d2c(sysd) % Equivalent continuous-time model
sysd1= d2d(sysd,Ts) % Resampling at the period Ts
>> sys=tf(1,[1 2 1])
Step Response

Transfer function:
1
-------------
s^2 + 2 s + 1

>> Ts=0.1; sysd=c2d(sys,Ts)


Amplitude

Transfer function:
0.004679 z + 0.004377
---------------------
z^2 - 1.81 z + 0.8187

Sampling time (seconds): 0.1


>> step(sys,sysd)
0 1 2 3 4 5 6 7 8
Time (seconds)

Converting G(s) in cascade with Z.O.H to G(z):


Given a Z.O.H in cascade with G(s), find the sampled-data transfer function G(z) ?

19 | P a g e
Y(s)
E(s) E*(s)
T
Zero Order Hold
Z.O.H G(s)

G(z)
1
We have () = () () = ().

Knowing that 1 = , the Z-transform of the system is:


()
() = (1 1 ) .

+2
Example 1: Let 1() = , find () ?
+1

Example 2: Let 2 () = , find 2 () ?
+

1
Solution: 2 () = .

1
Example 3: Let 3 () = , find 3 () ?
2

2 +1
Solution: 3 () = .
2 (1)2

MATLAB Code :
>> T=1;Num=1;Den=[1 0 0];
>> sysc=tf(Num,Den);
>> sysd=c2d(sysc,T,'zoh')
Transfer function:
0.5 z + 0.5
-------------
z^2 - 2 z + 1
Sampling time (seconds): 1

20 | P a g e
Block Diagram Reduction
The rule is: {1 ()2 ()} 1 ()2 ()
Or {1 ()2 ()} 1 () 2 ()
and
{1 ()2 () } = 1 () 2 ()

Find the z-transform of the system shown below:

21 | P a g e
Stability:
In this part, we will see the stability of the digital system and the effect of the
sampling time on the stability. The stability of digital system can be analyzed in Z-
Domain or in S-Domain.

Digital System stability via Z-Plane:

We know that in S-plane, the stability region is in the left-Plane of the S-Domain. If
the transfer function G(s) is transformed into a digital transfer function G(z), the
region of stability on the z-plane can be evaluated from the definition: =

Letting = + , we obtain:

= = (+) = = (cos() + ()) =

From the above equation, we can deduce that the stable domain that corresponds to
<0, lies inside the unity circle, the jw (=0) axis lies on the unity circle, and the
unstable domain >0 lies outside the unity circle.

Thus, a digital system is stable if and only if all poles of the closed-loop
transfer function T(z) are inside the unity circle.

22 | P a g e
The digital system is unstable if any pole of the closed-loop transfer
function T(z) is outside the unity circle.
The digital system is marginally stable if poles of multiplicity one of the
closed-loop transfer function T(z) are on the unity circle and other are
inside the unity circle.

Example: Study the stability of the closed-loop system:

1
Where () = +2 and T=0.5s.

() 0.316
() = (1 1 ) =
0.368
() 0.316
() = 1+() = 0.05 since the pole is inside the unity circle then the
system is stable.
MATLAB Code:
>> T=1;Num=1;Den=[1 2]; >> sysclD=feedback(sysd,1)
>> T=0.5;Num=1;Den=[1 2];
>> sysc=tf(Num,Den); Transfer function:
>> sysd=c2d(sysc,T,'zoh') 0.3161
-----------
Transfer function: z - 0.05182
0.3161
---------- Sampling time (seconds): 0.5
z - 0.3679
Sampling time (seconds): 0.5

23 | P a g e
We can check the stability with regards to the sampling period T:
0.5 1 2
() = The system is stable for all T >0.
(1.5 2 0.5)

10 1 10 1
Let () = +1 () = 10 and () =
(11 10)

The system is stable for: 0 < T< 0.2.

Stability via Routh-Hurwitz criterion:


We can study the stability of digital system using the Routh-Hurwitz
criterion. Indeed, we have just to find the transformation from z-Domain
to s-domain.
We have: = , we cannot use the transformation: () = ()|=
with a nonlinear operator.
The most used transformation is the Bilinear Transformation, where:
+1
=
1
This transformation verifies the mapping from s-domain to z-domain saw
previously.
Example: Let the characteristic equation of a system be:
() = 3 2 0.2 + 0.1 = 0
In s-domain, this is equivalent to: 3 19 2 45 17 = 0.

24 | P a g e
Thus system is unstable and
has 1 pole outside the unity
circle. No pole on the unity
circle and two poles inside
the unity circle.

Jurys Stability test: In this course, we will use this test only for second
order system (For more general system see Ogatas book).
Let the characteristic equation given by: () = 2 2 + 1 + 0
The system is stable if:
1. Q(1) >0;
2. Q(-1) > 0;
3. |0 | < |2 |
0.368 +0.264
Example: Let the digital system defined by: () = 2 1.368 +0.368
Determine the range of K that ensures the stability of the system K G(z)
closed by unity feedback.
() = 1 + () = 2 + (0.368 1.368) + 0.368 + 0.64=0
(1) = 1 + 0.632 > 0
|0 | < |2 | |0.368 + 0.264 | < 1

The system is stable for: 0 < K< 2.39

25 | P a g e
Steady state error:
We now examine the effect of sampling upon the steady state error.
Consider the digital system given below:

()
From the figure, we have: () = () (), or: () = 1+().

Using the final value theorem:


()
= () = lim(1 1 ) () = lim(1 1 )
1 1 1 + ()

Unit Step Input: () =

Thus, the steady state error is:


1
=
1 + lim ()
1

Defining the static error constant Kp as: = lim1 ()


1
=
1 +

Unit Ramp Input: () = (
)

1
The steady state error for this case is: = () =

26 | P a g e
1
where = lim1 ( 1)()

(+)
Unit Parabolic Input: () = ()

1
The steady state error for this case is: = () =

1
where = 2 lim1 ( 1)2 ()

10
Example: Let the open-loop transfer function 1 () = (+1) for the
system shown previously
1
With the ZOH, we obtain: 1 () = 10 1 1 + ;

Thus:
1. For a step input: = lim1 1 () = ess=
1
2. For a ramp input: = ( 1)1 () = 10 ess=
1
3. For a parabolic input: = 2 lim1 ( 1)2 1 () = 0 ess=

Mapping S-Plane to Z-plane


In s-plane, the closed-loop system (under damped system) is given by:
2
() = 2
+ 2 + 2

Dominant poles are: 1 2 and different characteristics are


given:
27 | P a g e
1.8 4 2
= ; = ; % = /1 ; =
1 2

How, we can determine these characteristics from digital system?


The transformation used to z-domain is: = , thus the dominant poles
in Z-Domain are given by:
2 2
1,2 = 1,2 = 1 = 1 = ,
where = and = 1 2 from these two equations, we can
deduce the damping rate and the natural frequency of the system:
1 ln()
= 2 + ln()2 and =
2 +ln()2

Example: Determine all characteristics of the open-loop system


1
1 () = (+1);

In s-domain, the closed loop transfer function is:


() 1
() = = 2
1 + () + + 1
The poles are given by: 1,2 = 0.5 0.866
The performances in s-domain are:
= 0.5; = 1; = 1.368; = 8; = 3.62; % = 16%; = 0

The digital open-loop transfer function is (Ts=1s):


1 0.368 + 0.264
() = (1 1 ) =
2 ( + 1) 2 1.368 + 0.368
The transfer function of the closed-loop system (unity feedback) is:
() 0.368 + 0.264
() = = 2
1 + () + 0.632

The poles are given by: 1,2 = 0.5 0.618


28 | P a g e
r = 0.798 and =0.89 rad (51o)
|ln()| 1
= = 0.27 and = 2 + ln()2 = 0.924
2 +ln() 2

Results are:
= 0.27; = 0.924; = 1.43; = 16; = 3.53; % =
41%; = 0.
System: sysdcl
Peak amplitude: 1.4
Overshoot (%): 40
At time (seconds): 3 Step Response
1.4
System: sys
Peak amplitude: 1.16
Overshoot (%): 16.3
At time (seconds): 3.59
1.2

System: sysdcl
Settling time (seconds): 15.3
System: sys 1
Rise time (seconds): 1.64
System: sys
Settling time (seconds): 8.08
System: sysdcl
0.8 Rise time (seconds): 1.57
Amplitude

0.6

0.4

0.2

0
0 5 10 15 20 25 30 35
Time (seconds)

Note that, if we reduce the sampling period to T=0.1s


29 | P a g e
We obtain:
The digital open=loop transfer function is (for T=0.1s):
1 0.00487 + 0.00467
() = (1 1 ) =
2 ( + 1) 2 1.9 + 0.902
The transfer function of the closed-loop system (unity feedback) is:
() 0.00487 + 0.00467
() = =
1 + () 2 1.9 + 0.9095
The poles are given by: 1,2 = 0.95 0.0837
Results are:
>> roots([1 -1.9 0.9095]) 0.9500 + 0.0837i & 0.9500 - 0.0837i
>> norm([0.95 0.0837]); ans = 0.9537; >> atan2(0.0837,0.95) 0.0879
>> r=0.954;theta=0.0879;psi=-log(r)/sqrt(theta^2+log(r)^2) = 0.4
>> r=0.954;theta=0.0879;omega=sqrt(theta^2+log(r)^2)/0.1= 0.92
= 0.4; = 0.92 ; = 1.6; = 10.86; % = 25%; = 0

Ts Tr Tp %OS Ts ess
0 0.5 1 1.638 3.62 16 8 0
1s 0.27 0.92 1.43s 3.54 41 16 0
0.1s 0.473 0.9951 1.6 3.58 18.51 8.5 0

Note: When (the sampling time is close to zero) T 0, the


performances in discrete time are close to the performances in
continuous time (s-Domain).
30 | P a g e
Design P-Controller via Root Locus:
Note that to draw the Root Locus, you can use exactly the same rules
saw in continuous part.
Further, if the open-loop transfer function is given by: () =
+
(+)(+)
,

The root locus is a circle with center


0 = (,0) with the radius =
( )( )

Determine the gain K that leads to =0.5 (%OS=16) for the system:
1
() =
( + 1)
The easiest solution is to use MATLAB:

31 | P a g e
>> sys=tf(1,[1 1 0])
Root Locus
Transfer function:
1 2
-------
s^2 + s
1

Imaginary Axis
>> Gz=c2d(sys,0.1,'zoh')
0.5
Transfer function:
0
0.004837 z + 0.004679
----------------------
z^2 - 1.905 z + 0.9048
-1
Sampling time (seconds): 0.1
>> rlocus(Gz)
>> zgrid(0.5,0) -2

-6 -4 -2 0 2
Real Axis

Root Locus

0.2 System: Gz
Gain: 0.921
0.15 Pole: 0.95 + 0.0793i
Damping: 0.499
Imaginary Axis

Overshoot (%): 16.4


0.1 Frequency (rad/s): 0.961

0.05

-0.05

0.8 0.9 1 1.1 1.2


Real Axis

The system response with the gain K=0.926 is:

32 | P a g e
>> K=0.921; System: sysdcl
>> sysdcl=feedback(K*Gz,1) 1.4 Step amplitude:
Peak Response 1.17
Overshoot (%): 16.6
Transfer function: At time (seconds): 3.8
1.2
0.004455 z + 0.004309
---------------------
1
z^2 - 1.9 z + 0.9091
System: sysdcl

Amplitude
Sampling time (seconds): 0.1 0.8 Settling Time (seco
>> step(sysdcl)
0.6

0.4

0.2

0
0 2 4 6 8 10 12
Time (seconds)

How we can determine the range of stability of this system?


We have two methods:
1. By using Jurys test,
2. By using Root Locus (find the gain K where the root locus crosses
the unity circle)

33 | P a g e
>> rlocus(Gz) Root Locus
The system is stable:
1
0 < K< 22.3 System: Gz
Gain: 22.3
0.8
Pole: 0.894 + 0.448i

Imaginary Axis
Damping: 0.000296
0.6 Overshoot (%): 99.9
Frequency (rad/s): 4.65
0.4

0.2

0 0.5 1 1.5
Real Axis

Digital PD Controller:
1
Given a system (double integrator) modeled by: () = . We want to achieve the following
2
performances: Ts=0.5s, %OS=25% and zero steady state error.

Design the controller to meet the desired specifications:


a- Using Pole Placement method. Plot the step response of the closed loop system.
b- Using Root Locus. Plot the step response of the closed loop system.
c- Compare the performance of these two methods.
From the desired specifications, we find that: = 0.4 and = 20/.

Using Pole Placement: = 2 and = 2 ( + ) here = = 0, thus = 400 and = 16.

The step response of the closed-loop 1.4


Step Response

system with PD controller in System: syscl


Peak amplitude: 1.25
Overshoot (%): 25.4
A t time (seconds): 0.17

Feedback path: 1.2

System: syscl

>> sys=tf(1,[1 0 0]) Settling time (seconds): 0.42

0.8

>> PD=tf([Kd Kp],1);


Amplitude

>> syscl=feedback(Kp*sys,PD/Kp) 0.6

>> step(syscl) 0.4

0.2

Performance in continuous time:


%OS=25.4; Ts=0.42 s; ess=0; 0
0 0.1 0.2 0.3 0.4
Time (seconds)
0.5 0.6 0.7 0.8

Tr=0.0732s
Digital Controller:

34 | P a g e
MATLAB Code: System: sysdcl
>> sysd=c2d(sys, 0.1) Peak amplitude: 1.26 Step Response
1.4 Overshoot (%): 25.8
sysd = At time (seconds): 0.2

0.005 z + 0.005 1.2


---------------
System: sysdcl
z^2 - 2 z + 1
Settling time (seconds): 0.511
1
Sample time: 0.1 seconds
Discrete-time transfer function.
>> PD_d=c2d(PD,0.1,'matched') System: sysdcl
0.8
Amplitude
PD_d = Rise time (seconds): 0.127
435.8 z - 35.77
Sample time: 0.1 seconds
Discrete-time transfer function. 0.6
Note that tustin approximation
will give unstable system.
0.4
>>
sysdcl=feedback(Kp*sysd,PD_d/K
p) 0.2
>> step(sysdcl)
Performaces are: %OS258,
Ts=0.511; Tr=0.127; ess=1 0
Performances have decreased 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
!!!! Time (seconds)

How to put the equivalent controller in the feedback Path:

HOW to calculate
() ?

From the equality:

() ()
()()
= = () =
we have = ;
() 1+()() () ()
1+ 1+(())() 1+ ()

35 | P a g e

() =
For our case we will obtain: () () =
and
+ (+)

MATLAB Code:
>>Kp=400; Kd=16;Ps=tf(Kp,[1 Kd Step Response
1.4
0]);
>>syscl=feedback(Ps,1)
System: syscl
1.2 Peak amplitude: 1.25
Overshoot (%): 25.4
Same results At time (seconds): 0.17

System: syscl
Time (seconds): 0.425
Amplitude: 0.983
1
System: syscl
Rise time (seconds): 0.0734

0.8

Amplitude
0.6

0.4

0.2

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
Time (seconds)

For better Comparison use SIMULINK or MATLAB (command line with Sim wher the system
is represented by a Simulink file).

36 | P a g e

You might also like