scieee AI-readable full text Open interactive document viewer

Tuning procedure for event-based PI controllers under regular quantization with hysteresis

Miguel-Escrig, Oscar; Romero Pérez, Julio Ariel

Abstract

In this paper a tuning procedure is proposed for event based PI controllers with Regular Quantization with Hysteresis (RQH) sampling law. The RQH is a generalization of Symmetric Send on Delta (SSOD) strategy which decreases the robustness requirements to avoid limit cycle oscillations and reduce the number of events needed for control, improving the overall performance of PI controllers in networked control systems. The tuning procedure takes into account not only classical robustness margins but also takes advantage of some specific robustness measures to avoid limit cycle oscillations induced by the sampler. As the robustness analysis depends on the Describing Function (DF) method, a study evaluating the effect of high order harmonics is provided, showing the validity of the tuning procedure. Some examples are included in which the usefulness of the tuning procedure is shown.

Full text

ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Available online at www.sciencedirect.com Journal of the Franklin Institute xxx (xxxx) xxx www.elsevier.com/locate/jfranklin Tuning procedure for event-based PI controllers under regular quantization with hysteresis Oscar Miguel-Escrig ∗, Julio-Ariel Romero-Pérez Department of System Engineering and Design, Universitat Jaume I. Campus del Riu Sec Avda, Vicent Sos Baynat s/n 12071, Castelló de la Plana, Spain Received 14 September 2020; received in revised form 2 February 2021; accepted 2 April 2021 Available online xxx Abstract In this paper a tuning procedure is proposed for event based PI controllers with Regular Quantization with Hysteresis (RQH) sampling law. The RQH is a generalization of Symmetric Send on Delta (SSOD) strategy which decreases the robustness requirements to avoid limit cycle oscillations and reduce the number of events needed for control, improving the overall performance of PI controllers in networked control systems. The tuning procedure takes into account not only classical robustness margins but also takes advantage of some specific robustness measures to avoid limit cycle oscillations induced by the sampler. As the robustness analysis depends on the Describing Function (DF) method, a study evaluating the effect of high order harmonics is provided, showing the validity of the tuning procedure. Some examples are included in which the usefulness of the tuning procedure is shown. © 2021 The Franklin Institute. Published by Elsevier Ltd. All rights reserved. 1. Introduction Event based control (EBC) of continuous system is getting more and more attention recently [1] . This is due to some of the advantages that EBC offers, such as providing a better management of the data flow through the digital networks on distributed control systems, reducing the data drop out in the form of package losses and decreasing the delays caused by the communication. These benefits are a direct consequence of the EBC data transmission policy, which consists in sending data only when significant changes are detected on the state ∗Corresponding author. E-mail addresses: [email protected] (O. Miguel-Escrig), [email protected] (J.-A. Romero-Pérez). https://doi.org/10.1016/j.jfranklin.2021.04.004 0016-0032/© 2021 The Franklin Institute. Published by Elsevier Ltd. All rights reserved. Please cite this article as: O. Miguel-Escrig and J.-A. Romero-Pérez, Tuning procedure for event-based PI controllers under regular quantization with hysteresis, Journal of the Franklin Institute, https:// doi.org/ 10.1016/ j.jfranklin.2021. 04.004 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] of the system and not periodically as in most of classical control loops. In networked control systems the EBC approach may be considered among the most promising control approaches, in deed, in [2] its importance in modern factory automation has been recently highlighted. In [3] a summarized but extensive study about the main contributions on EBC in the last two decades is presented. The results in that paper revels scarce of investigation on event based PID respect to other control approaches such as Model-based, Predictive or State-feedback control. PID, however, is used in most of the industrial control applications. Due to the high sensitivity of the derivative action to the measurement noise, the PI control is the dominant form of the PID in use today, [4] . This dominance in the industrial environment over other advanced control strategies such as MPC, was reflected in a survey conducted among the industrial committee members of the International Federation of Automatic Control published in [5] . The versatility of PID algorithms also allows them to remain important in the modern context of Industry 4.0 as it was highlighted in [6] , where the necessity of introducing new features to the PID algorithms in order to adapt them to the high connectivity between devices through wired and wireless communication networks that this paradigm offers was also pointed out. The adaptation of PID to the paradigm of event based control can contribute to its use in this new application scenarios. In EBC systems, the event generation policy is of paramount importance because it is in charge of generating and sending the events that regulate the execution of the controller algorithm, which, as shown in [7] , determines the performance and behavior of sampled control systems. The most used event generation techniques, mainly because of their simplicity of implementation, are the ones based on the signal quantification, like the send-on-delta (SOD) sampling technique, which is based on sending new events when the sampled signal changes in more than a threshold δ. The effectiveness of this strategy has been tested in terms of control performance and communication reduction, [8,9] . To the knowledge of the authors, the use of SOD in PID control loops was introduced by rzn [10] to reduce the use of CPU in embedded control systems without significantly degrading the system performance. To do that, the sensor is sampled periodically but the control algorithm is executed only if the error signal crosses preset thresholds. Some further works were focused on solving the problems raised by rzn, mainly related with the calculation of the integral of error when the time between samples increases. It should be noted in particular the works of Durand [11,12] and Vasyutynskyy [13,14] . Recent works have extended the rzn proposal to fractional order systems. Concretely, the implementation issues of the discrete event-based fractional order controllers have been addressed for two different control algorithms: FO-IMC [15] and FO-PID [16–18] . Because the aim of these papers is to reduce the computation effort of the control algorithms, their main contribution is the development of control routines computationally more efficient. However, no tuning procedures have been developed for these algorithms taking into account the effect of the SOD sampler, and the use of tuning methods for continuous controllers is suggested instead. With similar principles than in SOD sampling, in [19] a sampling strategy known as symmetric-send-on-delta (SSOD) was presented, being the main characteristic traits the inclusion of a hysteresis with the same magnitude than the quantification threshold δand having fixed switching levels. Several works have been published with regard to SSOD sampling in loops with a PI controller, concerning tuning procedures, identification and application cases. In [20] , a tuning procedure for PI controllers in SSOD sampling was presented taking into account first order plus time delay (FOPTD) models, and some rules were designed by minimizing the 1% settling time of the closed loop response. SSOD sampler has also been 2 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] used for identification, for instance, in [21] a system identification procedure was proposed. In [22] , event-based controllers with a SSOD sampling strategy were applied to the inside air temperature control of the greenhouse production process. In [23,24] , some tuning methods for PI controllers with SSOD sampler have been developed. Additionally, in [25] a unified design of a SSOD based PID and Smith predictor for self-regulating and integral processes was investigated. The approach followed in these publications was based on some robustness margins to avoid limit cycles that were obtained by applying the describing function (DF) technique, whose used allowed to introduce the classical concepts of phase and gain margins in the design of this kind of EBC. The DF is a well-known analysis tool for Wiener-Hammerstein nonlinear systems introduced in the 30s, and posteriorly presented in [26] . Several variants based on this technique were presented, e.g. the dual input DF [27] , the sampled or discrete DF [28] and the fractional order DF [29] . A lot of literature can be found about this method, for example in [30,31] . Another sampling strategy based on the signal quantization is the Regular Quantification (RQ) sampling strategy, which is an alternative to SSOD event generation, and consist in sending new data whenever the value of the sampled signal is a multiple of the quantization threshold δ. A comparative study between SSOD and RQ strategies was presented in [32] . Due to the lack of hysteresis in the RQ sampler, the measurement noise can produce bursts of events, and thus, bursts of data to transmit, which is the main disadvantage of RQ with respect to SSOD. Nevertheless, the inclusion of the hysteresis, as in the case of SSOD, forces the controller to fulfill higher robustness requirements to avoid limit cycle oscillations. Taking these effects of the hysteresis into account, in [33] a new sampling strategy called Regular Quantization with Hysteresis (RQH) was presented. This sampling strategy consists of a quantification with fixed thresholds and with variable hysteresis, which can be chosen freely, and depending on these parameters choice the intermediate cases between the RQ and SSOD appear. In that work the event generation for the same process reactivity was characterized and the robustness against limit cycle oscillations studied, introducing new gain and phase robustness margins to the presence of this kind of oscillations. Using these new margins, it has been proved that in general the tuning methods for continuous PI do not provide good enough results when applied to PI controllers with RQH sampling since either the limit cycles are not avoided or, conversely, extremely robust controllers are obtained which is an indicator that faster behavior can be achieved. This fact evidenced the necessity for developing new tuning algorithms for this kind of control systems taking into account the effects of the RQH sampler in order to improve the trade-off between robustness and speed of response. In this paper, a tuning procedure for PI controllers within a loop in which the error signal is sampled according to the RQH principles is proposed. The procedure takes into account classical robustness measures such as gain and phase margin, as well as it includes specific robustness measures, also in terms of gain and phase, to the oscillations induced by the sampler in the loop, which were presented in [33] . The tuning procedure and the obtained margins are tested in simulation for several processes which prove the tuning procedure applicability. Additionally, the validation of any controller placed within a structure with an RQH sampling is studied by taking into account additional harmonics which have an effect on the robustness measures. The paper is organized as follows. Section 2 presents the main characteristics and advantages of the RQH sampling strategy and highlights the necessity of a specific tuning method. Section 3 proposes a tuning procedure for the controller placed in a loop with a RQH 3 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Fig. 1. Control loop scheme for event-based PID controllers proposed in [19] . Fig. 2. Relationship between input xand output ¯x for the RQH sampling strategy. sampler. This tuning procedure takes into account both classical and specific to the nonlinearity robustness margins. Section 4 studies the validation of controllers placed in this kind of loops by considering the effect of high order harmonics. Finally, the conclusions about this work are drawn. 2. Problem statement The typical networked control system in which event generators such as the RQH are placed is presented in Fig. 1 . In this figure, the controller and process are denoted by the blocks C(s) and G p (s) respectively, the applied sampler, or event generator, is represented by the EG block, the ZOH block is a zero-order hold and the network’s delay is modeled by exp (−t d s) . The reference signal to track is denoted by y r , the controlled output by yand the disturbance signal by p. The controller is assumed to be placed close to the actuator. The measured signal e ∗of the error e is sent by the event generator through the communication network and the ZOH block keeps in ¯e the last value sent until new data arrive. This control scheme was first proposed in [19] considering that the EG block was a SSOD and the controller a PI. Instead of the SSOD, in this work the RQH sampling will be used in the EG block. The RQH sampler is defined essentially by two parameters, the quantization level δ> 0 and the hysteresis hthat can be freely selected as long as 0 ≤h ≤δ, being the ratio h/δ the characteristic parameter that define most of the sampler properties. The relation between an input xand its output ¯x of the RQH sampler is presented in Fig. 2 . In this figure the RQ or SSOD samplers input/output relationship can be obtained by fixing h = 0or h = δ respectively, being the RQH a more general strategy that embraces both, which consequently, presents characteristics that are a trade-off between RQ and SSOD. Namely, immunity to generate events caused by noise in the signal, low event generation for the same reactivity to 4 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Fig. 3. Block scheme equivalent to the one presented in Fig. 1 . changes and lesser robustness requirements for the controller to avoid limit cycle oscillations than the SSOD sampler. To select the proper parameters for the RQH sampler a simple procedure was presented in [33] . Firstly, the hysteresis his selected slightly greater than the peak-to-peak amplitude of the measure noise to prevent it from generating events. Secondly, the parameter δis selected to assure a certain reactivity to significant changes on the system, which are defined by the steady-state error e ss . The RQH sampling, as well as SSOD and RQ strategies, introduces a steady-state error on the controlled output y, this is due to the existence of a dead band around e = 0in which the sampler will send ¯e = 0 because the thresholds are not surpassed. The steady-state error in RQH samplers is defined by e ss = (δ + h) / 2. If hhas been previously chosen to avoid event generation due to the measurement noise, then δcan be obtained directly from this expression to fulfill the e ss requirement. Additionally, the ratio h/δ of the RQH sampler has a big influence on the number of generated events, which increase proportionally with this ratio, thus, making the e ss of the system to be the maximum admissible e ss , by means of maximizing δ, decreases to the lowest possible the number of events generated for a given change in the signal to track. Once the ratio h/δ is defined, the RQH can be characterized in terms of robustness using the Describing Function (DF) technique. To apply the DF technique, the block scheme presented in Fig. 1 can be rewritten as that in Fig. 3 , in which the network delay, the control and process transfer functions are grouped in G ol (s) = G p (s) C(s) e −t d s , which is the open-loop transfer function of the system, and the rest in the block EG-ZOH. This last block presents the same behavior as the original blocks: it samples the signal and holds its value until new samples are taken. Therefore, the EG-ZOH results in a non-linearity which can be studied with the DF method. The condition for the existence of limit cycle in the system presented in Fig. 3 is given by: G ol (jω) = −1 N , ∀ ω, (1) where N is the describing function of the non-linearity. Graphically, if it exists an intersection between the open-loop transfer function and the inverse negative of the DF, the system will present limit cycle oscillations. The DF for the RQH sampling strategy was presented in [33] and is given by the following equation: N (A, h) = 2δ Aπ⎡ ⎣ m  k=1  1 −δ A k + h 2δ−1 2 2 + 2m  k= m+1  1 −δ A 2m −k −h 2δ+ 1 2 2 ⎤ ⎦ −j 2hmδ A 2 π, (2) 5 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Fig. 4. Shapes of −1 / N for RQH samplers with different values of h/δ in Nyquist and Nichols diagrams with the gain and phase margins to the non-linearity γh/δ and h/δ . where A is the amplitude of the sinusoidal oscillation and m = A δ−h 2δ+ 1 2 is the maximum number of levels crossed by the oscillation. The traces of −1 / N are composed of several branches, one for each value of m. As the ratio h/δ decreases, all the branches tend to fold and move towards the Real-axis, being a horizontal line when h/δ = 0. In Fig. 4 the locus of −1 / N for different values of h/δ is represented. The case where h/δ = 1 represents the negative inverse of N for SSOD and several studies about its robustness have already been presented [32,34] . An important remark is that for PI controllers tuned with reasonable robustness margins the shape of G ol is such that the non intersection with the branch corresponding to m = 1 guarantees to avoid intersections with branches for m > 1 , and therefore, no intersection between G ol and −1 / N takes place, avoiding limit cycle oscillations. Using the expression of the DF presented in Eq. (2) , in [33] , a study of the robustness against limit cycles of certain classical tuning methods was presented for a batch of processes. To that end, a gain γh/δ and phase h/δ margins to the non-linearity were defined, revealing that some methods cannot be applied for certain ratios h/δ without presenting limit cycle oscillations, and other methods present an extremely robust behavior which can be an indicator that faster controllers can be tunned. These margins are presented in Fig. 4 in Nyquist and Nichols diagrams in violet. In addition, unlike the classical phase and gain margins, an important consideration to be taken into account is that the robustness margins to the non-linearity γh/δ and h/δ usually provide poor information about the closed loop performance. This is due to the fact that they are not measured with regard to a fixed point, instead, these measures depend on the non-linearity and on the open-loop transfer function shapes. In a similar way, assuring some 6 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] classical gain and phase margins, or using classical tuning rules, does not guarantee to avoid limit cycle oscillations induced by the sampling because it has not been taken into account in the original design. Thus, in this paper a tuning procedure which takes into account both classical margins and these new robustness margins to the non-linearity in the design procedure is developed. 3. Tuning procedure for RQH based PI From the study presented in [33] and as it has been commented before, tuning methods for continuous PI are not entirely valid for designing controllers with RQH sampling strategy since h/δ and γh/δ must be checked afterwards to ensure the avoidance of limit cycles. In this section, a tuning procedure for PI controllers will be introduced taking into account classical robustness measures and these new specific measures. The only restriction for the calculation of the new margins is the usage of the DF technique, which assumes the process to be filtering enough to neglect the high order harmonics effect. This means that the method can be used for a wide range of processes, having either sub-damped or over-damped response including time delays or non minimum phase. Before applying the tuning procedure, the parameters hand δthat define the RQH describing function, and significantly affect the robustness measures, must be selected taking into account the admissible steady state error ( e ss ) and the peak-to-peak amplitude of the measurement noise, as commented in Section 2 . It is important to keep in mind that higher values of h/δ affect negatively the amount of events generated, which will be greater than the number of events generated with intermediate values of h/δ. Besides, the increase of this ratio affects in an inversely proportional way the controller’s speed to attain the same margins h/δ and γh/δ. Once the parameters δand hhave been selected, the shape of −1 / N is defined, and the PI controller tuning procedure can be addressed. The goal of the tuning procedure proposed in this section is to obtain the controller that minimize the I AE (Integral of Absolute value of the Error) index of the disturbance response while fulfilling the requirements on gain and phase margins. This tuning problem can be expressed as follows: minimize K p ,T i I E subject to γcg ≥γcg r , cp ≥cp r , γh/δ ≥γh/δr , h/δ ≥h/δr (3) where γcg and cp are the classical gain and phase margin, and the sub-index rrefers to the required value of each parameter. It is well-known that for non-oscillatory responses the minimization of I AE and I E (Integral of the error) are equivalents. However, using the later is preferable because the I E is directly related with the controllers parameters trough the integral gain ( K i = K p /T i ) which facilitates the solution of the optimization problem. As commented before, the RQH sampling causes the apparition of a steady state error, and thus, that the integral of the error signal will tend to infinite. However, in Appendix A it has been proven that, with reasonable parameters, the integral of the sampled error signal is similar to the integral of the error signal in a continuous system, i.e. to the IE index. 7 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Before describing the tuning procedure, it is important to note that the following conditions must be met in order to fulfill the margins restrictions in Eq. (3) : Classical gain margin  G (jω cg ) C(jω cg ) ≤1 /γcg r (4a) arg (G (jω cg )) + arg (C(jω cg )) = −π(4b) Classical phase margin  G ol (jω cp ) = 1 (5a) arg (G ol (jω cp )) ≤−π−cp r (5b) h/δ gain margin ⎧ ⎨ ⎩ G (jω γ) C(jω γ) ≤1 γh/δr −1 N (A γ) (6a) arg (G ol (jω γ)) = arg −1 N (A γ) (6b) h/δ phase margin ⎧ ⎨ ⎩ | G ol (jω ) | = −1 N (A ) (7a) arg (G ol (jω )) ≤arg −1 N (A ) −h/δr (7b) Where G (s) = G p (s) e −t d s is considered to take into account the process transfer function G p (s) and the communication delay modeled by e −t d s . The precedent equations define a whole set of controllers whose margins will be at least the required values or greater. Our goal is to find the controller with maximum K i = K p /T i (minimum I E ) in this set. The tuning procedure consists of 3 steps: 1. Find the set of all the PI controllers that can be obtained for a given process. 2. Tune each controller obtained from step 1 according to the gain margin and detune those that do not fulfill the requirements on cp , γh/δ or/and h/δ. 3. Finally, choose among all the resulting controllers the one with minimum I E = K p /T i . Next, these steps are described in detail. Step 1 The tuning procedure starts by obtaining the range of possible values for ω cg . Since for a PI controller arg (C(jω)) ∈ −π 2 , 0 , the application of the Eq. (4b) implies that arg (G (jω cg )) ∈ −π, −π 2 . Thus, the range of ω cg can be directly obtained from the phase response of G (jω) as the values of ωwithin the boundaries defined by arg (G (jω)) = −πand arg (G (jω)) = −π 2 . For this range of ω cg a regular griding is defined. Each item in the grid corresponds to a PI controller whose parameter will be calculated according to step 2. Step 2 This step is applied to each item in the grid of ω cg obtained in step 1. The value of T i can be calculated using the equation of the PI phase arg (C(jω)) = arctan (T i ω) −π 2 , (8) that combined with Eq. (4b) result in, T i = 1 ω cg tan −arg (G (jω cg )) −π 2 . (9) 8 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Once T i has been obtained, the corresponding K p can be calculated. K p is firstly obtained to fulfill the restriction on γcg . For a PI controller, the modulus can be expressed as: | C(jω) | = K p  1 + (ωT i ) 2 ωT i . (10) Thus, from Eq. (4a) we obtain that: K p ≤ω cg T i γcg r G (jω cg )  1 + (ω cg T i ) 2 . (11) As the objective is to optimize the IE index, the maximum gain K p within all the possible values defined by Eq. (11) will be considered. That is: K p = ω cg T i γcg r G (jω cg )  1 + (ω cg T i ) 2 . (12) At this point, the controller fulfills the classical gain margin restriction. To meet the rest of margin conditions, Eqs. (5a) to (7b) are checked and the controller is conveniently detuned if needed. This is based on the fact that reducing K p implies a radial shrinking of G ol (jω) in the Nyquist diagram, or a downward displacement in the Nichols diagram. Consequently, the controller’s detuning improves all the robustness margins. In order to satisfy the classical phase margin requirement, Eq. (5) must be fulfilled. Considering in the construction of G ol the values of K p and T i previously calculated, we obtain the current margin cp . If cp ≥cp r , no modifications on K p have to be done. However, if this requirement is not fulfilled, we obtain the frequency which will become the new ω cp from Eq. (5b), forcing the equality arg (G ol (jω cp )) = −π−cp r (13) A detuning factor kis then introduced to fulfill the Eq. (5a), whose value can be calculated as: k = 1 G ol (jω cp )  (14) Once kis obtained, the controller gain is recalculated as kK p . It is important to highlight that kshrinks the shape of G ol (jω) in the Nyquist diagram and consequently all the robustness margins are risen. Therefore, the conditions in (4) hold true and the design meets both gain and phase margins. To fulfill the restrictions on γh/δ and h/δ the procedure is similar to the one used with the classic margins. Firstly, the margin γh/δ is calculated and compared with γh/δr . If γh/δ < γh/δr , then kmust be recalculated. From the definition of γh/δ it is worth noticing that for kG ol (jω) the factor kcan be introduced as follows: (ω γ, A γ) = arg min (ω,A ) ⎛ ⎝ −1 N (A )  k| G ol (jω) | : arg (G ol (jω)) = arg −1 N (A ) ⎞ ⎠ . (15) Since in the previous equation kdoes not affect the condition arg (G ol (jω)) = arg −1 N (A ) and −1 N(A )  | G ol (jω) | is just scaled by 1 /k,then the frequency ω γand A γwill 9 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Fig. 11. Temporal response of the measured output of the process with the controllers obtained in Example 3 (blue: RQH and red: SSOD), the events generated and their respective control actions to unitary step changes in the reference (at t = 0s) and disturbance (at t = 35 s) inputs. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) that the temporal responses of both controllers and samplers do not differ significantly. RQH sampling presents bigger changes in the control action produced by the quantification δused, which leads to a slightly more oscillatory response with a higher overshoot. In Table 1 the performance measures described above is presented, revealing that the usage of RQH sampling entails a reduction on the number of events needed to control the system, and according to the obtained performance indexes, this reduction of events does not degrade the performance of the system. However, in the set of restrictions S 2 , it can be seen a significant improvement of RQH sampling with regard to SSOD. As expected, the number of events generated is lower for RQH, but in addition, the rest of performance indexes are improved. This is due to the slowness of the SSOD controller, resulting from the required robustness against limit cycle oscillations, which produces a slow response that worsens the performance. In summary, this example shows how by choosing RQH sampling a robust controller against limit cycle oscillations induced by the sampler can be tunned without degrading significantly the overall performance of the system. An opposed situation is found with SSOD sampling, in which to attain similar levels of robustness than in RQH the controller is forced to present a slower response that degrades the system performance. Additionally, the number of events needed for control is lower for RQH than for SSOD regardless of the robustness to attain. To highlight the importance of the proposed tuning method over other existing tuning rules let us introduce the following example: Example 4. Consider the process with transfer function: G (s) = 1 −s ( s + 1) 3 . The peak-to-peak amplitude of the measurement noise has been measured to be of 0.04 units and it is required that the response do not present a steady-state error greater than 0.075. With this requirements a RQH sampler is chosen with h = 0. 05 to avoid burst of events due to the noise and δ= 0. 1 to not surpass the maximum e ss admissible. 16 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Table 2 Obtained controller and performance parameters for each tuning method. K p T i IA ¯ E ref t s , ref IA ¯ E d t s , d n ev Proposed 0.6646 2.1206 4.8637 14.878 4.1017 13.798 41 AMIGO 0.2473 1.8807 7.4872 18.088 7.7062 22.048 31 One-Third 0.3202 2.8453 8.6168 24.088 8.6736 27.388 31 Ziegler-Nichols 0.9257 6.0792 6.3643 30.268 6.3643 34.768 43 Fig. 12. Inverse negative of the sampler’s DF in this example and the G ol (jω) of the four studied controllers and process. A comparative test will be conducted between the performance offered by the proposed tuning method and other well-known methods, namely, AMIGO [35] , One-Third [36] and Ziegler-Nichols [37] tuning rules. For our tuning method a controller will be tunned to meet the following constrains: γcg ≥6 dB cp ≥45 ◦ γh/δ ≥2 dB h/δ ≥15 ◦ For the other tuning rules the temporal response of the process has been approximated by a FOPTD model and their parameters have been obtained. The obtained parameters can be seen in Table 2 . Needles to say, the controllers tuned with tuning rules other than the proposed in this papers are not supposed to avoid the intersection with the inverse negative of the DF, and therefore, avoid limit cycle oscillations. In this case, all controllers avoid intersection with the DF traces, in deed, the classical tuning rules present higher robustness measures than the proposed method, which can be appreciate in Fig. 12 where the open-loop transfer function of the four controllers and process in the Nyquist diagram is presented as well as the inverse negative of the DF of the sampler under study. The temporal response of the controlled output can be found in Fig. 13 as well as the generated events and the control action. In order of appearance: the proposed controller (orange), AMIGO (green), One-Third (red) and Ziegler-Nichols (blue) tuning rules. As it can be 17 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Fig. 13. Temporal response of the measured output of the process with different controllers, the events generated and their respective control action to unitary step changes in the reference (at t = 0s) and disturbance (at t = 60s) inputs. (Orange: proposed controller. Green: AMIGO. Red:One-Third. Blue: Ziegler-Nichols). seen, all the controllers present enough robustness to avoid limit cycle oscillations. AMIGO and One-Third tuning rules present controllers with a slow temporal response compared to the other rules, however, this is a normal behavior since they also present the highest robustness. The other controllers present a faster response, nevertheless, Ziegler-Nichols struggles to stabilize more than the proposed method. The measures presented in Example 3 have been used to evaluate the performance of the controllers under study, and have been summarized in Table 2 . As it can be seen, the proposed tuning rule presents the fastest results, being its integral errors and settling times, both under reference and disturbance changes, the ones with lower values. However, it presents a greater generation event rate, as Ziegler-Nichols, when compared with AMIGO and One-Third tuning rules. This is due to the overdamped temporal response of these last two methods, which matches with its increased robustness and slowness in the response. 4. Design validation The gain and phase margins to the non-linearity used in the tuning procedure were obtained using the DF technique, which assumes that the filtering capabilities of the linear part of the system are good enough to neglect the high order harmonics effect at the input of the nonlinearity. If this assumption is not fulfilled, the DF viability for predicting limit cycle can 18 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Fig. 14. Sinusoidal signal and its sampled output with a sampler with a given ratio h/δ. conduct to misleading results. In this section, we analyze the effect of high order harmonics on the proposed margins by studying the variation of the critical points to which each margin is measured. Therefore, the results presented in this section can be used to validate the design procedure presented before or any other tuning method that uses γh/δ and h/δ to check the robustness against limit cycles induced by the RQH sampler. Consider the input to the non-linearity to be a sine wave with period T o and amplitude A, which is considered high enough to produce single-leveled symmetric oscillations ( m = 1 ) on the sampled signal ¯e (t) as it is shown in Fig. 14 . The switches on the sampled signal ¯e (t) are produced at the time fractions ρ1 and ρ2 . In those switching points the value of the error signal e (t) is: e ρp T o 2 =  δ1 2 + h 2δfor p = 1 δ1 2 −h 2δfor p = 2 (24) As a sinusoidal signal has been supposed at the input of the non-linearity, the value of the time fractions ρ1 and ρ2 can be obtained: ρ1 = 1 πarcsin δ A 1 2 + h 2δ ρ2 = 1 −1 πarcsin δ A 1 2 −h 2δ (25) Expressing the sampled signal ¯e (t) as a Fourier series, and operating with the obtained expression of this signal through the loop, considering y r (t) = 0, and thus, e (t) = −y(t) , it can be obtained the resulting expression of e (t) , in which, evaluating at t = ρ1 T o 2 and t = ρ2 T o 2 : e ρ1 T o 2 = −4δ π ∞  n odd 1 n { G ol (jnω o ) } 1 2 sin (nπ(ρ2 −ρ1 ))+{ G ol (jnω o ) } sin 2 nπ 2 (ρ2 −ρ1 )  e ρ2 T o 2 = −4δ π ∞  n odd 1 n { G ol (jnω o ) } 1 2 sin (nπ(ρ2 −ρ1 ))−{ G ol (jnω o ) } sin 2 nπ 2 (ρ2 −ρ1 )  19 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] substituting these values of e (t) in the switching points presented in Eq. (24) , this equation can be expressed otherwise as: { G ol (jω o ) } = − π 4 +  ∞ n=3 , 5 , ... 1 n { G ol (jnω o ) } sin (nπ(ρ2 −ρ1 )) sin (π(ρ2 −ρ1 )) { G ol (jω o ) } = − πh 8 δ+  ∞ n=3 , 5 , ... 1 n { G ol (jnω o ) } sin 2 nπ 2 (ρ2 −ρ1 )  sin 2 π 2 (ρ2 −ρ1 )  Replacing the expressions of ρ1 and ρ2 which were obtained in Eq. (25) , the previous expressions can be rewritten as: { G ol (jω o ) } = − π 4 +  ∞ n=3 , 5 , ... 1 n { G ol (jnω o ) } sin (nθ) sin (θ) { G ol (jω o ) } = − πh 4δ+  ∞ n=3 , 5 , ... 1 n { G ol (jnω o ) } (1 + cos (nθ)) 1 + cos (θ ) (26) where: θ= arcsin ⎛ ⎝ δ 2A ⎡ ⎣ 1 −h δ 1 −δ 2A 1 + h δ2 + 1 + h δ 1 −δ 2A 1 −h δ2 ⎤ ⎦ ⎞ ⎠ which depends on the non-linearity characteristics. Eq. (26) describe the real and imaginary parts of G ol (jω o ) when the system presents oscillation of frequency ω o . As it can be seen, these expressions depend on the high order harmonics of the oscillation frequency: nω o , n = 3 , 5 , . . . , which are neglected in the DF approach. Therefore, these equations can be used to validate the controllers obtained by the tuning method proposed in Section 3 . To do that, more accurate estimations of the points with respect to which the margins γh/δ and h/δ are measured can be obtained by using equations in (26) with a reasonable number of harmonics and the values of G ol (jnω o ) , n = 3 , 5 , . . . approximated as: G ol (jnω o ) = G ol (jnω γ) γh/δ ;n = 3 , 5 , . . . (27) for evaluating the gain margin accuracy, and: G ol (jnω o ) = G ol (jω ) ·1 −h/δ;n = 3 , 5 , . . . (28) for evaluating the phase margin. In fact, Eqs. (27) and (28) provide the values G ol in the higher order harmonics of frequencies where the oscillations will take place if the gain or phase lag of G ol increase on γh/δ or h/δ, respectively. Hence, to validate the gain and phase margin to the non-linearity obtained, and therefore, the controller that has been tuned, the point obtained using Eqs. (26) and (27) , which will be denoted by G ol,γ (jω o ) , has to be compared to the point −1 / N (A γ) . Similarly, the point obtained with Eqs. (26) and (28) , which we will be referred to as G ol, (jω o ) , has to be compared to the point −1 / N (A ) . To show the variation of these critical points with respect to those where the gain and phase margin to the non-linearity are measured and how this variation is used to validate the proposed controllers, let us introduce the following example. 20 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Fig. 15. Harmonic analysis of the validity of the proposed margins for G ol (s) and the sampler with ratio h/δ = 2/ 3 . Example 5. Consider a system whose transfer function is defined by: G (s) = 1 (s + 1) 4 . A PI controller has been tuned applying AMIGO method [35] by approximating this system by a FOPTD model, obtaining K p = 0. 301 and T i = 2. 4268 . Consider in this case that the system is placed in a loop which contains a sampler with ratio h/δ = 2/ 3 . The robustness margins to the non-linearity have been measured and result in γh/δ = 11 . 51 dB and h/δ = 39 . 61 ◦. The gain margin has been obtained at a frequency ω γ= 0. 4703 rad/s and with a ratio δ/A = 0. 834, while the phase margin has been obtained at a frequency ω = 0. 1218 rad/s and with a ratio δ/A = 0. 833 . The points where these measures have been obtained can be seen graphically in Fig. 15 , where it has been represented the negative inverse of the DF and G ol (jω) in solid black line and the measured robustness margins with a circle marker, in blue for the gain margin and in red for the phase margin, in the Nyquist and Nichols diagrams. Then, to test the validity of the margins, Eq. (26) have been used considering the following 3 harmonics: n = 3, 5 and 7. In those equations, the open-loop transfer function to test is the one presented in Eq. (27) to test the gain margin and (28) to test the phase margin. As a result, the new location of the critical points is obtained. These new points have been represented with a cross of its respective color in Fig. 15 , and the respective new robustness margins have been measured to these points. In this case, the variation between −1 / N (A γ) and G ol,γ (jω o ) and between −1 / N (A ) and G ol, (jω o ) is not very important. Thus, as the variation between the robustness margins is very slight, being both obtained margins more restrictive than the corrected margins considering the high order harmonic contribution, the obtained controller can operate safely in this loop. Nevertheless, the corrected margins are not always beneficial in terms of robustness. For example, consider now that the sampler used above is replaced by another sampler with ratio h/δ = 1 / 6 . As in the precedent case, the robustness measures to the non-linearity have been obtained at the critical frequencies and δ/A ratios. Using Eqs. (26) –(28) as it has been 21 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] Fig. 16. Harmonic analysis of the validity of the proposed margins for a given system and sampler. explained before, the new location of the critical points has been obtained. In Fig. 16 it has been represented the negative inverse of the DF traces, the transfer function and the critical points obtained with the DF and with the harmonic analysis calculus. Here it can be seen that the variation of the critical points implies a reduction in the effective margins, being this reduction more visible in the case of the phase margin. In this case, the variation in the margins is not significant enough to induce limit cycle oscillations in the temporal response, in fact, considering the new recalculated margins, the controller still provides a considerable degree of robustness to the system. However, this proves that the influence of high order harmonics is not always beneficial in terms of robustness and that the validation of the controller design should be carried out, specially when systems with low filtering capabilities are involved, because the DF approach cannot be applicable with a high reliability. In general lines, the proposed margins give an accurate order of magnitude of the proximity to the oscillations due to the effect of the non-linearity. As it has been seen in the precedent example, the effect of the high order harmonics takes an important role in the accuracy of the robustness margins to the non-linearity, being the variation of the critical points beneficial or detrimental depending on the case. In particular, in those cases where h/δ is obtained for relative low values of ω , the variation of the critical point of the phase margin produced by the harmonic analysis is more remarkable, resulting in decreasing the effective phase margin to the non-linearity. In those cases, despite the variation on the phase margin, the corrected phase margin measure still provides enough robustness. 5. Conclusions In this paper a tuning procedure for PI controllers within a loop with a RQH sampling strategy has been provided. Prior to the controller tuning the parameters that define the RQH 22 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] sampler must be chosen. Guidelines to select the proper parameters for a system from specifications have been provided. The tuning procedure consists of 3 steps in which both, the classical robustness margins and the robustness margins to the limit cycles produced by the sampler proposed in this paper, have been taken into account. By considering both, not only the limit cycle oscillations induced by the sampler are avoided, but also a proper closed-loop temporal response is assured. Several simulation examples where the proposed tuning method is applied are shown. Those examples illustrate the usefulness of the method and how a loss in robustness can be suffered when the method is not properly used. Finally, the validation of the controller design has been tested by considering the effect on the robustness measures of higher order harmonics. In the cases where the DF technique can be used, it has been confirmed that the proposed margins to predict the appearance of oscillations are accurate and this validation can be skipped. Nevertheless, in those cases where systems with low filtering capabilities are involved the validation of the controller designed is recommendable due to the high order harmonic influence on the robustness. 6. Future works In this section two work lines for future researches related with the tuning of controllers with RQH sampling strategy are presented, which, in the opinion of the authors, could significantly improve the applicability and performance of this kind of control system: 1. The tuning procedure proposed in this paper is based on shaping the open-loop transfer function to obtain both the desired robustness margins and good closed-loop performance for a kind of event-based control loop with a continuous PI controller and RQH sampler. As it has been shown, this goal can be successfully achieved with a conventional PI controller by selecting the proper parameters K p and T i . Other controller structures, such as PID, could provide more flexibility on configuring G ol , and consequently, a better trade-off between robustness and response speed can be attained using that control structure. In this sense, the use of fractional order PID controllers seems specially interesting since they are a generalization of the conventional PID with more degrees of freedom in their frequency response due to the fractional-order differential and integral operators [38] . Fractional order PID is a consolidated field of research with a growing acceptance by the practitioner [39–42] . Because the suitability of the describing function technique in the context of fractional order systems has been previously shown in [29,43,44] , the extension of the results presented in this paper for fractional order control systems could lead to promising results in the field of EBC. 2. It is known that the validity of the describing function technique depends on the filtering properties of the linear part of the control loop. Consequently, the application of this technique for low order systems, such as first order plus time delay (FOPTD), is questionable. Because FOPTD models are commonly used to approximate the behavior of many actual industrial processes, it is worth considering more proper approaches for tuning RQH based controllers for this kind of systems. In [34] a procedure for tuning PI and PID controllers with SSOD sampling for processes with a FOPTD model was proposed by the authors. The approach is based on a new robustness measure to avoid limit cycle oscillations induced by the SSOD sampler, called the Tsypkin margin, which overcomes the limitations of DF approaches. The extension to RQH sampling of the results presented by the authors in 23 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] [45] could be of interest for tuning RQH based controllers for processes whose dynamic is modeled by low order transfer functions. Declaration of Competing Interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Acknowledgments This work has been supported by MICINN project number TEC2015-69155-R from the Spanish government, research project 18I411-Uji-b2018-39 from Universitat Jaume I and by CEICE grant number ACIF/2018/244. Appendix A. Validity of IE index In the nature of the E G −C(s) control loops is to have a static position error bounded by the switching thresholds of the chosen sampling strategy. Thus, the choice of IE index for selecting a controller can be questioned because it will tend to infinite. For this reason, a modification of this index has been considered using the sampled error signal ¯e (t) instead of the error signal e (t) , because it tends to 0 in steady state, producing the sampled integral error index I ¯ E , defined as: I ¯ E =  ∞ 0 ¯e (t ) dt . The control action for this kind of non-linear systems is: u(t) = K p ¯e (t) + K i  t 0 ¯e (τ ) dτ−K d dy dt , which for a PI controller: u(t) = K p ¯e (t) + K i  t 0 ¯e (τ ) dτ. Considering a step change at the disturbance input, in steady-state (assuming stability): u(∞ ) = K p ¯e (∞ ) + K i  ∞ 0 ¯e (t ) dt , as ¯e (∞ ) = 0 and taking into account the expression of I ¯ E : u(∞ ) = K i  ∞ 0 ¯e (t) dt = K i I ¯ E From the schema block in Fig. 1 : (u(∞ ) + p(∞ )) G (0) = y(∞ ) = −e (∞ ) , where e (∞ ) is bounded by the steady state error e ss , and, as a unitary step load disturbance is assumed p(∞ ) = 1 : (u(∞ ) + 1) G (0) ≤e ss , 24 O. Miguel-Escrig and J.-A. Romero-Pérez Journal of the Franklin Institute xxx (xxxx) xxx ARTICLE IN PRESS JID: FI [m1+; May 4, 2021;22:52 ] substituting with the expression of u(∞ ) : K i I ¯ E + 1 G (0) ≤e ss , taking into account that the I E caused by a load disturbance is −1 /K i : I ¯ E ≤e ss K i G (0) + I E , from which the difference between both indexes can be found: I ¯ E −I E ≤e ss K i G (0) . In this last expression it appears the relation between I ¯ E and I E indexes. Here it can be seen that the effect of maximizing K i minimizes the IE index, and makes the difference I ¯ E −I E minimum. In addition, as the system is assumed stable, the static error is bounded between: e ss ∈ −δ+ h 2 , δ+ h 2  thus, choosing proper values of δand h, and maximizing K i , the contribution of e ss , i.e. the effect of the sampling, can be small enough to consider I E ≈I ¯ E , and thus, we can consider the I E an appropriate selection index for PI tuning. Appendix B. Flowchart of the tuning procedure The proposed tuning procedure can be deployed by following the steps in this flowchart: 25