#### Abstract

The normal proportional derivative (PD) control is modified to a new dual form for the regulation of a ball and plate system. First, to analyze this controller, a novel complete nonlinear model of the ball and plate system is obtained. Second, an asymptotic stable dual PD control with a nonlinear compensation is developed. Finally, the experimental results of ball and plate system are provided to verify the effectiveness of the proposed methodology.

#### 1. Introduction

The ball and plate system is one of the most popular and important models in control education, and it is a benchmark nonlinear plant [1], because it is more complex than the traditional ball and beam system [2]. The ball and beam system has two degrees of freedom where the ball can roll freely on a rigid plate; see Figure 1. Since the movement of the ball over the plate can reach high speeds, the design of a suitable controller for this system is a major challenge; therefore, these systems are not commonly used in laboratories.

**(a)**

**(b)**

The ball and plate system has low consumer appeal. However, the challenge of balancing is a problem under continuous study for robotics transportation applications, often as extensions of the inverted pendulum project. Therefore, the system can present many challenges and opportunities as an educational tool of the control systems engineering for university students. Thus, this system has enormous potential for advanced control techniques, such as fuzzy control [3, 4], classical control [5], robust control [6–10], nonlinear control [11, 12], and sliding mode control [13].

There are some reported control algorithms for the ball and plate system in the literature. In [14], a stabilizing switching control scheme is proposed. By the concepts of switching-driving Lyapunov function and switching-driven stability, a locally asymptotically stabilizing switching controller is obtained. In [15], a linear model and simple PID controller are used for a real-time ball and plate system based on DSpace. On the other hand, intelligent control is suitable when the model of the ball and plate system is not available. In [16], a hierarchical fuzzy control with a genetic algorithm is applied for the adjustment of the membership functions.

From the above controllers, there are two problems for the ball and plate control:(1)some laboratories use simple controllers such as PD control, and the theory analysis is based on linear models [15];(2)nonlinear controllers for ball and plate system have good theory results; nevertheless, they are complex and rarely used in real applications [15].

In this paper, a novel dual PD control for the ball and plate system is presented. Continuing with the previous results of this research group, on the ball and beam system with two degrees of freedom of [17], a new ball and plate is assembled in [18] to reach the objective of this research. This prototype fulfills the requirements of a real-time control via an embedded system designed by minimal resources. To analyze the closed-loop system (see Figure 2), a new dynamic model of the ball and plate is obtained; therefore, a stability analysis using this novel nonlinear model is developed. To the best of our knowledge, this kind of analysis has not yet been established in the literature. Finally, experimental results are performed to evaluate the theory results.

This paper is organized as follows. In Section 2, the ball and plate dynamic model is introduced. Section 3 introduces dual PD control. In Section 4, the stability analysis of the proposed controller is considered. Ball and beam prototype is shown in Section 5. In Section 6, experimental results of three controllers applied to the ball and beam system are shown. Section 7 presents conclusions and suggests future research directions.

#### 2. Ball and Plate System

The new ball and plate system is shown in Figure 1. In this system a ball is placed on a plate where it is allowed to roll with two degrees of freedom. As the two motors turn, they produce a shift in the angles and , which at the same time cause a variation of position of the ball in due to the gravity force. In the absence of friction or other disturbances, the dynamics of the ball and plate system can be obtained by the Lagrangian method [19, 20].

The kinetic energy of the system is where is the kinetic energy of the ball; is the mass of the ball; is the inertia moment of the ball; is the radio of the ball; is the linear velocity of the ball; and are the position of the ball on plate; and are the angular position of the plate; is the angular velocity of the ball; and is the angular velocity of the plate.

On the other hand, potential energy of the ball due to the gravity is given by where is the potential energy of the ball and is the acceleration due to gravity.

From (1) and (2), the Lagrange equation is

Lagrange’s equations of motion are where and are the torque applied to the plate. Developing (4) gives the whole ball and plate system as follows: Define the system state as follows: Define the regulation errors as follows: where and are the desired ball position. For the ball and plate system, in the balance position , , , and , then .

It is difficult to analyze the stability of the ball and plate system (5) with normal PD control. Nevertheless, it is well known that PD control can stabilize the manipulator robots [21]. Now, a transformation of the ball and plate closed-loop system will be discussed.

