# Digital Repetitive Control under Nonuniform Sampling: An LMI Stability Analysis

Authors: Germán A. Ramos; Josep M. Olm; Ramon Costa-Castelló
Journal: Mathematical Problems in Engineering
 (2011)

---

## Abstract

Digital repetitive control is a technique which allows  tracking periodic references and/or rejecting periodic disturbances. Repetitive controllers are usually designed assuming a fixed fundamental frequency for the signals to be tracked/rejected and its main drawback being a dramatic performance decay when this frequency varies. A usual approach to overcome the problem consists of an adaptive change of the sampling period according to the reference/disturbance period variation. This paper presents a stability analysis of a digital repetitive controller working under time-varying sampling period by means of an LMI gridding approach. Theoretical developments are illustrated with experimental results, which are preceded by a detailed description of fundamental issues related to the implementation procedure.


---

## Body

## 1. Introduction

Repetitive control [1, 2] is an internal model principle-based control technique [3] that allows both the tracking and rejection of periodic signals. Essentially, this is achieved including a generator of the reference/disturbance in the control loop. Its use has reported successful results in different control areas, such as CD and disk arm actuators [4], robotics [5], electro-hydraulics [6], electronic rectifiers [7], pulse-width modulated inverters [8, 9], and shunt active power filters [10].It is usual to design repetitive controllers assuming a fixed periodTp for the signals to be tracked/rejected. Then, a fixed sampling period Ts is selected and, eventually, the value of the ratio Tp/Ts is structurally embedded in the control algorithm. However, it is well known that even slight changes in the frequency of the tracked/rejected signals result in a dramatic decay of the controller performance [11].A first set of proposals dealing with this problem maintain the initially selected sampling period, and robustness is achieved by means of large memory elements [11, 12] or introducing a fictitious sampler operating at a variable sampling rate and later using a fixed frequency internal model [13]. Both ideas work well for small frequency variations at the cost of increasing the computational burden.The second approach proposes to adapt the controller sampling rate according to the reference/disturbance period [14–16]. This allows  preserving the steady-state performance while maintaining a low computational cost, but, on the other hand, the original linear time invariant (LTI) system becomes linear time varying (LTV). This structural change requires a new stability study, but no formal proofs regarding this issue are reported in the quoted references.This paper analyzes the stability of a system containing a digital repetitive controller working under time-varying sampling period. The proposed methodology uses a linear matrix inequality (LMI) gridding approach [17, 18] that allows assessing the bounded input-bounded output (BIBO) stability of the closed-loop system in a known, bounded interval where the reference/disturbance period is assumed to vary. The theoretical results are experimentally validated through a mechatronic plant [19]. A detailed description and discussion about fundamental issues related to the implementation procedure is also provided.The structure of the paper is as follows. Section2 contains a brief introduction to digital repetitive control and a study of stability issues in case of constant sampling period. Section 3 analyzes the stability of the system under a time-varying sampling period using LMI techniques. Experimental results are collected in Section 4, while conclusions and further research lines are presented in Section 5.


## 2. Digital Repetitive Control under Constant Sampling Period

