Next Article in Journal
Reliability Verification of Existing RC Structures Using Partial Factors Approaches and Site-Specific Data
Previous Article in Journal
Cosmeceutical Potential of Grateloupia turuturu: Using Low-Cost Extraction Methodologies to Obtain Added-Value Extracts
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fitting of Generic Process Models by an Asymmetric Short Relay Feedback Experiment—The n-Shifting Method

by
José Sánchez Moreno
*,
Sebastián Dormido Bencomo
and
José Manuel Díaz Martínez
Department of Computer Sciences and Automatic Control, Universidad Nacional de Educación a Distancia, 28040 Madrid, Spain
*
Author to whom correspondence should be addressed.
Appl. Sci. 2021, 11(4), 1651; https://doi.org/10.3390/app11041651
Submission received: 11 January 2021 / Revised: 19 January 2021 / Accepted: 9 February 2021 / Published: 12 February 2021
(This article belongs to the Section Electrical, Electronics and Communications Engineering)

Abstract

:
This paper presents the generalization of the shifting method for relay feedback identification of dynamic systems of any order. The original shifting method enables the fitting of a maximum of five parameters of a transfer function model from the information obtained from a short relay test and without prior knowledge of the process to identify. The generalization, known as n-shifting, allows the estimation of the parameters of transfer functions of any order by applying one short relay test to the process to identify. Without loss of generality, the n-shifting approach is applied to fit an n-order plus time delay (n-OPTD) model but the approach can be also developed to identify models with other structures (non-minimum phase, unstable, integrators). Some examples of estimations are presented.

1. Introduction

