Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

UNIVERSITI MALAYSIA SABAH


SCHOOL OF ENGINEERING AND INFORMATION TECHNOLOGY

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MAKMAL KAWALAN
KE30501

LAB 5
Positional
itional Servo Using P.I.D Control

Name

: ________________________
______________

Matrix No.

: ________________________
__________________

Date

: ________________________
____________________

Control Lab#5: Positional Servo Using P.I.D Control 5-1

Lab 5: Positional
itional servo using P.I.D
P
control

5.1 Objectives

To understand proportional plus integral plus derivative control action.


To become familiar with proportional plus integral plus derivative (P.I.D.) controllers.

5.2 Proportional and Derivative Control


Derivative feedback control involves using the rate of change of the error
err signal to reduce
overshoot. When a step input is applied, the error initially rises to a high value and then decreases
as the system nears alignment. The initial high rate of change of error results in the derivative
output producing a very short positive peak.
As the motor accelerates
ates to maximum speed, the error signal begins to decrease. This results in the
derivative decreasing to a negative value, rising to zero when the motor has reached its maximum
speed and the error becomes constant. The process then reverses producing a negative
neg
spike as
the motor reverses at maximum overshoot.
In a proportional feedback system, the error signal is used to control the motor drive. The error
signal does not go negative (producing reverse torque) until the step input goes negative. The
important
tant point is that due to the overshoot of the error signal, no reverse torque can be applied
via the motor to slow it down until after it has passed through alignment.
However a combination of error and its derivative becomes negative before alignment causing
c
the
motor to provide reverse torque and stop the overshoot. As the motor slows towards alignment
the derivative component drops towards zero. If too much derivative component is added the
response becomes slow. The best response depends on the application
application but a small amount of
overshoot is tolerable in exchange for a reasonable response speed.
Expressed mathematically the motor control voltage, V is given by:
V
= error + derivative of error
= V + dV/dt
When the two gain factors are added:
V
= Kp( V + Kd(dV/dt) )
Where Kp is the proportional gain and Kd the derivative gain.

5.3 Proportional and Integral Control


The reason that in a purely proportional control system there must be a residual following error is
simple. As the motor is driven only by error, if there were
were none the motor would stop! Hence if the
system is static the error can be zero because there is no requirement to drive the motor. However
as soon as the motor is required to move there must be following error.

Control Lab#5: Positional Servo Using P.I.D Control 5-1


KE30501/KENTEO/0910(1)

Control Lab#5: Positional Servo Using P.I.D Control 5-2

Increasing the gain reduces the following error that is needed to keep the motor turning. For a
fixed speed, the signal required to drive the motor is fixed. Therefore the higher the gain, the
smaller the following error can be to provide that drive.
The faster the input changes, the faster the motor needs to go in order to follow the input. So, for a
fixed gain, the larger the following error must become to supply the drive. Suppose that the motor
is being driven in order to follow an increasing input. The following error is a constant value. A sum
of all the previous errors would be rising continuously and, if this component were added to the
motor drive signal, the motor would speed up and the following error reduce. This would in turn
make the integral component level off at a value just enough to keep the motor running at the
correct speed to make the error zero. The system always tries to maintains a state of zero following
error.
The important point is that now even though the following error may be zero, the motor can still be
driven by the integral component.
Expressed mathematically the motor control voltage, V is given by:
V
= error + integral of error
= V + V dt
When gain factors are added:
V
= Kp ( V + Ki (V dt) )
Where Kp is the proportional gain and Ki the integral gain.
5.4 Proportional, Derivative and Integral Control
The combination of the three terms (proportional, integral and derivative) can be thought of as
separate characteristics. Proportional, to provide the general error driven control signal. Integral,
so that there does not have to be a residual error to provide the control signal. Derivative, to give
the system stability and hence reduce overshoot.
However, in some ways the derivative and integral terms act against each other and are all
controlled by one overall gain, making the analysis much more involved.
The error control channel is like this:

Expressed mathematically the motor control voltage, V is given by:


V
= error + integral of error + derivative of error
= V + V dt + dV/dt

Control Lab#5: Positional Servo Using P.I.D Control 5-2


KE30501/KENTEO/0910(1)

Control Lab#5: Positional Servo Using P.I.D Control 5-3

When gain factors are added then:


V
= Kp ( V + Ki ( V dt) + Kd (dV/dt) )
Where
Kp = proportional gain
Ki = integral gain
Kd = derivative gain.
5.5 Sample Time
All practicals within this assignment allow the modification of the sample time. This parameter
controls how often the computer checks the state of the mechanical unit and makes adjustments.
Taking too few samples can inhibit the performance of the system, since the mechanical unit may
go beyond a set point without the computer noticing. Taking too many samples has the potential to
put a load on your computer, causing other processes to be potentially 'starved' of processor time.
When designing a controller, a comprimise between the required response and the available
processing resources of a digital controller must be met.
5.6 Practical 1 : Proportional Control with Derivative Action
#1

In this practical you will investigate the effect of adding a derivative component to the error
signal used to control the motor.
Note: In the previous assignment it became clear that increasing
the gain in order to reduce error caused the system to
become unstable, with a large overshoot in response to a
step input.
This can be corrected to some extent by adding a derivative
component to the error signal. This component is simply the
rate of change of error and, as the motor is driven by the
error, could be obtained from a tachometer.
However, in a computer controlled system such as this, it is
easiest to derive the signal directly from the error by
calculation.

#2

