Design of Fractional Order Odd-Harmonics Repetitive Controller for Discrete-Time Linear Systems with Experimental Validations

This paper presents a simple and straightforward design of a discrete-time fractional-order odd-harmonics repetitive controller (RC). Unlike general RC designs, the proposed method utilizes an internal model with a half-period delay and a stabilizing controller with a fractional phase lead compensator. First, the odd-harmonics internal model representing odd-harmonics frequencies is constructed by using the information of the reference’s basis period and the preferred tracking bandwidth. Secondly, an optimization problem synthesized from the stability condition of the RC closed-loop system is solved to obtain the fractional phase lead compensator. Finally, the fractional term of the stabilizing controller is realized by using a causal and stable infinite impulse response (IIR) filter, where the filter coefficients are computed by applying the Thiran formula. Simulation and experimental validation on a servomotor system are conducted to verify the effectiveness of the proposed design.


Introduction
Repetitive controller (RC) as a well-known control strategy was first developed by Inoue et al. [1] for high accuracy control of a power supply. RC is a learning-type controller like iterative learning controller used for tracking control or rejection of periodic signals, which has been developed for many control applications such as precision irrigation [2,3], mechatronics [4,5], renewable energy [6,7], power electronics [8,9] and biomedical [10,11]. The superior performance of RC is due to the use of an internal model as proposed by Francis and Wohnam [12]. The internal model represents the periodic reference/disturbance model and behaves as a periodic signal generator for tracking reference/compensating disturbance signal with a zero-tracking error.
A general discrete-time internal model is constructed by a one-cycle delay z −N with positive feedback forming the transfer function of z −N /1 − z −N . Note that N is generally an integer number representing the number of time steps per reference/disturbance period. Then, a low-pass filter is usually cascaded to z −N for improving the robustness of the RC system, but at the expense of tracking accuracies at higher frequencies. This type of internal model offers a zero steady-state error for tracking/rejecting periodic signals at fundamental frequency, even-and-odd harmonics components. In many real situations, reference/disturbance signals generally involve odd-harmonics only. These situations can be found in applications such as power electronic systems [8,9,13,14], magnetic rotor systems [15,16], nano-positioning systems [17], field-modulated magnetometer systems [18] and centrifugal compressors [19]. Inspired by this fact, the use of a general internal model is unnecessary if we only target odd-harmonics periodic components. If the general internal model is applied in these situations, then infinite gains will be introduced at even harmonics components too, which can reduce the system robustness and degrade the system performance [20]. In addition, the general internal model also introduces slow transient responses due to the presence of a one-cycle delay term z −N .
To deal with these situations, an odd-harmonics internal model was proposed in [20], aiming to provide infinite gains only at odd-harmonic frequencies. This implies that the infinite gains are introduced at the targeted odd-harmonic frequencies. Unlike the general internal model, the odd-harmonics uses a half-period delay z −N/2 , which improves the transient performance of the RC system. Besides the internal model, the stabilizing controller is also required to construct the RC system. The stabilizing controller is required to guarantee the stability of the closed-loop RC system. Moreover, the stabilizing controller also determines the convergence rate of the system error. The stabilizing controller is sometimes designed as the inverse of the plant model/closed-plant model [21][22][23], which is often not available due to the plant uncertainties and disturbances [24]. In addition, the complexity of the stabilizing controller is easily increased when the plant has a higherorder model. A pole placement-based design method was presented in [25,26], where the numerator and denominator of the controller are acquired by solving the Diophantine Equation. This design method yields a stabilizing controller with an order as high as the internal model [27]. In [24,28], the stabilizing controller was designed as a phase lead compensator K p z m , where K p is the learning gain and m is a lead-step integer. The design task involves examining various phase responses for every lead step m trial in order to determine the order m that provides a larger stable bandwidth. Moreover, the use of an integer lead step m results in non-flexible phase compensation.
In this work, we develop a new and novel approach to designing the stabilizing controller for the discrete-time odd-harmonics RC system. An optimization-based design methodology is employed to obtain the stabilizing controller in the simple form of a phase lead compensator. Unlike the conventional phase lead compensator in [24,28], we use a fractional order phase lead compensator, where the compensator's parameters are chosen by solving the optimization problem. Hence, this design method is straightforward because it avoids the manual tuning process in the frequency domain to obtain the stabilizing controller as shown in [24,28]. A fractional order stabilizing controller is considered here in order to provide more flexible phase compensation. Here, the fractional part is implemented by using a causal and stable IIR filter, whose filter coefficients are computed by applying the Thiran formula. Simulation and experimental results are demonstrated to verify the superior performance of the proposed design. In order to highlight the originality of our research work, the contributions to this work are listed as follows: 1.
An internal model with half-cycle delay representing odd-harmonic periodic signals is used to provide faster transient response.

