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

Z-Plane RL Design Using MATLAB: 2.1 Plant

This document describes using MATLAB to design a lead compensator controller for a unit inertia plant with a specified closed-loop response. The plant and specifications are presented, including a desired damping ratio of 0.707 and natural frequency of 100 Hz. A proportional controller results in an unstable system. A lead compensator is designed by placing a zero near the desired closed-loop pole and using root locus analysis to find the compensator pole location. The closed-loop response is analyzed, showing poles near the specified frequency and damping, confirming the successful design of the lead controller.

Uploaded by

pra_zara2637
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Z-Plane RL Design Using MATLAB: 2.1 Plant

This document describes using MATLAB to design a lead compensator controller for a unit inertia plant with a specified closed-loop response. The plant and specifications are presented, including a desired damping ratio of 0.707 and natural frequency of 100 Hz. A proportional controller results in an unstable system. A lead compensator is designed by placing a zero near the desired closed-loop pole and using root locus analysis to find the compensator pole location. The closed-loop response is analyzed, showing poles near the specified frequency and damping, confirming the successful design of the lead controller.

Uploaded by

pra_zara2637
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ME 481/581

Chapter 5

February 29, 2012

Z-Plane RL Design using MATLAB

Introduction.

This document is intended to give you an example of using MATLAB and root locus to design controllers (compensators) in the z-plane.

2
2.1

Plant and Specifications.


Plant.

The plant will be an pure unit inertia; this could be any rotary element in a low-friction environment. The general
transfer function from applied torque to angular position for a pure inertia is
1
1
(s)
=
= 2 (unit inertia)
2
(s)
Js
s

2.2

(1)

Specification.

I arbitrarily selected the closed-loop natural frequency to be 100 Hz and damping of 0.707, along with a sampling
frequency of fs =500 Hz (T =0.002). This corresponds to desired s-plane and z-plane pole locations of
p
s = n jn 1 2 444 j444.
(2)
z = esT = 0.2596 + j0.3192 0.26 + j0.32

(3)

This sampling frequency is quite low; we would typically sample at perhaps 20 the bandwidth (natural frequency).

2.3

Discretized Plant.

With T =0.002, the zoh-discretized model of the plant (found using MATLAB c2d) is:
>> Gc = tf([0 0 1],[1 0 0])
Transfer function:
1
--s^2
>> Gd = c2d(Gc,T)
Transfer function:
2e-06 z + 2e-06
--------------z^2 - 2 z + 1
Sampling time: 0.002
This can be expressed as
G(z) =

(2e 6)(z + 1)
(2e 6)z + (2e 6)
=
z 2 2z + 1
(z 1)2

Note the small numerator constant of 2e 6; that will probably be counteracted by a large forward path gain.

(4)

ME 481/581

Chapter 5

February 29, 2012

Compensator Design.

Proportional control will be tried first, then a lead compensator.

3.1

Proportional Control.

With proportional control the actuating signal sent to the plant is proportional to the error signal, hence the compensator is a pure gain K.
3.1.1

Closed-Loop Transfer Function.

With system input called R(z) and system controlled variable (output) called Y (z) the closed-loop transfer function
W (z) is
KG(z)
Y (z)
=
R(z)
1 + KG(z)

(5)

1 + KG(z) = 0

(6)

hence the system characteristic equation is

This is already in root locus form.


3.1.2

Root Locus of Proportional Control.

Using equation (6) we can draw the MATLAB root locus:


>> rlocus(Gd); axis equal; grid;
Zooming in on the locus near the +1 point we get the figure below:
Root Locus

0.4/T

0.3/T

0.7

0.6
0.2/T

Imaginary Axis

0.5

0.4

0.3

0.1/T

0.2 0.5/T

0.1

0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9

0.6/T

0.2

0.4

0.6

0.8
Real Axis

1.2

1.4

The locus (blue line) starts from the double pole at z = 1 and goes outside the unit circlethis system is unstable.

ME 481/581

3.2

Chapter 5

February 29, 2012

Lead Compensator.

We need to improve the stability of this system. A lead compensator (a quasi-differentiator) will do that. This can be
seen from two perspectives:
A lead network will pull the locus to the left, thus keeping it inside the unit circle
A lead network adds positive phase angle, thereby improving the phase margin
The structure of a lead compensator D(z) is
D(z) =

z+b
z+a

(7)

where the zero is closer to the +1 point than the pole.


3.2.1

Compensator Pole/Zero Locations.

My philosophy on lead compensator design is to place the compensator zero in the s-plane at about one-third the
distance of the desired dominant poles. Thus if the desired poles are at 445 j445 Id place the compensator zero
at about 445/3 150. Now in the z-plane this zero location would be
z = esT = e(150)(0.002) 0.74 = D(z) =

z 0.74
z+a

(8)

The location of the compensator pole is found using the root-locus angle condition, in which we use open-loop transfer
function D(z)G(z):
(angles of vectors from poles to desired pole) (angles of vectors from zeros to desired pole) = 180

(9)

The relevant values in this problem are:


The open-loop poles: -1, -1, and the unknown lead compensator pole
The open-loop zeros: 0.74, -1
The desired closed-loop pole: 0.26+j0.32
I suggest you draw the z-plane and draw these vectors. Here are the values that I found:
2(156 ) + 146 14 = 180

(10)

Parameter in (10) is the angle of the vector from the lead compensator pole to the desired closed-loop pole location.
From (10) this angle is
= 28

(11)

This implies that the pole must be located at z = 0.354, thus the lead compensator is
D(z) =

z 0.74
z + 0.35

(12)

The root-locus diagram of D(z)G(z) is shown on the next page; the cross shows where I specified the desired pole
(near = 0.6).
The corresponding K at this point is:
K = 3.14e5 = 314, 000
Remember the small numerator constant in G(z)? This K makes up for it.

(13)

ME 481/581

Chapter 5

February 29, 2012

Root Locus

0.6/T

0.5/T

0.4/T

0.8

0.1 0.3/T
0.7/T

0.2
0.3

0.6

0.2/T

0.4
Imaginary Axis

0.5
0.4 0.8/T

0.6
0.7
0.1/T

0.8
0.2 0.9/T

0.9

/T
0
/T
0.2 0.9/T
0.1/T
0.8/T

0.7/T

0.6/T 0.5/T 0.4/T

0.3/T

0.2/T

0.4
0.5

0.5

Real Axis

Final Closed-Loop System.

With the D(z) and G(z) given previously, the closed-loop transfer function is
Y (z)
KD(z)G(z)
=
R(z)
1 + KD(z)G(z)

(14)

Using MATLAB, this is


>> Wd = feedback(K*Dd*Gd,1)
Transfer function:
0.6287 z^2 + 0.1635 z - 0.4652
----------------------------------z^3 - 1.017 z^2 + 0.4555 z - 0.1112
Sampling time: 0.002
>> damp(Wd)
Eigenvalue

Magnitude

Equiv. Damping

Equiv. Freq. (rad/s)

5.58e-01
2.29e-01 + 3.83e-01i
2.29e-01 - 3.83e-01i

5.58e-01
4.46e-01
4.46e-01

1.00e+00
6.16e-01
6.16e-01

2.91e+02
6.54e+02
6.54e+02

The complex closed-loop poles have a damping ratio of 0.65 and a natural frequency of 654 rad/s (104 Hz). Id say
our design is pretty close.
One could get the step response, etc.
Since this is a Type II system, it should definitely have a DC gain of 1.00; from MATLAB we get
>> dcgain(Wd)
ans = 1

You might also like