Functional observer-based feedback controller for ball balancing table

The two degree of freedom ball balancing table (BBT) is a well-known didactic tool used to evaluate the effectiveness and performances of many control algorithms for dynamic systems. The present paper proposes to control the ball position of the BBT system via a linear feedback controller based on a functional observer. The parameters of the linear functional observer are determined by applying the direct method which requires neither a Sylvester equation resolution nor canonical transformations. The use of a digital controller has motivated the elaboration of the equations in the discrete time case. In this work, the BBT is tested in real-time to evaluate the proposed controller performances when stabilizing a ball on a reference point. This paper is a continuity of the previous work [12], in which only simulation results have been carried out.


Introduction
The two-dimensional BBT system can be considered as the extension of the one-dimensional ball and beam system. It is widely used as an experimental device for the study of multivariable nonlinear systems. The BBT is a challenging system known to be highly unstable in open-loop and strongly coupled. It consists of a ball rolling freely on the top of a rectangular plate fixed in its centre and able to rotate around its X and Y-axis. The coordinates of the steel ball are acquired through a touch screen in real-time.
Until now, a considerable number of studies have been devoted to the motion control problem of the BBT system [8,16,23,30]. It includes both, the static position control problem where the ball is stabilised at a reference position and the dynamic position control problem where the ball follows a desired trajectory. Many controllers have been suggested for studying these problems and one of the most prevalent is the classic PID controller. Nevertheless, it suffers from many limitations which were mentioned by several researchers such as an important settling time, a large overshoot [31], a low-precision [34] and others. So to ameliorate system performances, several advanced control methods have been investigated. In [8], a hierarchical fuzzy control scheme was proposed. A Fuzzy-PID controller based on Kalman filter was introduced in [13] where the PID parameters were self-tuned, and the Kalman filter was used to overcome modelling imprecision and reduce noise from sensors. In [3], an optimal nonlinear controller based on the model reference control structure was investigated. To determine optimal parameters, the invasive weed optimisation algorithm was used. In [15], in order to solve the trajectory tracking problem, an adaptive sliding mode controller was proposed. Based on the performance of static position and dynamic tracking, a comparison in [16] was carried out between Fuzzy controller, LQR, sliding mode and PID. In [27], two control approaches were presented and compared in an experimental study which are the state space feedback based on an observer and the sliding mode controller. In [12], the design of a functional observer-based feedback controller using the direct approach was presented. The controller was tested in a simulation environment. The acceptability of the simulation results has motivated the effort reported in the present paper to test the validity of the proposed controller on the BBT laboratory model in real-time. Linear functional observers (LFOs) have gained increasing interest in the past number of years, due to their potential to overcome problems related to technical constraints and high costs of sensors installation. In functional observer theory, it is not required to determine each component of the state variables, but it is sufficient to estimate a part of them, so by using a functional observer, we can ensure reducing substantially the order of the observer. This state variables partial reconstruction can be interesting and useful in many control systems and one of the widely used applications is the state feedback design where the control signal is generated as the output of the estimator. Various approaches have been proposed to provide state estimation. These approaches are essentially based on eigenvalue assignment or on the Sylvester-observer equation resolution [7]. In [21], the direct method was introduced for the first time to reconstruct a single linear functional observer and since then many studies have been carried out on functional observer design using this method [11,18,24]. The main advantage of this method is its simplicity as it relied on iterative derivations of the vector to be reconstructed. Besides, it is sufficient for the system to be functional observable (or functional detectable) instead of being observable (or detectable). We have to mention that the notion of functional observability (or functional detectability) is less restrictive than the observability (or the detectability) notion. In this work, the implementation of a feedback controller on a hardware platform has motivated the elaboration of the equations in a discretetime framework. This paper is divided into six sections. Section 2 deals with the description of the experimental setup of a ball balancing table. In section 3, our focus is on the design of a state feedback control law using a functional observer. Next, section 4 describes the direct procedure for the estimation of a desired functional by a linear multifunctional observer. The 5th section is devoted to the design of the BBT system controller. In the following section, the experimental results of the proposed algorithm are presented. Finally, some conclusions are given.

Experimental setup description and modeling
The ball balancing table is an apparatus used to evaluate the control algorithms developed in this paper. Figures 1  and 2 show the experimental setup and its main parts. The BBT physical parameters are indicated in Table 1 and

