Unified Approach to Evaluation of Real and Complex Repetitive Controllers

Repetitive controllers (RCs) are known for their ability of controlling periodic exogenous signals, even if these signals have high harmonic content. Due to the variety of repetitive controllers proposed in the literature, which are significantly different from each other, a comparative evaluation in a collective way is analytically complex. This fact implies a greater difficulty to select the appropriate RC strategy when designing a control system, what makes most control system designers to not use this class of controllers. In order to solve this problem, the present paper develops a unified approach for representation of (real and complex) repetitive controllers, which is based on the use of multiple primitive repetitive cells in parallel. Through this approach the main characteristics of a repetitive controller, such as stability properties, dynamic response, set of harmonic components that are effectively compensated and computational burden, are easily identified. Furthermore, in order to validate the potential of the proposed unified approach, comparative studies of $nk \pm m$ RCs and $nk+m$ RCs are performed. An experimental application based on a three-phase shunt active power filter is implemented to validate the theoretical evaluation presented in this paper.


I. INTRODUCTION
Due to the increasing demand for solar and wind power sources, a substantial increase in the number of three-phase grid-connected inverters has been noticed in the recent decades. In these applications, the inverters are responsible for the interface between the renewable energy sources and the electrical grid, being usually operated as voltage source inverters (VSI), as exemplified in [1] and [2]. Therefore, since the grid voltages are usually measurable parameters of the system, the power injection control can be done by regulating the inverter's output currents. As consequence, these power converters' performances strongly depend on their current control loops [3].
Several control strategies have been proposed in the literature in order to regulate the output currents of three-phase inverters, even if the reference signals have high harmonic content. Most of these solutions use linear control structures The associate editor coordinating the review of this manuscript and approving it for publication was Shihong Ding . that present high gain in a set of frequencies selected by the control system designer, such as multiple resonant controllers in parallel [4], thus being applicable to systems that demand currents having harmonic components whose orders are previously known. Since these linear solutions incorporate the mathematical model of the reference signal in the closed-loop control system, according to the internal model principle [5], they ensure zero steady-state error for tracking periodical reference signals whose all harmonic components are in the selected set. The control strategies based on the internal model principle that are used in three-phase inverters can still be classified into three categories [6]: real controllers, which are used to separately control each phase signal or each component of the space-vector that represents the three-phase signal in a stationary reference-frame, such as in [4]; complex controllers in stationary reference frame, which are used to control the space-vector formed by a three-phase signal in the αβ reference frame, such as in [7], [8]; and real controllers in synchronous reference frame, which are used to control d and q signals in a synchronous reference frame, such as in [9]- [11], and have frequency spectrum characteristics that are similar to those obtained for complex controllers in stationary reference frame.
Due to the variety of control solutions based on the internal model principle [5], understanding the differences between each control strategy is essential to evaluate and select the most appropriate solution to be used. As a matter of fact, by doing so it becomes possible to identify the advantages, disadvantages and target application of each control strategy. In this scenario, several researchers have compared relevant control schemes. Two examples of comparative studies that play this role are [3] and [12].
When evaluating the comparative studies performed in [3] and [12], it is observed that several recently proposed control schemes were obviously not included in these studies, such as multiple ROGIs in parallel [7] and generic order repetitive controllers (nk ± m RCs and nk + m RCs) [13]- [16]. Regarding this last class of controllers, the number of solutions based on repetitive action has significantly increased in the recent decades. Fig. 1 shows some repetitive control schemes that were proposed in the literature in the last decade to illustrate this fact.
In order to clarify the relevance of repetitive controllers in the recent research scenario, Fig. 2 shows the number of results found in Google Scholar, from 2015 to 2019, when searching for keywords related to some control strategies approached in [12]. The target controllers of the search presented in Fig. 2 are: PI in a synchronous reference frame, or PI-SRF; PI with multiple rotational integrators, or PI-MRI; resonant controllers, also known as SSIs (sinusoidal signal integrators) or SOGIs (second order generalized integrator); and repetitive controllers. From Fig. 2, it must be noted that there is a large number of results that related to ''repetitive controllers'' from 2015 to 2019, which indicates its relevance. Therefore, it is important to extend comparative studies on control strategies to also include repetitive controllers.
In spite of the existence of several different repetitive controllers, such as those exemplified in Fig. 1, their structures are so distinct from each other that a comparative evaluation in a collective way is analytically complex. In fact, several structures have been proposed as nk ± m RCs or nk + m RC. However, if one looks at Fig. 1(a) and Fig. 1(b), it is difficult to recognize which one has better stability properties or faster dynamic response. The same is true if one tries to compare the controllers of Fig. 1(c) and Fig. 1(d). This problem can be solved if a basic cell that allows to represent this class of controllers is created, as done, for instance, in [17] to represent several different topologies of multilevel inverters. In this sense, the primitive repetitive cell (PRC) proposed in [18], Fig. 3, can be used to compose all repetitive controllers available.
Despite having a great potential for comparative studies on repetitive controllers (RCs), the PRC is only used in [18] as a theoretical structure to justify the proposal of an nk ± m RC. In [19], this PRC is used for the first time to allow fairer comparisons between different RCs. However, only a superficial analysis is presented in [19], which cannot be generalized to all RCs.
The main objective of this paper is to present a general way to evaluate the dynamic characteristics of any real or complex RC, through the decomposition into PRCs connected in parallel. To the best of the authors' knowledge, this paper brings the following original contributions: • Proposing a generic structure of RC based on the concept of PRC (Fig. 4). Through this generic RC it is possible to regulate signals having harmonic components in the • Presenting a detailed analysis on how real and complex RC can be represented and evaluated through PRCs (the concept of complex RCs is covered in [6]); • Proposing a generic nk ± m RC (Fig. 5), which is a real generic order RC that can compensate reference signals with harmonics belonging to the family H = {nk ± m | k ∈ Z}. This new structure, composed of two PRCs in parallel, depending on its parameters, becomes equivalent to any nk ± m RC; • Performing theoretical studies on nk ±m RCs and nk +m RCs, which enable to identify the differences between the RCs that belong to these two classes of controllers; • Evaluating the effect of using multiple PRCs in parallel on the control system stability and dynamic response; • Mapping the poles and zeros of the structure of PRCs in parallel in terms of the parameter a. From this mapping it becomes possible to infer about the system stability.
The theoretical analysis allows the designer to select the most appropriate RC structure to each application. The paper is organized as follows. Section II reviews the PRC proposed in [18], which is used for developing the proposed unified approach. In Section III, a structure of PRCs in parallel that can be used to represent RC schemes is proposed. Its usefulness is illustrated through the evaluation the two most common families of RC schemes, nk ± m RCs (real controller) and nk + m RCs (complex controller). A performance comparison between different RC schemes using a shunt three-phase active power filter is made in Section IV, which is used to validate the theoretical assumptions. Finally, conclusions are presented in Section V.