Experimental system identification of transfer function models using relays is a widely used technique in control engineering. Typskin originally described that technique in 1973 [1], although the most known publication applying the approach is [2], where the method is applied for the automatic tuning of simple PID (Proportional, Integral, Derivative) regulators.
Due to the high number of regular papers, conference contributions, technical reports and specific books on system identification by relay methods, it is not our aim to make a long introduction to the subject. The rationale of the method is that a linear system under an ideal symmetrical relay control ( u A = u B and e A = e B = 0 in Figure 1) oscillates, approximately, at its ultimate frequency, that is, ω o s c ω u and the critical gain K u is derived from the describing function (DF) of the ideal relay. That is:
N ( A o s c ) = 4 u A π A o s c = K u .
where A o s c is the oscillation amplitude and u A is the relay output. The reason of the oscillation is explained because it occurs when Equation (2):
1 = G ( j ω o s c ) N ( A o s c )
is satisfied. Notice that Equation (2) represents the intersection in the Nyquist plot of G ( s ) with the horizontal line − 1 / N ( A o s c ) . The intersection point G ( j ω o s c ) is termed in the literature as the critical point. In the case of a simple relay, the phase lag of G ( j ω o s c ) is 180°.
An easy way to get the parameters of a transfer function model from Equation (2) is to use the magnitude and argument of G ( j ω o s c ) , separating both components to solve them. That is:
| 1 N ( A o s c ) | = | G ( j ω o s c ) |
arg 1 N ( A o s c ) = arg G ( j ω o s c ) .
As an example of this approach, the following two equations are obtained for estimating the parameters of a first order process as K e L s T s + 1 :
π A o s c 4 D = K 1 + ( T ω o s c ) 2
π = arctan ( T ω o s c ) L ω o s c .
Supposing that the process gain K is known, it is possible to calculate first the lag T using Equation (5) and next the time delay L using Equation (6). If the process to identify is an underdamped second order plus time delay as K e L s / [ ( T 1 s + 1 ) ( T 2 s + 1 ) ] , it is necessary to force the system to oscillate at another frequency ω o s c 2 to estimate the four parameters K , T 1 , T 2 and L of the model, by solving the four equations obtained from the magnitudes and arguments of:
1 N ( A o s c ) = G ( j ω o s c )
1 N ( A o s c 2 ) = G ( j ω o s c 2 ) .
There are two techniques for generating oscillations at other frequencies different from ω o s c : (i) by adding a phase lag to the original critical point G ( j ω o s c ) and (ii) by using a relay with hysteresis. The phase lag can be introduced in G ( s ) in two ways: by including an additional transport delay [3,4,5,6] or by an integrator [7,8,9]. Regarding the hysteresis technique, the DF corresponding to a relay with hysteresis is:
N ( A o s c , δ ) = 4 u A π A o s c 1 ( δ A o s c ) 2 i 4 u A δ π A o s c 2 ,
where δ = e A = e B 0 and A o s c > δ . As 1 / N ( A o s c , δ ) represents a horizontal line that can be moved down along the imaginary axis of the Nyquist plot changing δ . As the intersection of G ( s ) with 1 / N ( A o s c , δ ) means an oscillation, the critical point where the intersection occurs can be modified by manipulating the width of the hysteresis. Replacing Equation (9) in Equation (7) and Equation (8), it is possible to decrease the phase lag of the critical point as needed. From Equation (9), the theoretical phase lag obtained by applying hysteresis to the relay is defined by:
φ = arctan ( δ A o s c 2 δ 2 ) = arcsin ( δ A o s c ) .
This solution was originally described by [2].
However, the DF approach provides only an approximation of the true critical point at the frequencies where G ( s ) oscillates. These approximations reduce the accuracy of the results or even produce solutions in the complex plane. For instance, the DF analysis in a simple relay considers that the critical point has a phase lag of 180° but in a real experiment the phase lag can differ some degrees from 0°. Let see a practical example of this situation.
Example: The first order process:
G ( s ) = e s s + 1
under relay control feedback with u A = u B = 1 and e A = e B = 0 oscillates in a simulation at the frequency ω o s c = 2.1056 and amplitude A o s c = 0.6327 . However, by the DF approach, it is known that:
| G ( j ω o s c ) | = | 1 N ( A o s c ) | = π A o s c 4 u A = 0.4969
and arg G ( j ω o s c ) = 180 ° . Supposing that the process gain K = 1 is known and using the information from the DF and Equations (5) and (6) to estimate the lag and the delay of G ( s ) , we would obtain T = 0.8002 and L = 1.9842 . Clearly, the estimation is not very accurate. Also, if the process to estimate had been a second order model with time delay, an additional point G ( j ω o s c 2 ) would have been necessary by a second experiment with the relay. However, in this case also the estimation would contain similar errors.
From this example, it is clear that it is essential to obtain the exact value of G ( s ) at different oscillation frequencies during one relay test.
Two strategies are the most relevant solutions found in the literature to measure accurately several critical points during just one relay experiment. The first one is based on the Laplace transform of y ( t ) and u ( t ) ; as both signals are periodic and piecewise, it can be written as:
G ( j ω o s c ) = Y ( j ω o s c ) U ( j ω o s c ) = 0 T y ( t ) e j ω o s c t d t 0 T u ( t ) e j ω o s c t d t
and so, it is possible to obtain the harmonics:
G ( j n ω o s c ) = 0 T / n y ( t ) e j n ω o s c t d t 0 T / n u ( t ) e j n ω o s c t d t ,   n = 0 , 1 , 2 , 3 ,
It is worth noting that if the relay is not biased, that is, u A = u B , the signals and u ( t ) are symmetric in Equation (11) and thus harmonics of even order cancel out. Some works on system identification based on these approaches are [10,11,12,13,14]. If this strategy had been applied in the previous example to estimate the critical point, it would have been obtained | G ( j ω o s c ) | = 0.4289965 and arg G ( j ω o s c ) = 174.56 ° . With these data, the estimation of the process parameters produces T = 0.9999 and L = 1.001. Notice the difference in the accuracy with respect to the previous situation.
A second solution to get a second harmonic is the shifting method described in [15,16]. By this approach, it is possible to determine two points G ( j ω o s c ) and G ( j 2 ω o s c ) during one relay test by obtaining a second set of signals of frequency 2 ω o s c directly from y ( t ) and u ( t ) . The generalization of this method to obtain the points G ( j k ω o s c ) with k = 1 … n is the subject of this paper.
The original shifting and the extension presented here are characterized for their significantly short experiments (in fact, only a single experiment is needed). Once the convergence to the limit cycle has been achieved, only the information of one cycle of y ( t ) and u ( t ) is needed to make possible the identification of the model. It was demonstrated in [17] that if the experiment starts in a steady state and it is executed in the absence of load disturbances, then it is possible to use very short experiments, even under significant measurement noise. In general, the convergence is reached in one to three periods [17,18]. Similar works on identification based on short relay experiments are described in [19,20].
This paper presents the n-shifting method, a generalization of the basic shifting algorithm to obtain n points of G ( s ) in a short relay feedback experiment. Thus, the original method is extended to estimate transfer functions with more than 5 parameters, which is the maximum possible with the original approach.
The paper is organized as follows. Section 2 is dedicated to describing with more detail the original shifting technique. Section 3 demonstrates why it is possible to extend the shifting method to obtain n points from G ( s ) with data from just only one cycle of the oscillation generated by the relay in the system. The identification algorithm is explained in Section 4 for fitting models with n lags and one time delay and three illustrative examples are given in Section 5. Finally, conclusions and future extensions of the method are provided in Section 6.

2. The Shifting Technique

