Project Report DCS

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 51

DC MOTOR POSITION

CONTROL
Project Report

SAFEER ULLAH
REG# FA14-REE-

032

LINEAR SYSTEM
THEORY
INSTRUCTOR: Dr. SHAFAYAT
ABRAR
DEPARTMENT OF ELECTRICAL ENGINEERING

COMSATS INSTITUTE OF INFORMATION


TECHNOLOGY, ISLAMABAD

ABSTRACT:Direct current (DC) motor has become an important drive configuration


for many applications across a wide range of powers and speeds, due to its
easy control and excellent performance. This project is mainly concerned on
design and implementation of bidirectional dc motor position control system
by using Matlab and Lab VIEW software. Lab VIEW software will be used to
provide a graphic user interface (GUI) for the user to enter desired angle.

OBJECTIVES OF PROJECT:

MODELLING & ANALYSIS (Both in Continuous & Discrete time )


Mathematical Model of the System.
o Models for systems
a. Electrical
b. Mechanical
c. Electromechanical
o Transfer function
o Laplace transform
o Z transform
o Block diagrams
o Linearization

Implementation of Uncompensated System in MATLAB and

Simulink.
Sate Space Realization of the System.
Implementing the Continuous & Discrete time State Space Model.
CONTROLLER DESIGNING & IMPLEMENTATION
Designing a controller to stabilize the system according to the
required design criteria.
Implementing the Stabilized system in MATLAB & Simulink.
ANALYSIS OF STABLE SYSTEM
Time response
o Transient
o Steady state
Frequency response
o Bode plot
Analysis on Pole Zero map of the stabilized system.
Step Response of the stable system.
TRANSFORMATION
Jordan Canonical Form of the System.
Companion form of the System
Modal Form of the system.

STABILITY ANALYSIS
Eigens Values
Eigen Vectors of the System.
Root locus
PID & Lead--lag
BIBO Stability
Lyapunov Stability.
Controllability & Observability of the System.
DESCRITIZATION
Discretizing the Continuous time Stable System for T=1.

INTRODUCTION:-

Developments of high performance motor drives are very essential for


industrial applications. A high performance motor drive system must have
good dynamic speed command tracking and load regulating response. DC
motors provide excellent control of speed for acceleration and deceleration.
The power supply of a DC motor connects directly to the field of the motor
which allows for precise voltage control, which is necessary for speed,
position and torque control applications. DC drives, because of their
simplicity, ease of application, reliability and favorable cost have long been a
backbone of industrial applications. As compare to AC drives system, DC
drives are very simple. With help of mechanical or electrical techniques,
speed and position control of dc motor could be obtained. In the past, speed
and position controls of dc drives are mostly mechanical, requiring large size
hardware to implement. Advances in the area of power electronics have
brought a total revolution in the speed and position control of dc drives. The
use of power electronics for the control of electric machines offers not only
better performance caused by precise control and fast response, but also
maintenance, and ease of implementation.

Now days, Induction motors, Brushless D.C motors and Synchronous


motors have gained widespread use in electric traction system. Even then,
there is a persistent effort towards making them behave like dc motors
through innovative design and control techniques. Hence dc motors are
always a good option for advanced control algorithm because the theory of
dc motor speed control is extendable to other types of motors as well. The
motor speed and position can be controlled by controlling armature voltage
and armature current. It is obvious that speed control is possible by varying.
Flux per pole, (Flux control).
Resistance Ra of armature circuit (Rheostat Control).
Applied voltage V (Voltage Control).

The above methods have some demerits like a large amount of power
is wasted in the controller resistance. Hence, efficiency is decreased. It needs
expensive arrangement for dissipation of heat produced in the controller
resistance. By these data that are acquainted we can draw a conclusion that
these electric and electromechanical methods are less adaptive so electronic
techniques are used for speed control. These methods provide higher
efficiency, greater reliability, quick response, higher efficiency. One such
technique is Pulse Width Modulation. We will apply this technique in our
project so as to control the speed and position of the DC motor.

PHYSICAL SETUP:
The dc motor is one example of an electro-mechanical system. The
circuit diagram of the armature controlled dc motor is given as follows

Figure 1

Figure 2(a, b)

For this example, we will assume the following values for the physical
parameters.

La

= armature inductance (H) =

2.75 x 10 H

Ra

= armature resistance () =

4 Ohm

Kb

= back emf constant (V/rad/s) (K Kb i ) =

Jm

= moment of inertia of rotor (kgm2) =

Kt

= torque constant (Nm/A) =

0.0274 V /rad / sec


6

3.2284 x 10 kg . m

0.0274 N . m/ Amp

b = viscous friction coefficient (kgm2/s) =

3.5077 x 106 N .m . s

i a (t) = armature current (A)


va ( t )

= applied voltage (V)

e (t)

= back emf (V)

T l (t)

= load torque (Nm)

= magnetic flux in the air gap (Weber, Wb = Vs)


T m (t)

= motor torque (Nm)

m (t)

= rotor angular velocity (rad/s)

(t) = rotor displacement (rad)

MATHEMATICAL MODEL:The equations for obtaining the model can be done by two different
methods. One of them is derived with simple mathematic equations using
Newtons second law and another through the use of the Lagrangian Method.

SYSTEM EQUATIONS:
With the reference of Fig. 1, the developed torque of a dc motor is
proportional to the magnitude of the flux due to the field current if and the
armature current i. Therefore the developed torque can be expressed as:
T =K i ( 1 )
For any given motor, the only two adjustable quantities are the flux
and the armature current. There are two modes of operation of a servomotor.
For the armature-controlled mode (see Fig.1), the filed current is held
constant and an adjustable voltage is applied to the armature. In the field
control mode, the armature current is held constant and a voltage is applied
to the field circuit. Since the above circuit is armature controlled, the filed

current is held constant and therefore the equation (1) can be represented
as:
T =K t i a ( 2 )
Where, T is the motor torque, Ki is the motor torque constant in N-m/A
and i is the armature current.
When the armature is rotating, a voltage proportional to the product of
the flux and angular velocity is induced in the armature. For a constant flux,
the induced voltage ( e ) is directly proportional to the angular velocity by a
Ke
constant factor
.
e=K e m (3 )
Where
and

is the back emf,

Ke

is the back emf constant of motor,

is the angular displacement of the motor shaft. Remember

in SI units. Therefore we use K to represent both

Kt

and

Ke

From Fig. 1, the equation for torque equilibrium is:


