ISSN 0718-3291 Versión Impresa

ISSN 0718-3305 Versión en línea

Volumen 28 N° 1, Enero - Marzo 2020

pdf Índice

Control de un sistema bola-placa utilizando un controlador por realimentación de estados

Control of a ball-and-plate system using a State-feedback controller

Ingeniare. Revista chilena de ingeniería

On-line version ISSN 0718-3305

Ingeniare. Rev. chil. ing. vol.28 no.1 Arica Mar. 2020 


Control of a ball-and-plate system using a State-feedback controller

Control de un sistema bola-placa utilizando un controlador por realimentación de estados

David Núñez1 

Gustavo Acosta1 

Jovani Jiménez2 

1 Grupo de Investigación ICARO. Facultad de Ingeniería. Politécnico Colombiano Jaime Isaza Cadavid. Cra 48 N° 7-151. Medellín, Colombia. E-mail:;

2 GIDIA: Grupo de investigación y desarrollo en inteligencia artificial. Facultad de Minas. Universidad Nacional de Colombia. Cl. 80 #65-223. Medellín, Colombia. Email:


A ball-and-plate platform is a common example of the dynamical system used to apply modeling and control concepts studied in some engineering courses. In this kind of systems, a spherical body is positioned on a mobile plate with two degrees of freedom. The system is operated by two servo motors that cause displacement of the sphere in the x and y axis in the plane of the platform. It is known that such a system is highly unstable and non-linear. Initially, from a phenomenological analysis we obtained a state-space representation of the system. Then, a state feedback controller using the pole assignment method was designed to maintain a desired position of the sphere over the plane. A computer vision technique allowed us measuring the two-dimensional position of the sphere over the plane in real time. Model of the plant under study and controller design for sphere positioning were experimentally validated considering different set-points. Obtained results let us know that our plant-controller is stable and responds satisfactorily to position disturbances around a reference point.

Keywords: Ball and beam; ball and plate; transfer function; state feedback; state observer


Una plataforma bola-placa es un ejemplo común de sistema dinámico utilizado para aplicar los conceptos de modelado y control estudiados en algunos cursos de ingeniería. En este tipo de sistemas, un cuerpo esférico se coloca sobre una placa móvil con dos grados de libertad. El sistema es accionado por dos servomotores que provocan el desplazamiento de la esfera en los ejes x e y en el plano de la plataforma. Se sabe que dicho sistema es altamente inestable y no lineal. Inicialmente, a partir de un análisis fenomenológico se obtuvo una representación del sistema en el espacio de estado. A continuación, un controlador de realimentación de estado basado en el método de asignación de polos fue diseñado para mantener una posición deseada de la esfera sobre el plano. Una técnica de visión por computador fue usada para medir la posición bidimensional de la esfera sobre el plano en tiempo real. El modelado de la planta en estudio y el diseño del controlador para el posicionamiento de la esfera se validaron experimentalmente considerando diferentes puntos de ajuste. Los resultados obtenidos mostraron que el controlador diseñado es estable y responde satisfactoriamente a las perturbaciones de posición de la esfera alrededor del punto de referencia.

Palabras clave: Sistema barra-esfera; sistema Plano-Esfera; función de transferencia; realimentación de estados; observador de estados


The Ball-and-Plate (BaP) system, like the Ball-and-Beam and the magnetic levitator systems, have arisen a special interest in teaching engineering and research due to its complex dynamics based on an inherent instability and nonlinearity. The main advantages of this type of systems are its low cost, easy implementation and the opportunity that it offers to make experimental validation of theoretical knowledge in modeling, controling and other disciplines of engineering like the computer vision and robotics.

Several works are reported by specialized literature. In 1 a BaP system is constructed with two magnetic suspension actuators for two degrees of freedom. For this system, a ball position controller using the Liapunov function was designed. A visual servo control for a BaP system using a LQR control approach is presented by Cheng et al. in 2. The control of a BaP system using a friction compensation scheme, PD position controller and PD angular controller is discussed in (3. In 4, a basketball robot project in which six degrees of freedom manipulator makes a balancing control of a ball on a plate based only on haptic information is presented. In 5 balancing a ball on a plate is achieved using low cost phototransistor sensors. Two independent PID control algorithm, one for each motor, are programmed in an AVR ATMega16 microcontroller. In 6, a normal proportional derivative (PD) control is modified to a new dual form for controlling a BaP system. This variant corresponds to an asymptotic stable dual PD control with a nonlinear compensation. A novel mechatronic design of a BaP system is presented in 7, and two control strategies for ball position are discussed: 1) a PID controller with supervisory fuzzy control and 2) a sliding control. Finally, in 8,9,10,11,12 the modeling, construction and control of Ball-and-Beam systems, the one-dimensional version of BaP systems, are discussed.