The original shifting procedure is based on generating, during a test with an asymmetric relay with hysteresis (see Figure 1), a new set of periodic signals y ¯ ( t ) and u ¯ ( t ) of frequency 2 ω o s c directly from the signals y ( t ) and u ( t ) of frequency ω o s c where ω o s c = 2 π / T . These two new signals are obtained by the sum of the original signals and themselves but with a delay of T/2:
y ¯ ( t ) = y ( t ) + y ( t T 2 )
u ¯ ( t ) = u ( t ) + u ( t T 2 ) .
The result of Equations (12) and (13) is that y ¯ ( t ) and u ¯ ( t ) are periodic and rectangular waveforms, respectively but of T/2 period. Figure 2 shows an example of the shifting of the signals corresponding to a process 2 e s / ( s + 1 ) where e A = e B = 1 , u A = 1 and u B = 0.8 .
Since y ¯ ( t ) and u ¯ ( t ) are periodic, it is possible to apply Equation (11) for obtaining the fundamental harmonics of G ( s ) when the system is oscillating at 2 ω o s c . So, two critical points can be generated from the information of only one cycle by the following expressions:
G ( j ω o s c ) = 0 T y ( t ) e j ω o s c t d t 0 T u ( t ) e j ω o s c t d t
G ( j 2 ω o s c ) = 0 T / 2 y ¯ ( t ) e j 2 ω o s c t d t 0 T / 2 u ¯ ( t ) e j 2 ω o s c t d t
At this point, it is important to remark that the relay must be asymmetric, that is, e A e B and/or u A u B to avoid the second critical point becoming infinite because u ¯ ( t ) = 0 . If the relay is symmetrical the sum of the semi-periods of u ( t ) and u ¯ ( t ) in Equation (13) is zero because u ( t ) = u ( t T / 2 ) . Also, if a third point of the Nyquist plot is required, the process gain K = G ( 0 ) can be obtained as follows:
G ( 0 ) = 0 T y ( t ) d t 0 T u ( t ) d t .
The integrals of the Equations (14), (15) and (16) can be computed numerically once the experiment is finished. During the experiment it is enough to save the information corresponding to y ( t ) and u ( t ) to be analysed and processed off-line to calculate the value of the three critical points.
Once the values of the three critical points are available, it is possible to estimate the parameters of a model composed of four or five parameters as a maximum. There are two alternatives to make the fitting. The first one is by solving the explicit formulas of the model parameters (see [12,13,14] for expressions of models of four parameters). A second alternative is by solving the following two complex nonlinear equations:
G ( j ω o s c ) = G M O D E L ( j ω o s c ) G ( j 2 ω o s c ) = G M O D E L ( j 2 ω o s c ) .
The first version of the shifting method described in [15,16] did not take into consideration that the position of G ( j 2 ω o s c ) could be located in the first or second quadrant of the Nyquist map (see Figure 3). Due to the high frequency noise, it could be preferable for system identification to have this point in the third quadrant or with a phase lag as close to 180° as possible. To get two points with a more convenient position in the map (with a phase lag from 180° to 90°) it is necessary to force a clockwise rolling of G ( s ) by adding an additional phase shift by an integrator or a delay. Such action produces a new system G ( s ) whose intersection with the negative reciprocal of the relay DF occurs at a lower frequency than the original G ( s ) . Once the point G ( j ω o s c ) is measured and G ( j 2 ω o s c ) is calculated by shifting, the effect of the additional phase is discounted to obtain the original G ( j ω o s c ) and G ( j 2 ω o s c ) and proceed with the fitting. So, for example, if the system G ( s ) is modified by adding a delay L a d d , Equation (17) must be replaced by:
G ( j ω o s c ) = G M O D E L ( j ω o s c ) e j ω o s c L a d d G ( j 2 ω o s c ) = G M O D E L ( j 2 ω o s c ) e j 2 ω o s c L a d d
to undo the phase shifting. The added phase is ω o s c L a d d for the point G ( j ω o s c ) and 2 ω o s c L a d d for G ( j 2 ω o s c ) . If an integrator is chosen, the lag is always −π/2. Figure 3 presents an example of phase shifting by inserting a delay of 0.4 that transforms the system G ( s ) = e 0.1 s / ( s + 1 ) into G ( s ) = e 0.5 s / ( s + 1 ) . The oscillation occurs because G is intersecting with 1 / N ( A o s c , δ ) that corresponds to a relay with hysteresis. Notice that the two points of G ( s ) are located in the third and fourth quadrants of the map when the phase shifting is undone. If the experiment with G ( s ) had been done without the additional delay, the point G ( j 2 ω o s c ) would have been located in the second or first quadrant. In this example, ω o s c = 3.3 rad/s. and the phase lag of G ( j ω o s c ) is 2.926 rad. (167.65°); as the phase added by the delay is ω o s c L a d d = 1.32 rad. (75.63°), the phase lag of G ( j ω o s c ) becomes 1.606 rad. (167.65° − 75.63° = 92.02°). The phase added to G ( j 2 ω o s c ) is the double, that is, 2.64 rad. (151.26°).
This modification was included in the shifting method in [21] by adding an integrator to the block diagram and in [22,23] by a transport delay.

3. Extending the Basic Shifting Approach

