SC2FA – State controller for 2nd order system with frequency autotuner
Block SymbolLicensing group: AUTOTUNING
Function Description
The SC2FA block implements a state controller for 2nd order system (7.4) with frequency
autotuner. It is well suited especially for control (active damping) of lightly damped systems
(). But
it can be used as an autotuning controller for arbitrary system which can be described with
sufficient precision by the transfer function
(7.4) |
where is the natural (undamped) frequency, , , is the damping coefficient and , are arbitrary real numbers. The block has two operating modes: "Identification and design mode" and "Controller mode".
Identification and design mode
The "Identification and design mode" is activated by the binary input
.
Two points of frequency response with given phase delay are measured during
the identification experiment. Based on these two points a model of the
controlled system is built. The experiment itself is initiated by the rising edge
offon
of the TUNE input. A harmonic signal with amplitude uamp, frequency
and
bias ubias then appears at the output mv. The frequency runs through the interval
, it increases
gradually. The current frequency is copied to the output w. The rate at which the frequency changes
(sweeping) is determined by the cp parameter, which defines the relative shrinking of the initial period
of the exciting
sine wave in time ,
thus
The cp parameter usually lies within the interval . The lower the damping coefficient of the controlled system is, the closer to one the cp parameter must be.
At the start of the identification, the exciting signal has a frequency . After stime has elapsed, the calculation of the estimate of the current frequency characteristic point begins. Its real and imaginary parts are continuously copied in order to the outputs xre and xim. If the block parameter MANF is set to 0, then the frequency sweep stops twice for stime at the moments when points with phase delays ph1 and ph2 are first reached. The preset values for parameters ph1 and ph2 are respectively and , and they can be changed to any values in the interval , where . After stime seconds of stopping at phase ph1, or ph2, the average of the last iavg measured points is calculated (thus obtaining an estimate of the respective frequency characteristic point) for the subsequent calculation of the parametric model in the form (7.4). If , it is possible to manually "sample" two points of the frequency characteristic using the input HLD. The input stops the frequency sweep, and resetting resumes it. Other functions are identical.
It is possible to terminate the identification experiment prematurely in case of necessity by the input . If the two points of frequency response are already identified at that moment, the controller parameters are designed in a standard way. Otherwise the controller design cannot be performed and the identification error is indicated by the output signal .
During the actual "identification and design" process:
- the output TBSY is set to 1. After completion, it is reset to 0.
- If the controller design is error-free, the output
and the output iIDE indicates the individual phases of the identification experiment:
- Approaching the first point is ,
- stopping at the first point ,
- approaching the second point is ,
- stopping at the second point , and
- the final phase after stopping at the second point is .
- If the identification ends with an error, then and the number on the output iIDE specifies the corresponding error. See the description of the iIDE parameter below.
The computed state controller parameters are taken over by the control algorithm as soon as the SETC input is set to 1 (i.e. immediately if SETC is constantly set to on). The identified model and controller parameters can be obtained from the p1, p2, …, p6 outputs after setting the ips input to the appropriate value. For individual ips values, the parameters have the following meanings:
- 0: Two points of frequency response
- p1 …frequency of the 1st measured point in rad/s
- p2 …real part of the 1st point
- p3 …imaginary part of the 1st point
- p4 …frequency of the 2nd measured point in rad/s
- p5 …real part of the 2nd point
- p6 …imaginary part of the 2nd point
- 1: Second order model in the form (7.5)
- p1… parameter
- p2… parameter
- p3… parameter
- p4… parameter
- 2: Second order model in the form (7.6)
- p1… parameter
- p2… parameter
- p3… parameter in rad/s
- p4… parameter
- p5… parameter in Hz
- p6 …resonance frequency in Hz
- 3: State feedback parameters
- p1… parameter
- p2… parameter
- p3… parameter
- p4… parameter
- p5… parameter
After a successful identification it is possible to generate the frequency response of the controlled system model, which is initiated by a rising edge at the MFR input. The frequency response can be read from the w, xre and xim outputs, which allows easy confrontation of the model and the measured data.
Controller
The "Controller mode" (binary input )
has manual ()
and automatic ()
submodes. After a cold start of the block with the input
it is
assumed that the block parameters mb0, mb1, ma0 and ma1 reflect formerly identified coefficients
,
,
and
of the controlled system transfer function and the state controller design is
performed automatically. Moreover if the controller is in the automatic mode and
, then
the control law uses the parameters from the very beginning. In this way the identification
phase can be skipped when starting the block repeatedly.
The diagram above is a simplified inner structure of the frequency autotuning part of the controller. The diagram below shows the state feedback, observer and integrator anti-wind-up. The diagram does not show the fact, that the controller design block automatically adjusts the observer and state feedback parameters f1, f2, …, f5 after identification experiment (and ).
The controlled system is assumed in the form of (7.4). Another forms of this transfer function are
(7.5) |
and
(7.6) |
The coefficients of these transfer functions can be found at the outputs p1,…,p6 after the identification experiment (). The output signals meaning is switched when a change occurs at the ips input.
This block propagates the signal quality. More information can be found in the 1.4 section.
Input
dv | Feedforward control variable | Double (F64) |
sp | Setpoint variable | Double (F64) |
pv | Process variable | Double (F64) |
tv | Tracking variable | Double (F64) |
hv | Manual value | Double (F64) |
MAN | Manual or automatic mode | Bool |
|
|
|
ID | Identification or controller operating mode | Bool |
|
|
|
TUNE | Start the tuning experiment | Bool |
HLD | Stop frequency sweeping | Bool |
BRK | Termination signal | Bool |
SETC | Accept and set the controller parameters | Bool |
|
|
|
ips | Meaning of the output signals | Long (I32) |
|
|
|
MFR | Model frequency response generation | Bool |
Parameter
ubias | Static component of the exciting signal | Double (F64) |
uamp | Amplitude of the exciting signal 1.0 | Double (F64) |
wb | Frequency interval lower limit [rad/s] 1.0 | Double (F64) |
wf | Frequency interval upper limit [rad/s] 10.0 | Double (F64) |
isweep | Frequency sweeping mode 1 | Long (I32) |
|
|
|
cp | Sweeping rate 0.5 1.0 0.995 | Double (F64) |
iavg | Number of values for averaging 10 | Long (I32) |
alpha | Relative positioning of the observer poles (ident.) 2.0 | Double (F64) |
xi | Observer damping coefficient (ident.) 0.707 | Double (F64) |
MANF | Manual frequency response points selection | Bool |
|
|
|
ph1 | Phase delay of the 1st point [degrees] -60.0 | Double (F64) |
ph2 | Phase delay of the 2nd point [degrees] -120.0 | Double (F64) |
stime | Settling period [s] 10.0 | Double (F64) |
ralpha | Relative positioning of the observer poles 4.0 | Double (F64) |
rxi | Observer damping coefficient 0.707 | Double (F64) |
acl1 | Relative positioning of the 1st CL poles couple 1.0 | Double (F64) |
xicl1 | Damping of the 1st closed-loop poles couple 0.707 | Double (F64) |
INTGF | Integrator flag on | Bool |
|
|
|
apcl | Relative position of the real pole 1.0 | Double (F64) |
DISF | Disturbance flag | Bool |
|
|
|
dom | Disturbance model natural frequency [rad/s] 1.0 | Double (F64) |
dxi | Disturbance model damping coefficient | Double (F64) |
acl2 | Relative positioning of the 2nd CL poles couple 2.0 | Double (F64) |
xicl2 | Damping of the 2nd closed-loop poles couple 0.707 | Double (F64) |
tt | Tracking time constant 1.0 | Double (F64) |
hilim | Upper limit of the controller output 1.0 | Double (F64) |
lolim | Lower limit of the controller output -1.0 | Double (F64) |
mb1p | Controlled system transfer function coefficient b1 | Double (F64) |
mb0p | Controlled system transfer function coefficient b0 1.0 | Double (F64) |
ma1p | Controlled system transfer function coefficient a1 0.2 | Double (F64) |
ma0p | Controlled system transfer function coefficient a0 1.0 | Double (F64) |
Output
mv | Manipulated variable (controller output) | Double (F64) |
de | Deviation error | Double (F64) |
SAT | Saturation flag | Bool |
|
|
|
TBSY | Tuner busy flag | Bool |
|
|
|
w | Frequency response point estimate - frequency [rad/s] | Double (F64) |
xre | Frequency response point estimate - real part | Double (F64) |
xim | Frequency response point estimate - imaginary part | Double (F64) |
epv | Reconstructed pv signal | Double (F64) |
IDE | Identification error indicator | Bool |
|
|
|
iIDE | Error code | Long (I32) |
|
|
|
p1..p6 | Results of identification and design phase | Double (F64) |
[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com