Method and arrangement for automatic tuning of a controller
10481562 ยท 2019-11-19
Assignee
Inventors
- Esmaeil Jahanshahi (Trondheim, NO)
- John Bradford Schofield (Geneva, CH)
- Selvanathan Sivalingam (Trondheim, NO)
Cpc classification
G05B11/42
PHYSICS
G05B19/42
PHYSICS
G05B13/024
PHYSICS
International classification
G05B11/42
PHYSICS
G05B19/42
PHYSICS
Abstract
A method is described for acquiring data for relay-based controller tuning of a controller controlling a system. The method includes determining, based on controller output constraint, a relay amplitude representing an amplitude of a relay signal to be added to steady state controller output to obtain a sum signal to be fed to the system as system input during the acquiring data for relay-based controller tuning; and starting acquiring controller output data and system output data when detecting a steady state of system output while controller output is fed to the system as system input.
Claims
1. A method of determining a relay parameter usable during acquiring of data for relay-based controller tuning of a controller, usable to control a system, comprising: starting acquiring of controller output data and system output data in response to detecting a steady state of system output while controller output is fed to the system as system input; and determining, based on controller output constraint and on the controller output data acquired and the system output data acquired, a relay parameter representing an amplitude of a relay signal to be added to steady state controller output to obtain a sum signal to be fed to the system as the system input during the acquiring of the data for relay-based controller tuning, wherein a first step relay amplitude (RAMP1) is set as follows:
RAMP1=f1*ABS(Y_WIN), wherein f1 is between 0.08 and 0.12, Y_WIN is a controller output averaged over a moving window having a fixed width, and the relay parameter representing an amplitude of the relay signal is based on the first step relay amplitude (RAMP1), wherein a second step relay amplitude (RAMP2) is set as follows:
RAMP2=MAX(RAMP1,ABS(f2*X_MU*G.sup.1)), wherein X is a system output, X_MU is a system output averaged over increasing number of samples, G.sup.1 is an inverse of a gain of the controller, f2 is between 0.08 and 0.12, and the relay parameter representing an amplitude of the relay signal is based on the second step relay amplitude (RAMP2).
2. The method of claim 1, wherein the determining of the relay parameter is further based on a relay hysteresis (HYS), as given by:
HYS=f4*X_STD wherein f4 is between 4 and 6, X_STD=sqrt (Var_X), Var_X is a recursive mean of VX or low pass filtered mean of VX, VX=Sqr (XX_WIN), and X_WIN is windowed mean of system output (X).
3. The method of claim 2, wherein, the relay signal switches from low to high or from high to low in response to ABS(XXR) being larger than the relay hysteresis (HYS), wherein XR is a system output reference value.
4. The method of claim 1, wherein the controller output constraint comprises an upper limit controller output (PHOUT) and a lower limit controller output (PLOUT), wherein a third step relay amplitude (RAMP3) is set as follows:
RAMP3=MAX(RAMP2,PRAMP_MIN), wherein
PRAMP_MIN=5*HYS*MAX(G.sup.1,ABS(Y MAX)/ABS(X_MU)), HYS is relay hysteresis,
Y MAX=f3*MIN(YssPLOUT,PHOUTYss), f3 is between 0.85 and 0.95, Yss is a steady state controller output, and wherein the relay parameter representing an amplitude of the relay is based on the third step relay amplitude (RAMP3).
5. The method of claim 4, wherein the relay parameter representing an amplitude of the relay (RAMP) is obtained according to:
RAMP=MIN(RAMP3,ABS(Y MAX)).
6. The method of claim 1, wherein steady state of system output is detected, if X_WIN is between X_UL and X_LL, setting Index=1, wherein
X_UL=X_MU+0.5*X_STD, and
X_LL=X_MU0.5*X_STD, wherein X is a system output or process output, X_UL is a threshold upper limit and X_LL is a threshold lower limit and X_WIN is a windowed mean of X.
7. The method of claim 6, further comprising: detecting a steady-state offset comprising performing: If ABS(X_WIN-XR) is greater than 2*X_STD, then setting BOFS=1, else setting BOFS=0, wherein XR is a system output reference value, BOFS is an offset flag and X_STD=sqrt (Var_X), Var_X being a recursive mean of VX or low pass filtered mean of VX.
8. The method of claim 7, further comprising: setting a new system output reference value (SETPOINT) by performing: If (Index=1 and BOFS=1), then set SetPoint=X_MU; else set SetPoint=XR.
9. The method of claim 1, further comprising: determining an inverse gain (G.sup.1) of the controller by: estimating windowed maximum of controller output, Y_MAX estimating windowed minimum of controller output, Y_MIN estimating windowed maximum of process output, X_MAX estimating windowed minimum of process output, X_MIN setting INVGtemp=(Y_MAX-Y_MIN)/(X_MAX-X_MIN); and setting G.sup.1=Recursive mean of INVGtemp.
10. The method of claim 1, wherein, for performing relay-based controller tuning, controller output data and system output data are acquired, while the sum signal is fed to the system as system input data using relay amplitude as determined previously.
11. The method of claim 1, wherein, for performing relay-based controller tuning, controller output data and system output data are acquired over several cycles of the relay signal switching from low to high or from high to low.
12. The method of claim 1, wherein the acquiring of the controller output data and the system output data is stopped, in response to several cycles being performed a maximum number of times or if the controller output is outside a range bounded by PLOUT, PHOUT, wherein PLOUT is lower limit controller output and PHOUT is an upper limit controller output.
13. The method of claim 1, wherein f1 is 0.1.
14. The method of claim 2, wherein f4 is 5.
15. An arrangement for determining a relay parameter usable during acquiring of data for relay-based controller tuning of a controller to control a system, comprising: a processor configured to start acquiring of controller output data and system output data in response to detecting a steady state of system output while controller output is fed to the system as system input; and determine, based on controller output constraint and on the controller output data acquired and the system output data acquired, a relay parameter representing an amplitude of a relay signal to be added to steady state controller output to obtain a sum signal to be fed to the system as the system input during the acquiring of the data for relay-based controller tuning, wherein a first step relay amplitude (RAMP1) is set as follows:
RAMP1=f1*ABS(Y_WIN), wherein f1 is between 0.08 and 0.12, Y_WIN is a controller output averaged over a moving window having a fixed width, and the relay parameter representing an amplitude of the relay signal is based on the first step relay amplitude (RAMP1), wherein a second step relay amplitude (RAMP2) is set as follows:
RAMP2=MAX(RAMP1,ABS(f2*X_MU*G.sup.1)), wherein X is a system output, X_MU is a system output averaged over increasing number of samples, G.sup.1 is an inverse of a gain of the controller, f2 is between 0.08 and 0.12, and the relay parameter representing an amplitude of the relay signal is based on the second step relay amplitude (RAMP2).
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) Embodiments of the present invention are now described by reference to the accompanying drawings. The invention is not restricted to the illustrated or described embodiments.
(2)
(3)
(4)
(5)
DETAILED DESCRIPTION OF THE EXAMPLE EMBODIMENTS
(6) The illustration in the drawings is in schematic form.
(7) The system 100 illustrated in
(8) The system 100 further comprises an arrangement 113 for acquiring data/estimation of relay parameters for relay-based controller tuning of the controller 101 controlling the system 105 according to an embodiment of the present invention. Thereby, the arrangement 113 comprises a processor which is adapted to determine, based on controller output constraint, such as PLOUT and PHOUT, a relay amplitude RAMP, such as illustrated in
(9) The arrangement 113 is adapted to perform a method for acquiring data for relay-based controller tuning/estimating relay parameters according to an embodiment of the present invention.
(10) During the relay-based tuning procedure, system output data X (graph 201) and controller output data Y (graph 203), as illustrated in
(11) From K.sub.u and P, the controller parameters of the controller 101 may be determined according to the Ziegler-Nichols or similar equations.
(12) In order to perform the relay-based tuning procedure, the value for the variable RAMP, i.e. the relay amplitude, needs to be determined. Determination of RAMP is performed according to a method according to an embodiment of the present invention.
(13) A flow-chart is illustrated in
(14) In the function block 305, the relay parameters such as the relay hysteresis HYS and the relay amplitude (RAMP) are estimated.
(15) In the decision block 307, the variable BSS is checked and it is checked whether a user using a user input device 309 has inputted a start signal. If BSS as well as Start are true, it is switched to the function block 311, wherein the current controller output, i.e. the controller output at steady-state is stored as Y0. In the function block 313, the relay algorithm is iterated. In the decision block 315 it is checked whether the duration is larger than PMAXCYCL or whether Y>PHOUT or Y<PLOUT or whether a stop signal has been given by the user using the input device 309. If these conditions are met, the relay is stopped in the function step 317 and in a function step 319, the controller is initialized with Y0 and it is returned to functional step 303. If the decision step 315 results in a false value, it is cycled back to the function block 313.
(16) The operator may enable a relay test mode when there exists steady-state conditions (STST=1) in the function block 303 in a control loop. The relay parameters may be estimated by the logic in the function block 305 or, optionally, may be set by the operator. The controller output Y just before enabling the relay test mode is stored as Y0. During performing the relay algorithm (block 313), the experimental data, i.e. controller output data (Y) and system output data (X) may be monitored, stored and later on analyzed. The relay test may be stopped, once a maximum tuning duration, for example 15 cycles, is reached or a user-defined number of cycles is reached, as may be set in the procedural step 315. The test may further be automatically disabled, if there is a controller output constraint violation (Y>PHOUT or Y<PLOUT) or a timeout occurs, as may be checked in method step 315.
(17) In the following, the main algorithms of the method for fully automatic relay test are explained:
(18) A) Detection of Consistent Steady-State
(19) 1. Estimate recursive mean of X (or low pass filer).fwdarw.X_MU
(20) 2. Estimate windowed mean of X (NWindow=64).fwdarw.X_WIN
(21) 3. Calculate VX=Sqr(XX_WIN)
(22) 4. Estimate recursive mean of VX (or low pass filter) (mean is not recursive).fwdarw.Var_X
(23) 5. Calculate sqrt (Var_X).fwdarw.X_STD
(24) 6. Calculate X_UL=X_MU+0.5*X_STD
(25) 7. Calculate X_LL=X_MU0.5*X_STD
(26) 8. Compare X_WIN with X_UL and X_LL
(27) 9. If X_WIN is between X_UL and X_LL.fwdarw.Index=1 otherwise BSS=0
(28) 10. Calculate abs(Derivate of Index).fwdarw.TempIndex
(29) 11. Calculate Windowed Integral of TempIndex..fwdarw.SumIndex
(30) 12. If SumIndex=0 and Index=1.fwdarw.BSS=1
(31) 13. If not,.fwdarw.BSS=0
(32) 14. End.
(33) B) Detection of Steady-State Offset:
(34) BOFS is the offset flag and we set it if the windowed average X_WIN (process output) is far away from the external set-point XR.
(35) If ABS(X_WINXR) is greater than 2*X_STD, then set BOFS=1; else set BOFS=0.
(36) C) Choosing Set-Point for Relay Test:
(37) If both the first steady-state Index (step 9 of section A) and the offset flag are set as 1, we use recursive mean of process output (X_MU) as the pseudo set-point for the relay-test:
(38) If (Index=1 and BOFS=1), then set SetPoint=X_MU; else set SetPoint=XR.
(39) D) Estimation of Relay Hysteresis (HYS):
(40) Relay hysteresis is used to prevent the effect of measurement noise on the behavior of relay output. When the process is at steady state, standard deviation of process output is equal to standard deviation of the noise. The relay hysteresis must be chosen based on strength of the noise. From our experience, it is set as
HYS=5*X_STD
(41) E) Estimation of inverseGain (G1):
(42) Estimate windowed maximum of controller output, Y_MAX
(43) Estimate windowed minimum of controller output, Y_MIN
(44) Estimate windowed maximum of process output, X_MAX
(45) Estimate windowed minimum of process output, X_MIN
(46) INVGtemp=(Y_MAX-Y_MIN)/(X_MAX-X_MIN);
(47) G1=Recursive mean of INVGtemp
(48) F) Estimation of Relay Amplitude (RAMP):
(49) Maximum deviation of controller output from Yss (steady state value) is found by taking into account PHOUT and PLOUT from PID controller block (FB1407). The safe operation is ensured by this.
Y MAX=0.9*MIN(YssPLOUT,PHOUTYss)1.
(50) Default value of the relay amplitude is 10% of the controller output
RAMP1=0.1*ABS(Y_WIN);2.
(51) Process response to the relay signal should be 10% of its steady-state value, X_MU.
RAMP2=MAX(RAMP1,ABS(0.1*X_MU*G1));3.
(52) To make sure that the relay amplitude is sufficient to take the process output out of the relay hysteresis.
PRAMP_MIN=5*HYS*MAX(G1,ABS(Y MAX)/ABS(X_MU));4.
RAMP3=MAX(RAMP2,PRAMP_MIN);
(53) Saturate the relay amplitude to the safe value
RAMP=MIN(RAMP3,ABS(Y MAX));5.
(54) RAMP1, RAMP2, RAMP3 being also referred to as first, second, third step relay amplitude, respectively.
(55) Embodiments of the present invention may also be applied to control systems set up in a cascade configuration. Thereby, two or more controllers may be connected in cascade configuration. At such configuration, the output SLV_INF (slave_INF) on the slave controller may be always connected to input master_INF (MST_INF) on the master controller. Saturation of the controller output in the slave controller may be expected, when the tune mode in the master controller is enabled. When the slave controller is put in the tuning mode, function input X1 in master controller may take the current value and force tracking is enabled in master controller until the tune mode in slave controller is disabled. When the tuning mode is disabled in the slave controller, force tracking mode in both master and slave controllers may be disabled.
(56)
(57) The following notation is used: XRT A structure that receives necessary values from PID Function Block (FB1407) X Process output PTIMEOUT Time out for stopping the relay test (Maximum time to finish three cycles) PRAMP Relay amplitude PHYS Relay hysteresis PTINT Integral time for disturbance rejection PMAXCYCLE Maximum tuning duration in number of cycles Y Controller output YR Chosen setpoint Y_SS Value of controller output at steady state YX_SS Value of process output at steady state ACTIVE Status of relay activation mode DUR Tuning duration in number of cycles ElapsedT Elapsed time of relay test
(58) The function block 400 illustrated in
(59) It should be noted that the term comprising does not exclude other elements or steps and a or an does not exclude a plurality. Also elements described in association with different embodiments may be combined. It should also be noted that reference signs in the claims should not be construed as limiting the scope of the claims.