In 13) four control methods are compared: PID controller, sliding mode controller, fuzzy controller and LQR controller; all applied to a ball and plate system. The results of this work relate the responses of the four controllers graphically and with values associated with establishment time, over-impulse and steady-state error. The author concludes -based on his graphical and numerical answers- that the controller with the best performance is the Sliding Mode control to solve the problem of static and dynamic tracking for nonlinear systems with high complexity as it overcomes modeling imprecisions and parameter variations.

In this paper, four stages of engineering analysis and design are addressed. The first stage corresponds to the phenomenological analysis of the movement of ball on plate, from which its representation in space state is obtained. In a second stage, with the previous results, a state feedback controller using the pole assignment method is developed and the establishment time and percentage overshoot as the main design parameters are considered. In third stage, simulations are performed in Simulink® in order to verify the fulfillment of the desired parameters. Finally, our BaP-controller system implementation is experimentally validated.



From the phenomenological analysis, it is possible to observe the forces acting in the BaP system. It should be mentioned that in the modeling of the system, only the dynamic of the Ball-on-the Plate is taken into account. The forces acting on the system with an angle p of one of its axes are defined in the free-body diagram shown in Figure 1.

Figure 1 Free-body diagram of a 2D BaP system. 

According with the free-body diagram and applying the second Newton's law, we have:


In the equation (1), the first term defines the force component as a function of the inclination angle p, and the second term corresponds to the frictional force between the plate and the contact point of the ball. Given the dynamic of the BaP system, two movements are identified: translation and rotation. The latter is produced by the torque due to the contact point of the ball with the plate and its distance to mass center. It is described by:


In equation (2), t is the torque, f s is the frictional force and R is the ball ratio. Applying Newton's second law for rotational movement, caused by the torque, we have:


Where in equation (3) a are the angular acceleration and the I cm is the inertial of mass center, given by the expression of equation (4).


From equations (1) and (4) the following differential equation is obtained:


Now, (5) it is a nonlinear differential equation because it has a sinusoidal component. The development of a controller for this system is highly complex due to the nonlinear quantity. Nevertheless, this task becomes simpler if the nonlinear equation is converted into a linear equation. As shown in Figure 2, the sine function could be considered linear around its zero crossing. This could be used for the equation linearization but incorporates an operational restriction of the plate inclination in the range [-n/6, n/6]. Considering the above, we obtain the linear equation given in (6).


Figure 2 Linear zone of the sine function. 

Since for this system a state feedback controller will be designed, it is necessary to go from the differential equation to a state space representation, and make the following substitutions:

We can obtain the lineal model described by equations (7) and (8).



The matrix form of equations (7) and (8) are given in equations (9) and (10) respectively.




This representation is valid for both, x and y axes.

Controller Design

Before starting to design the state feedback controller, it is necessary to demonstrate that the system is both, observable and controllable 14. To do so, we must prove that:



Where A, B and C, are the matrices included in equations (9) and (10). When equations (11) and (12) are evaluated according to the values of A, B and C matrices, we can obtain the following two results:

This proves that the system studied is controllable and observable. When designing the space state controller, the pole assignment method was used. In this method the closed loop system poles are placed on the complex plane S, to obtain the desired dynamic behavior, as shown in Figure 3.

Figure 3 Block diagram of a control system. 

The characteristic equation of the system is changed into a desired characteristic equation by considering the next two design parameters:

Where t sd is the establishment time and M pd is the percentage of over-impulse. From this, the damping coefficient ξ and the natural frequency ϖn are calculated using the expressions (13) and (14).



These values are put into a second-order characteristic equation of the form:


To obtain:


To determine the feedback gains we can use Ackermann's formula, which is given by:

Where K is the gain vector and Φ(A) can be calculated by using the expression:

α1 and α2 values are taken from (16). After solving and simplifying we obtain:


Where K is the feedback gain vector. The response of this controller retains a steady-state error, but the BaP system has an integrator in its dynamics, therefore it is recommended to use servo system type 1 14, like the one shown in Figure 4.

Figure 4 Servo-system type 1 with feedback gains. 

For equation (17), K1 corresponds to the first element of K and Km is a modified version of K, where the first element is replaced by zero. This can be observed in equations (18) and (19).



This controller is applied for positioning on both axes, x and y.


At this point, with a dynamic system model and a state feedback controller design, it is necessary to observe the stability and dynamic behavior of the plant-controller system. For doing so, the program Simulink® of Matlab® will be used.

In Figure 5 it should be noted that the position of the ball in the x and y axes corresponds to the outputs of the BaP system, while the step signals correspond to the inputs. The obtained response is shown in Figure 6, the straight lines correspond to the speed of the ball, and the curve lines are the x-y ball position.

Figure 5 State space model of the BaP system. 

Figure 6 BaP system step response inputs. 

According to Figure 4 and equations (18) and (19), the simulation diagram of Figure 7 allowed us to obtain the BaP-controller system response shown in Figure 8. Note that each coordinate position has a different set-point, x = 0.5 and y = 0.75.

At this point, we can see that the controller forces the system to accomplish the design requirements of t sd =1s and M pd = 2% for both, x and y position.

Figure 7 BaP-controller system implemented as servo-system type 1. 

Figure 8 BaP-controller system position response. 


The Ball-and-Plate system was built with two acrylic pieces of 0.35 m 2 each one. The first one corresponds to the 10 mm width base, and the second, to the 3mm width plate. Between them, the following pieces were placed:

Central Piece

allows the two degrees of freedom of the BaP system, the plate rests over it, which is made of polytetrafluoroethylene. Its operating range is [-15°, 15°] as it is shown in Figure 9.

Figure 9 Central piece of the BaP system. 


were made of stainless steel. At one of its ends there is a small piece that allows the plate to be tilted. Axes are properly threaded to provide the possibility of adjustment of the platform with respect to the servomotors, as shown in Figure 10. Axes are responsible for converting the rotation movement of the servo motors into the linear motion required to incline the plate.

Figure 10 An axis piece of the BaP system. 


provides the torque and displacement to tilt the plate. Two servo motors are required for our two degrees of freedom of the BaP system (see Figure 11).

Figure 11 Servomotor and holder. 

Figure 12 shows integration of all of the pieces. The final aspect of our BaP system can be seen in Figure 13.

Figure 12 Mechanical design of the BaP system. 

Figure 13 Final view of the BaP system. 


For the BaP system under consideration we have an input and an output per axis. Therefore, it is necessary to incorporate a state observer to estimate the internal states of the real system, required to produce the control law. Figure 14 shows the system configuration after incorporating the state observer.

Figure 14 Control loop using a state observer. 

It should be noted that the observer only needs the input and output for each coordinate (x, y). The A, B and C matrices are known (see equations (9) and (10)) but the L matrix needs to be calculated.

The observer response must be faster than the control response 14, therefore the establishment time for the observer (tso) must be less than the establishment time for the controller (t sd ).

The observer's characteristic equation is defined the same way that in (16), and making the proper operations we obtain the following:


To calculate the L matrix we can use Ackermann's formula




Replacing and solving the matrix that makes the observer response faster than the controller's, we obtain:


It should be mentioned that the configuration shown in Figure 14 will be applied to two servomotors, one for each x and y position of the ball on plate. As shown in Figure 15, there are two input references to the controller s.p x and s.p y , and two control actions U x (t) and U y (t) are generated, one for each servo motor.

Figure 15 Simplified block diagram of the control loop. 

The interface between the BaP system and a PC is implemented through an Arduino UNO and a webcam. The microcontroller module receives the control signals generated by the control algorithm that runs on the PC and generates PWM signals to drive the servo motors. This causes the plate tilt to maintain the x-y reference position of the ball. Figure 16 shows the complete experimental setup.

Figure 16 Complete experimental setup for the BaP system. 

A webcam is used as the position sensor of the ball on the 2D plate. Both, the video processing algorithm to determine the position of the ball and the control algorithm were implemented with Labview.