The extension of the basic shifting method to generate n points means opening the possibility of estimating models of any order by one relay feedback experiment. This extension would consist in generating n sets of signals y ¯ n ( t ) and u ¯ n ( t ) by generalization of the Equations (12) and (13) to:
y ¯ n ( t ) = j = 0 n 1 y ( t j T n ) = y ( t ) + y ( t T n ) + + y ( t ( n 1 ) T n )
u ¯ n ( t ) = j = 0 n 1 u ( t j T n ) = u ( t ) + u ( t T n ) + + u ( t ( n 1 ) T n )  
in order to be able to apply the expression:
G ( j n ω o s c ) = 0 T / n y ¯ n ( t ) e j n ω o s c t d t 0 T / n u ¯ n ( t ) e j n ω o s c t d t .
This generalization is known as the n-shifting method. It must be noticed that with n = 2, the generalization corresponds to the original approach. Figure 4 shows the result of the n-shifting until n = 4 with the same process and relay setting as in Figure 2.
But in order to be able to apply the extension, it is necessary to prove that given a generic signal f ( t ) of period T , the signal f ¯ ( t ) obtained by the sum of n signals f ( t ) delayed successively j T / n with j = 0 … n−1 is a signal of period T / n . It leads to the formulation of the following theorem.
Theorem 1.
Given a periodic function f ( t ) having a period T , that is, f ( t ) = f ( t + T ) , then:
f ¯ ( t ) = j = 0 n 1 f ( t j T n ) = f ( t ) + f ( t T n ) + + f ( t ( n 1 ) T n )
is a periodic function of period T / n .
Proof of Theorem 1.
If the F ( s ) is the Laplace transform of f ( t ) then the Laplace transform of f ( t j T n ) is e j T n F ( s ) . So, the Laplace transform of (22) is:
F ¯ ( s ) = ( 1 + e T n s + e 2 T n s + + e ( n 1 ) T n s ) F ( s ) .
It is well known [24] that the Laplace transform of a periodic function f ( t ) = f ( t + T ) is:
F ( s ) = 0 T e s T f ( t ) d t 1 e s T = F 0 ( s ) 1 e s T
So, applying Equation (24) to the right term of Equation (23), we get:
F ¯ ( s ) = 1 + e T n s + e 2 T n s + + e ( n 1 ) T n s 1 e s T F 0 ( s )
By applying the variable change e T n s = x to Equation (25), we have:
F ¯ ( s ) = 1 + x + x 2 + + x n 1 1 x n F 0 ( s ) = ( x n 1 + + x 2 + x + 1 ) x n 1 F 0 ( s ) .
If:
( x n 1 ) = ( x n 1 + x n 2 + x + 1 ) ( x 1 )
is applied to Equation (26), the following expression is obtained:
F ¯ ( s ) = 1 x 1 F 0 ( s )
Undoing the previous variable change in Equation (28), we get:
F ¯ ( s ) = 1 1   e T n s F 0 ( s )
that corresponds to the expression of the Laplace transform given in Equation (24) of a periodic function f ¯ ( t ) with period T / n . □

4. The Identification Algorithm

Once proved that the generalization of the shifting method is feasible, it is necessary to define the identification method for fitting models of any order using the information provided by the n-shifting approach.
Obtaining the explicit expressions of the parameters of a model with more than four parameters (for instance, one zero, three lags and delay) can be complicated and tedious because of the length of the nonlinear expressions. The solution presented here is for fitting a model of n order plus time delay (n-OPTD):
M n O P T D ( s ) = K i = 1 n ( T i s + 1 )   e L s
and it is based on solving a set of nonlinear equations. Without loss of generality, the procedure can be applied to models with other structures as non-minimum phase or with integrators.
Continuing with Equation (30), the number of unknowns in this model is n + 1, L is not taken into account because it is obtained by solving the equation corresponding to the argument of Equation (30). Therefore, n + 1 experimental points G ( 0 ) ), G ( j ω o s c ) , G ( j 2 ω o s c ) ,…, G ( j n ω o s c ) must be obtained from a relay test by n-shifting.
The magnitude expression of M n O P T D ( j n ω o s c ) is:
| M n O P T D ( j n ω o s c ) | = K i = 1 n T i 2 n 2 ω o s c 2 + 1   .
Now, relating the magnitudes of the n points G ( j ω o s c ) , G ( j 2 ω o s c ) , … , G ( j n ω o s c ) with their corresponding magnitude expressions obtained from (31) and reordering the expressions, we obtain the following set of n nonlinear equations:
K 2 | G ( j k ω o s c ) | 2   + i = 1 n ( 1 + k 2 T i 2 ω o s c 2 ) = 0
with k = 1 … n. Once the Tis are obtained from Equation (32), we use these values and the argument of G ( j ω o s c ) to get L . As it is possible to calculate:
M ¯ n O P T D ( j ω o s c ) = K i = 1 n ( T i j ω o s c + 1 )  
then:
L = arg G ( j ω o s c ) arg M ¯ n O P T D ( j ω o s c ) ω o s c ,
where it is considered that arg G ( j ω o s c ) < 0 .
Several valid models can be obtained on some occasions. The model selected must be the one that minimizes the following index based on the Euclidian distance:
D ˜ = k = 0 n | G ( j k ω o s c ) M n O P T D ( j k ω o s c ) | .
Summarizing, the generic procedure for fitting a model by the n-shifting approach is:
  • Make a short relay feedback experiment. The length of the experiment must be 2–3 cycles for stabilization and 1 cycle for recording y ( t ) and u ( t ) .
  • Calculate ω o s c and save the last cycle of y ( t ) and u ( t ) .
  • With y ( t ) and u ( t ) , calculate y ¯ k ( t ) and u ¯ k ( t ) with k = 0 … n by Equations (19) and (20).
  • With y ¯ k ( t ) and u ¯ k ( t ) calculate G ( j k ω o s c ) with k = 0 … n by Equation (21).
  • Obtain the n Ts by solving Equation (32).
  • Obtain the time delay from Equation (34).
  • If multiple solutions are obtained, select the model that minimizes Equation (35).