m =T
J m +b
m =K i a ( 4 )
J m +b
The differential equation for the armature circuit is:
La

d ia
+ Ra i a +e=v a
dt

La

d ia
+ Ra i a=v ae
dt

Transfer Function:By applying Laplace Transform on eq (4), we get:

La

d ia
+ Ra i a=v aK m ( 5 )
dt

K t =K e

( J m s2 m ( s )+ b s m ( s ) )=K I a ( s )
s ( J m s+ b ) m ( s )=K I a ( s )( 6 )
By applying Laplace Transform on eq (5), we get:

( La s I a ( s ) + Ra I a ( s ) ) =V a ( s )Ks m ( s )
( La s + Ra ) I a ( s )=V a ( s )Ks m ( s )( 7 )
Eliminating

I ( s ) from eq (7), we obtain:

I a ( s) =

V a ( s )Ks m (s)
Put value of
( La s+ R a )

s ( J m s+ b ) m ( s )=K

I ( s ) in eq (6), we obtain:

V a ( s )Ks m (s)
( La s+ Ra )

V a ( s ) K K 2 s m (s )
s ( J m s+ b ) m ( s )=
( La s + R a )
s ( La s+ R a ) ( J m s+ b ) m ( s )=V a ( s ) KK 2 s m ( s)
s ( La s+ R a ) ( J m s+ b ) m ( s ) + K 2 s m (s )=V a ( s ) K
s [ ( La s+ Ra ) ( J m s +b ) + K 2 ] m ( s ) =V a ( s ) K
m ( s)
K
=
[rad /V ]( 8)
(
)
V a s s [ ( La s+ Ra ) ( J m s +b ) + K 2 ]

m ( s)
0.0274
=
[rad /V ]
6
V a ( s ) s [ ( 2.75 x 10 s +4 ) ( 3.2 x 106 s+ 3.50 x 106 ) +0.00075 ]
m ( s)
0.0274
=
[rad /V ]
12 3
V a ( s ) [ 8.878 x 10 s +1.29 x 105 s2 +0.0007648 s ]

MATLAB representation of Transfer Function


We can represent the above open-loop transfer function of the motor in
MATLAB by defining the parameters and transfer function as follows. Running
this code in the command window produces the output shown below.

State Space:
In state-space form, the governing equations above can be expressed
by choosing the rotational position (
state variables.
From eq(4), we get
J m m +b m =K i a

) and electric current ( i ) as the

J m m=K i ab m
K i ab m
m =
Jm
K
b
m = i a m
Jm
Jm
d
K
b
m= i a m ( 9 )
dt
Jm
Jm
d
= ( 10 )
dt m m
From eq(5), we get
La

d ia
+ Ra i a=v aK m
dt

La

d ia
=K m Ra i a+ v a
dt

d i a K m Ra i a+ v a
=
dt
La
R
v
d
K
i a=
m a i a + a ( 11 )
dx
La
La
La
Combining eq(9), eq(10) and eq(11) and representing them in matrix
format, we get

[ ][

b
0
d m
Jm
=
dt m
K
ia
0
La

][ ] [ ]

0
0
K m
0
J m m +
v ( 12 )
1 a
R a i a
La
La

From eq(10), it can be concluded that the armature voltage (

va

) is the

input to the system and the rotational position ( ) is chosen as the output
to the system.

[]

y=[ 1 0 0 ] ( 13 )
ia
From eq: (12) & (13): we get:
x = Ax+ Bu

y=Cx+ Du

[ ][
0

1
b
0
Jm
A=
K
0
La

0
K
Jm
Ra
La

1
3.5077 x 106
0
3.2284 x 106
0.0274
0
2.75 x 106

0
1
0
A= 0 1.0865
8487.18
0 9963.63 1454545.45

] [

0
1
0
3
A= 0 1.0865
8.49 x 10 ;
3
6
0 9.96 x 10 1.45 x 10

0
0.0274
3.2284 x 106
4
2.75 x 106

0
1
0
0 1.0865 8.49e3
0 9.96e3 1.45e6

[ ][ ][

0
0
0
0
0
0
B=
=
= 0 =
;
0
1
1
5
3.64e5
3.64 x 10
La
2.75 x 106

][

C=[ 1 0 0 ] ;
D=[ 0 ] ;
MATLAB representation of State Space Equation:
We can also represent the system using the state-space equations. The
following additional MATLAB commands create a state-space model of the
motor and produce the output shown below when run in the MATLAB
command window.

The output of the above program is shown below:

Solution of the system:

[General State Equation Solution]


x ( t )=e

A ( tt 0)

x ( t 0 ) + e A (t ) Bu ( ) d
t0

If we plug this solution into the output equation, we get:


[General Output Equation Solution]
y (t )=C e

A (t t 0 )

x ( t 0 ) +C e A (t ) Bu ( ) d + Du (t )
t0

0
1
0
A= 0 1.0865
8487.18
0 9963.63 1454545.45

s
1
0
( sI A )= 0 s+1.0865 8.49 x 103
3
6
0 9.98 x 10 s +1.45 x 10

determinant ( sI A )=0

s
1
0
|sI A|= 0 s +1.0865
8487.176 =0
0 9963.636 s+1454545.455
s ( ( s+ 1.0865 )( s+1454545.455 ) + ( 9963.636 )( 8487.176 ) )=0
s ( s 2+ ( 1.0865+ 1454545.455 ) s+ ( 1.08651454545.455 )+ 84563132.33 )
s ( s 2+ 1454546.54 s+ 86143495.97 )
s 1=0, s 2=59.226, s3 =1454487.314

A11
(
)
Adjoint sI A = A21
A31

A12
A22
A32

A 13
A 23
A 33

A 11 =s 2+ 1454546.54 s +86143495.97

( s +59.226 ) ( s+ 1454487.314 )
A 12=0=0
A 13=0
A 21=( s+1454545.455 )
A 22=s( s +1454545.455 )
A 23=9963.636s
A 31=8487.176
A 32=8487.176s
A 33=( s+1.0865 )s

Adjoint ( sI A ) =

( s+59.226 )( s +1454487.314 ) ( s+1454545.455 )


8487.176
0
s( s+1454545.455 ) 8487.176s
0
9963.636s
( s+1.0865 )s

inverse ( sI A )= ( sI A )1=

( sI A ) =

Adjoint ( sI A )
determenant ( sI A )

( s +59.226 )( s +1454487.314 ) ( s+1454545.455 )


8487.176
0
s( s+1454545.455 ) 8487.176s
0
9963.636s
( s+1.0865 )s

s ( s+59.226 )( s+1454487.314 )

1
s

( sI A )1= 0
0

( s+1454545.455 )
s ( s+59.226 )( s +1454487.314 )
( s+1454545.455 )
( s +59.226 )( s+ 1454487.314 )
9963.636
( s +59.226 )( s+ 1454487.314 )

Taking Partial Fraction:

8487.176
s ( s+ 59.226 )( s+1454487.314 )
8487.176
( s+59.226 )( s +1454487.314 )
( s +1.0865 )
( s+59.226 )( s +1454487.314 )

X
Y1
Z1
( s+1454545.455 )
= 1+
+
s ( s+59.226 )( s +1454487.314 ) s ( s+59.226 ) ( s+ 1454487.314 )

0.016885 85 0.016885 85
1.454 x 107

+
s
( s+59.226 ) ( s+1454487.314 )

X2
Y2
( s+ 1454545.455 )
=
+
( s+59.226 )( s+1454487.314 ) ( s+59.226 ) ( s+ 1454487.314 )
5

1.0000 3997
3.9975 x 10

( s+59.226 ) ( s +1454487.314 )

X3
Y3
9963.636
=
+
( s+59.226 )( s+1454487.314 ) ( s+59.226 ) ( s+ 1454487.314 )
3

6.8 5055 x 10
6.8 5055 x 10
+
( s+59.226 )
( s+1454487.314 )

X
Y4
Z4
8487.176
= 4+
+
s ( s+59.226 ) ( s+1454487.314 ) s ( s +59.226 ) ( s+1454487.314 )
5

9.852 x 10
9. 852 x 10
4.007 x 10

+
s
( s +59.226 ) ( s +1454487.314 )
X5
Y5
8487.176
=
+
( s+59.226 )( s+1454487.314 ) ( s+59.226 ) ( s+ 1454487.314 )
3

5.8 35 x 10
5.8 35 x 10

( s+59.226 ) ( s +1454487.314 )

X6
Y6
( s+ 1.0865 )
=
+
( s+59.226 )( s+1454487.314 ) ( s+59.226 ) ( s+ 1454487.314 )

3.997
1.00004
+
( s+59.226 ) ( s +1454487.314 )

1
s

( sI A ) = 0
0

0.01688585 0.01688585
1.454 x 107

+
s
( s+59.226 ) ( s+ 1454487.314 )
1.00003997
3.9975 x 105

( s+ 59.226 ) ( s+1454487.314 )
3
3
6.85055 x 10
6.85055 x 10
+
( s +59.226 )
( s +1454487.314 )

9.852 x 105 9.852 x 105


4.007 x 109

+
s
( s+59.226 ) ( s+1454487.314 )
5.835 x 103
5.835 x 103

( s+ 59.226 ) ( s+1454487.314 )
3.997
1.00004
+
( s +59.226 ) ( s+1454487.314 )

( sI A )
e =L1 (1)=

At

1 0.016885850.01688585 e59.2 t +1.454 x 107 e1454487.3 t 9.852 x 105 +9.852 x 105 e59.2 t + 4.007 x 109 e1454487
0
1.00003997 e59.2t 3.9975 x 105 e1454487.3 t
5.835 x 103 e59.5 t5.835 x 103 e1454487.3 t
0
6.85055 x 103 e59.2t + 6.85055 x 103 e1454487.3 t
3.997 e59.2 t +1.00004 e1454487.3 t

( sI A )

1 0.0168850.01688585 e59.2(t +) + 0.0336 e1.454 x10 (t + ) 9.837 x 105 +9.852 x 105 e59.2 (t +
e A (t + )=L1 (1)= 0
1.00003997 e59.2(t + )3.9975 x 105 e1454487 .3(t+ )
5.835 x 103 e59.2(t+ ) 5.8
0 6.85055 x 103 e59.2(t + )+ 6.85055 x 103 e1454487 .3(t + )
3.997 e59.2(t+ ) +1.00

x ( t )=e

A ( tt 0)

x ( t 0 ) + e A (t ) Bu ( ) d
t0

Now find

At

by Cayley-Hamilton Theorem:

0
1
0
A= 0 1.0865
8487.18
0 9963.63 1454545.45

1
0
( I A )= 0 +1.0865
8487.18
0 9963.63 +1454545.45
determinant ( I A )=0

| I A|= 0 +1.0865
0

9963.63

0
8487.18 =0
+ 1454545.45

( ( +1.0865 )( +1454545.45 ) + ( 9963.63 ) ( 8487.18 ) ) =0


( 2+ (1.0865+1454545.45 ) + ( 1.08651454545.45 )+ 84563132.33 )=0
( 2+1454546.54 + 86143495.97 )
1=0, 2=59.226, 3=1454487.314
According to Cayley-Hamilton Theorem:
At

e =B0 I + B1 A +B 2 A

Or

e =B0 + B1 +B2

For

=0 ;

( )

e t 0 =B0 +B 1 ( 0 ) + B2 ( 0 )

B 0=1
For

2=59.226

e59.226t =B 0+ B 1(59.226)+B 2 (59.226)2


e59.226t =B 059.226 B1+ B2 3507.719
e59.226t =159.226 B1+ B 2 3507.719

Putting valve of

e59.226t 1=59.226 B 1+3507.719 B2


3=1454487.314
e1454487.314t =B0 +B 1(1454487.314)+ B2 (1454487.314)2
1454487.314t

12

=B01454487.314 B1 +2.1155 x 10 B 2

B 0=1

=11454487.314 B1 +2.1155 x 10 B 2

1454487.314t

1=1454487.3146 B 1+2.1155 x 10 B2

12

1454487.314t

Putting valve of

B 0=1

12

][ ] [

59.226
3507.719
B1
e59.226t 1
=
1454487.314 2.1155 x 10 12 B2
e1454487.314t 1

[ ][
[ ][

B1
59.226
3507.719
=
B2 1454487.314 2.1155 x 1012

][
1

e59.226 t 1
e1454487.314 t 1

][

B1
0.016885
2.799 x 1011
e59.226t 1
=
B2 1.1609 x 108 4.727 x 1013 e1454487.314t 1
59.226t

B 1=0.016885(e

11

1)+2.799 x 10
59.226 t

B 1=+0.0168850.016885 e
8

59.226t

B 2=1.1609 x 10 (e

]
]

1454487.314t

(e

1)

11 1454487.314t

+2.799 x 10

13

1)+ 4.727 x 10

1454487.314t

(e

1)

B 2=+1.1609 x 1081.1609 x 108 e59.226t +4.727 x 1013 e1454487.314t


e At =B0 I + B1 A +B 2 A2
e
(1454487.314 t1)
1.1609 x 108 (1e59.226t )+ 4.727 x 1013

1 0 0
0
1
0
e At = 0 1 0 + ( 0.016885 ( 1e59.226t ) +2.799 x 1011 e1454487.314t ) 0 1.0865
8487.176 +
0 0 1
0 9963.63 1454545.45

[ ]
[ ][

0.0168850.016885 e59.226t + 2.799 x 1011 e1454487.314 t


1 0 0 0
e At = 0 1 0 + 0 1.0865 ( 0.0168850.016885 e59.226 t +2.799 x 1011 e1454487.314 t )
8487.176 ( 0.0168850.01
0 0 1 0 9963.6 ( 0.0168850.016885 e59.226t + 2.799 x 1011 e1454487.314 t ) 1454545.45 ( 0.0168850

1
0.016885(1e59.226t )+2.74 x 1011 e1454487.314t
9.85 x 105 (1e59.226t )+ 4.01 x 109 e145
e At = 0
1.000035 ( e59.226 t ) 3.99 x 105 e1454487.314 t
7.02 x 103 e59.226 t 5.83 x 103 e1454487.314 t
0 8.25 x 103 e59.226t +6.884 x 103 e1454487.314 t +1.4 x 103
0.207 e59.226t + 1.000039 e1454487.314 t +

Chapter 02: System Analysis


Design requirements
We will want to be able to position the motor very precisely, thus the
steady-state error of the motor position should be zero when given a
commanded position. We will also want the steady state error due to a
constant disturbance to be zero as well. The other performance requirement
is that the motor reaches its final position very quickly without excessive
overshoot. In this case, we want the system to have a settling time of 40 ms
and an overshoot smaller than 16%.
If we simulate the reference input by a unit step input, then the motor
position output should have:
Settling time less than 40 milliseconds
Overshoot less than 16%
No steady-state error, even in the presence of a step disturbance input

Stability Test by using Eigen Valves:

0
1
0
A= 0 1.0865
8487.18
0 9963.63 1454545.45

1
0
( I A )= 0 +1.0865
8487.18
0 9963.63 +1454545.45

determinant ( I A )=0

| I A|= 0
0

1
0
+1.0865
8487.18 =0
9963.63 + 1454545.45

( ( +1.0865 )( +1454545.45 ) + ( 9963.63 ) ( 8487.18 ) ) =0


( 2+ (1.0865+1454545.45 ) + ( 1.08651454545.45 )+ 84563132.33 )=0
( 2+1454546.54 + 86143495.97 )
1=0, 2=59.226, 3=1454487.314

One pole of the system is on origin and the two are on left hand side, so this
marginally stable.

Open Loop Response:


One method to obtain the open loop response is by using the
MATLAB command ltiview. The MATLAB code for this is as follow:

Step Response

7
6

Amplitude

5
4
3
2
1
0
0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0.18

0.2

Time (seconds)

From the above plot, we can see that when 1 volt is applied to the
system the motor position grows unbounded. This is obviously at odds with
the given requirements, in particular, that there be no steady-state error. The
open-loop response of the system is not even stable. Stability of a system
can be verified with the MATLAB command isstable where a returned value

of TRUE (1) indicates that the system is stable and a returned value
of FALSE (0) indicates that the system is not stable.

Stability of the system can also be determined from the poles of the
transfer function where the poles can be identified using the MATLAB
command pole as shown below.

As indicated by this function, one of the poles of the open-loop transfer


function is on the imaginary axis while the other two poles are in the left half
of the complex s-plane. A pole on the imaginary axis indicates that the free
response of the system will not grow unbounded, but also will not decay to
zero. Even though the free response will not grow unbounded, a system with
a pole on the imaginary axis can grow unbounded when given an input, even
when the input is bounded. This fact is in agreement with what we have
already seen. In this particular case, the pole at the origin behaves like an
integrator. Therefore, when the system is given a step input its output
continues to grow to infinity in the same manner that an integral of a
constant would grow to infinity as the upper limit of the integral is made
larger.

Closed Loop Response:


Let's now consider the closed-loop response of the system where the
system schematic has the following structure.

The closed-loop transfer function for the above with the controller C(s)
simply set equal to 1 can be generated using the MATLAB
command feedback as shown below.

The corresponding unit step response can be generated by adding the


above and following command. The annotations for the peak response,
settling time, and final value can be added to the plot from the right-click
menu under Characteristics.

Step Response

1.4

System: TF_cl
Peak amplitude: 1.07
Overshoot (%): 7.16
At time (seconds): 0.0886

1.2

System: TF_cl
Settling time (seconds): 0.13

Amplitude

1
System: TF_cl
Final value: 1

System: TF_cl
Rise time (seconds): 0.0426

0.8
0.6
0.4
0.2
0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0.18

Time (seconds)

2nd Method for Step Information:

Examining the above closed-loop step response, the addition of


feedback has stabilized the system. In fact, the steady-state error appears to
be driven to zero and the overshoot is less than 16%, though the settle time
requirement is not met. The character of the resulting step response is again
indicated by the location of the poles of the system's transfer function just
like the system's stability properties were. The MATLAB command pzmap will
plot the poles (and zeros) of a given transfer function as shown below.

Pole-Zero Map

40

System: TF_cl
Pole : -29.6 + 35.3i
Damping: 0.643
Overshoot (%): 7.16
Frequency (rad/s): 46.1

Imaginary Axis (seconds-1)

30
20
10

System: TF_cl
Pole : -1.45e+06
Damping: 1
Overshoot (%): 0
Frequency (rad/s): 1.45e+06

0
-10
System: TF_cl
Pole : -29.6 - 35.3i
Damping: 0.643
Overshoot (%): 7.16
Frequency (rad/s): 46.1

-20
-30
-40
-15

-10

-5
-1

Real Axis (seconds )

0
5

x 10

The above plot shows that the closed-loop system has one real pole at
-1.45e6 and a pair of complex poles at (-29.6+35.3j) and (-29.6-35.3j) as
indicated by the locations of the blue x's. The damping and natural
frequencies associated with these poles can be determined by right-clicking
on the associated poles in the resulting plot. This information can also be
determined using the MATLAB command damp as shown below.

(Frequencies expressed in rad/seconds)

Since the one real pole is so much faster than the complex conjugate
poles (its real part is much more negative) its effect on the dynamic
response of the system will be mimimal. Therefore, the damping (zeta =
0.643) and the natural frequency (Wn = 46.1) of the complex conjugate
poles will primarily indicate the response of the closed-loop system.

Adding the following commands will calculate the overshoot and 2%


settle time predicted by these poles assuming that they dominate, in other
words, that we have a canonical underdamped second-order system.

The above results closely match the overshoot and settle time from the
step response plot above which explicitly captured the effect of the third,
non-dominant pole.
Throughout the rest of the pages of this example, different controllers
will be designed to reduce the settle time of the closed-loop step response to
meet the given 40 millisecond requirement while still meeting the other
system requirements, including the zero steady-state error in the presence of
a step disturbance.

PID Controller Design


From the main problem, the open-loop transfer function of the DC
Motor is given as follows.
m ( s)
K
=
[rad /V ]
V a ( s ) s [ ( La s+ Ra ) ( J m s +b ) + K 2 ]
The structure of the control system has the form shown in the figure below.

For the original problem setup and the derivation of the above
equations, please refer to the DC Motor Position: System Modeling page.
For a 1-radian step reference, the design criteria are the following.
Settling time less than 0.040 seconds
Overshoot less than 16%
No steady-state error, even in the presence of a step disturbance input
Now let's design a PID controller and add it into the system. First create a
new m-file and type in the following commands (refer to main problem for
the details of getting these commands).

Recall that the transfer function for a PID controller has the following
form.
C ( s )=K p+

Ki
K d s2 + K p s+ K i
+ K d s=
s
s

Proportional control:
Let's first try using a proportional controller with gain ranging from 1 to
21. An array of LTI models, each with a different proportional gain, can be
built using a for loop. The closed-loop transfer functions can be generated
using the feedback command.

Response to a Step Reference with Different Values of K p

1.8

Kp = 1

1.6

Kp = 11
Kp = 21

Position, (radians)

1.4
1.2
1
0.8
0.6
0.4
0.2
0

0.02

0.04

0.06

0.08

0.1

0.12

Time (seconds)

0.14

0.16

0.18

0.2

Let's also consider the system's response to a step disturbance. In this


case, we will assume a reference of zero and look at the how the system
responds to the disturbance by itself. The feedback command can still be
employed for generating the closed-loop transfer function where there is still
negative feedback, however, now only the plant transfer function P(s) is in
the forward path and the controller C(s) is considered to be in the feedback
path. Refer back to the block diagram at the top of this page to see the
structure of the system. We should generate the plot shown in the figure
below.

1.4

Response to a Step Disturbance with K p = 21 and Different Values of K i


Ki = 100
Ki = 300

1.2

Ki = 500

Position, (radians)

1
0.8
0.6
0.4
0.2
0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0.18

0.2

Time (seconds)

The above plots show that the system has no steady-state error in
response to the step reference by itself, no matter the choice of proportional
gain Kp. This is due to the fact that the plant has an integrator, that is, the
system is type 1. However, the system has significant steady state error
when the disturbance is added. Specifically, the response due to the
reference and disturbance applied simultaneously is equal to the sum of the
two graphs shown above. This follows from the property of superposition that
holds for linear systems. Therefore, to have zero steady-state error in the

presence of a disturbance, we need the disturbance response to decay to


zero. The larger the value of Kp the smaller the steady-state error is due to
the disturbance, but it never reaches zero. Furthermore, employing
increasingly larger values of Kp has the adverse effect of increasing the
overshoot and settle time as can be seen from the step reference plot. Recall
from the DC Motor Position: System Modeling page that adding an integral
term will eliminate the steady-state error and a derivative term can reduce
the overshoot and settling time.

PI control:
Let's first try a PI controller to get rid of the steady-state error due to
the disturbance. We will set Kp = 21 and test integral gains Ki ranging from
100 to 500. We should generate a figure like the one shown below.

Response to a Step Reference with K p = 21 and Different Values of K i

1.8

Ki = 100

1.6

Ki = 300
Ki = 500

Position, (radians)

1.4
1.2
1
0.8
0.6
0.4
0.2
0

0.05

0.1

0.15

0.2

0.25

Time (seconds)

0.3

0.35

0.4

Now let's see what happened to the step disturbance response.


Change the following commands in wer m-file and re-run in the command
window. We should generate a plot like the one shown in the figure below.

0.08

Response to a Step Disturbance with K p = 21 and Different Values of K i


Ki = 100

0.07

Ki = 300
Ki = 500

Position, (radians)

0.06
0.05
0.04
0.03
0.02
0.01
0
-0.01

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

Time (seconds)

The integral control has reduced the steady-state error to zero, even
when a step disturbance is present; that was the goal for adding the integral
term. For the response to the step reference, all of the responses look similar
with the amount of oscillation increasing slightly as Ki is made larger.
However, the response due to the disturbance changes significantly as the
integral gain Ki is changed. Specifically, the larger the value of Ki employed,
the faster the error decays to zero. We will choose Ki = 500 because the
error due to the disturbance decays to zero quickly, even though the
response to the reference has a longer settling time and more overshoot. We
will attempt to reduce the settling time and overshoot by adding a derivative
term to the controller.

PID control:
Adding a derivative term to the controller means that we now have all
three terms of the PID controller. We will investigate derivative

gains Kd ranging from 0.05 to 0.25. Go back to the m-file and make the
following changes.

Response to a Step Reference with K p = 21, Ki = 500 and Different Values of Kd

1.4

K d = 0.05
K d = 0.15

1.2

K d = 0.25

Position, (radians)

1
0.8
0.6
0.4
0.2
0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

Time (seconds)

Let's see what happened to the step disturbance response.

Response to a Step Disturbance with K p = 21, K i = 500 and Different values of K d

0.06

Kd = 0.05
Kd = 0.15

0.05

Kd = 0.25

Position, (radians)

0.04
0.03
0.02
0.01
0
-0.01

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0.18

0.2

Time (seconds)

It looks like when Kd = 0.15, we can meet our design requirements. To


determine the precise characteristics of the step response we can use the
right-click menu of the step response plot, or we can use the MATLAB
command stepinfo as shown below.

From the above, we see that the response to a step reference has a
settling time of roughly 34ms (< 40 ms), overshoot of 12% (< 16%), and no
steady-state error. Additionally, the step disturbance response also has no
steady-state error. So now we know that if we use a PID controller with Kp =
21, Ki = 500, and Kd = 0.15, all of our design requirements will be satisfied.

Drawing the open-loop root locus


The main idea of root locus design is to predict the closed-loop
response from the root locus plot which depicts possible closed-loop pole
locations and is drawn from the open-loop transfer function. Then by adding
zeros and/or poles via the controller, the root locus can be modified in order
to achieve a desired closed-loop response. Let's first view the root locus for
the plant.
6

Root Locus - P Control

x 10

Imaginary Axis (seconds-1)

3
2
1
0
-1
-2
-3
-4
-5
-6

-5

-4

-3

-2

-1

Real Axis (seconds -1)

3
6

x 10

The commands sgrid and sigrid are functions that mark regions of the
complex plane corresponding to certain parameters. sgrid is a function in the
Control System Toolbox; however, to use sigrid we will have to download
it here. The variables in the sgrid command are the damping ratio (zeta =
0.5) and the natural frequency (Wn = 0). The variable in the sigrid command
is the sigma term. The zeta and sigma used above correspond to an
overshoot of 16% and a settling time of 0.040 seconds, respectively, for a
canonical second-order system. Even though our motor transfer function is
third order, it will be explained that these second-order based definitions will
work well. No value is given for Wn since we have no requirement on rise
time.
From the above figure, the two open-loop poles near the origin cannot
be distinguished because the scale of the axes is set to show the third pole
which is much farther to the left than the other two poles. The MATLAB
command pole can be employed to determine the exact values of the openloop poles.

The open-loop pole located very far to the left (further than -1e6) does
not affect the closed-loop dynamics unless very large gains are used. These
large gains place two of the closed-loop poles in the right-half complex splane where the system becomes unstable. Since we will not use gains that
will make the closed-loop system unstable, we can neglect this pole by
performing a model reduction.
Model reduction
In general, the real part of a pole indicates how quickly the transient
portion of the corresponding mode decays to zero (assuming negative real
part). Therefore, if we have a transfer function which has one (or more) poles
much farther to the left in the complex plane (more negative) than the other
poles, their effect on the dynamic response will be hidden by the slower,
more dominant poles. In the case of our motor position example, the
transient closed-loop response for small gains will not be affected much by
the open-loop pole at -1.45e6. The correct way to neglect this pole in order
to maintain its steady-state contribution is to keep the DC gain of the
transfer function the same, as follows:
H ( s )=

G( s)
G ( s ) for s p
s
+1
p

( )

As shown above, the poles of the open-loop transfer function can be


identified using the MATLAB command pole. The two poles that dominate are
difficult to identify from above because of the scientific notation, but they
can be seen more clearly by recognizing that they are the first and third
elements of the resulting vector which we have named poles.

We can then check that the other poles have not been affected by
again using the pole command as shown below.

Now we can draw the root locus of the reduced system.


Root Locus - P Control

200

0.5

Imaginary Axis (seconds-1)

150
100
50
0
-50
-100
-150
-200
-300

0.5
-250

-200

-150

-100

-50

50

100

Real Axis (seconds -1)

If we examined the original root locus near the origin, it would closely
approximate the locus of the reduced transfer function shown above. We can
see from this new plot that the closed-loop poles are never fast enough to
meet the settling time requirement (that is, they never move to the left of
the sigma = 100 vertical line). Also, recall that we need an integrator in the
controller (not just in the system) to remove the steady-state error due to a
constant disturbance.
Integral control

Now, let's try using integral control to remove the steady-state error
due to a constant disturbance. Note that this adds a 1/s term to the forward
path of the system. Run this m-file and we will obtain a plot like the one
shown below.
Root Locus - I Control

200

0.5

Imaginary Axis (seconds-1)

150
100
50
0
-50
-100
-150
-200
-300

0.5
-250

-200

-150

-100

-50

50

100

Real Axis (seconds -1)

From this root locus we can see that the closed-loop system under
integral control is never stable, therefore, a different controller must be
employed.
PI control
Now, let's modify the integral controller to a PI controller. Using PI
instead of I control adds a zero to the open-loop system. We'll place this zero
at s = -20. The zero must lie between the open-loop poles of the system in
this case so that the closed-loop system will be stable.

Root Locus - PI Control

200

0.5

Imaginary Axis (seconds-1)

150
100
50
0
-50
-100
-150
-200
-300

0.5
-250

-200

-150

-100

-50

50

100

Real Axis (seconds -1)

We have managed to stabilize the system and achieve zero steadystate error to a constant disturbance, but the system is still not fast enough.
PID control
In order to pull the root locus further to the left, to make it faster, we
need to place a second open-loop zero, resulting in a PID controller. After
some experimentation, we place the two PID zeros at s = -60 and s = -70.
Change the lines defining the controller in wer m-file to the following. Re-run
wer m-file and we will generate a plot like the one shown below.
Root Locus - PID Control

200

0.5

Imaginary Axis (seconds-1)

150
100
50
0
-50
-100
-150
-200
-300

0.5
-250

-200

-150

-100

-50

50

100

Real Axis (seconds -1)

Now, we can see that two of the closed-loop poles can be placed well
within both the settling time and percent overshoot requirements. The third

closed-loop pole moves from the open-loop pole at s = -59.2 to the open-loop
zero at s = -60. This closed-loop pole nearly cancels with the zero (which
remains in the closed-loop transfer function) because they are so close
together. Therefore, we can neglect its effect. Let's reduce our new model
again by performing the zero-pole cancelation using the minrealcommand.
We pass 0.1 as a tolerance parameter as follows. The root locus for this
further reduced system with controller is shown below. Note how closely it
resembles the root locus without the pole-zero cancelation.
Root Locus - PID Control

200

0.5

Imaginary Axis (seconds-1)

150
100
50
0
-50
-100
-150
-200
-300

0.5
-250

-200

-150

-100

-50

50

100

Real Axis (seconds -1)

Even though the one open-loop zero was canceled, the other open-loop
zero remains in the closed-loop transfer function and cannot be neglected.
The effect of an additional zero (if there is no cancellation) is in general to
speed up the response and add overshoot. Therefore, we have to be
conservative in picking where on the root locus we want the closed-loop
poles to lie.
Determining gain using rlocfind command
If we recall, we need the settling time and the overshoot to be as small
as possible, particularly because of the effect of the extra zero. Large
damping corresponds to points on the root locus near the real axis. A fast
response corresponds to points on the root locus far to the left of the
imaginary axis. To find the gain corresponding to a point on the root locus,
we can use the rlocfind command. Specifically, enter the command [k,poles]
= rlocfind(rsys_ol) in the MATLAB command window.
Then go to the plot and select a point on the root locus on left side of
the loop, close to the real axis as shown below with the small + marks. This
will ensure that the response will be nearly as fast as possible with minimal
overshoot. These pole locations indicate that the response would have

almost no overshoot if it were a canonical second-order system. Recall,


however, that the presence of the zero will add some overshoot.
Root Locus - PID Control

200

Imaginary Axis (seconds-1)

150
100
50
0
-50
-100
-150
-200
-300

-250

-200

-150

-100

-50

50

100

Real Axis (seconds -1)

After doing this, we should see the following output in the MATLAB
command window.

Note that the values returned in wer MATLAB command window may
not be exactly the same, but should at least have the same order of
magnitude. We can also get the step response plots for the reference and
disturbance with this specific controller and loop gain by executing the
following code in the command window. These commands should produce
the plots shown below where the annotations to the figures are added by
choosing Characteristics from the right-click menu of each of the plots.

Response to a Step Reference with PID Control

1.4
1.2

Position, (radians)

1
0.8
0.6
0.4
0.2
0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

Time (seconds)

Response to a Step Disturbance with PID Control

0.06

Position, (radians)

0.05

0.04

0.03

0.02

0.01

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

Time (seconds)

From the above, we can see that in response to a step reference the
system has an overshoot of approximately 14%, a settling time just under
0.04 seconds, and no steady-state error. Also, the response to a step

disturbance reaches a steady-state value of zero. Therefore, all of the design


requirements have been met.
In this example we placed the zeros of our compensator in order to
reshape the root locus so that the closed-loop poles could be placed in the
region of the complex plane that would achieve our given design
requirements. It is in general helpful to understand the principles of how the
root locus is drawn, however, MATLAB can be very helpful in refining the
design and verifying the resulting performance.

Digital Controller Design


Creating a sampled-date model of the plant
The first step in the design of a digital control system is to generate a
sampled-data model of the plant. Therefore, it is necessary to choose a
frequency with which the continuous-time plant is sampled. In choosing a
sampling period, it is desired that the sampling frequency be fast compared
to the dynamics of the system in order that the sampled output of the
system captures the system's full behavior, that is, so that significant intersample behavior isn't missed.
Let's create a continuous-time model of the plant. Create a new mfile and add the following MATLAB code (refer to the main problem for the
details of getting these commands). Running the m-file within the MATLAB
command window will generate the output shown below.

The use of the zpk command above transforms the transfer function
into a form where the zeros, poles, and gain can be seen explicitly.
Examining the poles of the plant (or its frequency response), it is clear that
the pole at -1.45e06 contributes very little to the response of the plant. The
gain crossover frequency of the plant is approximately 5 Hz. Therefore,
choosing a sampling period of 0.001 seconds (frequency of 1000 Hz) is
significantly faster than the dynamics of the plant. This sampling period is
also fast compared to the speed that will be achieved by the resultant
closed-loop system. A sample time of 0.001 seconds is specifically 1/100 of
the required time constant and 1/40 of the required settling time.
In this case, we will convert the given transfer function from the
continuous Laplace domain to the discrete z-domain. MATLAB can be used to
achieve this conversion through the use of the c2d command.
The c2d command requires three arguments: a system model, the sampling
time (Ts), and the type of hold circuit. In this example, we will assume a zeroorder hold (zoh) circuit. Refer to the Introduction: Digital Controller
Design page for further details. Adding the following commands to wer m-file
and running in the MATLAB command window generates the sampled-data
model shown below.

From the above, notice that there is a pole and zero very near to z = 0
that effectively cancel. This cancellation in the transfer function can be
accomplished by applying theminreal command with a tolerance of 0.001.
Cancellation of this pole and zero will reduce the order of our transfer
function and will help to avoid numerical difficulties in MATLAB. Applying
the minreal command, therefore, produces the following reduced order
transfer function. Note the absence of the pole and zero near z = 0.

We would now like to analyze the closed-loop response of the system


without any additional compensation. First, we have to close the loop of the
transfer function by using the feedback command. After closing the loop,
let's inspect the closed-loop step response with the zero-order hold. This can
be
accomplished
by
using
the step and stairscommands.
Since
the step command is fed a discrete model, it will output a vector of discrete
samples at the sample time Ts associated with the model (click here for
further details). The syntax below specifies to simulate the step response for
0.5 seconds. The stairs command draws these discrete data points as a
stairstep, just like what would be produced by a zero-order hold circuit. Add
the following code at the end of wer previous m-file and rerun it. We should
generate a plot like the one shown below.

Root locus design


We will now employ a root locus design methodology to generate a
digital controller for our system. The main idea of a root locus approach to
design is to modify the closed-loop response by placing the closed-loop poles
of the system at desired locations. Adding poles and zeros to the original
open-loop transfer function via the controller allows us to reshape the root
locus in order to place the closed-loop poles at the desired locations. This
approach can also be used for discrete-time models. We will use the SISO
Design Tool graphical user interface (GUI) for designing our controller. Adding
the command sisotool('rlocus',dP_motor) to wer m-file will open the SISO
Design Tool when run at the command line.
Two windows will open initially with the SISO Design for SISO Design
Task window having the form shown in the figure below. This figure shows the
root locus of the transfer function d_TF passed through the sisotool function.
This figure appears initially due to the addition of the string 'rlocus' to the
function call. If the string'rlocus' is omitted, the default initial window
includes the open-loop Bode plot in addition to the root locus plot.

Root Locus Editor for Open Loop 1(OL1)

1.5

Imag Axis

0.5

-0.5

-1

-1.5

-2
-5

-4

-3

-2

Real Axis

-1

Recall from our previous controller designs that we have added an


integrator to our compensator in order to reject the effect of a constant
disturbance in steady state. We can add integral control through the SISO
Design Tool interface under the Compensator Editor tab of the Control and
Estimation Tools Manager window. Specifically, an integrator is added to our
controller by right-clicking on the Dynamics section of the window and
selecting Add Pole/Zero > Integrator from the resulting menu. The figure
below illustrates what the Control and Estimation Tools Manager window
should look like.
Integral control in the continuous-time domain is 1/s. The SISO tool
uses a forward difference approximation for mapping from the s-plane to the
z-plane as described by s = (z-1)/Ts, where Ts is the sample time being
employed. Therefore, the addition of the integrator will add an additional
pole at 1 on the root locus plot. See below for the resulting root locus plot
where the red x denotes the location of the compensator pole at z = 1.

Root Locus Editor for Open Loop 1(OL1)

10
8
6
4

Imag Axis

2
0
-2
-4
-6
-8
-10
-1

-0.5

0.5
Real Axis

1.5

The default format for compensators in the SISO Design Tool is Time
constant form. For the remainder of this problem, we will design the
compensator in Zero/pole/gainform. This change can be made by
choosing SISO Tool Preferences ... from the Edit menu of the Control and
Estimation Tools Manager window. The compensator parameterization can
then be changed under the Options tab.
By default, the root locus plot includes the unit circle shown in the
above figure by the dashed line. Recall that for a discrete-time system,
closed-loop poles located within the unit circle indicate a stable closed-loop
system. From the above, we can see that the after adding the extra pole at 1,
the root locus had three poles near 1. This caused the root locus to move to
the right (outside of the unit circle) indicating that the closed-loop response
will be more unstable.
Therefore, we will add a zero near 1, inside the unit circle, to cancel
one of the poles and pull the root locus in. We will specifically add a zero
at z = 0.95. In general, we must add at least as many poles as zeros for the
controller to be causal. This zero can be added to our compensator in the
same manner as the integrator was added above. The only difference is that
we will choose Real Zero from the right-click menu and then must specify in
the Location cell that the zero is to be placed at 0.95. The root locus plot
should now appear as shown below.

Root Locus Editor for Open Loop 1(OL1)

1.5

Imag Axis

0.5

-0.5

-1

-1.5

-2
-6

-5

-4

-3

-2
Real Axis

-1

The addition of the integrator has helped with the requirement on


disturbance rejections, however, the above root locus indicates that the
closed-loop system cannot be made robustly stable through further tuning of
the loop gain. We also have not addressed our other design requirements. To
help us in this regard, let's identify the region of the complex plane where
the closed-loop poles must be located.
These regions can be added to our root locus by choosing Design
Requirements from the right-click menu. Then choose new and set the
overshoot to be less than 16%. This process can then be repeated to add the
settling time requirement of less than 0.04 seconds. The resulting figure is
shown below where the unshaded region identifies where the closed-loop
poles must be located to meet our given transient requirements. These
regions assume a canonical second-order system, which we do not have
currently, but the regions can still help guide our design.

From the above figure, we can see that the two dominant branches of
our root locus do not pass through the required region. Therefore, we need to
add poles and/or zeros to our compensator to bend the root locus into the
desired region. Let's first try cancelling the zero at approximately -0.98 by
adding a pole nearby. This can be done in the same manner described above
for the integrator and the real zero. It is desirable to cancel this zero since it
will add overshoot to the step response. The addition of this pole will result in
two of the branches of the root locus going off to the right and outside of the
unit circle.
We will attempt to pull these branches in by placing two additional
zeros near the desired closed-loop pole locations. These zeros can be added
via the Compensator Editor tab as done above. In this case, however, we will
place the zeros using a graphical tuning approach. Specifically, select a
single o from the tool bar at the top of theSISO Design for SISO Design
Task window. Then click the resulting "pointer" on the real axis to place the
zero. Repeat this process to add a second zero. The effect of moving these
two zeros can then be seen by moving the pointer over the
corresponding o on the root locus and clicking on it. While holding down the
mouse button, we can then move the zero along the real axis to visualize the
effect of different locations. Through trial and error we arrive at a location of
0.8 for the two zeros. In order to make the controller causal, we need to add
an additional pole. Using a graphical approach again, we can add a real pole
by choosing an x from the tool bar at the top of the SISO Design for SISO
Design Task window. Through trial and eror we arrive at a pole location of
0.6. The resulting root locus is shown below.

Next we must choose a loop gain in order to move the closed-loop pole
locations along the root locus to the desired location. Since our closed-loop
system is not canonical second order, we will have to employ some trial and
error to identify the exact pole locations. In order to assist us in this regard,
we can open a plot for the closed-loop step response so that we can observe
the effect of the gain changes on the actual step response, without having to
rely on a second-order idealization.
The closed-loop step response plot is opened from the Control and
Estimation Tools Manager window under the Analysis Plots tab as shown
below. In this tab, selectStep from the drop-down window for Plot 1 under
the Analysis Plots section of the window. Then under the Contents of
Plots section of the window check the box for Plot 1 on the first row, which
corresponds to a plot for the Closed Loop r to y. Finally, click the Show
Analysis Plots button to produce the closed-loop step response.
The resulting step response plot with loop gain of 1 appears to meet
the settling time requirement, but not the overshoot requirement. In order to
be certain, we can define the allowed step response shape by
choosing Design Requirements from the right-click menu of the step
response plot and choosing the overshoot to be 16% and the settling time to
be 0.040 seconds. Note that we will need to choose a rise time of less than
0.040 seconds, even though we have no such requirement.
We will now modify the loop gain to meet the overshoot requirement.
Using a graphical tuning approach, grab one of the pink boxes on the root
locus plot by clicking on it, then drag the box along the locus. Each box

represents the location of a closed-loop pole and dragging the box along the
locus changes the loop gain to the value that places that closed-loop pole at
that specified location. Through trial and error, a loop gain of 800 reduces
the overshoot of the associated step response to approxomately 10% while
achieving a settling time of approximately 0.02 seconds. Furthermore, the
steady-state error goes to zero when there is no disturbance present. The
resulting step response plot is shown below.

The only thing now left to verify is the system's disturbance rejection
properties. A plot of the system's response to a step disturbance can be
generated from the Analysismenu of the SISO Design for SISO Design
Task window. Instead, we will generate the disturbance response plot from
the MATLAB command line. Before we do that, however, we must first export
the compensator we have designed in the SISO Design Tool to the
workspace. This is accomplished by selecting Export from the File menu of
the Control
and
Estimation
Tools
Manager window.
We
then
select Compensator C and click on the Export to Workspace button. Once we
have done this, then enter the following instructions in the command window
to produce the response plot shown below.

Examination of the above shows that for a step disturbance, the


steady-state error will still go to zero. Employing the property of
superposition, it is also apparent that the total response will have overshoot
less than 16% and will reach steady-state well within the 40 millisecond
requirement.

You might also like