Sei sulla pagina 1di 9

Control Lab#4: Positional Servo using P.I.

D Control 4-1 4

Lab 4: Positional Servo using P.I.D Control

4.1 Objective To understand proportional plus integral plus derivative control action. action To become familiar with proportional plus integral plus derivative (P.I.D) Controllers. Controllers

4.2 Proportional and Derivative Control Derivative feedback control involves using the rate of change of the error 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 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 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 point oint 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 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 but 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.

4.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 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#4: Positional Servo using P.I.D Control 4-1 4 KM40501/ 1213(2)

Control Lab#4: Positional Servo using P.I.D Control 4-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.

4.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#4: Positional Servo using P.I.D Control 4-2 KM40501/ 1213(2)

Control Lab#4: Positional Servo using P.I.D Control 4-3

When gain factors are added then: V = Kp ( V + Ki ( V dt) + Kd (dV/dt) ) Where Kp = proportional gain = integral gain Ki Kd = derivative gain. 4.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. 4.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. 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.

#3

Control Lab#4: Positional Servo using P.I.D Control 4-3 KM40501/ 1213(2)

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

#4

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

Fig. 4.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. Increase the derivative gain. Notice the overshoot reduces and the stability improves. Use the Display box to select the display parameters and input excitation. 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

#6

#7

Control Lab#4: Positional Servo using P.I.D Control 4-4 KM40501/ 1213(2)

Control Lab#4: Positional Servo using P.I.D Control 4-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. ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ 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. ___________________________________________________________________________ ___________________________________________________________________________ __________________________________________________________________________ Given that proportional and derivative control will always gives a steady state error and has a slow response, suggest some suitable applications. ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________

#9

#10

4.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. Add integral action by increasing the integral gain slowly. Notice that the average error decreases but as the motor reverses the response is worse.

#12

Control Lab#4: Positional Servo using P.I.D Control 4-5 KM40501/ 1213(2)

Control Lab#4: Positional Servo using P.I.D Control 4-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 Derivative 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? ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ Set the proportional gain to maximum and increase the integral gain slowly. Why does the system become unstable when the integral gain is increased? ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________

#14

#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#4: Positional Servo using P.I.D Control 4-6 KM40501/ 1213(2)

Control Lab#4: Positional Servo using P.I.D Control 4-7

4.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.

4.9 Full P.I.D Control #17 #18 Use both triangle and square wave inputs to investigate the effect of the three gain terms. 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#4: Positional Servo using P.I.D Control 4-7 KM40501/ 1213(2)

Control Lab#4: Positional Servo using P.I.D Control 4-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. ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ 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? ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________ What other factors will affect the practical which do not occur in the maths model? ___________________________________________________________________________ ___________________________________________________________________________ ___________________________________________________________________________

#20

#21

Control Lab#4: Positional Servo using P.I.D Control 4-8 KM40501/ 1213(2)

Control Lab#4: Positional Servo using P.I.D Control 4-9

Group Members: 1.______________________________ 3.______________________________ 5.______________________________

2. _____________________________ 4. _____________________________ 6. _____________________________

4.1 Positional Servo using P.I.D Control #7 Proportional Gain Derivative Gain

#12 Proportional Gain Derivative Gain

#18 Proportional Gain Integral Gain Derivative Gain

Control Lab#4: Positional Servo using P.I.D Control 4-9 KM40501/ 1213(2)

Potrebbero piacerti anche