Video processing algorithm consists of the following stages: 1) Image Mask, for dimension reduction, 2) Measure, for corner detection, 3) Color Threshold to take into account only orange (ball) and black (platform), 4) Binary Image Inversion, to take into account the dynamics of the ball, not the platform, 5) Advance Morphology, to remove sections of the image that could be mistaken for the sphere and 6) Particle Analysis where the ball center coordinates are taken.

In Figure 17, the control algorithm in Labview can be seen. The configuration shown in Figure 14 is used to control each servo motor. Here we can see a SubVI corresponding to the observer; this algorithm is shown in Figure 18.

Figure 17 Control algorithm implemented in Labview®. 

Figure 18 Observer algorithm implemented in Labview®

The parameters of the controller and the observer, used in the experimental validation phase, can be seen in Tables 1 and 2.

Table 1 Controller Parameters. 

Table 2 Observer Parameters. 

Figures 19 and 20 show the BaP system responses. These figures show the response of the BaP system (blue line) to different changes in the reference x-y position (red line). The green line corresponds to the control action generated to move the servo motors.

Figure 19 BaP system response to changes in reference position (s_p_x = 175). 

Figure 20 BaP system responses to changes in reference position (s_p_x = 270). 

According to the results obtained from the experiment, Table 3 lists the values corresponding to the desired response parameters and steady-state error (Ess).

Table 3 Parameters Response. 

Compared to 14, the controller used in this work outperforms the PID controller, the fuzzy controller and the LQR controller as well, but it is not better than the sliding mode controller.

This work stands out for the simplicity of the modeling taking into account only the dynamics of the ball on the plate, unlike the works mentioned here, where the servomotors and the sensor element are also included, which makes the mathematical treatment difficult.

The implementation of the system is robust enough to be used as a laboratory experiment to advance experimental validations with different control alternatives, thus achieving a contribution to the training of professionals in this area of engineering, due to the fact that it is a complex system presenting a high degree of alignment and instability.


By linearizing the system, the operating range of the platform is restricted, a situation that is convenient

because the mechanical constraints with which the central ball joint (central piece) was designed only allows inclinations of ± 15° in the x-y plane. This results in the convenient operation of the BaP system in the linear zone.

Since no sensors are available to detect BaP system states, it was necessary to include a full-order observer with establishment time twice as fast as the controller. In this way it was possible for the observer to estimate the states of the system before the controller stabilizes them.

The fact of taking into account the states of the system -in this case the position and speed- allowed the controller to generate a suitable control signal, achieving a correct response of the system to the disturbances, and allowing to locate the sphere around the desired set-point.

The servo-system type 1 is ideal to control processes whose dynamic behavior incorporates an integrator. This configuration is useful for eliminating the steady-state error in the system response when the states are fed back. Additional advantages of the servo-systems type 1 are that they avoid the need of a different gain for each reference position and avoid the need of making additional calculations in cases where it is required to add an integrator.

Due to the high speed of the system's response, it was necessary to calculate a controller whose desired poles provided an establishment time of 1 second. During the experimental stage, it was observed that by increasing this value, the servomotors presented a small oscillatory movement until the sphere was located at the desired point, which allowed to clearly identify the desired conditions of the controller, which were presented in Table 1.

The results of this work can be consulted in the link below:


The authors gratefully acknowledge the support given by their home institutions, the Politécnico Colombiano Jaime Isaza Cadavid and the Universidad Nacional de Colombia, in the development of this work. Special thanks to Dr. Henry Sarmiento and to Professor M. Sc. Luis Eduardo Garcia.


[1] C.C. Ker, C.E. Lin and R.T. Wang. "Tracking and Balance Control of Ball and Plate System". Journal of the Chinese Institute of Engineers. Vol. 6 N° 30, pp. 459 -470. April 2007. ISSN: 0253-3839. DOI: 0.1080/02533839.2007.9671274.

[2] C.C. Cheng and C.H. Tsai. "Visual servo control for balancing a Ball-Plate system". International Journal of Mechanical Engineering and Robotics Research. Vol. 5 N° 1, pp. 28-32. January 2016. ISSN: 2278- 0149. DOI: 10.18178/ijmerr.5.1.28-32.