Remark 1.
The phase lag of points G ( j 2 ω o s c ) to G ( j n ω o s c ) in the Nyquist plot are conditioned by the relay because the hysteresis determines the position of G ( j ω o s c ) . The maximum decrease of phase lag of G ( j ω o s c ) that the hysteresis can theoretically produce is 90°. This could prevent the points of G at higher frequencies from being situated in the first and second quadrant, without thus being necessary to add any phase by a delay or an integrator.
Remark 2.
The solutions provided in the literature to force the phase shifting when needed do not allow to know the effect on the phase before starting the experiment. An on-the-fly way is starting the experiment with a small additional delay and increase it until:
arg G ( j n ω o s c ) π
but that implies that G ( j n ω o s c ) must be known on-line.
Remark 3.
The effect of the noise has not been considered in the procedure because results would be similar to those presented in [12,13] due to the same foundation of both methods. One of the advantages of the relay is that its hysteresis reduces the influence of the noise in e ( t ) by generating control actions u ( t ) free of noise. The recommendation is to adjust the hysteresis to 2–3 times the noise level [19,25]. However, if the noise level is too large, it could produce false control actions and the calculation of ω o s c and G ( j ω o s c ) would become difficult. This fact would demand a previous filtering of y ( t ) .

5. Simulation Examples

The method is demonstrated on three examples of processes of high order. The experiments have been run in Matlab/Simulink by simulations and the integration step has been set to h = 0.001 s. The length of the experiments has been 3 cycles, leaving the first two cycles to allow the limit cycle to stabilize. So, just information from once cycle was used in the Equations (19)–(21). The nonlinear system given by Equations (32) and (34) were solved by the fsolve function of Mapple.
Example 1.
Fitting of a model of the same order than the process.
The method is applied to the estimation of a model of order n = 4, which means six parameters, as a study case for presenting the system of nonlinear equations to be solved. The process chosen is:
G 1 ( s ) = 2 ( s + 1 ) ( 0.5 s + 1 ) ( 0.25 s + 1 ) ( 0.1 s + 1 ) e s
so four points must be obtained by the n-shifting derived from the information of one cycle of y ( t ) and u ( t ) . Applying Equation (32) with n = 4, it is obtained:
K 2 | G ( j ω o s c ) | 2 + ( 1 + T 1 2 ω o s c 2 ) ( 1 + T 2 2 ω o s c 2 ) ( 1 + T 3 2 ω o s c 2 ) ( 1 + T 4 2 ω o s c 2 ) = 0 K 2 | G ( j 2 ω o s c ) | 2 + ( 1 + T 1 2 4 ω o s c 2 ) ( 1 + T 2 2 4 ω o s c 2 ) ( 1 + T 3 2 4 ω o s c 2 ) ( 1 + T 4 2 4 ω o s c 2 ) = 0 K 2 | G ( j 3 ω o s c ) | 2 + ( 1 + T 1 2 9 ω o s c 2 ) ( 1 + T 2 2 9 ω o s c 2 ) ( 1 + T 3 2 9 ω o s c 2 ) ( 1 + T 4 2 9 ω o s c 2 ) = 0 K 2 | G ( j 4 ω o s c ) | 2 + ( 1 + T 1 2 16 ω o s c 2 ) ( 1 + T 2 2 16 ω o s c 2 ) ( 1 + T 3 2 16 ω o s c 2 ) ( 1 + T 4 2 16 ω o s c 2 ) = 0 .
The configuration of the relay has been chosen as ea = 1, eb = − 1, ua = 1, ub = − 0.8.
After running the experiment and applying the n-shifting approach to one cycle of data from y ( t ) and u ( t ) , the following values were measured: ωosc = 0.892878 rad/s, G1(0) = 1.999448, G1(osc) = − 0.932070 − 0.940652j, G1(j2ωosc) = − 0.335874 + 0.562595j, G1(j3ωosc) = 0.276118 + 0.191255j, G1(j4ωosc) = 0.138722 − 0.122538j.
Solving Equations (38) and (39), the model obtained is:
M 4 O P T D ( s ) = 1.999448 ( 0.9989 s + 1 ) ( 0.5009 s + 1 ) ( 0.2494 s + 1 ) ( 0.1001 s + 1 ) e 1.001 s .
Figure 5 presents the Nyquist plot of the process given by Equation (37) and the model given by Equation (39) with the points of G1(s) highlighted.
Example 2.
Fitting a model of lower order than the process using phase shifting.
In this second example, the 8th order process:
G 2 ( s ) = 1 ( s + 1 ) 8
is fitted using the model of a fourth order M4-OPTD. An additional delay L a d d = 4 has been introduced to illustrate the effect of the phase shifting to move the G 2 points to a more convenient position in the Nyquist plot. Therefore, the simulation is run during three cycles with the system G 2 ( s ) = G 2 ( s ) e s L a d d . The configuration of the relay during the experiment has been set to: ea = 0.5, eb = − 0.5, ua = 1, ub = − 0.8.
As the model to estimate is of order 4, the points to calculate are 4. Thus, the results of the n-shifting are: ωosc = 0.2238159 rad/s, G’2(0) = 1.000020. G2’(osc) = − 0.727749 − 0.383053j (φ ≈ 152°), G2’(j2ωosc) = 0.207702 + 0.434568j (φ ≈ 295°), G2’(j3ωosc) = 0.095464 − 0.204507j (φ ≈ 424°), G2’(j4ωosc) = − 0.094937 − 0.000093j (φ ≈ 539°).
Once the effect of the additional delay is discounted by G 2 ( j n ω o s c ) e 4 n ω o s c = G 2 ( j n ω o s c ) , the definitive points for the fitting are: G2(osc) = − 0.156146 − 0.807444j (φ ≈ 101°), G2(j2ωosc) = − 0.469391 + 0.107986j (φ ≈ 193°), G2(j3ωosc) = 0.004302 + 0.225650j (φ ≈ 271°), G2(j4ωosc) = 0.085876 + 0.040475j (φ ≈ 335°).
It can be appreciated the phase shifting that the additional delay has introduced in the G 2 points when compared with the G 2 s. Solving Equations (32) and (34) with the G 2 points, many solutions are obtained but the only valid solution that corresponds to a stable system is the following:
M 4 O P T D ( s ) = 1.00002 14.52 s 4 + 21.96 s 3 + 17.17 s 2 + 6.5 s + 1 e 1.504 s .
The rest of the solutions correspond to unstable and/or non-causal systems (negative delays) and are thus discarded. Figure 6 and Figure 7 present the Nyquist plot and the step response of the process G2 and the model of Equation (41). The behaviour of the model in time and frequency is completely similar to the original process.
Example 3.
Estimation of an unstable process of low order.
This last example is included to show that the proposed method is able to identify unstable plants from one relay feedback test. The process selected is a second order unstable plant:
G 3 ( s ) = 1 ( T 1 s 1 ) ( T 2 s + 1 ) e L s
presented in [26], where T 1 = 2, T 2 = 0.5 and L = 0.5. The configuration of the relay is the one used by [26]: ea = 0.1, eb = − 0.1, ua = 1, ub = − 1.
After the simulation, the points obtained from applying the n-shifting are: ωosc = 0.592697416015431 rad/s, G3(0) = − 0.999979, G3(osc) = − 0.593316 − 0.173648j, G3(j2ωosc) = − 0.333983 − 0.014068j, G3(j3ωosc) = − 0.191932 + 0.063947j, G3(j4ωosc) = − 0.102077 + 0.085296j.
As in Example 2, the solutions obtained from Equations (32) and (34) with n = 4 are many but only two correspond to an unstable system. Those are:
M 4 O P T D 1 ( s ) = 0.9999 0.017 s 4 + 0.025 s 3 1.026 s 2 1.494 s + 1 e 0.4966 s
M 4 O P T D 2 ( s ) = 0.9999 0.017 s 4 + 0.043 s 3 + 0.992 s 2 2.504 s + 1 e 1.477 s .
To select one, it is necessary to calculate the D ˜ index given by Equation   (35) for both models. The values are D ˜ 1 = 0.0362 and D ˜ 2 = 0.1607 , so the selected model is M 4 O P T D 1 ( s ) . Figure 8 shows the Nyquist plot of G 3 ( s ) and the two solutions where it is clearly appreciated that the model M 4 O P T D 1 ( s ) is the best option.