Recall that the trigonometric Fourier series expansion of aTp-periodic signal r(t) reads as(2.1)r(t)=a0+∑k=1∞akcos⁡2kπTpt+bksin2kπTpt.
By the Internal Model Principle [3], the inclusion of the generator of signal (2.1) in the control loop results in the tracking/rejection of any Tp-periodic reference/disturbance signal. Hence, following [1], the transfer function of a generator of (2.1) may be written as (2.2)Ĝr(s)=1s∏k=1∞(2kπ/Tp)2s2+(2kπ/Tp)2=Tpe-Tps/21-e-Tps.
However, Tpe-Tps/2 being a delay term with a gain Tp, it is sufficient to include (2.3)G̅r(s)=11-e-Tps
inside the control loop, which can be implemented as e-Tps with a positive feedback, as depicted in Figure 1. Notice that the transfer function (2.2) has poles at s=±jk/Tp, k∈ℕ. Therefore, from a frequency point of view, G̅r(s) exhibits infinite gain at frequencies k/Tp, for all k∈ℕ. This assures zero-tracking error at these frequencies in closed loop if the closed-loop system is stable.Figure 1
Basic structure for a continuous-time repetitive controller.It is also worth mentioning that some studies relate repetitive control to control learning techniques (see, e.g., [1]). This is due to the fact that the basic repetitive structure learns a signal of length Tp and repeats it as a periodic signal of period Tp if the input to the system is set to zero (see Figure 1).The implementation of a time delay in continuous time is a complicated point. Fortunately, in discrete time it is an easier task; if the reference/disturbance signal periodTp is a multiple of the sampling period Ts, the digital implementation is reduced to a circular queue. Therefore, the discrete transfer function that should be included in the loop is(2.4)Gr(z)=z-N1-z-N=1zN-1,
where N=Tp/Ts∈ℕ.In addition to the constraint that represents the demand of a constant ratio betweenTp and Ts, it is important to point out that Ts should be selected taking into account that discrete-time implementations can only deal with those harmonics which are below the Nyquist frequency ωs/2=π/Ts.Repetitive controllers are composed of two main elements: the internal model,Gr(z), and the stabilizing controller, Gx(z). The internal model is the one in charge of guaranteeing null or small error in steady state, while the stabilizing controller assures closed-loop stability. Several types of internal models are used depending on the concrete periodic signal to deal with [19–22]. In this work the generic internal model is used, that is, Gr(z) is indeed taken as(2.5)Gr(z)=H(z)zN-H(z).H(z) plays the role of a low-pass filter in charge of introducing robustness in the high frequency range [23]. Although the internal model and the stabilizing controller can be arranged in different ways, most repetitive controllers are usually implemented in a “plug-in” fashion [20], as depicted in Figure 2: the repetitive compensator is used to augment an existing nominal controller, Gc(z). This nominal compensator is designed to stabilize the plant, Gp(s), and provides disturbance attenuation across a broad frequency spectrum. The signals R(z),D(z) denote, respectively, the z-transforms of the input signal r(t) to be tracked and of the output disturbance d(t) to be rejected.Figure 2
Discrete-time block-diagram of the proposed repetitive transfer function.Assume that bothTp and Ts are constant, which makes N also constant, and let Gp(z) stand for the corresponding z-transform of Gp(s). Sufficient stability criteria are given in the next Proposition.Proposition 2.1.
The closed-loop system of Figure2 is stable if the following conditions are fulfilled [19, 20].(1)
The closed-loop system without the repetitive controller,Go(z), is stable, where
(2.6)Go(z)=Gc(z)Gp(z)1+Gc(z)Gp(z).(2)
∥H(z)∥∞<1.(3)
∥1-Go(z)Gx(z)∥∞<1, where Gx(z) is a design filter to be chosen.Remark 2.2.
These conditions hold for a proper design ofGc(z), H(z), and Gx(z). Namely [19, 20],(i)
it is advisable to design the controllerGc(z) with a high enough robustness margin;(ii)
H(z) is designed to have gain close to 1 in the desired bandwidth and attenuate the gain out of it;(iii)
a trivial structure which is often used forGx(z) in case that Go(z) is minimum phase is [24]:
(2.7)Gx(z)=kr[Go(z)]-1.
Otherwise, alternative techniques should be applied in order to avoid closed-RHS plane zero-pole cancellations [24]. Moreover, there is no problem with the improperness of Gx(z) because the internal model provides the repetitive controller with a high positive relative degree. Finally, as argued in [25], kr must be designed looking for a trade-off between robustness and transient response.


## 3. Digital Repetitive Control under Variable Sampling Period