Lemma 1. *The ball and plate closed-loop system (5) can be transformed into the following form:
**
where , is defined in (6), and is defined in (7).*

*Proof. *See Appendix A for the proof.

#### 3. Dual PD Control

The goal of this research is to develop a PD regulation with compensation capable of controlling the position of ball on a plate in both axes . Initially, the plate is at the horizontal, that is, , and tilts in both axes to control the position of the ball. Each tilting axis will be operated by a DC motor. The position of the ball on the plate is measured by a camera [18].

A dual PD controller is an adequate basic term to obtain an acceptable response of the system; however, an exact nonlinear compensator is included to find the objective of guaranteeing the closed-loop system stability. Figure 2 shows a diagram of this controller scheme.

The dual PD control law of the -axis is as follows:

The dual PD control law of the -axis is as follows: where , and , are positive constants of the controllers of the plate and , and , are constants of controllers of the ball. and are compensators, which will be designed in the next section.

For the regulation problem, the control goal is to stabilize the ball in the desired position , being denoted by ; therefore, the dual PD controllers become or

If , , , , , , , , , and , and can be written as follows:

#### 4. Stability Analysis

In this section, Lyapunov’s first method is used to prove the dual PD control with nonlinear compensation (14) and (15) is asymptotically stable.

First, it is analyzed if the matrices and may be candidates for Lyapunov function. The matrix is not symmetric to prove that the function is positive; that is, each main minor determinate is computed. If the constants , , , and is a square matrix, then

Position of the ball is ; therefore, the matrix that satisfies all determinants of the main minors (16) are positive; then, is a positive definite matrix that satisfies

The matrix is not symmetric to prove that the function is positive and the calculation of quadratic form is determined. Consider

The position of the plate is , and the constants are , , , . If is a square matrix , then the quadratic form satisfies

The stability of the closed-loop system is stated in the following theorem.

Theorem 2. *Consider the ball and plate system (8), the dual PD control (14), (15), and the following compensators of and as follows**
Therefore, the closed-loop system of the ball and plate system is asymptotically stable
*

*Proof. *Since is a positive definite matrix, in (18) is a quadratic form, and recalling that and are not negative, the following positive definite quadratic form is used as the Lyapunov function:
To assure the potential energy is positive, we let and , . Differentiating it with respect to time and recalling that and are constants, it yields
It is (see Appendix B)
Using the compensators (20) in (24) gives
Since and , is a semidefinite negative function. Thus, the closed-loop system is stable in the equilibrium point . To prove asymptotic stability, LaSalle’s theorem is used in the following region:
From (22), if and only if . For a solution to belong to for all , it is necessary and sufficient that for all . Therefore it must also hold that for all . It is concluded that the closed-loop system is the only initial condition in for which for all . Finally, the origin of the closed-loop system is asymptotically stable in [6–10].

*Remark 3. *In [22–26], the authors use proportional-integral-derivative controllers; nevertheless, the proposed controller is different because it has 4 dynamic alternatives being selected by the controller depending on the and values of the ball and beam system, and it is called the dual PD control. The proposed controller has the main merit that it can guarantee the convergence of the regulation error; that is, the dual PD controller obtains a desired behavior in the system. The shortcoming of the proposed method is that the changes between the 4 dynamic alternatives in the controller could cause the undesired chattering.

#### 5. Prototype

Figure 3 shows the prototype used to test the new dual PD controller. Simulink is used to test the model (8); consider kg, cm, and m/s^{2}. Once the simulation is successful, the implementation on FPGA is carried out. The prototype has the following parts: the plate size is 50 × 50 cm, the ball is with a radius of 1.27 cm, and a CMOS camera model MT9 M011 [27] is used as a visual position sensor of the ball. The model used as image sensor is the TRDB card DC2 [27] of Terasic company. The designed hardware components of the prototype are image preprocessing, ball position, and dual PD controller with compensator. The image preprocessing component receives a color image from CMOS camera and delivers a binary image. The ball position component receives the binary image and delivers the position of the ball on the plate; these components are able to process 16 images per second [18]; the position of the ball is sent to the dual PD controller component; this includes the new control law. Finally, the motors receive these control laws and they move the plate on and directions, simultaneously. The DC motors are selected as an actuator for its high torque. This motor is a powerful 12 V brushed DC motor with a 50 : 1 metal gearbox and an integrated quadrature encoder [28]. To obtain real-time operation, all modules are embedded in hardware using the very high speed hardware description language (VHDL) using Quartus II version 7.2 and are implemented in Altera DE2 [29] (Development Education board) with a Cyclone II FPGA.