Mathematical model
To derive the coupled equations of motion, the following assumptions are taken into account: The last two hypotheses impose a constraint on the rotation acceleration of the plate.
By using the Lagrangian method and the relationship between the plate angle and the motor angle, the nonlinear equations of the system for X-direction and Y-direction can be written as follows: To simplify the control of such a highly nonlinear system, we can use the approximation of sine function for small angles: Then, the differential equations can be linearized around the operating point (x b = 0, y b = 0) and the equations (1) and (2) become: with Taking the Laplace transform of (4), we obtain the transfer function: In Y-direction, the transfer function can be written as: As the actuator of ball balancing table is a servomotor, its transfer function, denoted by G M (s) , can be approximated as a first order function of the form: where U X and U Y are the input signals of servomotors in X and Y directions, K M is the gain and is the time constant of the actuator.  The ball balancing table has a cascade structure (Figure 4), then the plant's and actuator's transfer matrix is: where From the transfer function matix, we can easily deduce the continuous state space representation.

Discrete state space representation
Assume that the general form of the continuous time state space model of the BBT is given by the following equation: where the system matrix A c is n × n , the input matrix B c is n × p and the output matrix C c is m × n . To implement the numerical control calculation, this linear continuous model needs to be discretized.Then, the discrete state space equations are given by: with: Notations In the whole paper, all the sampled signals are functions of the discrete-time variable k which we may write in one of three ways

Discrete feedback controller
In order to guarantee the asymptotic convergence of the error estimation to zero, the control loop poles are assigned by the pole placement method. The feedback control law is given as follows: where r(k) is a two-dimensional reference input signal. F and N C are, respectively, the state feedback gain matrix and a constant matrix that acts on the static gain [20,25].
By replacing u(k) by its expression in (13), we obtain: For an external reference input r(k), the static gain Γ is expressed as follows: The matrix N C is calculated if the static gain Γ is determined and we can obtain: If the system (13) is controllable [2,17], then the design of the pole placement controller is possible. From the equation (14), it's clear that a state observer is required to estimate the states used for the feedback. In literature, various types of state observers are used, but our focus is limited to the functional observer. The block diagram of the proposed system is shown in Figure 5.
Next, the state observer design for discrete system is detailed step by step.

Discrete functional linear observers
Let us consider the problem of observing a linear functional (k) , the vector that is required to be estimated (or reconstructed): where F ∈ ℝ (l×n) .
Without loss of generality, it is assumed in this paper that: -F and C are matrices that have full row rank, i.e., rank(F) = l and rank(C) = m -The number of functions to be estimated is not greater than the difference between the number of states and the outputs of the system l ≤ n − m . The greatest possible order for the functional observer is n − m , which is the order of the Cumming-Gopinath observer [5,10]. -The triplet (A, C, F) is functional observable or at least functional detectable [6,9,14,22]. If this condition does not hold, then it is not possible to design a functional observer for this triplet.
To reconstruct the function, (k) , the following Luenberger observer structure of order q, q ≤ (n − p) , is proposed: where z(k) is the q-dimensional state vector and v(k) ∈ ℝ l is the estimate of (k) . The observer matrices L ∈ ℝ (q×q) , V ∈ ℝ (q×p) , P ∈ ℝ (q×m) , H ∈ ℝ (l×q) and G ∈ ℝ (l×m) are determined such that: The linear functional observer structure is given in Figure 6.

Existence conditions
Theorem 1 The observable system (19) is an asymptotic observer of linear functional (18) if and only if there exists a (q × n) matrix T solution of the equations: and the matrix L is Schur, namely when all the absolute value of the eigenvalues are less than one.