2.
An optimization-based design methodology is developed to obtain the fractional order stabilizing controller.

3.
The fractional order stabilizing controller is realizable since the fractional part of the controller is approximated by using a stable and causal IIR filter.
The remainder of this paper is structured as follows. Section 2 explains the problem statement and preliminaries underlying a repetitive control problem and a general design of repetitive controller. In Section 3, the proposed design is described, covering the structure, stability analysis, synthesis and realization of the fractional-order odd-harmonics repetitive controller. Section 4 presents the simulation results, followed by experimental validation in Section 5. A comparison study is also discussed in Section 5. Lastly, the conclusion is drawn in Section 6.

Repetitive Control Problem
In this work, we consider a discrete-time linear time invariant (LTI) system represented as follows: where U(z), Y(z) and V(z) are the Z-transforms of discrete-time signals of u(k), y(k) and v(k), respectively, and P(z) is the plant model. Here, u(k), y(k), v(k) ∈ R, respectively, denote a control input, a plant output and an input disturbance. Suppose that the LTI system (1) is required to track a periodic reference r(k) or/and reject a repetitive disturbance v(k) such that the tracking error e(k) converges to zero. The tracking error e(k) is defined as The design objective is to synthesize the control input u(k) such that the reference r(k) is tracked, the disturbance v(k) is cancelled, the tracking error e(k) quickly converges to zero steady-state, and the resulting closed-loop system is both stable and has faster transient response. Note that r(k) and v(k) are periodic signals having odd-harmonics components with a similar fundamental frequency.

General Repetitive Controller
Suppose that the system (1) is subject to the periodic reference r(k) and/or repetitive disturbance v(k) with a basis frequency of f b = f r = f v . Note that f r and f b are the fundamental frequencies of reference and disturbance, respectively. The repetitive controller depicted in Figure 1 can be used to form a stable closed-loop system offering an accurate reference tracking and/or a good disturbance rejection. The controller shown in Figure 1 is then referred to as general RC, which is equivalent to the following transfer function: where E(z) is an error signal, U R (z) is a repetitive control signal, q(z) is a low-pass filter, F(z) is a stabilizing controller and N = T b T s is an integer number of samples per reference period with T s being the sampling period and T b being the reference period. The term (3) represents the general RC's internal model, defined as The internal model (4) has N evenly spaced poles on the unit circle at the harmonics of the basis frequency f b . The filter q(z) in (4) aims to improve the system robustness against unmodeled dynamics at the high frequencies. The presence of q(z) pushes the poles at the higher frequencies toward inside of the unit circle. Since the poles of (4) are mostly located at the unit circle, the internal model (4) has a capacity to perfectly track/compensate any periodic signal with frequency of n f b < f q , where n = 1, 2, · · · , n m , f q is the q(z)'s bandwidth and n m f b < f q [27].

Controller Structure
An odd-harmonics repetitive controller (OHRC) has a controller structure as shown in Figure 2. Unlike general RC in Figure 1, the OHRC has negative input and negative feedback. In addition, the OHRC utilizes a half-cycle delay z −N/2 . The input-output relation of the OHRC is then given as where C o (z) is defined as the transfer function of OHRC, q(z) is q-filter and F(z) is a stabilizing controller. Similar to (3), the filter q(z) is inserted to improve the robustness of the OHRC system. This is due to the pure internal model such as [−z −N/2 /(1 + z −N/2 )] being also susceptible to the instabilities. Here, the filter q(z) is chosen as moving average filter as follows: where 0 < q l < 1 and ∑ h l=1 q l + q 0 = 1. The filter q(z) in (6) is a low-pass filter contributing zero-phase for all frequency components and unity gain at the frequencies below the filter bandwidth. Note that the term (5) corresponds to an internal model design proposed in [20]. This internal model represents the reference models at the oddharmonics frequencies only, i.e., . This behavior can be seen from Figure 3, indicating the magnitude responses of odd-harmonics and general internal models with a basis frequency of 1 Hz. Observing the infinite gains of OHRC, it is obvious that the trajectories at the desired odd-harmonics only will be tracked.
In the RC-controlled system, the stabilizing controller F(z) is compulsory to ensure the stability of the RC closed-loop system. In addition, the stabilizing controller also determines the convergence rate of the system error. A novel and new design of stabilizing controller F(z) is covered in Section 3.3, i.e., Fractional Order Stabilizing Controller.