[3] Y. Wang, M. Sun., Z. Wang, Z. Liu and Z. Chen. "A novel disturbance-observer based friction compensation scheme for ball and plate system". ISA Transactions. Vol. 53 N° 2, pp. 671-678. March 2014. ISSN: 00190578. DOI: 10.1016/j.isatra.2013.11.011.

[4] K.-K. Lee, G. Bätz and D. Wollherr. "Basketball Robot: Ball-on-Plate with Pure haptic information". IEEE International Conference on Robotics and Automation. Pasadena, CA, USA. May 19-23, 2008.

[5] A. Zeeshan, N. Nauman and M. Jawad Khan. "Design, Control and Implementation of a Ball on Plate Balancing System". IEEE International Bhurban Conference on Applied Sciences & Technology (IBCAST). Islamabad, Pakistan. January 9-12, 2012.

[6] S. Galvân, M. Moreno, J. Rubio, F. Ortiz, W. Yu and C. Aguilar. "Dual PD Control Regulation with Nonlinear Compensation for a Ball and Plate System". Mathematical Problems in Engineering, Vol. 2014, pp. 1-10. March 2014. ISSN: 1563-5147. DOI:

[7] M. Moarref, S. Mohsen and G. Vossoughi, "Mechatronic Design and Position Control of a Novel Ball and Plate System". IEEE Mediterranean Conference on Control and Automation. Ajaccio, France. 25 Jun - 27, 2008.

[8] Z. Rashied, M. Hamees, M.U. Hassan, S. Hameed and N. Khatri. "Real time implementation of Robust PID controller for stabilization of Ball Balancing Beam". International Journal of Conceptions on Information Technology and Computing. Vol. 4 N° 2, pp. 6-9. March, 2016. ISSN: 2345-9808.

[9] M. Keshmiri, A. Jahromi, A. Mohebbi, M. Amoozgar and W.-F. Xie. "Modeling and Control of Ball and Beam System using Model Based and Non-Model Based Control Approaches". International Journal on Smart Sensing and Intelligent Systems. Vol. 5 N° 1, pp. 14-35. March, 2012. ISSN: 1178-5608.

[10] M. Amjad, Z. Shareef and S. Abdullah. "A Simplified Intelligent Controller for Ball and Beam System". IEEE international Conference on Education Technology and Computer (ICETC). Shanghai, China. 22 Jun - 24 Jun, 2010.

[11] N. Almutairi and M. Zribi. "On the sliding mode control of a Ball on a Beam system". Nonlinear Dynamics. Vol. 59 N° 1-2, pp. 221- 238. January 2010. ISSN: 0924-090X. DOI: 10.1007/s11071-009-9534-8.

[12] M. Ramírez, H. Sira, R. Garrido and A. Luviano. "Control Proporcional Integral Generalizado de un sistema Ball and Beam para tareas de seguimiento de trayectoria". Congreso Nacional de Control Automático (AMCA). Cuernavaca, Morelos, México. Octubre 14-16, 2015.

[13] Aghiad Kassem, Hassan Haddad and Chadi Albitar. "Comparison between different methods of control of ball and plate system with 6DOF Stewart plataform". International Federation of Automatic Control (IFAC). IFAC-PapersOnLine 48-11 (2015) 047-052, 2015.

[14] K. Ogata. "Ingeniería de Control Moderna". Pearson Educación S.A. Madrid, España. 2003.

Received: November 17, 2017; Accepted: October 08, 2018

* Autor de correspondencia:


Artículos Relacionados

# Título Ver
Simulación bidimensional de un sistema de combustión inestable (2010)
Javier Achury Varila, Carlos Duque Daza, Carlos Galeano Urueña

Otros Artículos

# Título Ver
Modelo de programación asíncrona para Web transaccionales en un ambiente distribuido (2011)
Luis Marco Cáceres Alvarez, Miguel Alejandro Pinto Bernabé
Grado de supervisión como variable moderadora entre liderazgo y satisfacción, motivación y clima organizacional (2010)
Alejandro Adrián Cuadra-Peralta, Constanza Beatriz Veloso-Besio
Prospección y caracterización del Yacimiento de Cobre, en la Vereda Los Cueros, Villanueva, Departamento de la Guajira-Colombia (2019)
Dino Carmelo Manco Jaraba, Kevin Rafael Ariño Díaz, Elías Ernesto Rojas Martínez

Desarrollado por: Cristian Díaz Fonseca -