The direct approach to design linear functional observers
Let us define as the smallest integer such that: where The hypothesis (24) can always be fulfilled using Cayley-Hamilton theorem [32] for every k ≥ k 0 . After = 0, 1, 2 … phase-advanced of (k) = Fx(k) , we obtain: From Equation (24), it can be deduced that FA is a function of Σ . Then, there exist the matrices L C,i , i = 0 … and L F,i , i = 0 … − 1 such that: From the previous equation, the following linear equation can be written: where Φ is a (l × ) matrix, = m + (l + m) , Φ can be written as: For = , the equation (26) can be written as: To eliminate the state x(k) from equation (30), let's consider the successive shift forward of (k) = Fx(k) and y(k) = Cx(k): By replacing (31) and (32) in (30), we get: where for ≥ 2 and j = 0 to − 2: The equation (33) can be written as: where q stands for the shift forward operator and q −1 for the delay operator in a discrete-time formulation. Let us denote the vectors: With (k) = z −1 (k) + F C, y(k) , we obtain: where the matrices P C,i for i = 0 to − 1 are given by: Let us introduce the vector z(k) = z T 0 (k) ⋯ z T −1 (k) T , the input-output recurrence equation (35) can be realised as the state space observable system (19) where If L is a Schur matrix then the observer (19) is an asymptotic observer of (k) . Now, finding the stable functional observer depends on the resolution of the linear equation (28) and then the decomposition of Φ.
The solution set of the linear equation (28) is given by: where Ω is an arbitrary (l × ) matrix and Σ [1] is a generalized inverse of Σ given by [4]: For single functional observers (case l = 1 ), the proposed method leads to the minimum functional observer [21]. However, for multiple functional observers (case l > 1 ), the resulting order observer does not necessarily represent the minimum possible order. When theorem 1 is fulfilled, the order of the designed observer is l . The stable observer order could be even greater than n or n − m . That's why a reduction of the observer order is required to obtain a stable minimal observer. (35) z 0 (k + 1) = L F,0 z −1 (k) + P C,0 y(k) + V 0 u(k) z 1 (k + 1) = L F,1 z −1 (k) + P C,1 y(k) Φ = FA Σ [1] + Ω I − Σ Σ [1] (38) Σ [1] ∈ X ∈ R (n× ) , Σ XΣ = Σ

Controller design for BBT system
Considering the plant's and actuator's modeling method in section 2. K M is determined as 100 and is calculated as 0.01. After the calculations, motor transfer function is obtained as below: then the transfer function of system is given by: For the sampling period T = 0.004s , the discrete state space representation in the form (13) is obtained: To start the design, we have to choose the following stable closed-loop poles: The controller gain F, which assigns the above closed-loop poles is calculated by using the pole-assignment routine. The result is : and Now, our focus is on the design of the functional observer. The first step deals with the determination of . From (24),

Experimental results
It is clear, in Figure 7 that the experimental output signals of the ball balancing table follow the reference trajectories with good performances. The results show also that the control law obtained by using the functional observer, allows to obtain high performances with an error which starts from the prescribed initial value and quickly goes to zero. The motor angles provide an amplitude saturation outside the range [−45 • , +45 • ] . In this paper, the stabilization problems during the saturation period have been fulfilled experimentally according to the dynamics of the system. As a perspective of this work, the stability analysis problem for the systems with input saturation will be addressed. For several decades, the stability analysis or stabilization problems of control systems with saturation have attracted extensive attention in the research community and they still constitute an open source of both theoretical and practical problems (see, e.g., [26,28,29,33,35]).

Conclusion
A functional observer with a minimum order, designed for time-invariant discrete-time linear systems, was determined by applying the direct procedure. To evaluate this procedure, a state feedback controller based on a multifunctional observer is implemented in a control laboratory experiment.
Compared to full order observer, some interesting functional observer features can be deduced. On the one hand, the functional observer designer is free to choose the states to be estimated. On the other hand, the number of state variables reconstructed using a functional observer is lower than that using a full order observer. As it is mentioned in section 5, the two inputs, two outputs, sixth-order BBT system require only a second-order functional observer, while it requires a sixth-order Kalman observer or a fourth-order Cumming-Gopinath observer. Designing the minimum observer has the advantages of reducing the observer calculation time. Compared to [4], the reduction of the observer establishment time, in such a way as to allow estimating the two system states before the controller stabilizes them, is not required when using the functional observer since it needs to construct only one BBT system state. Let us note that to simplify the calculation, the model in [19] takes into consideration only the ball dynamics.
In further works, the development conditions of matrix Ω leading to an asymptotic observer with minimal dimension as well as the extension of the direct approach to the unknown disturbance input linear observers will be considered.
Acknowledgemnents This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http:// creat iveco mmons. org/ licen ses/ by/4. 0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Conflict of interest The authors declare that they have no conflict of interest
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.