II. PRIMITIVE REPETITIVE CELL
In 2013, Lu et al. [20] proposed a control scheme named ''parallel-structure repetitive control'' (PSRC) through which the conventional repetitive action using complex RCs in parallel was implemented for the first time. These complex control structures that are used in parallel to form (or evaluate) a more sophisticated RC scheme became further known as primitive repetitive cells (PRCs).
When re-evaluating the PRC used as basis for the PSRC control scheme [20], a second direct path can be added in parallel to this primitive structure, as done in [21] for the conventional RC. As a result of this approach, Neto et al. [18] proposed a generic PRC (which was latter extented in [22]) that is composed by the following elements: • A generic delay e − T 0 n s : The PRC proposed in [18] has a generic delay of T 0 /n in its structure, where T 0 represents the period of the fundamental component. The parameter n allows the control system designer to select the periodicity of the family of harmonic components in which the PRC applies high gain, that is, it allows to control only the harmonics in the family H = {nk | k ∈ Z} instead of H = {k | k ∈ Z} (all harmonic components); • A complex gain e j2π m n : When a complex gain e j2π m n is cascaded with the generic delay e − T 0 n s , the frequency response of the controller undergoes a frequency shift. Thus, this parameter allows the control system designer to select a harmonic m so that the PRC applies high gain to all harmonic components of the family H = • A constant gain a: This block represents the gain of the PRC's second direct path, which is used to establish a constant proportion between the repetitive action and a proportional action. If the value of the real constant gain a varies, then the control structure and its stability characteristics change [22]. As a matter of fact, as demonstrated in the next section, the controller has its zeros allocation changed when varying this parameter.
Since the target application defines the fundamental period T 0 that should be used, the generic delay and the complex gain only depend on the chosen parameters n and m. Based on the elements described above, the PRC proposed in [18] has the following transfer function: However, for a discrete-time analysis, the generic delay can be implemented as z −N /n , where N represents the number of samples per period of the fundamental component. Therefore, its transfer function in the discrete-time domain is given by which is represented by the block diagram shown in Fig. 3.
It is important to highlight that a linear-phase filter can be cascaded with the delay of the periodic signal generator to increase the relative stability of the RC system. Considering a discrete-time control system, this characteristic can be obtained when using a finite impulse response (FIR) filter [23].