#### 6. Experimental Results

To verify the advantages of the dual PD controller with compensator, several experiments are performed for the regulation [11], [12]. A first set of experiments are performed using the proposed method which implements the control laws (13) and (14); these experiments are repeated using the dual PD controller without compensator, meaning in (13) and (14). Finally, the proposed controller is compared with a fuzzy logic controller [18] using the same experiments.

Consider that the movement of the ball is slow and does not show tendency to slip (smooth bearing), due to the slow speed and acceleration of the plate; the interactions of the movements of the plate are uncoupled; the details of the performance are shown in Figures 4–6, where the position, velocity, and control signals are presented as the dual PD control with compensator, PD control without compensation, and fuzzy logic controller responses.

Figure 4 shows the position of the ball on the -axis; in this experiment the initial position is 0.02587 m and the final position is 0.4375 m, and it shows that the dual PD control with compensator reaches the desired value faster than the other two methods. Figure 5 shows behavior of the velocity of the ball on the -axis; in this experiment the initial velocity is 0, and it shows that the dual PD control with compensator is stabilized faster than the other methods. Figure 6 shows behavior of the control signals on the -axis, where the dual PD control with compensator shows the best behavior.

#### 7. Conclusions and Future Work

The dual PD control with nonlinear compensation has been presented to solve the regulation problem for the ball and plate system. To use these controllers, a new dynamic model in the manipulator robot form was obtained. The proposed nonlinear model is very useful to design and validate different control algorithms which can then be extrapolated to problems with the same characteristics; one advantage of working with a nonlinear model is that the full dynamic can be seen, making it possible to analyze the behavior of the system at each equilibrium point. By using the first method of Lyapunov, a new Lyapunov function is presented for the stability analysis; as a result of this analysis, the asymptotic stability of the closed-loop system can be guaranteed. On the order hand, the exact compensator requires to have a precise knowledge of the system nonlinearities; however, the methodology of how to obtain it is presented in detail. Furthermore, the experimental result shows the excellent performance of the proposed controller, obtaining the best behavior in comparison with the other selected controllers; see Figures 4, 5, and 6. As a future work, a PD regulator with an intelligent compensator will be developed [30–33].

#### Appendices

#### A. Ball and Plate Model

Substituting (14) and (15) into (5), we have

By equating all the equations to zero, we have

The inertia matrix is where and . The Coriolis matrix is where and . The matrix is The gravity matrix is The compensator matrix is Therefore the ball and plate system model can be described in the form (8).

#### B. Stability Analysis

From (8), the inertial matrix is Substituting (B.1) into (23), we have Developing (B.2), we have Factoring similar terms, we have Eliminating and grouping terms, we have From (B.5), the differentiate of is Equation (B.6) is substituted in as follows: where and . Developing (B.7) and separating terms variables constants, we have where and . We define a new matrix : Differentiating (6), we have is calculated by multiplying After multiplying (B.12) by , we have Finally multiplying (B.14) by ,we have Equation (B.8) is calculated as follows: where and are given in (B.8). From (B.16), we first have where , , and and are given in (B.16). Then multiplying (B.17) by , we have Finally multiplying (B.20) by , we obtain Therefore, the term is equal to the sum of (B.21) and (B.15) as follows: From (B.5), we calculate the term as follows: Finally, the term is calculated from (B.5): Therefore, to obtain the derivative of the Lyapunov function, add (B.22), (B.23), and (B.24), and factoring and , we have (24).

#### Conflict of Interests

The authors declare no conflict of interests about all the aspects related to this paper.

#### Acknowledgments

The authors wish to thank the anonymous reviewers for their detailed reviews and many constructive suggestions which have improved the paper significantly and to the Institutions of Mexico (SNI-CONACyT, SIP-IPN, COFAA-IPN, PIFI-IPN, and CONACyT) for providing necessary support to carry out this research work.