# Online SOPDT Model Identification Method Using a Relay
## 3 Simulation Results and Discussion
### Identification of the Second-Order Time-Delayed Plant  
Example 1. Assume that the plant is described by the following transfer function  
\[G_{ob1}(s)=\frac{2\ e^{-3s}}{(10s+1)(2s+1)} \tag{24}\]  
This plant was identified in accordance with the procedure presented in Section 2.1. The preliminary relay test allowed for determining the steady-state gain and the dead time. The following results were obtained: the response to an increase in the controlled signal equal to the output from the relay \(B\) = 0.1 was 1.942 after 40 s and 1.995 after 60 s, and the time delay was measured to be 3.01 s.  
The limit cycle parameters of the closed loop conducting this plant were equal to \(\omega_{1}\) = 0.387815 and \(K_{u1}\) = 2.5341. After introducing an ideal integral term and changing the dynamics of the loop, we obtained \(\omega_{2}\) = 0.13132 rad/s and \(K_{u2}\) = 0.1121. Oscillations induced with the relay will have parameters different from those derived from the calculations. The accuracy of these measurements will depend on the type of relay used. The identification experiment conducted with the ideal relay at \(B\) = 1 allowed for the measurement of the amplitude of the controlled variable \(A\) = 0.5369 and the period \(T_{osc}\) = 16.22 s. Usually, for online identification, a relay with hysteresis is used, which deforms the oscillations the most and the determined limit cycle parameters deviate more from the real ones. Using such a relay, which avoids chattering by changing the sign of the control error, with a width of \(\varepsilon\) = 0.02, the oscillation amplitude \(A\) = 0.5544 and the period \(T_{osc}\) = 16.60 s were measured. On the basis of the measured values, the sum \(\alpha\) and product \(\beta\) of the time constants were calculated, which were equal to \(\alpha\) = 12.8608 and \(\beta\) = 20.8841. On the basis of (21), both time constants of model (2) were determined as \(T_{1}\) = 1.9065 s and \(T_{2}\) = 10.954 s. The transfer function of this model is thus equal to  
\[G_{m22}(s)=\frac{1.995\:e^{-3.01s}}{(10.954s+1)(1.907s+1)} \tag{25}\]  
If a more time-consuming two-step procedure using a relay with saturation is used (Section 2.4), the accuracy of the measurement will depend on the slope of the linear part of the relay \(k\). For values slightly higher than the ultimate gain, the error can be less than 0.02%. For the second stage of the more accurate measurement of limit cycle parameters, a saturation relay was used [22]. The slope of the linear part of this relay was assumed to be \(k\) = 1.15-\(K_{\mathrm{ue}}\), which allowed the system to generate sustained oscillations with the magnitude \(A\) = 0.424 and the period \(T_{\mathrm{osc}}\) = 16.20 s. After the introduction of an ideal integral term into the system, the period increased to the value \(T_{\mathrm{osc2}}\) = 47.817 s. The identification test carried out by the proposed method made it possible to determine the transfer function of the tested plant with high accuracy:  
\[G_{m22}(s)=\frac{1.995\:e^{-3.01s}}{(10.002s+1)(1.982s+1)} \tag{26}\]  
A simpler critically damped SOPDT model can also be used to represent the dynamics of a second-order time-delayed plant [23]. Its transfer function is given as  
\[G_{2}(s)=\frac{ke^{-\theta_{c}s}}{(T_{m}s+1)^{2}} \tag{27}\]  
To compare it with the obtained overdamped SOPDT model, the parameters of the model of this class were determined on the basis of the previously made measurements, except that the time delay was calculated rather than measured. Based on the following relationships [24]:  
\[T_{m}=\frac{\sqrt{kK_{u}-1}}{\omega_{u}} \tag{28}\]  
\[\theta_{c}=\frac{\pi-2 arctg\sqrt{K\cdot k_{u}-1}}{\omega_{u}} \tag{29}\]  
the parameters of the second-order model using the ideal relay without hysteresis were calculated as being \(\theta\) = 2.467 s and \(T_{m}\) = 4.986 s.  
Figure 4 shows the step characteristics of the plant, the models created by the proposed method, and the critically damped SOPDT, which was constructed using the above formulae.