The repetitive controller introduced in the previous section contains the ratioN=Tp/Ts, which is embedded in the controller implementation. This is not a problem if the reference or disturbance periodic signal has a known constant period. However, the controller performance decays dramatically when a variation of Tp appears [11]. This paper propounds to adapt the controller sampling period Ts following the reference/disturbance period Tp(t), with the aim of maintaining a constant value for N. Hence, on the one hand, Gr(z),Gx(z), and Gc(z) are designed and implemented to provide closed-loop stability for a nominal sampling period Ts=TsN, in accordance with Proposition 2.1 and Remark 2.2. Their structure remains always invariant; that is, it undergoes no further structural changes. On the other hand, the period of the sampler device that precedes the plant Gp(s) is accommodated to the variation of Tp(t); therefore, its discrete-time representation is that of a LTV system.Remark 3.1.
The above described operation may yield major changes in the dynamic response of the system. As an example, consider that the plantGp(s) in Figure 2 is
(3.1)Gp(s)=-4.625⋅10-10s3-5.891⋅10-5s2+1.071s+36.671.067⋅10-9s4+2.394⋅10-6s3+7.672⋅10-4s2+0.2185s+1.983.
Let the repetitive controller be constructed assuming N=25 and a reference/disturbance nominal period Tp=0.125 s, this yielding a nominal sampling period of TsN=Tp/N=0.005 s. Let also Gc(z), H(z), and Gx(z) be selected as indicated in Section 4.2. Then, the sufficient stability conditions established in Proposition 2.1 for the nominal sampling period TsN are fulfilled. Figure 3 depicts the maximum modulus eigenvalue of the closed-loop system matrix as a function of Ts in a neighborhood of TsN. This information allows  stating that instability is ensured for Ts∉[4.461,5.543] ms.Figure 3
Maximum modulus eigenvalue of the closed-loop system matrix.The above discussion indicates that, although the proposed technique allows adapting the system to the specific signal frequency to be tracked/rejected without changing the digital controller, the sampling rate change may affect closed-loop stability. In what follows, an LMI-based approach to study closed-loop stability under varying sampling rate condition is developed.Regarding the time-varying nature of the sampling period of the plant, the stability analysis is carried out in the state-space formalism. Let(Ã,B̃,C̃,D̃) represent the continuous-time plant state-space representation, that is, (3.2)Gp(s)=C̃(sI-Ã)-1B̃+D̃.
Assume that Gp(s) is sampled at {t0,t1,…,tk,…}, with t0=0 and tk+1>tk, the sampling periods being Tk=tk+1-tk. Let also xk≜x(tk),uk≜u(tk),yk≜y(tk),A̅k=A̅(Tk),B̅k=B̅(Tk),C̅=C̃ and D̅=D̃, where (3.3)A̅(T)≜eÃT,B̅(T)≜∫0TeÃτB̃dτ.
Therefore, the plant evolution at the sampling instants is given by the discrete-time LTV system: (3.4)xk+1=A̅kxk+B̅kuk,yk=C̅xk+D̅uk.
In case that Tk remains constant, i.e., Ti=Tj, for all i≠j, system (3.4) corresponds to a discrete-time LTI system with z-transform transfer function Gp(z)=C̅(z𝕀-A̅)-1B̅+D̅. In an aperiodic sampling framework A̅k and B̅k vary with k, and the z-transform representation is no longer valid.Similarly, under varying sampling period, the closed-loop system depicted in Figure2 can be described in state space by a quadruple (Ak,Bk,C,D), which may be constructed combining (A̅k,B̅k,C̅,D̅) and the state-space representations of Gr(z), Gx(z), and Gc(z). Thus, C and D are constant matrices, while Ak and Bk depend continuously on Tk. A methodology for studying the closed-loop system under time-varying sampling conditions will be introduced in the rest of this section.Let the sampling period,Tk, take values in a known compact subset 𝒯=[T0,TF]⊂ℝ+.Proposition 3.2.
The uniform exponential stability of the zero stateε=0 of εk+1=Akεk implies the uniform BIBO stability of the system (Ak,Bk,C,D).Proof.
According to [26], the result follows if Bk, C, and D are uniformly bounded matrices, for all k, and this is indeed true: Bk depends continuously on Tk, which belongs to a compact set 𝒯, while C,D are constant matrices.The preceding result allows reducing the stability analysis of(Ak,Bk,C,D) to that of the zero state of εk+1=Akεk.Let us define(3.5)LTk(P)=Ak⊤PAk-P.Proposition 3.3 (see [26]).
If there exists a matrixP such that
(3.6)LTk(P)≤-αI,∀Tk∈T,s.t.P>0,P=P⊤,
where α∈ℝ+, then the zero state of εk+1=Akεk is uniformly exponentially stable.At this point, it is immediate to realize that relation (3.6) in Proposition 3.3 yields an infinite set of LMIs. The gridding approach introduced in [17, 18] allows a simplified stability analysis that may be performed in two stages, if necessary.In a first stage, advantage is taken from the fact that(AN,BN,C,D), corresponding to (Ak,Bk,C,D) evaluated in Tk=TsN, is stable by construction, because recall that Gr(z),Gx(z), and Gc(z) are designed with such purpose.Proposition 3.4.
Assume that the stability conditions of Proposition2.1 are satisfied for a nominal sampling period TsN∈𝒯. Then, (1)
the zero state of the LTI systemεk+1=ANεk is uniformly exponentially stable,(2)
the LMI problem(3.7)LTsN(P)≤-αI,s.t.P>0,P=P⊤,
with α∈ℝ+, is feasible,(3)
letP=PN be a solution of the LMI problem (3.7) for a fixed α∈ℝ+. Then, there exists an open neighborhood of TsN, say ℐ𝒩, such that (Ak,Bk,C,D) is BIBO stable in ℐ𝒩.Proof.
It follows from the stability hypothesis that all the eigenvalues ofAN have modulus less than 1, which yields immediately item 1 [26]. Item 2 stems from the fact that the sufficient condition for uniform exponential stability established in Proposition 3.3 is also necessary for a discrete-time LTI system. Finally, item 3 follows immediately from Propositions 3.2 and 3.3 once the continuity of the matrix elements of Ak with respect to Tk is taken into account.Assume that we are interested in analyzing the stability of(Ak,Bk,C,D) for all sampling periods Tk∈𝒯. Let then P=PN be a feasible solution of the LMI problem (3.7) for a fixed α∈ℝ+; its existence is guaranteed by Proposition 3.4. Let also {τ0,…,τq}, with τi+1>τi, be a sufficiently fine grid of 𝒯. If Lτi(PN)<0, for all i=0,…,q, stability for all Tk∈𝒯 may be probably inferred.Otherwise, in case that there exists at least a singleτi such that Lτi(PN)>-α𝕀, the gridding procedure proposed in [18] may be carried out as follows. Let {τ0,…,τr}  be a sorted set of candidate sampling periods suitably distributed in 𝒯. Then, one may solve the following finite set of LMIs:(3.8)Lτi(P)≤-αI,i=0,…,r,s.t.P>0,P=P⊤,
for a fixed α∈ℝ+. In case that the problem is feasible and a solution, P=PG, is encountered, the negative semidefinite character of LTk(PG) is to be checked for intermediate values of Tk in each open subinterval (τi,τi+1). If this fails to be accomplished, (3.8) has to be solved again for a finer grid of 𝒯.Remark 3.5.
The application of the procedures to the plant introduced in Remark3.1 yields the following results. The evolution of the maximum modulus eigenvalue of LTk(PN),PN being the solution of (3.7) for α=100, is depicted in Figure 4. Hence, BIBO stability is ensured in ℐN=[4.996,5.004] ms. Alternatively, the approach that stems from (3.8) guarantees stability in 𝒯=[4.60,5.45] ms; this interval is computed by successive extensions of an initial 𝒯0 containing TsN until (3.8), with α=100, becomes definitely unfeasible.Figure 4
Maximum eigenvalue of (1)LTk(PN) with α=100 and TsN=0.005 s; (2) LTk(PG) with 50 points in the range [4.60,5.45] ms. The plots have been rescaled to allow a better comparison between (1) and (2).Remark 3.6.
Notice that(i)
comparatively, in the first approach a shorter stability radius may be reasonably expected;(ii)
the main drawback of both analysis paths is associated with the fact that stability is rigorously guaranteed just in open neighborhoods of each sampling periodτi where either Lτi(PN)<0 or Lτi(PG)<0 are satisfied;(iii)
the applicability of the above developed method to large scale or very high order systems is subject to the limitations of the numerical algorithms used to solve the LMI problems (3.7) or (3.8);(iv)
a faulty estimation ofTp and/or an error in the implementation of Ts may yield important performance degradation [11]. However, closed-loop BIBO stability is not threatened unless the plant is actually sampled with Ts values lying outside the region 𝒯 where stability is guaranteed.


## 4. Experimental Setup and Results

### 4.1. Plant Description

Systems with rotary elements are usually affected by periodic disturbances due  to the movement of these parts (e.g., electrical machines, CD players…). This kind of system is supposed to be moving, in some cases, at a fixed angular speed. Under these working conditions any friction, unbalance, or asymmetry appearing on the system generates a periodic disturbance that affects its dynamical behavior. Reference [19] contains a description of a mechatronic plant designed to reproduce this working conditions. This device is composed of a bar holding a permanent magnet in each end, each magnet being magnetically oriented in the opposite way, and attached to a DC motor and two fixed permanent magnets (see a sketch in Figure 5). The rotation of the DC motor causes a pulsating load torque (Γp) that depends on the mechanical angle θ of the motor axis. When the motor axis angular speed ω is constant (θ̈=ω̇=0), the pulsating torque is a periodic signal with a fundamental period directly related to the axis speed: Tp=ω-1, with ω expressed in rev/s. The control goal for this plant is maintaining the motor axis angular speed constant at a desired value. However, this type of disturbances may not be completely rejected by a regular controller, so a repetitive controller is designed in next subsection.Figure 5
Mechanical load: fixed and moving permanent magnets sketch (ω and Γp stand for the angular speed and the disturbance torque, resp.).Figure6 also shows the open-loop time response of the plant containing the fixed magnets. It is important to note that the speed describes an almost periodic signal. This type of disturbances may not be completely rejected by a regular controller, so a repetitive controller is designed in next subsection.Figure 6
Open-loop time response of the plant with the fixed magnets.Finally, it is worth mentioning that in this experimental setup the disturbance could be written as a nonlinear part of the system, and therefore nonlinear control techniques should be used instead of repetitive control. An interesting application of this procedure to speed control of mechatronic systems is reported in [27]. However, for the present case this would require the use of complex models and, consequently, of complex nonlinear controllers which in general might not provide the same performance. Hence, we proceed assuming unmodeled or uncertainty components as disturbances, which is quite common in control theory and, at the same time, allows the use of repetitive control in this problem.


### 4.2. Control Design

A first-order model for the plant is experimentally derived from its open-loop time response without the fixed magnets, namely,(4.1)Gp(s)=8.7620.10667s+1rev/sV.
The controller is constructed from (4.1), for a speed of ω=8 rev/s and obtaining 25 samples per period, that is, N=25. These conditions imply a nominal sampling period of TsN=Tp/N=1(ωN)=5 ms. Under these assumptions the nominal discrete time plant is(4.2)Gp(z)=0.4012z-0.9542.
According to Remark 2.2, the following design issues have been taken into account:  (i)
Gc(z)=0.25 provides a very robust inner loop,(ii)
the first order null-phase FIR filterH(z)=0.02z+0.96+0.02z-1 provides good performance in this case,(iii)
the fact thatGp(z) is minimum phase allows Gx(z)=krGo-1(z), with kr=0.3.These settings yield the control law(4.3)uk=0.25ek+0.015ek-23+0.70ek-24-0.84ek-25-0.018ek-26+0.02uk-24+0.96uk-25+0.02uk-26,
with ek=rk-yk, where yk is the system output (speed) and rk is the reference.


### 4.3. Stability Analysis

Although the controller is designed to regulate the speed at 8 rev/s, in practice it will be necessary to move from this design point. Let us assume that we are interested in varying the speed reference in the interval[6,11] rev/s; this entails a sampling period variation in the interval 𝒯=[0.00363,0.00666] s.The stability analysis that stems from Proposition3.4 includes the solution of the LMI (3.7), which is known to be feasible, and the checking of the negative definite character of LTk(PN). Figure 7 shows the evolution of the maximum modulus eigenvalue of LTk(PN) when solving for α=100 and also for 50000 uniformly distributed values of Tk. Therefore, it can be presumed that the closed-loop system may operate in a speed range of [7.32,8.77] rev/s with dynamically preserved stability. This speed interval is obviously very narrow and operation conditions are limited to a sampling period interval ℐN such that 𝒯⊈ℐN. However, it is important to recall that this test comes not from a necessary condition but from a sufficient condition, so moving out of this interval does not necessarily imply instability (although this step can be avoidable in most cases, its results are very useful to tune the LMI solver regarding next step).Figure 7
Maximum eigenvalue of (1)LTk(PN) with α=100 and TsN=0.005 s; (2) LTk(PG) with 50 points in the range [6,11] rev/s. The plots have been rescaled to allow a better comparison between (1) and (2).In order to guarantee a broader stability interval, the second method described in Section3 may be applied. Therefore, 50 uniformly distributed points are selected in 𝒯=[0.00363,0.00666] s. These points are used to construct the set of LMIs (3.8), and a feasible solution P=PG with α=100 is obtained. Figure 7 depicts the maximum modulus eigenvalue of LTk(PG), designating with a star the 50 points leading to the LMI formulation. The maximum modulus eigenvalue of LTk(PG) corresponding to a finer grid consisting of 50000 uniformly distributed point are also drawn in Figure 7. These points are used to check the sign of LTk(PG) in the intervals between the points defining the LMI set. It can be seen that LTk(PG)<0 for every point in this finer grid of the interval 𝒯; hence, stability is dynamically preserved therein. This method extends the previously obtained stability interval [7.32,8.77] rev/s, thus providing less conservative results. Further extensions of the new interval could also be feasible.


### 4.4. Implementation Issues

The first issue to deal with in the implementation of the control action is the measurement of the uncertain or time-varying periodTp of the signal to be tracked/rejected. In the general case an adaptive scheme similar to those in [13, 15, 16] is used for this task; the complete controller architecture is depicted in Figure 8. The frequency values, Tp-1(t), are obtained by means of a frequency observer using information from different sources, namely, reference profile, output signal, and control action. Then, the sampling rate is calculated as Ts(t)=Tp(t)/N.Figure 8
Complete controller architecture.Nevertheless, as it has been previously stated, in mechanical turning systems the frequency to be tracked/rejected is directly related to the turning speed. Hence, for the analyzed mechatronic plant the disturbance frequency is straightforwardly computed from the turning speed reference. This allows us to study the effect of the adaptive approach on the closed-loop system decoupled from the frequency observer dynamics.For the general case, the study of the effect of the frequency observer dynamics on the global system stability is out of the scope of this paper. However, it is also worth recalling that any fault in the estimation and/or implementation ofTs causes a difference between the experimental ratio Tp/Ts and the implemented value for N which, in turn, may yield a performance degradation. As an example, Figure 9 shows the first harmonic gain factor evolution of the internal model against a relative deviation of the real sampling period Tsreal with respect to the nominal TsN=5 ms, namely, (4.4)|Gr(exp⁡[j(2π/N(1+ΔTs)TsN)TsN])||Gr(exp⁡[j(2π/NTsN)TsN])|=|Gr(e2πj/N(1+ΔTs))||Gr(e2πj/N)|,
where Gr(·) is defined in (2.5) and (4.5)ΔTs=Tsreal-TsNTsN.
Notice that even small deviations of Tsreal entail important gain reductions. However, as stated in Remark 3.6(iv), closed-loop stability is not threatened unless Tsreal∉𝒯.Figure 9
First harmonic gain factor evolution at harmonic frequencies.Finally, and also in accordance with Remark3.6(iv), the frequency observer output has to be saturated so as to guarantee that Ts∈𝒯.The controllers have been implemented using RTLinuxFree-3.1, a real-time operating system (RTOS). This RTOS allows programing using standard POSIX system calls [28] with the user interface of a GNU/Linux Operating System (kernel 2.6.9). The controllers are encoded in C language, while periodic task handling has been implemented using RTLinuxFree capabilities.The actuator is composed of a Johnson Electric HC615L (20 W, 5 A) DC motor, a full-bridge inverter (LMD18200, 3 A full-bridge) and pulse width modulation (PWM) hardware, included in a NuDQ PCI8133 board. The speed sensor is composed of a 500 pulse-per-revolution optical encoder Hewlett-Packard H9730A, a quadrature decoder and a counter, all of them are included in a NuDQ PCI8133 board. The interface between the controller real-time task and the NuDQ PCI8133 board has been implemented using low level commands.


### 4.5. Experimental Results

The reference profile used in the experimentation is the following. During the time interval[0,10] s, the reference is maintained constant at the nominal value of ω̅=8 rev/s. At t=10 s a ramp reference change, from ω=8 rev/s to ω=6.25 rev/s, is introduced in the system; then, the speed is kept constant for 10 s and finally at t=25 s the speed is gradually augmented at a constant acceleration until it reaches the value ω=10.81 rev/s at t=32 s.The experiment has been carried out for three different settings of the sampling time. In Figure10(a) the sampling period is kept constant at the nominal value TsN=5 ms, for all t; it is important to realize that, in comparison to the uncompensated speed profile depicted in Figure 6, now disturbances are almost rejected in [0,10], that is, when both reference and sampling are at the nominal values. However, for t>10 s disturbances cannot be properly compensated, and performance is strongly degraded. Figure 10(b) depicts the output behavior when the sampling period is varied adaptively assuming that the estimation of Tp uses a 2nd order frequency observer; the profile of the actually used Ts is in Figure 11. Notice that the performance gets worse in the regions where there is estimation error. Finally, Figure 10(c) portrays the response under adaptive variation of Ts from an exact estimation of Tp. According to Sections 4.3 and 4.4, stability is preserved in the three situations because Ts always belongs to 𝒯. Performance in the steady-state depends on the accuracy of the estimation of Tp, while performance during transients, although not guaranteed by repetitive control theory, follows here the same pattern as that observed for the steady state; that is, it improves with better estimations of Tp.Closed-loop system behavior using a repetitive controller and with sampling periodTs. (a) Fixed at the nominal value (TsN=5 ms); (b) obtained from a 2nd order frequency observer for Tp; (c) obtained from an exact estimation of Tp.
(a)(b)(c)Figure 11
Sampling periodTs corresponding to an exact (blue) and a 2nd order (green) observer for Tp.


## 4.1. Plant Description

Systems with rotary elements are usually affected by periodic disturbances due  to the movement of these parts (e.g., electrical machines, CD players…). This kind of system is supposed to be moving, in some cases, at a fixed angular speed. Under these working conditions any friction, unbalance, or asymmetry appearing on the system generates a periodic disturbance that affects its dynamical behavior. Reference [19] contains a description of a mechatronic plant designed to reproduce this working conditions. This device is composed of a bar holding a permanent magnet in each end, each magnet being magnetically oriented in the opposite way, and attached to a DC motor and two fixed permanent magnets (see a sketch in Figure 5). The rotation of the DC motor causes a pulsating load torque (Γp) that depends on the mechanical angle θ of the motor axis. When the motor axis angular speed ω is constant (θ̈=ω̇=0), the pulsating torque is a periodic signal with a fundamental period directly related to the axis speed: Tp=ω-1, with ω expressed in rev/s. The control goal for this plant is maintaining the motor axis angular speed constant at a desired value. However, this type of disturbances may not be completely rejected by a regular controller, so a repetitive controller is designed in next subsection.Figure 5
Mechanical load: fixed and moving permanent magnets sketch (ω and Γp stand for the angular speed and the disturbance torque, resp.).Figure6 also shows the open-loop time response of the plant containing the fixed magnets. It is important to note that the speed describes an almost periodic signal. This type of disturbances may not be completely rejected by a regular controller, so a repetitive controller is designed in next subsection.Figure 6
Open-loop time response of the plant with the fixed magnets.Finally, it is worth mentioning that in this experimental setup the disturbance could be written as a nonlinear part of the system, and therefore nonlinear control techniques should be used instead of repetitive control. An interesting application of this procedure to speed control of mechatronic systems is reported in [27]. However, for the present case this would require the use of complex models and, consequently, of complex nonlinear controllers which in general might not provide the same performance. Hence, we proceed assuming unmodeled or uncertainty components as disturbances, which is quite common in control theory and, at the same time, allows the use of repetitive control in this problem.


