A New Dual Algorithm for Digital Process Control

A New Dual Algorithm for Digital Process Control

A NEW DUAL ALGORITHM FOR DIGITAL PROCESS CONTROL R. G. F. Scott Department of Systems Science, The City University, Northampton Square, London ECl V O...

938KB Sizes 2 Downloads 102 Views

A NEW DUAL ALGORITHM FOR DIGITAL PROCESS CONTROL R. G. F. Scott Department of Systems Science, The City University, Northampton Square, London ECl V OHB, u.K.

Abstract. This paper describes a new algorithm suitable for direct digital process control using a Ilicroprocessor. The algorithm uses conventional PID control when in regulator mode and bang-bang control with a limited slew rate when in servo 1Iode. The switching tille for the bang-bang controller is re-estiMated continuously and the single parameter used in the estimation updated adapti vely. The algori thll sh~ws an illprovement in ~rfol'llance index over that for an optimally tuned PID controller of around 20%. Keywords. Adaptive Control, Bang-bang control, Coaputer Control, Direct Digital Control, Process Control. INTRODUCTION FrOIl the introduction of Direct Di~tal Control in 1962 until the present day, the • ost cO.llon di~ tal control algori thll has been the discrete form of PID control. The Jlost obvious reason for its popularity is its effectiveness, when correctly tuned, in a wide r~e of applications. One problea still arises, however, in sOlle circumstances. The paraaeterewhich give the best response to a change in set point are not always those which are best for the Ilaintenance of a constant desired value in the face of a disturbance. If accurate control is needed, the control engineer has a difficulty in deciding on which basis to tune the controller.

use a sillilar type of &l~ori thm and model structure, but find. the switching tille using a dimensionless phase plane technique which is independent of the model parameters • The present work again uses a bang-bang al«ori thll for servo .ode control and PID control when in regulator IIode, but here the swi tching tille is re-estimated at each sapling time. This enables the dyruunics of the model to be dealt with very simply. The single paraeter used in estimating the dynamics of the lIodel is also updated adaptively according to the perforlllance of the servo controller. ALGORITHM DESCRIPl'ION

The basic }-part structure of the algorithll is shown in Fi~. 1. The algorithm is entered at tiaed intervals iaaediately after reading into the processor the di~itised signal froll the transducer lIeasuring the controlled variable and calculating the error.

One approach to the proble. which has attracted .any researchers is to use a dual algorithm "ploying PID control to maintain an existing state and bang-bang control to achieve a new desired state. Bang-bang control, where the controller output is at one or other ofi ts physical constraints and changes troa end to end at a calculated instant, is the aatheaatical law for a controller which has liaits on its action changing a plant state in lIinillUJI tille. The law and the determination of the switching tiae lIay be derived using Pontryagin's MaxiJlus Principle. Hau, Bacher and. Kaufllan (1972) have used this result and calculated the switching tille by assuaing a lIodel structure of a second order aystea with a pure delay. The lIodel parasetere are estiaated froa the inl tial response of the syste. to the bangbang controller. Hau points to batch procesain«, where set point changes are frequent, as an application where this algorithll is useful. Beard, Groves and Johnson (1974) 399

Fig. 1 Basic algorithm structure

R. G. F. Scutt

400

Since the algorithm incorporates a decision process, an intelligent device is necessary for its implementation. The amount of processi~ needed is, however, relatively small and a microprocessor is ideally suited to the task. Any processor with a word length of at least 8 bits could conveniently be used. The Discriminator. It was decided to use a very siaple criterion for determini~ whether the system required servo or regulator type action. Any error greater than + ~ of full scale was deemed to reQuire servo action, ~iving a 10% 'tolerance band' for regulator action with the set point at its centre. A measured value within this band was corrected by regulator action.

The braking tille was also subject to adaptation. If the servo control acted so that the measured variable changed direction before the regulator mode band was reached, braking was deemed to have been too early and the tille reduced. If, however, the regulator lIode band was entered too fast and wae overshot, braking time was increased. The algoritha was later modified in the light of early results. The switching time calculations and the adaptive routine were unch~ed, but the controller output slew rate wae limited. The reason for this modification is discussed below.

A siaplified flow chart for the servo algori tha is given in Fig. J.

The Re«ulator Controller. Whilst it is possible to design optimal regulators for a system for which the mathematical model is known, it was felt that to keep the algorithm simple and of ~eneral application it would not be possible to improve on a correctly tuned PID controller for regulator action, and this controller is therefore employed. The tun1~ wae achieved for the simulated plant by a hillclimbing technique rather than by the less reliable Zeigler and Nichols Method.

Calculate switching tillS

The Servo Controller. The original servo controller wae a b&n«controller, i.e. the output wae either at zero or at full scale, and switched £rea end to end. The switchi~ time was calculated by assUMing that the current rate of ch~e of the controlled variable would continue until the desired value was reached. The tiae taken so to reach the set point was calculated and a fixed 'braking time' subtracted from this time to give the estimated switching tiae. The switching time wae re-estimated each tim. the controlled variable measurement was supled. Fig. 2 shows the calculations ~aphically • b~

Controller output full on

Controller output full off

No Controlled variable

- - -- -- - - - - - - - - -

-.~-

/

~i

.•

--- -Set --- Point

I

~

I :

Braking t i ae allowed

Decrease braking tille

, ~ Estimated time to set point ,

tching tille

Time

Fig. 2 Calculation of switching time

EXIT Fig. J Simplified flowchart of servo algorithm

A new dua l a l gorithm f o r di git a l pr oces s con tro l