6. Conclusions

This paper has presented the n-shifting approach, a generalization of the basic shifting approach presented in [15], that allows the fitting of transfer functions by a short relay feedback experiment. The basic shifting technique allows us to fit models of a maximum of five parameters by two points of G(s) obtained experimentally. However, by the n-shifting extension it is possible to obtain n points and make a fitting of a model of any order and structure.
In this work, the fitting of a generic n-order with time delay (n-OTD) model has been taken as a study case to present the approach but it can be extended to stable models with other structures (for example with integrators or zeros) or even unstable processes. The simulations presented show that the approach may be very appropriate to fit model templates in contexts where long experiments cannot be done. So, in this context, the models of the examples have been fitted with information from one cycle of simulation after two cycles for stabilization. To resume the approach, from n points derived from one cycle relay feedback experiment it is feasible to estimate a n-OPTD model composed of n + 2 parameters, that is, the static gain K, the transport delay L and the n time lags.
Apart from the fitting of models of high order, a practical use of the n-shifting approach is its application to the tuning of PID controllers by evolutionary algorithms. As the approach is able to provide an accurate estimation of n points of the output spectrum of a process, the tuning of PID controllers with a genetic algorithm using a n-order model is a direct application. The procedure for tuning would be (a) to estimate n points of an unknown process by the n-shifting approach, (b) to generate the n-order model with the points obtained in the previous step and (c) to tune the PID controller by a genetic algorithm using the n-order model with the goal of minimizing the integrated absolute error (IAE) after a set-point change or after a disturbance.
Regarding its limitations, the noise could be a problem in presence of relevant measurement noise. As said before, one of the features of an asymmetric relay is that it reduces the influence of the measurement noise by producing a control action free of noise in most of the cases. However, in presence of significant noise would be convenient a previous filtering of the process output because the signals y ¯ ( t ) are synthetized by the n-shifting of y ( t ) and the influence of noise could be transmitted to these signals. Another limitation of this estimation approach (and the approaches based on relays) is to obtain points of the process located in the low frequency range (the fourth quadrant in the Nyquist map). This is consequence that relays with hysteresis can produce oscillations with a minimum phase lag of around 90°.
Further research lines are (i) the extension of the n-shifting approach to the identification in event-based control loops where a SSOD-PI (Symmetric-Send-On-Delta) controller would replace the asymmetric relay, (ii) the tuning of PID controllers by genetic algorithms using n-OPTD models obtained by the n-shifting approach and (iii) the full characterization of the waveforms u ¯ ( t ) that the n-shifting produce by changing the relay parameters and the value of n.