Stability Analysis
In this subsection, the stability conditions of the plug-in OHRC system are analyzed. The stability conditions are then used to design our proposed stabilizing controller. The block diagram of the overall control system is shown in Figure 4 respectively, the reference, control input, disturbance and output signal. The sensitivity function of the closed-loop OHRC system shown in Figure 4 is Substituting (5) into (7), we have Simplifying the denominator part of (8), we get Let us define the stabilized plant model P s (z) given by Then, (9) can be rewritten as which can be factorized into three parts as follows: Based on (9), the plug-in OHRC system in Figure 4 is internally stable if the following conditions are satisfied [20]: Note that the notation X (z) ∞ represents the H ∞ -norm of the transfer function X (z), which can be interpreted as the maximum value of the magnitude responses of X (z) for all frequencies (i.e., ∀ z = e jω , 0 < ω < π/T). Remark 1. C1 and C2 are, respectively, needed to ensure the stability of Parts A and B in (12). In addition, C2 also implies that the closed-loop plant model P s (z) in (10) is a stable transfer function. C3 is derived by using small gain theorem assuring the stability of Part C (12).

Fractional Order Stabilizing Controller
Several assumptions are made before proceeding to the design of stabilizing controller F(z): Assumption 1. The filter q(z) is chosen as a stable low-pass filter giving the unity gain at the referred bandwidth ω q (i.e., N q (ω) = 1 for all ω that satisfy 0 < ω < ω q and N q (ω) 1 for all ω that satisfy ω q < ω < π/T, where ω q = 2π f q ). In addition, q(z) contributes zerophase for all frequency components (i.e., θ q (ω) = 0 o for all ω that satisy 0 < ω < π/T). Here, N q (ω) and θ q (ω), respectively, represent the magnitude and phase characteristics of q(z). Assumption 2. The plant model P(z) is known and the feedback controller D(z) is chosen such that the P s (z) in (10) has a stable transfer function. This implies that 1/[1 + D(z)P(z)] is also stable. Assumption 3. The reference R(z) and disturbance V(z) are periodic with a common basis frequency ω b , i.e., ω b = 2π/T b . Note that ω b is known and R(z) and V(z) contain odd-harmonics components. If the reference R(z) and disturbance V(z) have different basis frequencies, then multi period-based RCs such as in [29,30] can be utilized.
The following remarks are also provided to describe the conservation of Assumptions 1 to 3:

Remark 2.
The zero-phase low-pass filter q(z) is a moving average filter with a non-causal form. However, the presence of multiplication with a delay term (i.e, z −N or z −N/2 ) makes the filter realizable (see Figures 1 and 2).

Remark 3.
Assumption 2 reflects a model-based control system design. In this control system design, we require an open-loop plant model P(z).

Remark 4.
The exact values of the periodicity and the basis frequency of the reference R(z) and disturbance V(z) are required in the design. One may observe them using measurement instruments, including an oscilloscope and spectrum analyzer.
Based on Assumptions 1 to 3, we have the information about q(z), P s (z) and ω b , which is needed for designing the proposed stabilizing controller F(z). Instead of using an inverse plant model [21][22][23], which is often not available due to plant uncertainties, the stabilizing controller F(z) can be designed in simple form as follows: where K p is a positive learning gain and M is a positive number, which is not necessarily an integer. This means that M is possibly a fractional positive number. This is different to the references [24,28], where M is strictly an integer number. Here, we aim to obtain the stabilizing controller (14), satisfying the condition (13) given that q(z), P s (z) and ω b are provided. The stability condition (13) is equivalent to where |X (z)| operates as the magnitude response of the transfer function X (z). Let N p (ω) and θ p (ω) be the magnitude and phase responses of P s (z). The transfer function P s (z) can be written as P s (z) = N p (ω)e jθ p (ω) , while F(z) can be expressed as F(z) = K p e jMω . Following Assumption 1 that q(z) contributes a zero-phase for all frequencies, condition (15) can be rewritten as |{1 − K p e jMω N p (ω)e jθ p (ω) }N q (ω)| < 1.
Then, (16) can be further adjusted to Squaring both sides of (17), (17) becomes Remark 5. From (18), it can be seen that the ideal condition is achieved when K p N p (ω) → 1 and θ p (ω) + Mω → 0 o for 0 < ω < π T . This means that the magnitude compensation results in a unity gain and the phase compensation gives a zero phase. However, this condition is hard to achieve, especially at higher frequencies. The presence of q(z) offering N q (ω) << 1 makes it possible to satisfy condition (18).
which represents a cost function in the left hand side of (18) assessed at a single frequency ω j . Since the repetitive model represents the reference/disturbance model at odd-harmonics only, the following objective function is constructed: where ω b is the basis frequency given by Assumption 3 and L is an integer number calculated such that (2L + 1)ω b ≈ π/T. Finally, we present the optimization problem as follows: subject to Remark 6. The optimization problem (21) aims to find two unknown variables K p , M, which minimize the objective function (20) and satisfy two constraints. The first constraint is added to guarantee that the obtained K p and M are positive numbers. The second constraint is needed to ensure that the stability condition at each frequency ω j is satisfied. Note that M is not necessarily an integer.