ALGORITHM &:VALUA'fION For practical reasons the initial evaluation has been carried out using digital simulation. A full evaluation will require tests on a pilot scale rig which will present the common problems of measurement noise, instrument calibration and so on. The simulated plant described below was a second order system with a pure delay included to provide a re~listic control problem. The plant integrations were performed by the simple Euler algorithm using a time step of 10 ms. The plant output is sampled and the controller activated once a second. The algori thin was eva.luated using a step-change in the desired value from an initial zero state to a demanded value of 5 ~!o of full scale. 'r he controller performance was evaluated using the integral of time x absolute error (ITAE) criterion taken over 100 s from the step change in input. SiIlulated Plant transfer function of the plant used was e 1(1 + 36)(1 + 56), where is the delay time and all times are in seconds. The value of the delay time was taken initially at Z s, though the effect of longer delays has also been investigated briefly and is discussed below. Tb~

The plant gain was taken as unity for computational convenience. The output was restricted to an arbitrary scale of 0 - 10 units, and the measurement Ifas assumed fast and accurate with the same scale. The output of the controller was also restricted to a 0-10 unit scale; if the control algorithm called for a value outside this range the appropriate end-of-range value was output by the program.

4 01

Controller and Plant outputs 10 __ , Controller output .--8

,,

,

Plant response--

"

, I I

6

,,

4 2

o

l'ime, s.

Fig. 4. Step response using PID algorithm

was either full on (10 units) or full off ( zero units). Using this algorithm to implement a 0 - 5 unit step change in the desired value resulted in an ITAE very sillilar to that obtained using the )-term controller, the figure this time being 15850 unit-so A graph of the controller output and system response is given in Fig. 5. Controller and Plant outputs

Controller output----

f',

Plant res ponse - -

I, I I

Testing with PID Control. The well-established discrete PID algorithm was taken as providing a. standard of performance over which any new control algorithft must show sOlle advantage. The plant was therefore first tested under PID control. The controller parameters were tuned by a simple hillclimbing algorithm to give the lowest value obtainable of the chosen ITAE performance index. The controller parameters so obtained for a plant with a 2 8 delay werel Gain 4.12 Integral action time 24.1 s Derivative action time 1.84 s The value of ITAE obtained for the standard o - 5 unit step change in deaand was 15288 unit-seconds. A graph of the controller output and system response is given in Fig.4. Testing the New Algorithft The J-part algorithm described above was then programmed and used to control the siaulated plant. The )-term section used the sUle paruetere as the optiaally tuned PID controller. The servo controller output

4Ci

Tillle, s.

Fig. 5. step response using new algorithm

It was noted, however, that the trajectory of the controller output was different froa that of the PID controller, and this observation suggested a modification to the algori thft • Algorithm Modification The variational calculus on which optimal control theory depends considers the change in performance index as a trajectory lIovee

402

R. G. F. Scott

around the optimal trajectory. This suggests that if two different trajectories result in similar values of perfonnance index, there will be a trajectory somewhere between thea which will give a performance index at an extremua value. It was therefore decided to modify the servo controller output to give a trajectory which lay approximately between the original servo algorithm trajectory and that given by the PID controller. This was achieved by limiting the slew rate of the controller output (an effect produced in any case by lIost physical actuators). The JIIodified systea was then tested using the sallle step input. This time the ITAE was reduced to 12449 unit-seconds, a significantly lower figure than the 15288 unit-seconds for the PID controller. A graph of controller output and system response for the aodified algorithm is given in Fig. 6. Controller and Plant Output 1 I

{

Controller Output - - --

/. "

Plant response _ _

I

:~~ I

,:!

,

6

I It

..

" 1 II H • I, 1'11 1

,~.t'' , :' "'"-, )

4

11

,I I

"

,

.... ",

.,."

CONCWSIONS The achievement of a reduction of nearly 2C1Jb in the perforllance index in a particular case by using the new algori thll rather than a conventional PID one is not seen as conclusive proof that the new algorithm is the aDBwer to all single-loop control problems : It is, however, seen as evidence that it can achieve promising results, and may have immediate application where a control loop is called upon both to change a system state and to maintain the system in the new state. There are several outstanding problems to be investigated, in particular, the effect of aeasurement noise, even after filtering, on the slope calculations on which the servo algori thm depends, may possibly cause some difficulties. There is also the stability problem for systems with long time delays noted above. Against these difficulties must be set the advantages of the algorithm, which are that no mathematical model of the plant is needed and that the single parameter of the servo controller is self-adjusting. These features should make it of wide application in the field of industrial process control where both modelling and controller tuning can be difficult.

, .. ",'

ACKNOWLEDGEMENTS 2

o

Tille, so

The author would like to thank P. S. Pal and S. A. M. Shehabi, both of whom carried out a substantial MOunt of the coaputing for this work as part of their respective degree research projects at the City Uni versi ty.

Fig 0 60 Step res ponse for modi fied a1i;ori thm 0 REFERENCES

Results with Different Plant Parameters. Some investigations have been started into the performance of the controller using plants with similar tille-constants but with a longer pure delay. The additional phase lag caused by increasing the delay to 5 s gives rise illlllediately to stability problems. The optimal gain of the 3-tera controller is reduced to 0.3 in order to keep the system stable, with a consequent increase in ITAE to around three times that achieved with a 2 s delay. The original servo algorithm has an inherently high gain, and although it need not be stable on its own (because system stabili ty may still be achieved once the system can operate in regulator mode), the rll.te of change of output proved so high that regulator mode operation could not be maintained, as the error always increased to more than the specified liait for regulator mode operation. Current work is examining the possibility of a variable gain servo controller.

Beard, J.N., Groves, FoR. and Johnson, A.E. (1974). A simple algorithm for the time-optiaal control of chemical processes. AIChE J., ~, 133-140 Hsu, E.H., Bacher, S. and Kaufman, A. (1972) A self-adapting time-optimal control algorithm for second-order processes. AIChE .j., ]&, 1133-1139.