Author Contributions

Conceptualization, S.D.B.; methodology: J.S.M.; software: J.S.M. and J.M.D.M.; validation: S.D.B.; investigation: S.D.B.; writing—original draft preparation, J.S.M.; writing—review and editing, S.D.B. and J.S.M.; visualization, J.S.M.; funding acquisition, S.D.B. and J.S.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Spanish Ministry of Economy and Competitiveness, grant numbers DPI2017-84259-C2-2-R and RTI2018-094665-B-I00.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Tsypkin, Y.Z. Foundations of the Theory of Learning Systems; Academic Press: New York, NY, USA, 1973. [Google Scholar]
  2. Åström, K.J.; Hägglund, T. Automatic tuning of simple regulators with specifications on phase and amplitude margins. Automatica 1984, 20, 645–651. [Google Scholar] [CrossRef] [Green Version]
  3. Li, W.; Eskinat, E.; Luyben, W.L. An improved autotune identification method. Ind. Eng. Chem. Res. 1991, 30, 1530–1541. [Google Scholar] [CrossRef]
  4. Scali, C.; Marchetti, G.; Semino, D. Relay with additional delay for identification and autotuning of completely unknown processes. Ind. Eng. Chem. Res. 1999, 38, 1987–1997. [Google Scholar] [CrossRef]
  5. Tan, K.K.; Lee, T.H.; Wang, Q.G. An enhanced automatic tuning procedure for PI/PID controllers for process control. AIChE J. 1996, 42, 2555–2562. [Google Scholar] [CrossRef]
  6. Leva, A.; Bascetta, L.; Schiavo, F. Model-based Proportional−Integral/Proportional−Integral−Derivative (PI/PID) autotuning with fast relay identification. Ind. Eng. Chem. Res. 2006, 45, 4052–4062. [Google Scholar] [CrossRef]
  7. Friman, M.; Waller, K.V. A two-channel relay for autotuning. Ind. Eng. Chem. Res. 1997, 36, 2662–2671. [Google Scholar] [CrossRef]
  8. Wang, Y.; Shao, H. PID Autotuner based on gain- and phase-margin specifications. Ind. Eng. Chem. Res. 1999, 38, 3007–3012. [Google Scholar] [CrossRef]
  9. Sung, S.W.; Lee, J. Two-channel relay feedback method under static disturbances. Ind. Eng. Chem. Res. 2006, 45, 4071–4074. [Google Scholar] [CrossRef]
  10. Vivek, S.; Chidambaram, M. Identification using single symmetrical relay feedback test. Comput. Chem. Eng. 2005, 29, 1625–1630. [Google Scholar] [CrossRef]
  11. Wang, P.; Gu, D.; Zhang, W. Modified relay feedback identification based on describing function analysis. Ind. Eng. Chem. Res. 2007, 46, 1538–1546. [Google Scholar] [CrossRef]
  12. Sánchez, J.; Guinaldo, M.; Visioli, A.; Dormido, S. Enhanced event-based identification procedure for process control. Ind. Eng. Chem. Res. 2018, 57, 7218–7231. [Google Scholar] [CrossRef]
  13. Sánchez, J.; Guinaldo, M.; Visioli, A.; Dormido, S. Identification of process transfer function parameters in event-based PI control loops. ISA Trans. 2018, 75, 157–171. [Google Scholar] [CrossRef] [PubMed]
  14. Sánchez, J.; Guinaldo, M.; Visioli, A.; Dormido, S. Identification and tuning methods for PI control systems based on symmetric send-on-delta sampling. Int. J. Control Autom. Syst. 2019, 17, 2784–2795. [Google Scholar] [CrossRef]
  15. Hofreiter, M. Shifting method for relay feedback identification. IFAC-PapersOnLine 2016, 49, 1933–1938. [Google Scholar] [CrossRef]
  16. Hofreiter, M. Biased-relay feedback identification for time delay systems. IFAC-PapersOnLine 2017, 50, 1462–1465. [Google Scholar] [CrossRef]
  17. Soltesz, K.; Mercader, P.; Baños, A. An automatic tuner with short experiment and probabilistic plant parameterization. Int. J. Robust Nonlinear Control 2016, 27, 1857–1873. [Google Scholar] [CrossRef] [Green Version]
  18. Lin, C.; Wang, Q.G.; Lee, T.H. Relay feedback: A complete analysis for first-order systems. Ind. Eng. Chem. Res. 2004, 43, 8400–8402. [Google Scholar] [CrossRef]
  19. Berner, J.; Hägglund, T.; Åström, K. Asymmetric relay autotuning—Practical features for industrial use. Control Eng. Pract. 2016, 54, 231–245. [Google Scholar] [CrossRef]
  20. Berner, J.; Soltesz, K. Short and robust experiments in relay autotuners. In Proceedings of the 22nd IEEE International Conference on Emerging Technologies and Factory Automation (ETFA), Limassol, Cyprus, 12–15 September 2017. [Google Scholar]
  21. Hofreiter, M.; Hornychová, A. Process identification using relay shifting method for autotuning of PID controller. In Proceedings of the MATEC Web of Conference, Osaka, Japan, 27–30 November 2019; Volume 292. [Google Scholar]
  22. Hofreiter, M. Alternative identification method using biased relay feedback. IFAC-PapersOnLine 2018, 51, 891–896. [Google Scholar] [CrossRef]
  23. Hornychová, A.; Hofreiter, M. Shifting method for relay feedback identification implemented in PLC Tecomat. In Proceedings of the 20th International Carpathian Control Conference (ICCC), Krakow-Wieliczka, Poland, 26–29 May 2019. [Google Scholar]
  24. Brown, R.G.; Nilsson, J.W. Introduction to Linear Systems Analysis, 1st ed.; John Wiley and Sons: New York, NY, USA, 1962. [Google Scholar]
  25. Berner, J.; Hägglund, T.; Åström, K. Towards a new generation of relay autotuners. In Proceedings of the 19th World Congress of The International Federation of Automatic Control, Cape Town, South Africa, 24–29 August 2014. [Google Scholar]
  26. Chen, F.; Garnier, H.; Gilson, M.; Zhuan, X. Frequency domain identification of continuous-time output-error models with time-delay from relay feedback tests. Automatica 2018, 98, 180–189. [Google Scholar] [CrossRef]
