FIWR – Frequence Identification With Reconstructor
Block SymbolLicensing group: ADVANCED
Function Description
The FIWR block performs the identification experiment of the process frequency characteristics. The
system is excited by a harmonic signal with a static component ubias, amplitude uampb, and frequency
passing through
the interval wb,
wf
where wb < wf. If the adaptive amplitude change is enabled (adaptive_amp = on), then the
excitation signal takes such values that the output amplitude is close to dy_max/2. The
frequency sweep rate is determined by the cp state (unless it’s not adaptively adjusted, in
which case cpb exclusively determines it), outlining:
- For logarithmic mode (mode = 1), it signifies the proportional reduction of the initial period
of the excitation
sine wave over time .
Hence, the equation is as follows:
- For linear mode (mode = 2), it represents the frequency increase per unit of time.
The value of the cp state is usually in the interval in logarithmic mode. For the linear mode, the parameter must be chosen with respect to the specified frequency range and the desired frequency change. If the adaptive change of the sweeping rate is enabled (adaptive_cp = on), then the cp state is recalculated depending on the "incorrect" position of the frequency characteristic point before its convergence at each scheduled stop of the sweeping (given by the vector StopVal). The current value of the cp parameter is copied to the output cp, its initial value cpb can be selected. The minimum and maximum values of cp cp_min and cp_max are taken into account only in adaptive_cp = on mode; otherwise, the value cpb is copied to the output cp. In the combined mode (mode = 3), cpb is the sweeping rate in logarithmic segments, and the linear segments, including the sweeping rates, are defined by the matrix WL. This matrix can be defined:
- 1: Explicitly: [ , , ..., ], where the matrix size is [1x3N].
- 2: Alternatively: [
... ;
... ;
... ],
where the matrix size is [3xN].
is the start of the i-th linear interval, is the end of the i-th linear interval, and is the frequency increment.
In adaptive mode, the excitation amplitude is also continuously adjusted. The ratio of the amplitude sweep rate to the frequency sweep rate is determined by the separate parameter cp_ratio. The amplitude sweep always proceeds logarithmically, and the ratio applies to the actual (for mode = 1) or theoretical (for mode = 2) logarithmic frequency sweep rate cp. It is ideal to sweep the amplitude faster than the frequency (cp_ratio ), ensuring sufficiently rapid adjustment of the excitation amplitude in case of resonances. The recommended value is cp_ratio .
System identification is triggered by setting the input TUNE = on. After rmi seconds (estimated transient duration), the calculation of the current point of the frequency characteristic starts. Its real and imaginary parts are repeatedly copied to the outputs xre and xim, and the phase delay at a given frequency is copied to the output phase. During the identification process, the sweeping stops whenever the required stopping points are reached based on the parameter stopBy: stopBy = 1 for phase delay , or stopBy = 2 for frequency . The stopping time is related to the values of the parameters q_crit and np. q_crit specifies the threshold of relative change in the mean values of estimates across two consecutive windows for resuming the sweeping. The smaller the parameter q_crit, the more accurately the frequency characteristic point will be determined, and the sweeping stop time will be longer. For a shorter evaluation window given by the number of seconds np (usually chosen identically to rmi), the stopping time will be shorter. It is possible to select the maximum number of evaluation windows cmi, with a common value being cmi = 10. By input HLD = on it is possible to manually stop the frequency sweeping; setting HLD = off again causes the sweeping to continue. If necessary, the identification process can be prematurely terminated by input BRK = on. In this case, the output mxData holds the last instantaneous values, the output pmpRef contains all accurately measured points, and the system continues to be excited by the static component ubias. All other outputs are set to zero.
During the identification, the output TBSY = 1. It is set to 0 when finished. During an error-free experiment, the output IDE = off. If the identification ends in an error, then IDE = on and the output iIDE specifies the associated error.
The vector StopVal can be inserted:
- 1: Explicitly: [], where the vector size is [1xM].
- 2: Alternatively: [],
where
is the initial phase,
is the step between phases, and
is the final phase. The vector size is [1x5].
For both representations, the phase vector (for stopBy = 1) must contain a decreasing sequence, and the frequency vector (for stopBy = 2) must contain an increasing sequence.
The nmax parameter specifies the maximum number of elements of the vector StopVal that can be inserted. At the same time, this is the maximum width of the pmpRef matrix, thus the maximum number of accurately measured points that can be stored.
The process signal pv is reconstructed using an embedded identical state reconstructor, which assumes the same frequency at the output as the excitation signal. To filter out minor nonlinear effects, higher harmonics with multiples f2-f4 can also be reconstructed. The first nonzero multiples are always considered valid. A special case occurs when the parameter f5 is additionally used; in this case, the multiples are always fixed (f2=2, f3=3, f4=4, f5=5), regardless of their specified values. For a purely linear system, the reconstruction of nonexistent higher harmonics may cause some states of the reconstructor to diverge; in such a case, f2=0 should be set. The speed of the reconstructor can be adjusted by observing the reconstructed process variable epv through the parameter alpha, which specifies the relative position of the poles of the reconstructor.
In a single experiment, it is possible to simultaneously identify up to 5 signals in the case of a single-input and multi-output system. The experiment is controlled according to the main signal pv, and in the adaptive excitation amplitude mode, all maximum permissible response values defined by the array dy_max are monitored. If the length of the array is insufficient for nsig selected signals for processing, the last value of the array is applied to all undefined positions. If all signals share the same limitation, only one value needs to be specified.
Error code iIDE:
101 | ... | Sampling frequency is too low |
102 | ... | Output saturation during identification |
103 | ... | Exceeded initialized array size |
104 | ... | Process variable out of allowable range |
10 | ... | warning - sampling frequency is too low |
11 | ... | warning - cpb does not comply with set limits |
12 | ... | warning - dithering resumed due to reaching max. time |
13 | ... | warning - unable to save additional precisely measured points |
due to exhaustion of initialized memory | ||
This block propagates the signal quality. More information can be found in the 1.4 section.
Input
pv | Process variable | Double (F64) |
TUNE | Start the tuning experiment | Bool |
HLD | Hold | Bool |
BRK | Stop the tuning experiment | Bool |
Parameter
wb | Start frequency [rad/s] 0.0 1.0 | Double (F64) |
wf | End frequency [rad/s] 0.0 10.0 | Double (F64) |
cpb | Initial sweeping rate 0.0 1.0 0.92 | Double (F64) |
alpha | Relative position of recostructor’s poles 0.0 2.0 | Double (F64) |
mode | Frequency sweeping mode 1 | Long (I32) |
|
|
|
adaptive_cp | Adaptive sweep rate flag on | Bool |
adaptive_amp | Adaptive amplitude flag on | Bool |
nsig | Number of valid input signals 1 5 1 | Long (I32) |
np | Window size for convergence detection [s] 0.0 3.0 | Double (F64) |
q_crit | Convergence threshold [%] 0.001 100.0 5.0 | Double (F64) |
cp_min | Minimal Sweeping Rate 0.0 1.0 0.8 | Double (F64) |
cp_max | Maximal Sweeping Rate 0.0 1.0 0.99 | Double (F64) |
cp_ratio | Sweeping and amplitude change ratio 0.0 1.0 0.8 | Double (F64) |
uampb | Initial amplitude of the exciting signal 0.0 1.0 | Double (F64) |
uamp_max | Maximal amplitude of the exciting signal 0.0 5.0 | Double (F64) |
ubias | Static component of the exciting signal | Double (F64) |
hilim | Maximal allowed value of the exciting signal 10.0 | Double (F64) |
lolim | Minimal allowed value of the exciting signal -10.0 | Double (F64) |
cmi | Number of windows for convergence detection (per frequency) 1 10 | Long (I32) |
rmi | Reconstructor tunning time [s] 0.0 10.0 | Double (F64) |
f2..f5 | Next estimated harmonic order 2 1000 2 | Long (I32) |
nmax | Allocated size of array 10 10000000 40 | Long (I32) |
stopBy | Stop sweep by 10 | Long (I32) |
|
|
|
StopVal | Stopping points [-30 -90 -150] | Double (F64) |
WL | Linear intervals matrix (combined mode only) [2.2 | Double (F64) |
dy_max | Maximum allowed response amplitude [2.2 | Double (F64) |
Output
mv | Manipulated variable (controller output) | Double (F64) |
TBSY | Tuner busy flag | Bool |
|
|
|
w | Actual frequency [rad/s] | Double (F64) |
xre | Real part of frequency response | Double (F64) |
xim | Imaginary part of frequency response | Double (F64) |
phase | Phase shift of frequency response [degrees] | Double (F64) |
epv | Process variable estimation | Double (F64) |
IDE | Error indicator | Bool |
iIDE | Error code | Long (I32) |
cp | Actual Sweeping Rate | Double (F64) |
thd | Total harmonic distorsion | Double (F64) |
pmpRef | Precisely measured frequency response points (w im re) [2.2 | Double (F64) |
mxData | Actual estimated frequency response (all signals) [2.2 | Double (F64) |
[Previous] [Back to top] [Up] [Next]
2025 © REX Controls s.r.o., www.rexygen.com