III. STRUCTURE OF PRCs IN PARALLEL
The PRC with configurable structure presented in the previous section can be used as basis for decomposing and representing any type of RC. This fact is exemplified through the analysis of the two families of RCs most frequently used: nk ± m RCs and nk + m RCs, such as those shown in Fig. 1. A structure of PRCs in parallel that allows to evaluate RCs using a unified approach is presented below.
Based on the PSRC proposed in [20], when replacing its PRCs by the one described in the previous section, the structure shown in Fig. 4 is obtained. As consequence, this scheme can control the harmonic components of the family H = ∪ i=0,··· ,p−1 {n i k + m i | k ∈ Z}, with K i and a i as parameters to be tuned. Thus, the PSRC is a particular case of the proposed structure, which is obtained by doing: a i = 0, n i = n and m i = i; for all i ∈ {0, 1, · · · , p − 1}, with p = n.
Two particular control strategies that can be obtained from the structure presented in Fig. 4 are the nk ± m RCs (such as those in [13] and [14]) and the nk + m RCs (such as those in [15] and [16]). These two classes of controllers are briefly discussed below.

A. STUDY ON NK ± M RCS USING THE PROPOSED STRUCTURE
In view of the fact that nk ± m RCs can be used to control exogenous signals whose harmonic components belong to the union of families H 0 = {nk + m | k ∈ Z} and H 1 = {nk − m | k ∈ Z}, these nk ± m RC schemes can be represented by two PRCs in parallel with parameters n 0 = n 1 = n and m 0 = −m 1 = m. Thus, based on these assumptions, the transfer function of a generic nk ± m RC is given by: However, (3) can be rewritten as in which A = (K 0 a 0 + K 1 a 1 ). It is important to realize that the characteristic equation of the transfer function presented in (4) does not depend on the parameters K 0 , K 1 , a 0 or a 1 .
In fact, after a thorough evaluation, it is observed the poles of this transfer function are located at the z-plane unit circle, in accordance with the frequency of the harmonic components of the family H = {nk ± m | k ∈ Z}. Furthermore, the characteristic equation of (4) is common to all nk ± m RCs proposed in the literature.
Since nk ±m RCs are real controllers [6], all their poles and zeros must be real or pairs of complex conjugates. However, when evaluating the term 1 of (4), and considering the Euler's formula, it can be seen that Therefore, the first condition for ensuring that there is no imaginary part in the numerator of the transfer function shown in (4) is that K 0 = K 1 = K rc , what makes the controller to be real. After this substitution in (4), it is rewritten as Finally, since the parameters a 0 and a 1 multiply the same gain K rc , it is possible to evaluate nk ± m RCs using two PRC with a 0 = a 1 = a. By doing so, (6) can be manipulated in order to obtain the following equation: The block diagram of this class of controllers, based in the configuration presented in Fig. 4, is shown in Fig. 5. It is important to realize that, if a 0 + a 1 = 2a holds, the transfer function presented in (7) is always valid, even if a 0 = a 1 . As an example, when considering a 0 = 0 and a 1 = 2a (or a 0 = 2a and a 1 = 0), (6) still leads to (7). However, in order to maintain the approach of decomposing repetitive controllers into PRCs, a 0 = a 1 = a is considered in the following explanation.
The nk ± m RC proposed in [13] can be decomposed into PRCs with a = 0.5, what cancels the term 2 cos 2π m n z − N n (2a − 1) in the numerator of (7). In fact the obtained transfer function corresponds to the one presented in [13], repeated in Table 1. For obtaining the nk ± m RC proposed in [14], PRCs with a = 0 can be used in parallel, cancelling the term [2a] in the numerator of (7). This same characteristic is also observed for the nk ± m RC proposed in [18] considering two PRCs with a = 1 in parallel, for which the term z −2 N n (2a − 2) is cancelled. In order to better show these facts, the transfer function of the controllers mentioned above, which are presented in Table 1, can be compared with (7).
Parameter a causes a displacement on the zeros of the RC transfer function. As can be seen in Fig. 6a, when considering a = 0 (making the scheme in Fig. 5 equivalent to the nk ± m RC proposed in [14]), the control structure allocates zeros outside the z-plane unit circle, resulting in a non-minimum phase system. As a increases (Fig. 6b), the zeros are shifted to enter the unit circle, making the controller to have a minimum phase transfer function, with half of the zeros converging to the point (0, 0) when a = 1 (Fig. 6c). Since a = 1 in Fig. 6c, it shows the zeros positions of the nk ±m RC proposed in [18].
The root locus of the generic nk ± m RC (Fig. 7), which was obtained considering a unity gain feedback system with a unity gain plant, as done in [24] for the conventional RC, allows to evaluate its poles displacement taking the repetitive gain K rc as the varied parameter. Fig. 7a indicates that, when K rc exceeds a certain boundary value, the nk ± m RC formed by PRCs with a = 0 becomes unstable (poles go outside the z-plane unit circle). On the other hand, this characteristic does not happen when the zeros are allocated inside the circumference, as shown in Fig. 7c for a = 1. Thus, it can be seen that the parameter a directly impacts the system stability.
Since the generic nk ± m RC presented in Fig. 5 is formed by two configurable PRCs, its stability and performance characteristics can be inferred from the study of the configurable  PRCs [22]. In fact, this methodology can be extended to all nk ± m RCs through their decompositions into the generic nk ± m RCs. This means that, for example, since a PRC with a = 1 has better stability characteristics than a PRC with a = 0, it is expected that the nk ± m RC proposed in [18] (equivalent to two PRCs with a = 1 in parallel) also presents better stability characteristics than the solution proposed in [14] (equivalent to two PRCs with a = 0 in parallel).