Figure 1. Basic configuration of an asymmetric relay control system.
Figure 1. Basic configuration of an asymmetric relay control system.
Applsci 11 01651 g001
Figure 2. Waveforms of four cycles of y(t) and u(t) (thick lines) and their corresponding shifting y ¯ ( t ) and u ¯ ( t ) (thin lines in red colour).
Figure 2. Waveforms of four cycles of y(t) and u(t) (thick lines) and their corresponding shifting y ¯ ( t ) and u ¯ ( t ) (thin lines in red colour).
Applsci 11 01651 g002
Figure 3. Phase shifting by an additional delay.
Figure 3. Phase shifting by an additional delay.
Applsci 11 01651 g003
Figure 4. Waveforms of four cycles of y ( t ) and u ( t ) (thick black) and their n-shifting signals y ¯ 2 ( t ) , y ¯ 3 ( t ) , y ¯ 4 ( t ) and u ¯ 2 ( t ) , u ¯ 3 ( t ) , u ¯ 4 ( t ) (thick red, thin black and thin red, respectively).
Figure 4. Waveforms of four cycles of y ( t ) and u ( t ) (thick black) and their n-shifting signals y ¯ 2 ( t ) , y ¯ 3 ( t ) , y ¯ 4 ( t ) and u ¯ 2 ( t ) , u ¯ 3 ( t ) , u ¯ 4 ( t ) (thick red, thin black and thin red, respectively).
Applsci 11 01651 g004
Figure 5. Nyquist map of G 1 ( s ) (in blue) and M 4 O P T D ( s ) (in red).
Figure 5. Nyquist map of G 1 ( s ) (in blue) and M 4 O P T D ( s ) (in red).
Applsci 11 01651 g005
Figure 6. Nyquist map of G 2 ( s ) (in blue) and M 4 O P T D ( s ) (in red).
Figure 6. Nyquist map of G 2 ( s ) (in blue) and M 4 O P T D ( s ) (in red).
Applsci 11 01651 g006
Figure 7. Step responses of of G 2 ( s ) (in blue) and M 4 O P T D ( s ) (in red).
Figure 7. Step responses of of G 2 ( s ) (in blue) and M 4 O P T D ( s ) (in red).
Applsci 11 01651 g007
Figure 8. Nyquist plot of G 3 ( s ) (in black), M 4 O P T D 1 ( s ) (in red) and M 4 O P T D 2 ( s ) (in green).
Figure 8. Nyquist plot of G 3 ( s ) (in black), M 4 O P T D 1 ( s ) (in red) and M 4 O P T D 2 ( s ) (in green).
Applsci 11 01651 g008
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Sánchez Moreno, J.; Dormido Bencomo, S.; Díaz Martínez, J.M. Fitting of Generic Process Models by an Asymmetric Short Relay Feedback Experiment—The n-Shifting Method. Appl. Sci. 2021, 11, 1651. https://doi.org/10.3390/app11041651

AMA Style

Sánchez Moreno J, Dormido Bencomo S, Díaz Martínez JM. Fitting of Generic Process Models by an Asymmetric Short Relay Feedback Experiment—The n-Shifting Method. Applied Sciences. 2021; 11(4):1651. https://doi.org/10.3390/app11041651

Chicago/Turabian Style

Sánchez Moreno, José, Sebastián Dormido Bencomo, and José Manuel Díaz Martínez. 2021. "Fitting of Generic Process Models by an Asymmetric Short Relay Feedback Experiment—The n-Shifting Method" Applied Sciences 11, no. 4: 1651. https://doi.org/10.3390/app11041651

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop