Feedforward Tracking Control of Flat Recurrent Fuzzy Systems

Flatness based feedforward control has proven to be a feasible solution for the problem of tracking control, which may be applied to a broad class of nonlinear systems. If a flat output of the system is known, the control is often based on a feedforward controller generating a nominal input in combination with a linear controller stabilizing the linearized error dynamics around the trajectory. We show in this paper that the very same idea may be incorporated for tracking control of MIMO recurrent fuzzy systems. Their dynamics is given by means of linguistic differential equations but may be converted into a hybrid system representation, which then serves as the basis for controller synthesis.


Introduction
The synthesis of controllers is usually based on a known model, which is assumed to sufficiently describe the dynamics of the process that is to be controlled. If only rough expert knowledge or measurement data is available, gray box models based on fuzzy logic are a way to derive an approximate model. Although some methods are known that attempt to control the process without any model (see, e.g., [3,9,14]), it is generally preferable to exploit existing rough process knowledge for controller synthesis.
In particular, Recurrent Fuzzy Systems [1,15] represent the system dynamics approximately by means of linguistic rules, in which the conclusion part consists of the state derivative being described simply as a constant. Thus, Recurrent Fuzzy Systems may also be interpreted as zeroth-order Takagi-Sugeno fuzzy systems. In contrast to the more general Takagi-Sugeno fuzzy systems, the main benefit of Recurrent Fuzzy Systems relies on the possible linguistic interpretability of the rules obtained. Having obtained a recurrent fuzzy system, the question arises on how to control this particular system class. In [11,12] it was shown how to derive stabilizing feedback for these dynamic fuzzy systems by means of static fuzzy control or switching polynomial controllers for known equilibria.
This paper now addresses the question of tracking control for Recurrent Fuzzy Systems. In the last two decades, the tracking control problem was answered for the broad class of (differentially) flat nonlinear systems [10] in a multitude of works (see, e.g., [4,8,13,22]). See also [18][19][20] for applications of flatness-based control.
Since it is well known [20], that utilizing an exact linearizing feedback controller may cause severe problems in the presence of model uncertainties, a common approach is to exploit the flatness property to obtain a nominal feedforward control from the inverse system combined with a linear controller for the error system linearized around the trajectory.
In this paper, we show that this approach is general enough to solve the tracking control problem for flat Recurrent Fuzzy Systems as well, whereas for brevity we restrict our attention to square MIMO systems. In a first step, a switched nonlinear system is obtained from the given rule base of the recurrent fuzzy system. By applying a dynamic transformation, this switched nonlinear system is then rendered input-affine, such that feedforward control can be applied locally. By linearizing the error dynamics around the trajectory, a simple PID controller then controls small perturbations around the trajectory as well as model uncertainties, which naturally arise due to the approximate nature of Recurrent Fuzzy Systems.
The benefit of the proposed method clearly is in the analytic derivation of the inverse system, which is then used for generation of the feedforward control signal. This is in contrast to the system class of Piecewise Bilinear Models, where tracking control is usually based on learning techniques for the inverse system [6,7] and hence, there is no guarantee beforehand that the inverse system exists. On the other hand, the method proposed in this paper can similarly be applied to Piecewise Bilinear Models as well.
The remainder is organized as follows: In Sec. 2, basic definitions for Recurrent Fuzzy Systems are reviewed roughly, and a dynamic transformation for decoupling of the inputs is given. Sec. 3 then reviews well-known results from flat systems in the light of Recurrent Fuzzy Systems. The flatness property is then used in Sec. 4 for trajectory generation and synthesis of the feedforward control, whereas Sec. 5 describes the additional PID control for stabilization of the error dynamics. A numerical example is given in Sec. 6 and concluding remarks in Sec. 7.

Recurrent Fuzzy Systems
This section briefly revisits the definition of Recurrent Fuzzy Systems (RFS) as detailed in [15] and [1]. Its block diagram is depicted in Fig. 1, with dynamic function f (x, u) and output function g(x) being static fuzzy systems defined in the input-state space Z = X × U, X = R n , U ⊂ R m with u ∈ [u min , u max ]. The output function g(x) is assumed not to contain feedthrough and is thus defined over the state space only. The output values are bounded to [y min , y max ].
f (x, u) g(x) uẋ x y Each linguistic rule of the complete rule base describing the system dynamics is of the form with L x j , L u q denoting vectors of linguistic values in the state and input space. Similarly, Lẋ w(j,q) denotes vectors of linguistic values describing gradients quantitatively. For the output function, similar rules of the form are obtained.  In order to transfer the linguistic rules into a numerical representation, core position vectors s x j ∈ [x min , x max ], s u q ∈ [u min , u max ], s y j ∈ [y min , y max ] and core position gradients sẋ w ∈ R n are associated with the linguistic vectors. For simplicity, the sets of core position vectors s x j of the dynamic function f (x, u) and those of the output function g(x) are assumed to be identical. This assumption is rather mild, since an RFS with different sets can always be converted into one with identical sets by an augmentation of the respective grids.
Clearly, the rule base defines gradients at discrete grid points (s x j , s u q ), which is also visualized in Fig. 2. It becomes obvious, that the core position vectors induce a rectangular grid in Z. The interpolation region of core position vectors being adjacent to a vector (x, u) ∈ Z is termed hypersquare, denoted H l . Therein, l = (j, q) consist of the indices of the lower core positions. Note, that l might therefore index a single core position s l or a hypersquare H l .
In order to obtain real-valued dynamic and output functions in the entire input-state space, membership functions µ x i j i (x i ), µ up qp (u p ) are introduced, assigning to states and inputs a degree of membership to linguistic values with associated core positions s x i j i , s up qp . Having thereby fuzzified states and inputs, the algebraic product is used for aggregation and implication, the simple sum for accumulation of the single rules, and the center of singleton method for defuzzification [2]. Thus, the representationẋ is obtained for the state derivative (and output), which is a weighted summation over all core position gradients (or core position outputs, respectively). The weighting by the premise is the product of memberships in every dimension. If for membership functions µ x i j i , µ up qp of states and inputs, triangular and ramp shaped functions are assumed, i.e.
then the dynamics (3a) evaluates to the product of piecewise affine functions, which can be for every H l . By rearranging terms,ẋ is obtained, with the vector of monomials in the inputs u p being denoted as Z(u) = Obviously, the system dynamics of an RFS with m > 1 are not input affine, which is disadvantageous for the controller synthesis. Nevertheless, with the following dynamic transformation, an equivalent input-affine dynamics can be achieved: First, the system input is augmented by an integrator, such that inputs v ∈ R m ,u = v are obtained. Introducing new state variables w = Z(u), the differential equations of these new states then readẇ Thus, the state space equations of the prolonged system read Therefore, the following considers without loss of generality the input-affine dynamicṡ for each interpolation region H l .

Further notations
Throughout the paper, we use the standard notation rank {M} for the rank of a matrix and ∂x i a i , a Lie derivative of a function f regarding a is denoted. Eigenvalues are denoted by λ ∈ C. Usually, hypersquares H l and core position vectors s x j , s u q are indexed by an integer vector l corresponding to a grid position. If ambiguity is excluded, sometimes a scalar index notation H i , H j is used for enumeration of different hypersquares and core positions.

Flatness Property of RFS
In the following, we briefly review the property of (differential) flatness, which is detailed in length, e.g., in [10,13]. Nevertheless, the description is carried out from the perspective of RFS.
exists, such that The RFS is globally (differentially) flat, iff it is locally flat for every H l ∈ H. Often, the flat outputs z are incident with the measured outputs y. For the order of the derivatives β p in (11), it holds in general that m p=1 β p ≥ n. As noted in [21], for m p=1 β p = n it is always possible to transform the system dynamics (locally) into a linear form by means of static state feedback. Furthermore, in this case z = ϕ l (x), i.e., the flat outputs are not dependent on the input or its derivatives. Also, flatness is then directly related to observability of the system's states via the flat outputs z i and in contrast to the case m p=1 β p > n, observability is not dependent on the input signal.
For simplicity, the following therefore considers the case m p=1 β p = n. Then, by local change of coordinates (6) is diffeomorphic to the controller normal forṁ Therein, δ l,p denotes the local vector relative degree regarding the p-th output, defined by which has to hold for all x ∈ H l . The local vector relative degree δ l = [δ 1 , . . . , δ m ] T then combines all m relative degrees. By letting α l,i (ξ, u) = v i , (6) is equivalent to a system in MIMO Brunovský formξ as shown in [13]. Furthermore and according to [17], if rank {A l } = m holds for the matrix then a static state feedback may be applied to (6), such that it is input-output decoupled.

Inverse System and Feedforward Control
According to (11), state and input can be reconstructed from the flat outputs and a finite number of their derivatives. Under the assumption that initial conditions are consistent with the system, e.g., the nominal control u d (t) may be computed from (11b) given a sufficiently smooth trajectory z d (t).
Due to the piecewise definition of the system dynamics (9), direct computation of (11b) is not possible, since ψ u l is implicit due to the dependence of l on x and u. To circumvent this problem, the inverse system as shown in Fig. 3 continuously reconstructs the current hypersquare H l by means of l = σ(x d , u d ). Within the closed-loop, the nominal input u d is then reconstructed from the nominal trajectory z d and the states x d . An alternative would be to obtain necessary derivatives of z d from the trajectory generator, or calculation of the derivatives, which is always difficult in the presence of noise.
In addition, the system depicted in Fig. 3 is diffeomorphic to a linear system, thus its eigenvalues can be chosen arbitrarily stable. To see this, consider from (13)   . . .
If for every H l , (16) is invertible, then global input-output decoupling and tracking is achieved by means of the control law Therein, either v i = z   are stable and v is set such that g l (x d ) = z d . While the first choice allows in theory for the exact tracking of z d , fast changes of the nominal trajectory may cause a high amplitude of u d .
In the second case, poles of the closed-loop linear system can be placed such that the transient behavior of (20) will not cause saturation effects due to the usual bounds on the control input. Obviously, the following holds: Proposition 1 If for each hypersquare H l , α l,i (ξ, u) are such that the linear closed-loop local dynamics (20) have identical eigenvalues, the controlled RFS has a global linear input-output behavior.
It follows immediately, that if the desired trajectory z d is sufficiently smooth, so will be the output z of the RFS. On the other hand, this smoothness property does in general not hold for the nominal input u d . To see this, consider the dynamics of the RFS (3a), which is globally Lipschitz by definition. Due to the choice of triangular membership functions (4), the piecewise defined function ψ u l and more specifically, (19) is dependent on Lie derivatives of the output function. Continuity of u then implies, e.g., which does not hold in general. Thus, u d may be discontinuous, even if z d is smooth.

Extended PID control of Error Dynamics
In addition to the flatness-based feedforward control derived from the RFS model of the plant, an additional feedback controller is necessary in order to stabilize the error dynamics around the trajectory, as described in numerous works (see, e.g., [5,13,20,22]). The necessity of the feedback controller is caused by minor inconsistencies of the system's initial state with the reference trajectory as well as noise and disturbances. In the light of RFS, the main reason for the additional feedback is due to model uncertainties arising from the approximate gray box modeling. Several synthesis concepts are proposed in the literature, which are mostly based on linearization of the error dynamics and application of linear controllers. Here, the approach of an extended PID controller as proposed in [13] is applied due to its simplicity.
Let the error state of the i-th linear subsystem be denoted with ξ T i = ξ i,1 , . . . , ξ i,δ l,i , i = 1, . . . , m. Extending this error state by the integrated difference between the measured output and the reference leads to is then obtained, for which a stabilizing controller can be determined. Overall, the resulting control law combining the feedforward part as well as the extended PID control reads Since (22) is dependent on the full state ξ, a high-gain observer [16] is utilized to reconstruct non-measurable states. The complete control structure is depicted in Fig. 4.

Simulation Results
In the following, the aforementioned tracking control is applied to the numerical example of the nonlinear dynamics which will serve as ground truth reference model. Usually, when utilizing RFS, the exact plant dynamics are unknown and the fuzzy system is obtained by expert knowledge or measured data. Here, an RFS is derived from (28)  hypersquares H l , whereas the output model is defined over a grid with (5−1) 3 = 64 hypersquares H x j . Each local dynamics is then defined by (6). E.g., for the hypersquare H 1 bounded by −2 ≤ x j ≤ −1, j ∈ {1, 2, 3}, and −10 ≤ u q ≤ 0, q ∈ {1, 2}, the local systeṁ is obtained. For each hypersquare H l , the local relative degrees are then computed. Due to n j=1 δ i,j = n, the system has no internal dynamics and can be stabilized via static state feedback. Thus, y = z is a flat output. Furthermore, for each hypersquare, the matrix A l in (16) is invertible, e.g., for (29) it is computed to A 1 = I m . Therefore, a local controller can be found for each hypersquare achieving global input-output decoupling.
In this example, the functions α l,i were chosen such that the local linear dynamics (20) have stable eigenvalues at λ i = −10. Since all α l,i can be pre-computed offline, fast online determination of the nominal control u d is possible by means of a look-up table and the evaluation of a function. Furthermore, the extended PID control is computed online as linear quadratic regulator. The online linearization of the error dynamics and computation of the feedback are computationally more complex than the feedforward control, and thus become the bottleneck regarding real time implementation.
In order to test the controller, the signals are considered, which are to be tracked by the flat outputs of the system. The nominal trajectories (31) are applied to the controlled ground truth (28), having an initial state of x 0 = [0.05, −0.5, 0.5] T , whereas the initial state of the inverse system as well as the highgain observer isx 0 = [0, 0, 0] T . As becomes apparent from the simulation results shown in Fig. 5, the flat outputs follow the nominal trajectory very well. Note that tracking is achieved even in case of initial states not being consistent with the trajectory. Furthermore, Fig. 6 depicts the development of the control input u = u d + ∆u. Apparently, the bound on the control input u q ≤ 10 is not exceeded, even during the initial transient behavior.  Fig. 5, it can also be seen that the plant output does not converge asymptotically to the nominal trajectory, since small deviations of y from y d remain. The reason for this effect is mainly due to the fact that the RFS, by which the nominal control law u d is computed, is only an approximation of the ground truth model, to which the controller is applied to. In addition, the inverse system (19) does not follow the reference trajecotry arbitrarily fast. By assigning faster poles to the linear subsystems (20), this effect can be mildered, as shown in Fig. 7. Therein, different simulation runs are shown, each with unique set of equal eigenvalues of (20). As can be seen, neglecting the initial transient behavior, the error e = y − y d becomes smaller with faster eigenvalues. At the same time, the magnitude of u d increases with faster eigenvalues, such that especially during the initial displacement of the outputs from the reference trajectory, the control input exceeds its bound. Thus, a trade-off between fast decay of the transients and meeting the control input bounds has to be made.

Discussion
In this paper, an approach for flatness-based feedforward control of Recurrent Fuzzy Systems was presented. It was shown that existing techniques for tracking control of flat nonlinear systems may also be applied to Recurrent Fuzzy Systems. Since the dynamics of a recurrent fuzzy system is defined by means of a linguistic rule base, it was first shown how to derive local real valued system dynamics under mild assumptions. Thus, a partitioning of the input-state space was obtained, whereas the system dynamics within each partition was described by a vector polynomial being multi-affine in the inputs and states. By means of a dynamic transformation, these local dynamics were then shown to be always equivalent to a prolonged input-affine system. Due to space limitations, several simplifying assumptions were made throughout the paper, which do not lessen the underlying idea, but should be addressed in future work: First, only Recurrent Fuzzy Systems without internal dynamics were considered, whereas the application to those with stable internal dynamics (i.e., minimum phase Recurrent Fuzzy Systems) is straightforward. Second, only flat Recurrent Fuzzy Systems stabilizable with static state feedback were addressed. A similar discussion for the more general case of dynamic feedback remains an open topic, but may also be tackled by means of the flatness approach. In addition, only square systems with global decoupling of each input-output pair were discussed, in contrast to the more general form of Recurrent Fuzzy Systems with a number of inputs different from the number of outputs.
Finally, for feedback control of the error system, an extended PID controller was utilized, stabilizing the linearized error dynamics around the reference trajectory. Here, the PID controller was mainly chosen due to its simple implementation. Nevertheless, as mentioned in [13], any kind of linear controller can be applied. In particular, a comparison especially with robust controllers, such as H ∞ controllers, would be interesting in the light of the approximate nature of the system model.