B. STUDY ON NK + M RCS USING THE PROPOSED STRUCTURE
In order to evaluate the nk + m RCs, such as those in [15] and [16], the structure of PRCs presented in Fig. 4 can be used with K 0 = 0 and K 1 = K 2 = · · · = K p−1 = 0. This means that one PRC can be directly used as a complex RC [22]. The transfer function of this generic nk + m RC is given by: The generic nk + m RC is designed to control a system through a complex control action u, which is calculated from the complex error e. It is suitable to any system that can be modeled in the complex domain. Since three-phase systems are usually modeled in the complex domain, after transforming the abc quantities to the complex αβ reference frame, this was chosen as the initial target application for the control strategy. Nevertheless, its complex control action u αβ must be transformed to the abc reference frame so that it becomes possible to use them to obtain the control action for each phase.
In this scenario, (8) can be manipulated to achieve: Therefore, as observed for the generic nk ±m RC, the transfer funcion poles of the generic nk + m RC do not depend on the parameters K rc and a. In addition, the zeros displacement caused by varying parameter a is similar to that presented for the generic nk ± m RC above proposed, as can be seen in Fig. 8. Despite this similarity, since it is a complex control structure, the poles and zeros mapping is not symmetric with respect to the real axis.
Regarding the implementation of this class of controllers in digital signal processors, it is done using its scalar representation [6]. This means that a complex single-input singleoutput controller, whose input and output signals are space vectors, can be represented using a real multi-input multioutput representation, where the input and output signals are the real and imaginary components of the space vector. When VOLUME 9, 2021 FIGURE 8. Poles and zeros mapping of the generic nk + m RC whose transfer function is given by (9). The RC scheme was tuned with the following parameters: n = 6; m = 1; and sampling frequency of 1.8 kHz.
doing this, the generic nk + m RC presented in (9) can be represented in terms of the inputs e α and e β , and outputs u α and u β , such as the complex RC proposed in [22].

C. EFFECT OF USING MULTIPLE PRCS IN PARALLEL ON THE CONTROL SYSTEM STABILITY
Consider now that the harmonic components that need to be controlled are in the family H 0 = {nk + m | k ∈ Z}. What is the effect of using a controller able to regulate not only the components in H 0 , but also those in H 1 = {nk − m | k ∈ Z}? In order to evaluate this situation, a PRC designed for controlling H 0 = {6k + 1 | k ∈ Z} is compared with an RC scheme composed by a 6k + 1 RC in parallel with a 6k − 1 RC, both with the same FIR filters Q(z) to improve the stability characteristics of the control system [18]. For this evaluation, the control system is composed by a shunt active power filter (APF) used to compensate the harmonic currents required by a three-phase rectifier, and the RC scheme above described.
It is well known that the phase currents demanded by the three-phase rectifier only contain harmonic components of the family H = {6k ± 1 | k ∈ Z}, regardless of which is the phase sequence of the voltages at the point of common coupling (PCC). This characteristic is illustrated in the harmonic spectrum of the a-phase current (Fig. 9). In fact, since the currents i a , i b and i c are real signals, their positive and negative spectra are symmetric, as shown in Fig. 9. As consequence, real controllers that present high gain in the harmonic components of the family H = {6k ± 1 | k ∈ Z} are indicated to be used in the current control of the shunt APF, which can be implemented in abc or αβ reference frames.
Nevertheless, the space vector of the same currents absorbed by the three-phase rectifier has an asymmetric harmonic spectrum, as shown in Fig. 10. The magnitudes of the positive and negative frequency components correspond to the magnitudes of the positive-and negative-sequence threephase components, respectively [6]. As a matter of fact, this space vector is represented by  in which h s ∈ H 0 = {6k + 1 | k ∈ Z}, that is, h s ∈ H 0 = {· · · , −17, −11, −5, +1, +7, +13, +19, · · · }, where ''+'' and ''−'' indicate whether the harmonic component corresponds to a positive or negative sequence three-phase signal. Thus, for this application, if the controller is implemented considering the space vector notation, only the harmonics that belong to H 0 need to be controlled for the proper control. In this scenario, where only controlling H 0 is required, the effect of using both controllers, for H 0 and H 1 , is evaluated by setting the RC gains as follows: K 0 constant, being equal to K rc ; K 1 gradually increased from 0 to K rc .
By doing so, it becomes possible to see the typical frequency response of a control system with a nk + m RC and how it gradually changes until the controller becomes a nk ± m RC. This behavior is shown in Fig. 11 through the magnitude plot in which G(z) is the transfer function in z-domain that models the plant (the shunt APF output filter in this example). More details about this G(z) are presented in Section IV. As two PRCs are being used in parallel, scaled by the gains K rc and K 1 , both impact the frequency response of the control system. In fact, when comparing the curves in Fig. 11 that are obtained for a single PRC (K 1 = 0) and for two PRCs with the same gain in parallel (K 1 = K rc ), it is observed that these schemes show similar magnitude response around low frequency harmonic components that belong to the family H 0 = {6k + 1 | k ∈ Z}. This makes both control schemes eligible to synthesize currents whose space vectors have harmonic components that belong to H 0 . However, they are distinct with respect to the application of high gain in the harmonic components of the family Another important difference in these magnitude responses is also observed at high frequencies. The control structure based on a single PRC (K 1 = 0) has a lower magnitude for high frequencies. This happens because this control scheme does not have the additional gain of the second PRC, which is responsible for controlling the family H 1 . Consequently, the greater the number of PRCs used in parallel the greater becomes the gain of the OLTF for high frequencies, what negatively impacts the system stability.
From the analysis presented above, one can conclude that, once the harmonic components to be regulated are known, it is preferable to use only one n 0 k + m 0 PRC with the highest n 0 possible. If there are components that do not belong to the family H 0 , it becomes necessary to use another PRC in parallel, for controlling the new components, and so on.

D. DECOMPOSITION OF RCS IN STRUCTURES OF PRCS IN PARALLEL
Besides the nk ± m RCs and the nk + m RCs shown in Fig. 1, the structure of PRCs in parallel presented in Fig. 4 can also be used to represent other RC schemes with more specific functions, such as: RCs for controlling only odd harmonics [25]- [27]; the 6k ± 1 RC proposed in [28]; and the conventional RC [21]. Table 2 summarizes the decomposition of several RC schemes as structures of PRCs in parallel.
Since the PRC is the base element for this representation, instead of needing to know all the particularities of each RC scheme presented in Table 2 in order to evaluate them, the control system designer can study the dynamic and functional characteristics of the PRC and use them for this distinction. Further, when comparing RCs decomposed into in PRCs, it can be seen that RC schemes proposed in the literature have different repetitive gains. Thus, this approach enables the control system designer to normalize the repetitive gains of these controllers, what allows a fairer comparison between them.

E. POSITIONING ZERO-PHASE FIR FILTERS TO INCREASE THE STABILITY OF NON-CONVENTIONAL RC SCHEMES
Non-conventional RC schemes (i.e. RC schemes other than the conventional RC [21]), such as nk ± m RCs, can also contain FIR filters to improve the stability characteristics of the control system [23]. A simple way to know where to place these FIR filters for the non-conventional RC schemes is to decompose them into the structure of PRCs in parallel (Fig. 4), and then place a FIR filter in each PRC of the structure. Finally, the transfer function of the resulting control structure must be acquired.
In order to demonstrate this procedure, the nk ± m RC proposed in [18] is considered. This RC is based on PRCs with a = 1 in parallel (Table 2), and zero-phase FIR filter with symmetric coefficients Q(z). When cascading the FIR filter with the delay z −N /n of the periodic signal generator of each PRC, the following equation is obtained: When adding the two fractions of (13), the following equation is obtained: VOLUME 9, 2021 However, Euler's formula can be used to obtain the cosine function from a weighted sum of complex exponential functions, i.e. 2 · cos(θ) = e jθ + e −jθ . Therefore, (14) can be rewritten as which is the one presented in [18]. This approach can be extended to other basic blocks that are included in RC schemes to perform any additional function. For instance, several authors have proposed the use of fractional delay to improve the performance of RC schemes under fundamental frequency variation [30], [31]. In these control schemes, the number of samples to be delayed by the periodic signal generator is not an integer value. Thus, its fractional part is approximated by a Lagrange interpolation polynomial FIR filter [32], which is cascaded with the integer part. All those controllers in [30], [31] can be decomposed into the structure of PRCs in parallel presented in Fig. 4. However, the FIR filters (for fractional delay and for increasing the stability margins) must be included in each PRC, such as done in (13) for the nk ± m RC proposed in [18].

IV. PERFORMANCE COMPARISON OF REPETITIVE CONTROLLERS
In this paper, a three-phase shunt APF is used to mitigate the harmonic contamination caused by a three-phase rectifier, as can be seen in the block diagram of the complete control system (Fig. 12). In this application, the three-phase output currents are the controlled variables and the APF output filter can be modeled as the plant of the control system. Therefore, transforming to the αβ reference-frame, the plant transfer function is given by: where i f = L −1 { I f (s)} is the space-vector obtained from the APF output currents and d = L −1 { D(s)} is the space-vector obtained from the duty cycles (L −1 is the inverse Laplace transform operator). The digital blocks, which are in the shaded area of Fig. 12, were implemented in a dSPACE platform. The block H l (z) is a lead compensator used to attenuate the effect of the computational delay [33]. The parameters of the prototype are presented in Table 3.
The dSPACE platform is a modular hardware system that allows the user to program a control system application using Simulink/Matlab. This platform is composed by I/O and processor boards. The dSPACE platform used to obtain the experimental results of this paper has the DS1005 PPC board,   which is a processor board that provides the computing power for real-time system while works as interface between the I/O boards and the host PC. The DS1005 PPC board features a PowerPC 750GX processor running at 1 GHz. Figure 13 shows the prototype and dSPACE platform.

A. EVALUATION OF THE FAMILY OF HARMONIC COMPONENTS TO BE CONTROLLED
Since the shunt APF shown in Fig. 12 is used for compensating load current disturbances, which is done to make the grid currents sinusoidal, it is very important to evaluate the harmonic decomposition of the currents demanded by the used non-linear load. As a matter of fact, from this evaluation of the load currents, it is possible to determine the family of harmonic components to be controlled so that the shunt APF works properly. Ideally, this step should be done at the beginning of the control system design process since it allows the designer to choose the appropriate RC scheme.
For the application presented in Fig. 12, where the non-linear load is a three-phase rectifier, the harmonic spectrum of the phase load current and the harmonic spectrum of the space vector obtained from the three-phase load currents are shown in Fig. 9 and Fig. 10, respectively. When observing which components have high magnitude in these harmonic spectra, it should be noted that all RC schemes presented in Table 2 can be used in this application. Therefore, with the purpose of delimiting the experimental analysis, the following six control strategies were implemented: • Conventional RC [21]; • nk ± m RCs ( [13], [14], [18]), for n = 6 and m = 1; and • nk + m RCs ( [15], [16]), for n = 6 and m = 1.

B. PARAMETERS OF THE IMPLEMENTED RC SCHEMES
As discussed in Section III, all real and complex RCs presented in the Table 2 can be decomposed into the proposed structure of PRCs in parallel. The decomposition analysis presented in Table 2 shows that the evaluated RC schemes naturally have different repetitive gains. Thus, these gains VOLUME 9, 2021  should be tuned so that it becomes possible to make a fair performance comparison between them. This can be accomplished by adopting the same repetitive gains for each PRC that forms all evaluated controllers. In this sense, Table 4 shows the controllers that are evaluated experimentally (with equivalent gains) and their respective ''normalized'' decompositions into PRCs. The conventional RC proposed in [21] is implemented considering a(z) = 1.
It is important to realize that without using the proposed structure of PRCs in parallel to make this comparison fair, it would not be possible to prove that the RCs are being evaluated with equivalent repetitive gains. The block diagrams of the implemented control schemes, with the gains shown in Table 4, are exhibited in Fig. 14. Low-pass FIR filters (Q(z)) are used in the periodic signal generator of each evaluated RC to improve the stability characteristics of each control system.
In order to make a fair comparison, the repetitive gain was initially tuned for conventional RC, and then the tuned repetitive gain was extended to the other evaluated RC schemes. For this, the design methodology presented in [33] was used to obtain K rc = 0.060. A lead compensator with transfer function given by is used to mitigate the effect of computational delay [33] (its position in the control system is indicated in Fig. 12). On the other hand, the following symmetrical FIR filter (order M = 6 and cut-off frequency f c = 1.8 kHz) was used to improve the stability characteristics: As shown in the following subsection, K rc = 0.060 results in reasonable stability and performance characteristics when using the conventional RC. However, if this same repetitive gain is applied to the other evaluated RC schemes, all implemented with same Q(z) and H l (z), only the control system with the nk + m RC proposed in [16] is also stable ( Table 5). These results presented in Table 5 are in line with the theoretical evaluation presented in Section III, showing that PRCs with a = 1 have better stability properties. However, the nk ± m RC based on PRCs with a = 1, scheme proposed in [18], resulted in an unstable system for K rc = 0.060. This happens because the use of two PRCs in parallel worsens the stability characteristics of the control system, as discussed in Subsection III-C.
After the demonstration about the decomposition into PRCs for predicting the stability properties of the RC schemes, the performances of these RCs are now evaluated. However, in order to make a fair comparison, the repetitive gains of all unstable solutions were reduced until all evaluated control systems had similar stability margins and bandwidths, i.e., similar sensitivity indexes [34] and 0 dB gain crossing frequencies. For some of these control strategies, a proportional action with gain (K p ) is added in order to achieve the desired sensitivity index and 0 dB gain crossing frequency. As result of this design methodology, the repetitive and proportional gains used in the experimental implementation of each RC scheme are presented in Table 6.

C. SUMMARY OF THE EXPERIMENTAL RESULTS
The performance comparison of the six RCs is summarized in Table 7. Based on the data presented in Table 6 and Table 7, it is observed that: • All RC schemes are tuned in order to achieve similar 0 dB gain crossing frequencies and sensitivity index; VOLUME 9, 2021 • As result of the design methodology, Table 6 shows that the complex solutions allow the use of greater repetitive gains than the real controllers based in PRCs with same parameters a, n and m. This happens because, in contrast with the real nk ± m RCs, the complex nk + m RCs are based in a single PRC; • From the previous item, when the same parameters n and m are chosen for nk ±m RC and nk +m RC schemes, it is expected that the controllers that are based in only one PRC present faster transient response, since the design for the same stability margin results in higher control gain; • Among all evaluated controllers, the ones that resulted in lower THDs were the conventional RC and the RC proposed in [16]. This happens because these RCs are based on a single PRC with a = 1, which enabled the use of a repetitive gain higher than the other strategies. Between them, the lower THD was achieved using the conventional RC, what is expected due to its ability to compensate all harmonic components; • On the other hand, since the conventional RC uses a greater number of delays in its periodic signals generator than the other evaluated control strategies (Fig. 14), it results in the longest settling time and in the higher IAE (integral of absolute error) and ITAE (integral of time absolute error) among the evaluated strategies; • When looking at the nk ± m RCs of Fig. 14, it can be noticed that all these controllers have two memory blocks z −N /n cascaded in their OLTF. This fact is one of the causes for the slower transient response in comparison with the nk + m RCs presented in Fig. 14, which have only one memory block z −N /n in their OLTF. This characteristic is also in accordance with the number of PRCs in parallel used to represent each RC scheme; • Among all evaluated strategies, the nk + m RC proposed by Zimann et al. [16] has the shortest settling time and the lowest IAE. However, when considering only the real control strategies, the nk ± m RC proposed by Neto et al. [18] takes this place, making it an attractive solution for single-phase systems, where complex RCs cannot be applied.
Based on the data presented in Table 7, and considering the decomposition of the evaluated RCs into PRCs (Table 4), it is observed that the parameter a of the PRCs indirectly influences the system's response. This happens because increasing a improves the stability characteristics and allows the use of higher repetitive gains, resulting in better steady-state and transient responses. This characteristic is confirmed in the experiments given that the evaluated strategies based on PRCs with a = 1 led to lower THD in the grid currents, lower settling time, lower IAE and lower ITAE than the equivalent controllers with a = 0.5.
In order to illustrate the experimental results summarized in Table 7, Fig. 15 shows the phase-a grid and APF output currents before and after enabling the shunt APF operation. From this figure, it is possible to observe that all implemented RC control systems work properly for the tuned gains, i.e., they are mitigating the harmonic contamination present in the grid currents, as expected

V. CONCLUSION
This paper presents a structure of PRCs in parallel that can be used as basis to evaluate any RC scheme. Since RC schemes can be decomposed into the proposed structure, the analysis of the PRCs parameters allows to fairly compare them. In order to illustrate this feature, nk ± m RCs and nk + m RCs were theoretically evaluated using the proposed unified approach. The comparison takes into account the influence of the number of PRCs in parallel used to represent an RC scheme, and of the parameter a of these PRCs on the stability margins and the bandwidth of the closed-loop control system. Consequently, from the proper choice these parameters, the control system designer can use higher repetitive gains, which leads to better transient and steady-state state performances.
The analysis carried out in this paper may induce the reader to think that the greater the parameter a the better becomes the PRC response. In fact, the better stability characteristics achieved by increasing parameter a up to one allows increasing the RC gain, which resulted in better performance. However, it is expectable that, if the gain is maintained, the controller shows some decrease in performance to justify the stability improvement, particularly if a is further increased beyond one. Thus, an analytical evaluation of the system behavior is still necessary, to establish a trade-off between stability and performance to optimize selection of parameter a and RC gain. This evaluation is of course facilitated by the decomposition of the RC structure into PRCs in parallel. One possible way to carry out the study is using input-output stability analysis for different applications. Through this methodology, it is expected that it will be possible to specify the most suitable parameters for each type of application, which implies selecting the most suitable RC scheme.