# Online SOPDT Model Identification Method Using a Relay
## 2 Description of the Method
### Calculation of the Time Constants  
In the proposed method, unlike the classical relay method [3], only the value of the ultimate frequency \(\omega_{\mathrm{u}}\) obtained from this measurement is used for the calculations of time constants. This makes it robust to errors in the measurement of the amplitude. After the measurement of the period of oscillations generated at the critical point in a closed loop system with the identified plant, it is repeated in a loop with an additionally introduced integrator. Let us represent the Fourier transfer function of a model (2) as the product of the minimum-phase term \(G_{mf}(j\omega)\) and the delay term \(G_{d}(j\omega)\):  
\[G_{m}(j\omega)=G_{mf}(j\omega)\cdot G_{d}(j\omega) \tag{6}\]  
The argument of this function can be expressed as a sum of arguments of both the inertia and the delay:  
\[Arg\{G_{m}(j\omega)\}=\varphi_{m}(\omega)=-arctg(\omega T_{1})-arctg(\omega T _{2})-\omega\theta \tag{7}\]  
Figure 3: Static characteristics of a saturation relay. Figure 2: Time series of selected variables during the pretest. Without decomposing into two inertias, this relationship for \(\omega=\omega_{u}\) can also be written in another form:  
\[\varphi_{m}(\omega)=\theta\omega_{u}-arctg\frac{(T_{1}+T_{2})\omega_{u}}{1-T_{1} T_{2}\cdot\omega_{u}{}^{2}} \tag{8}\]  
Due to the ultimate frequency \(\omega_{u}\), the argument of the Fourier transfer function \(G_{m}(j\omega_{u})\) is the phase lag \(\varphi_{m}\) equal to \(-\pi\) and the relation (8) will take the form  
\[arctg\frac{(T_{1}+T_{2})\omega_{u}}{1-T_{1}T_{2}\cdot\omega_{u}{}^{2}}=\theta \omega_{u}+\pi \tag{9}\]  
The tangent functions of both sides of the Equation (9) are equal to  
\[\frac{(T_{1}+T_{2})\omega_{u}}{1-T_{1}T_{2}\cdot\omega_{u}{}^{2}}=tg(\theta \omega_{u}+\pi)=tg(\theta\omega_{u}) \tag{10}\]  
The expression \(\theta\cdot\omega_{u}\) represents the phase shift \(\varphi_{dt}\), which the dead time introduces into the open system at the ultimate frequency. Taking this into account, after simplification, Equation (10) can be written as  
\[tg\varphi_{dt}(1-T_{1}T_{2}\cdot\omega_{u}{}^{2})=(\ T_{1}+T_{2})\omega_{u} \tag{11}\]  
To be able to determine the values of the time constants, it is necessary to determine one more point of the frequency characteristic. This can be done in several ways, for example, by introducing into the feedback loop any linear corrector of the known transfer function for the duration of the test, preferably one that does not influence the magnitude. Let us assume that with the inclusion of a relay in the feedback loop, an ideal integral member will be added, causing the phase shift of the open system to increase by \(\varphi(\omega_{2})=-90^{\circ}\). In the closed system, non-extinguishing oscillations will be induced. The measurement of their frequency will allow for the determination of the value \(\omega_{2}\). For a signal of this frequency, the phase lag of an open system (without the integrating element added) will be equal to \(\varphi(\omega_{2})=-90^{\circ}\). Taking this into account, the relation (9) will take the following form:  
\[\varphi_{m}(\omega_{2})+\pi=-arctg-\frac{(T_{1}+T_{2})\omega_{2}}{1-T_{1}T_{2 }\cdot\omega_{2}{}^{2}}-\theta\omega_{2}-0.5\pi \tag{12}\]  
Simplifying (12) we obtain  
\[tg(\theta\omega_{2}+0.5\pi)=\frac{(T_{1}+T_{2})\omega_{2}}{T_{1}T_{2}\cdot \omega_{2}{}^{2}-1} \tag{13}\]  
Let us substitute the expression \(\theta\omega_{2}+0.5\pi\) with the new variable \(\varphi_{2}\):  
\[Arg\{G_{m}(j\omega)\}=\varphi_{m}(\omega)=-arctg(\omega T_{1})-arctg(\omega T _{2})-\omega\theta \tag{7}\]0  
Let us assume that the frequency of the oscillations generated during the first  
to solve for the time constant of the delay that needs to be known. By transforming Equations (16) and (17), we can determine the sum and product of the time constants \(T_{1}\) and \(T_{2}\).