Here the derivative is generated by taking the difference between successive error values.
The sampling rate can be varied using the set sample time control box. Initially it is set to 100
milliseconds.

#3

Adjust the sample time and observe the behavior of the controller. Different time settings will
cause different effects. This diagram shows how the system blocks are configured for this
practical.

Control Lab#5: Positional Servo Using P.I.D Control 5-3


KE30501/KENTEO/0910(1)

Control Lab#5: Positional Servo Using P.I.D Control 5-4

#4

Make the appropriate patching on the DIGITAL UNIT 33-120 as shown Fig.5.2

Fig.5.2: Patching diagram Positional servo using P.I.D control

#5

Use the square wave input. Set derivative gain to zero, increase the proportional gain and
observe the overshoot when the gain is high.

#6

Increase the derivative gain. Notice the overshoot reduces and the stability improves. Use
the Display box to select the display parameters and input excitation.

#7

Now use the triangle input. Note that following error reduces with high proportional gain,
but is slightly increased by the derivative component.
Proportional Gain
Derivative Gain
Control Lab#5: Positional Servo Using P.I.D Control 5-4

KE30501/KENTEO/0910(1)

Control Lab#5: Positional Servo Using P.I.D Control 5-5

#8

Set the proportional gain high and the derivative gain to zero. Observe the overshoot on the
measured signal. Increase the derivative gain. Explain how the derivative gain reduces the
overshoot on the measured signal.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

#9

Set the proportional gain to a mid-value and set the derivative gain to zero. Observe the
measured output. Now increase the derivative gain to a similar value as the proportional
gain. Explain why the response becomes slow with high derivative gain.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

#10

Given that proportional and derivative control will always gives a steady state error and has
a slow response, suggest some suitable applications.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

5.7 Practical 2: Proportional Control with Integral Action


Note: In this practical the effect of integral action is investigated.
In the previous assignment, it could be seen that unless the
system is static there is always a residual following error.
Increasing the gain reduces it but, in purely proportional
control, it can never be zero.
By adding a component consisting of the sum of all the
previous error samples, following error can be reduced
considerably. This component corresponds to the
mathematical integration process and hence is called
integral action.
Integral action has the disadvantage of slowing down the
general response and, while reducing the average
following error, will often increase its peak value. Only a
small amount of integral gain can be added before the
system becomes very unstable. The sample rate may be
adjusted as in the previous practical. This diagram shows
how the system blocks are connected for this practical.
#11

Patching diagram is same with the previous practical. Use the triangle wave input. With the
integral gain set to zero, observe the following error.

#12

Add integral action by increasing the integral gain slowly. Notice that the average error
decreases but as the motor reverses the response is worse.

Control Lab#5: Positional Servo Using P.I.D Control 5-5


KE30501/KENTEO/0910(1)

Control Lab#5: Positional Servo Using P.I.D Control 5-6

Note: Use the square wave input to observe the step response.
Use the Display box to select the display parameters and
input excitation.
Note only a little integral action can be added before the
system becomes unstable.

Proportional Gain
Integral Gain

#13

Set the integral gain to zero. Increase the proportional gain and observe the following error.
Why does the following error occur? Why can`t the following error be reduced to zero when
there is no integral gain?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

#14

Set the proportional gain to maximum and increase the integral gain slowly. Why does the
system become unstable when the integral gain is increased?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

#15

Increase the rate of change of input using the control on the mechanical unit. Observe the
error and measured value. Set the rate of change of input back to a low value and apply the
brake on the side of the mechanical unit. Observe the error and measured value.
Do these results make proportional and integral control suitable for fast continual load
variations and high inertia applications?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

Control Lab#5: Positional Servo Using P.I.D Control 5-6


KE30501/KENTEO/0910(1)

Control Lab#5: Positional Servo Using P.I.D Control 5-7

5.8 Practical 3: Proportional Control with Integral and Derivative Action


Note: In this practical the ideas of proportional integral and
derivative control are combined into a PID or Three Term
Controller. In concept, by adding the characteristics of all
three components the best possible system performance
should be obtainable. Of course with three gains to set the
adjustment of such a system is more difficult and the
mathematical analysis quite involved.
However a reasonable approximation can be made by
simple experimentation, using your experience of the
characteristics of each term alone. Try adjusting the
sampling rate and see what effect it has on the system.
Remember that like many engineering problems there is no
one perfect solution. This diagram shows how the system
blocks are configured for this practical.

#16

Patching diagram is same with the two previous practical.

5.9 Full P.I.D Control


#17

Use both triangle and square wave inputs to investigate the effect of the three gain terms.

#18

Start with only proportional gain and then add derivative action. When the system is stable,
add a small amount of integral gain and observe carefully the effects. Adjust all three gains
and note their interactive nature.
Use the Display box to select the display parameters and input excitation.
Notice that the best step response is not accompanied by minimum following error.

Proportional Gain
Integral Gain
Derivative Gain

Control Lab#5: Positional Servo Using P.I.D Control 5-7


KE30501/KENTEO/0910(1)

Control Lab#5: Positional Servo Using P.I.D Control 5-8

#19

Describe the process which occurs when an input is applied to the motor, in terms of the
effects which the proportional, derivative and integral feedback have on the measured
output.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

#20

Compare the values which are set for the three gains in the practical with similar values set
in the maths model. Is the measured value output the same for both cases?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

#21

What other factors will affect the practical which do not occur in the maths model?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________

Control Lab#5: Positional Servo Using P.I.D Control 5-8


KE30501/KENTEO/0910(1)

You might also like