Realization of the Controller
It is possible that the solution for variable M is a fractional number. Hence, the stabilizing controller F(z) is not realizable. To deal with this problem, the stabilizing controller F(z) is then split into: where M i + M f = M, M i is positive integer number and M f is a negative fractional number, i.e., M i > M and M f < 0. The term z M f can be approximated by a stable and causal IIR filter I(z) as follows: where R = ceil(M f ). The coefficients a 0 , a 1 , · · · , a R are designed by using Thiran fractionaldelay formula [31,32]. The Thiran formula is given by where If we pick M i = ceil(M), then M f is within −1 < M f < 0. Now, z M f can be approximated as a first-order filter as follows: Here, By applying (27), the IIR filter coefficients can be easily obtained. Since z M i in (22) is non-causal, it cannot be implemented separately without being merged with the internal model. The modification shown in Figure 5 is presented to make the proposed controller fully realizable.

Simulation Results
The plant model of Quanser SRV02 servo in [33] is used in the simulation. The open-loop plant has the following model: where θ o (s) is an angle position (rad) and V o (s) is an open-loop voltage (V). The plant model (28) is sampled with zero-order-hold method at the sampling period T = 0.005 s, resulting in the discrete-time model as follows: which is a marginally stable plant since P(z) has one of its poles lying on the unit circle. Recalling (10), we add a simple proportional gain D(z) = 10 to improve the stability margin of (29). As a result, it leads to the minimal realization of the closed-loop plant model P s (s) given as Now, we have a second-order discrete-time model as shown in (30). The closedloop plant model P s (z) has two stable complex poles located at p 1 = 0.91 + i0.084 and p 2 = 0.91 − i0.084. Hence, Condition 2 (C2) in Remark 1 is satisfied. Here, we consider a tracking control problem with no presence of disturbance (i.e., V(z) = 0). A periodic reference signal r(k) with a maximum amplitude 0.81 rad (46.19 deg) as illustrated in Figure 6 is defined as a reference input of the system expressed as r(k) = π 6 sin(πkT s ) + π 6 sin(3πkT s ) It can be seen from (31) that the basis frequency of r(k) is ω b = π rad/s. Consequently, the integer number N is computed as (2π/ω b T s ) = 400. The q-filter q(z) is selected as q(z) = 0.25z −1 + 0.5 + 0.25z, which is a stable low-pass filter with a cut-off frequency as ω q = 228 rad/s. Using P s (z), N and q(z), the optimization problem (21) can now be constructed. Utilizing the Optimization Toolbox by MATLAB, the optimization problem can be solved resulting in the stabilizing controller as follows: Following the steps (22) to (27), we get Here, the IIR filter I(z) has a single pole at p 1 = −0.864, confirming that z M f is replaced by a stable and causal filter. Hence, F(z) in (32) can now be approximated by Finally, the transfer function of the proposed controller can be represented as Based on Remark 2, we firstly examine the phase compensation and the stability condition provided by the stabilizing controller F(z) given in (34). The phase compensation and the stability condition are plotted in Figure 7a,b, respectively. As shown in Figure 7a, the proposed stabilizing controller F(z) provides phase compensation with wider stable range [−90 • , 90 • ] to approximately 200 rad/s. The overall system is guaranteed to be stable due to the magnitude responses of {1 − F(z)P s (z)}q(z) being less than one for all frequencies. This behavior is clearly indicated from Figure 7b. The tracking output and tracking error plots, respectively, given in Figure 8a,b demonstrate that the reference signal r(k) with odd-harmonics frequencies is accurately tracked after about 3.25 s. Figure 8b also indicates a significantly small steady-state tracking error; that is, |e(k)| < 0.05 • . These simulation results show that the proposed method effectively works for tracking/rejection of odd-harmonics repetitive control system.