## 4.2. Control Design

A first-order model for the plant is experimentally derived from its open-loop time response without the fixed magnets, namely,(4.1)Gp(s)=8.7620.10667s+1rev/sV.
The controller is constructed from (4.1), for a speed of ω=8 rev/s and obtaining 25 samples per period, that is, N=25. These conditions imply a nominal sampling period of TsN=Tp/N=1(ωN)=5 ms. Under these assumptions the nominal discrete time plant is(4.2)Gp(z)=0.4012z-0.9542.
According to Remark 2.2, the following design issues have been taken into account:  (i)
Gc(z)=0.25 provides a very robust inner loop,(ii)
the first order null-phase FIR filterH(z)=0.02z+0.96+0.02z-1 provides good performance in this case,(iii)
the fact thatGp(z) is minimum phase allows Gx(z)=krGo-1(z), with kr=0.3.These settings yield the control law(4.3)uk=0.25ek+0.015ek-23+0.70ek-24-0.84ek-25-0.018ek-26+0.02uk-24+0.96uk-25+0.02uk-26,
with ek=rk-yk, where yk is the system output (speed) and rk is the reference.


## 4.3. Stability Analysis

Although the controller is designed to regulate the speed at 8 rev/s, in practice it will be necessary to move from this design point. Let us assume that we are interested in varying the speed reference in the interval[6,11] rev/s; this entails a sampling period variation in the interval 𝒯=[0.00363,0.00666] s.The stability analysis that stems from Proposition3.4 includes the solution of the LMI (3.7), which is known to be feasible, and the checking of the negative definite character of LTk(PN). Figure 7 shows the evolution of the maximum modulus eigenvalue of LTk(PN) when solving for α=100 and also for 50000 uniformly distributed values of Tk. Therefore, it can be presumed that the closed-loop system may operate in a speed range of [7.32,8.77] rev/s with dynamically preserved stability. This speed interval is obviously very narrow and operation conditions are limited to a sampling period interval ℐN such that 𝒯⊈ℐN. However, it is important to recall that this test comes not from a necessary condition but from a sufficient condition, so moving out of this interval does not necessarily imply instability (although this step can be avoidable in most cases, its results are very useful to tune the LMI solver regarding next step).Figure 7
Maximum eigenvalue of (1)LTk(PN) with α=100 and TsN=0.005 s; (2) LTk(PG) with 50 points in the range [6,11] rev/s. The plots have been rescaled to allow a better comparison between (1) and (2).In order to guarantee a broader stability interval, the second method described in Section3 may be applied. Therefore, 50 uniformly distributed points are selected in 𝒯=[0.00363,0.00666] s. These points are used to construct the set of LMIs (3.8), and a feasible solution P=PG with α=100 is obtained. Figure 7 depicts the maximum modulus eigenvalue of LTk(PG), designating with a star the 50 points leading to the LMI formulation. The maximum modulus eigenvalue of LTk(PG) corresponding to a finer grid consisting of 50000 uniformly distributed point are also drawn in Figure 7. These points are used to check the sign of LTk(PG) in the intervals between the points defining the LMI set. It can be seen that LTk(PG)<0 for every point in this finer grid of the interval 𝒯; hence, stability is dynamically preserved therein. This method extends the previously obtained stability interval [7.32,8.77] rev/s, thus providing less conservative results. Further extensions of the new interval could also be feasible.


## 4.4. Implementation Issues