Experimental Validation
The real-time experiments are conducted to further validate the effectiveness of the proposed design. Figure 9 shows an experimental setup consisting of PC (as host PC and target system), DAQ Q8-USB (as ADC and DAC), Amplifier VoltPAQ-X2 (as two channels signal conditioning) and Quanser SRV-02 (as an open-loop servomotor plant). The openloop plant model is similar to the model (28) used in the simulation. In the experiments, we aim to regulate the servomotor SRV-02 such that the angle position θ o (k) (deg) accurately follows the periodic reference r(k) consisting of odd-harmonics frequencies as shown in Figure 6.
In the experiments, we compare the performance of the proposed controller with general RC using a similar stabilizing controller. The compared general RC has the following transfer function: Here, F(z) in (36) is given as in (34). In addition, we also examine the root-mean-square error (rmse) and the root-mean-square of steady-state error (rms-ess) defined as: rms-ess := 1 (n T − n ss ) where n T = 20/0.005 = 4000, n ss = t ss /0.005 and t ss is time to reach the steady-state condition. The tracking errors of the proposed RC and general RC from the experimental validation are plotted in Figure 10. The error plots given in Figure 10a show that the proposed RC has a superior transient response compared to the general RC. The proposed RC converges after about 3.5 s, which is almost half of the convergence time of the general RC (i.e., 6.4 s). This phenomenon is obvious because the delay period of general RC (36) is twice that of the proposed controller in (35). However, the general RC provides better tracking accuracy compared to the proposed RC. This is noticeable from the steady-state error shown in Figure 10b. We can also notice that the calculated rms-ess value of the general RC is smaller compared to that of the proposed RC. We also evaluate the performance of both controllers when some integer phase lead stabilizing controllers are considered. It can be seen from Table 1, that the proposed controller gives the smallest rmse value, showing the superiority over the general RC and OHRC with integer phase lead stabilizing controller. Another comparison is also made to the integer phase lead RC developed in [24]. The stabilizing controller in [24] has the following form: where k p is a learning gain and m is an integer lead step. In [24], the design task is started by choosing the lead step m which gives larger stable bandwidth and satisfies the following phase condition: Here, the lead step m is assessed one by one, by plotting the phase responses shown in Figure 11. As depicted in Figure 11, the lead step m = 4 is chosen. Then, the learning gain k p is manually tuned to give fast convergence and theoretically determined to meet the magnitude condition as follows: where m is the chosen lead step (i.e., m = 4), and N p (ω) and θ p (ω) are, respectively, the magnitude response and the phase response of the closed-loop plant P s (z). Let us manually pick the learning gains k p as 0.5, 0.75, 1 and 1.25. The tracking errors of the integer phase-lead RC system [24] with different learning gains are shown in Figure 12a-d. Figure 12a-d indicate that even though the learning gain is increased, the phase lead RC system remains, showing slower convergence rate compared to the proposed RC. In addition, the calculated root-mean-square errors of the phase lead RC system with different learning gains are significantly larger compared to the proposed RC. We can also notice that increasing the learning gain results in larger steady-state error. As observed from Figure 12d, that tracking error tends to diverge after t = 10 s. This implies that increasing the learning gain to 1.25 leads to an unstable closed-loop system. The steady-state error and the rms-ess value of the phase-lead RC, especially at the gain k p = 0.5, are also examined. Figure 13 indicates that the phase-lead RC has a bigger range of steady-state error. Moreover, the rms-ess of phase-lead RC is also larger than in the proposed RC. All the above results demonstrate the superiority of the proposed controller over the general RC (3) and the integer phase-lead RC [24].

Conclusions
In this paper, a discrete-time fractional-order odd-harmonics repetitive controller has been developed. First, an internal model with a half-cycle delay is used to track/compensate periodic signals with odd-harmonics components. Second, the fractional-order phase lead stabilizing controller is designed based on the optimization problem derived from the RC's stability condition. Finally, the fractional term of the stabilizing controller is approximated by a causal and stable IIR filter, with coefficients that are calculated by using the Thiran formula. Simulation, experimental validation and comparison study were conducted to verify the effectiveness of the proposed design.

Funding:
The authors received financial support for publication from the UPLAND Project, with the support of IsDB and IFAD, that focus to increase smallholders' agriculture productivity, incomes, livelihoods, and resilience in the targeted area. Meanwhile, the research was supported by Research Center for Photonics, National Research and Innovation Agency (BRIN), Indonesia.
Institutional Review Board Statement: Not applicable.

Informed Consent Statement: Not applicable.
Data Availability Statement: Not applicable.