The first issue to deal with in the implementation of the control action is the measurement of the uncertain or time-varying periodTp of the signal to be tracked/rejected. In the general case an adaptive scheme similar to those in [13, 15, 16] is used for this task; the complete controller architecture is depicted in Figure 8. The frequency values, Tp-1(t), are obtained by means of a frequency observer using information from different sources, namely, reference profile, output signal, and control action. Then, the sampling rate is calculated as Ts(t)=Tp(t)/N.Figure 8
Complete controller architecture.Nevertheless, as it has been previously stated, in mechanical turning systems the frequency to be tracked/rejected is directly related to the turning speed. Hence, for the analyzed mechatronic plant the disturbance frequency is straightforwardly computed from the turning speed reference. This allows us to study the effect of the adaptive approach on the closed-loop system decoupled from the frequency observer dynamics.For the general case, the study of the effect of the frequency observer dynamics on the global system stability is out of the scope of this paper. However, it is also worth recalling that any fault in the estimation and/or implementation ofTs causes a difference between the experimental ratio Tp/Ts and the implemented value for N which, in turn, may yield a performance degradation. As an example, Figure 9 shows the first harmonic gain factor evolution of the internal model against a relative deviation of the real sampling period Tsreal with respect to the nominal TsN=5 ms, namely, (4.4)|Gr(exp⁡[j(2π/N(1+ΔTs)TsN)TsN])||Gr(exp⁡[j(2π/NTsN)TsN])|=|Gr(e2πj/N(1+ΔTs))||Gr(e2πj/N)|,
where Gr(·) is defined in (2.5) and (4.5)ΔTs=Tsreal-TsNTsN.
Notice that even small deviations of Tsreal entail important gain reductions. However, as stated in Remark 3.6(iv), closed-loop stability is not threatened unless Tsreal∉𝒯.Figure 9
First harmonic gain factor evolution at harmonic frequencies.Finally, and also in accordance with Remark3.6(iv), the frequency observer output has to be saturated so as to guarantee that Ts∈𝒯.The controllers have been implemented using RTLinuxFree-3.1, a real-time operating system (RTOS). This RTOS allows programing using standard POSIX system calls [28] with the user interface of a GNU/Linux Operating System (kernel 2.6.9). The controllers are encoded in C language, while periodic task handling has been implemented using RTLinuxFree capabilities.The actuator is composed of a Johnson Electric HC615L (20 W, 5 A) DC motor, a full-bridge inverter (LMD18200, 3 A full-bridge) and pulse width modulation (PWM) hardware, included in a NuDQ PCI8133 board. The speed sensor is composed of a 500 pulse-per-revolution optical encoder Hewlett-Packard H9730A, a quadrature decoder and a counter, all of them are included in a NuDQ PCI8133 board. The interface between the controller real-time task and the NuDQ PCI8133 board has been implemented using low level commands.


## 4.5. Experimental Results

The reference profile used in the experimentation is the following. During the time interval[0,10] s, the reference is maintained constant at the nominal value of ω̅=8 rev/s. At t=10 s a ramp reference change, from ω=8 rev/s to ω=6.25 rev/s, is introduced in the system; then, the speed is kept constant for 10 s and finally at t=25 s the speed is gradually augmented at a constant acceleration until it reaches the value ω=10.81 rev/s at t=32 s.The experiment has been carried out for three different settings of the sampling time. In Figure10(a) the sampling period is kept constant at the nominal value TsN=5 ms, for all t; it is important to realize that, in comparison to the uncompensated speed profile depicted in Figure 6, now disturbances are almost rejected in [0,10], that is, when both reference and sampling are at the nominal values. However, for t>10 s disturbances cannot be properly compensated, and performance is strongly degraded. Figure 10(b) depicts the output behavior when the sampling period is varied adaptively assuming that the estimation of Tp uses a 2nd order frequency observer; the profile of the actually used Ts is in Figure 11. Notice that the performance gets worse in the regions where there is estimation error. Finally, Figure 10(c) portrays the response under adaptive variation of Ts from an exact estimation of Tp. According to Sections 4.3 and 4.4, stability is preserved in the three situations because Ts always belongs to 𝒯. Performance in the steady-state depends on the accuracy of the estimation of Tp, while performance during transients, although not guaranteed by repetitive control theory, follows here the same pattern as that observed for the steady state; that is, it improves with better estimations of Tp.Closed-loop system behavior using a repetitive controller and with sampling periodTs. (a) Fixed at the nominal value (TsN=5 ms); (b) obtained from a 2nd order frequency observer for Tp; (c) obtained from an exact estimation of Tp.
(a)(b)(c)Figure 11
Sampling periodTs corresponding to an exact (blue) and a 2nd order (green) observer for Tp.


## 5. Conclusions

This paper analyzed the BIBO stability of a closed-loop system containing a digital repetitive controller working under time-varying sampling period. The analysis was carried out using an LMI gridding approach that allows a stability assessment in a known, bounded interval where the reference/disturbance period is assumed to vary. The theoretically predicted results have been experimentally validated through a mechatronic plant in which rejection of periodic disturbances with time-varying period is successfully achieved. A detailed description of fundamental issues related to the implementation procedure has been provided.Current research is being devoted to develop redesign methodologies to address the situations in which the sampling periodTs falls out of the stability interval 𝒯.



---

*Source: 120570-2011-08-29.xml*