2016 2nd International Conference on Industrial Engineering, Applications and Manufacturing (ICIEAM)
Design and Implementation of a Vision-based Control for a Ball and Plate System Eng.Salah Reda Bdoor
Dr.Osama Ismail, Dr.Magdy Raouf Roman
Mechatronics and Robotics Engineering Dept., Faculty of Eng. Egyptian Russian University Cairo, Egypt
[email protected]
Mechanical Power Dept., Faculty of Eng. Helwan University , Mataria Branch Cairo, Egypt
[email protected],
[email protected]
Prof.Dr.Yehia Hendawi Mechatronics Dept., Faculty of Eng. Future University in Egypt Cairo, Egypt
Abstract—This paper discusses how to achieve the stabilization of a highly non-linear electro-mechanical system that is considered one of the most important problem that found in our life. Therefore, the paper is directed toward achieving stabilization for one of the most famous unstable non-linear electromechanical system in 2 DOF (ball and plate system) using vision-based control. In this paper we will discuss the design of vision-based control strategy for balancing ball and plate system to control ball position and ball motion track using suitable system identification methods. Also different control techniques (classical and modern) will be proposed. Keywords—ball and plate; vision control; non-linear system; motion control
I.
INTRODUCTION
The Ball and Plate balancing system is a 2 DOF system that can be used to verify the efficiency Level of many control systems (classical or modern) for achieving the stabilization system, also ball and plate balancing system can be used by replaced ball by other object in any of mechatronics applications or industrial filed. The system consist of square Perspex plate, which is fixed at its center by universal joint. The plate can be rotated around the two horizontal axi. Two stepper motors were used to drive to plate based on signals generated by the controller. The control problem of the designated system is to keep the freely rolling ball in certain position or force the movement to be on specific trajectory on the plate. For sensing the ball position, vision sensor (CCD webcam ) will be used to capture an image of the ball, send it to the controller for processing and evaluate the required actuation signal to minimize the error between actual, and target ball position. Then send signals to stepper motors to incline the plate to achieved the required position of the ball. Schematic diagram of the implemented system is shown in Fig.1.
Fig. 1. Schematic Diagram of Experimental Test-rig
II.
ACTUATION MECHANISM
A. Mechanical description The motors that used to make the plate inclines and changes its rotational angles are stepper motor. The selection of stepper motor because its characteristics gives the ability to control directly the angular position of the plate. To overcome the sporadic missing of steps in stepper motor, the plate position will be evaluated from the measured rotation angle of the motor shaft. The geometric relationship between the two motor shafts rotation angles and the resultant plate angular position was derived, so can use the velocity of the stepper motor as inputs. Each motor drives one axis of the plate and is connected to the plate by special designed L-shaped linkage consists of two linkages connected with a ball & socket joint Fig.2 . Referring to the schematic in Fig. 3. , each side of the L-shaped linkage has four-bar parallelogram linkage to guaranty that for minor motions around equilibrium, both plate angles ( and , defined later) and corresponding motor angles ( m1 and m2) are equal. The plate is pivoted at its center with universal
978-1-5090-1322-7/16/$31.00 ©2016 IEEE
2016 2nd International Conference on Industrial Engineering, Applications and Manufacturing (ICIEAM) joint around O, Ball joints (at points J1, J2, J3 and J4) connecting linkages and rods to prevent the system from bind by support enough freedom of motion.
Complete symmetry around x-z and y-z planes for the plate is assumed to ensure that non-diagonal inertia matrix of the plate do not include any terms.
Because of imposing by the parallelogram linkages, for small motion the motor angles matching with the plate angles as result to the kinematic constraints. The calculation for required stepper motor that used in our system is the moment of inertia of the motors that was determined using the available CAD model, detailed calculations can be found in Appendix[a].
From the above assumptions, it is evident that out of the four variables consequently the plate and L-shape linkage mechanism has 2 DOF, which is as expected. This is also equal to the inputs to the system, ( m1, m2, , and ), where m1,
are motor angle
m2
,
, are plate angles.
Only two are independent since the mechanism has two DOF. Thus, there exist the following two kinematic constraint equations that relate the motor angles to the plate angles. (H1cos (H1sin (H2sin
– H1sin
m2–H2sin
–H2cos
– H1cos m1
cos
2 m1) +
+ V1 )2= V12
(1)
2
+V2) +(H2cos
2 m2) +(H2sin
sin
)=V22
(2)
where V1 , V2 are vertical linkages, H1 & H2 are horizontal linkages.
Fig. 2. Experimental Test-rig.
B. Mathematical modeling Relation between motor angles and plate angles
It is observed from the non-linear equations (1)&(2) that the plate angle is related to the motor angles, & and m1 & m2. So, it can reduce the expression in Eq.(1)&(2) at small motion about the equilibrium to the linear relationships as follow : = m1 = m2 Experimentally in [1], was verified the validity of this assumption. By founded that is very satisfactory between the inclinometer reading for the plate angles & and the motor angles m1 & m2, for the relevant range of operation.[1] Also for our Test-rig was verified this assumption, because there symmetry in the mechanical design between our system and [1].
Fig. 3. Plate actuation spatial linkage mechanism.
Assuming the following to use in the modeling of the system : The friction between the ball and the plate is enough to avoid the slipping of the ball on the plate. This makes the equations of motion simpler and The degree of freedom for this system to be limits. Neglect the ball rotation around its vertical axis. Neglect the roll friction between ball & plate. For ensures that angle of the plate will be roughly equal the angles of motor, there are small motion of the plate can be assumed around its equilibrium configuration.
Relation between ball position and plate angles
The Euler- Lagrange equation is:T V d T + = Qi qi qi dt qi
(3)
Where T - kinetic energy of the system; V - potential energy of the system; ̇ - first derivative of the i-th generalized coordinate by time; - i-th generalized coordinate by time; Qi - i-th generalized force The ball & plate system has four DOF, two DOF describe the motion of the ball on the plate and other two DOF describe the plate inclination. As coordinates xb and yb that describe the position of the ball and , describe the plate inclination angles, and can be assumed as the torque that acting on the plate and drive the plate inclination. Summarize coordinates can be shown in the following variables : q1 = xb , q2 = yb , q3 =
, q4 =
2016 2nd International Conference on Industrial Engineering, Applications and Manufacturing (ICIEAM) Rotational energy with translational energy for moving of the ball can describe the kinetic energy of the ball. Tb = [ ( ̇
̇)
( ̇
]( ̇
= [
̇ )] = ̇)
Ib = mr2
(5)
Equation for the kinetic energy and the ball position xb, yb about center of the ball can be described as following :)( ̇
̇ )
( ̇
̇
̇
̇
)
(6)
Total kinetic energy of the system is T = Tb+ Tp T=
)( ̇
(
̇
)
̇ )
( ̇
[
]( ̇
̇
̇
̇)
+ ybsin
(7)
)
(8)
The nonlinear of differential equations can be obtained, after all required derivation to get the particular of the Euler equation . Xb : [
] ̈ –m( ̇
̇
̇
) + mgxbsin
=0 (9)
] ̈ –m( ̇ + mgybsin
̇
̇
)+
=0
(10)
where ̈ = gsin ) ̈ +m( ̈ xbyb + ̇
:( +2 ̇
̇ xb)+ mgxbcos
+2 ̇
̇ xb)+ mgxbcos
̇ yb + ̇
̇ +
=
) ̈ +m( ̈ xbyb + ̇
:(
=
centrifugal torque as result to rotation of the plate.
)
(
) ̈
m( ̈ xbyb+ ̇ ) 2 ̇ ̇ xb mgxbcos
̇ yb+ ̇
Torque as ( angular acceleration of the ball X inertia of the plate) “ this for one axis ”.
dcos
̇
Influence of gyroscopic moments. Coriolis acceleration Moment resulting product of the weight of ball. External driving moment.
The direct input of the system are and not and in fact. The acceleration limit is below the frequency of a stepper and this why the input of the system are and not forces. Also the result for not take equation (11) and (12) in our consideration because magnitude of moment will not affect the motor position.
Overhead digital camera used with processing software for measuring the ball position, as shown in Fig. 4. the webcam take the picture and extract the position of the ball from this picture by using image processing toolboxes in software MATLAB’s/Simuink. The procedure for finding the ball on a grabbed picture consists of the following steps: The taken picture will convert to a bi-level image. We can regard that the image as a matrix with one or zero (white or black). Suppose that the ball will be white and the plate will be black in the bi-level image. Calculate the summation of elements in rows and columns of the image.
where ̈ = gsin Yb : [
̇
III. BALL-POSITION SENSOR
The center of the incline plate with the horizontal plane is relative to potential energy of the ball. V = mg(xbsin
̇
(4)
Ball inertia can be computed as
Tp = [(
m( ̇
(11) ̇ yb+ ̇ ̇ (12)
Equations (9) and (10) describe the ball motion on the plate, they say the acceleration of the ball movement depends on the angles and angular velocity of the plate inclination. Equations (11) and (12) tell how the plate inclination dynamics influenced by the external driving force, the position and speed of the ball. The interpretation of the particular terms in the equations (9) and (11) is:
The row and column with the largest sum of elements correspond to the point located at the center of the ball. Dynamic window method is executed to make the pictures capturing and analyzing process are speedup. By use this method, Instead of search the full camera frame, just only portion of frame which located concerning the ball’s estimated position is searched. At time tb, the ball’s center (xb,yb) and the ball velocity ( ̇ , ̇ ), so the corners of dynamic camera window at time tb+1 will be at (xb + ̇ (tb+1 - tb ) ± a/2 , yb+ ̇ (tb+1 - tb ) ± b/2 ) where a are the length and b and width of the dynamic camera window. Using this method, will get a short time less than regular PC in the sense of the ball’s location processing. The usage camera in the Test-rig is webcam SPZ3000 Philips with 1.3 megapixel video and photo, face tracking, 3x digital zoom. For processing real-time picture, intelligent video system are used.
2016 2nd International Conference on Industrial Engineering, Applications and Manufacturing (ICIEAM) feedback to reach better performance. It will be exciting to apply non-linear controls more than use controllers for the linear model to seek further improvements in the performance of the system. The main objective of this paper remains the control of an unstable system (Ball & plate: 2 DOF) using vision based control. There are a lot of difference between all ball on plate balancing systems that was designed before, every system has its engineering concept starting from mechanical design of the system that its different between each others, following with the difference in the actuators, sensors, and control systems. Fig. 4. Usage webcam.
Cameras and other imaging devices are popular choices for sensors due to: Their versatility. Their passiveness (a scene can be measured without inference). The large amount of data one gets from a single sample and the high sampling rate. And the fact that cameras are relatively cheap and readily available. IV.
PROPOSED CONTROL
A lot of proposed control can be established to use vision based control for ball and plate system. Classical or modern control can be suggested to moving ball on plate. In classical control lag compensator structure, lead compensator structure or PID can be used. In [2] the results shown that is not good choice to use PID, and lead controller be founded as recommendable solution when choosing within the compensating controllers because stabilization of the system will not achieved when apply a lag controller as solution for the system. In [3], as modern control, the authors suggested sliding mode techniques ( adaptive backstepping control ) with the strategy of the fuzzy monitoring. Experimentally founded that adaptive sliding backstepping control are more effectively than use conventional SMC because its need a lot of time to get a favorable tracking accuracy. V.
CONCLUSION
When the Experimental Test-rig for the ball & plate system be established, it will be available to use it as a benchmark verifying the efficiency Level of many control strategy. Then applied the control system which are tested and achieved good performance results in any mechatronics or industrial applications. Another suggestion about using full state
So the aim for our work in the future is to verify control system techniques after testing it by using our methodology that we chosen from mechanical design Fig. 1. and for actuator (L-shape linkage mechanism to rotate the plate using stepper motors) and the sensor ( webcam with image grabbing and image processing toolbox software ) as shown in Fig. 4., we can achieve this by use GUI of the compensators in real time in the system, and test the results of the ball position with real time on GUI. REFERENCES “Mechatronic design of a ball-on-plate balancing system” . S. Awtar et al. l Mechatronics 12 (2002) 217-228. [2] Andrej Knuplei, Amor Chowdhury, Rajko SveEko “Modeling and Control design for the ball and plate system (2003)” journal of institute of Electrical and Electronics Engineers (IEEE)Smetanova 17, SI-2000 Maribor, Slovenia. [3] Zhankui Song n, KaibiaoSun “Adaptive backstepping sliding mode control with fuzzy monitoring strategy for a kind of mechanical system”. [4] Z. Song,K.Sun/ISATransactions53(2014)125–133 [5] Hongrui Wang, Yantao Tian, Zhen Sui, Xuefei Zhang and Ce Ding “Tracking Control of Ball and Plate System with a Double Feedback Loop Structure”. [6] Marco A.Moreno-Armenda´riz , Ce´ sar A.Pe´rez-Olvera, Floriberto OrtizRodrıguez , Elsa Rubio “Indirect hierarchical FCMAC control for the ball and plate system” . Neurocomputing 73(2010) 2454-2463. [7] Aneeq Zia “Polar and Polygon Path Traversal of a Ball and Plate System“.978-1-4244-8165-1/11/$26.00 ©2011 IEEE. [8] A. Zeeshan*, N. Nauman**,M. Jawad Khan** “Design, Control and Implementation of a BaIl on Plate Balancing System”. Proceedings of 2012 9th International Bhurban Conference on Applied Sciences & Technology (IBCAST). [9] F. C. Braescu, L. Ferariu, R. Gilca and V. Bordianu “Ball on plate balancing system for multi-discipline educational Purposes”. are with the“Gheorghe Asachi” Technical University of Iasi, 27 Dimitrie Mangeron Bd.,70050, Iasi, Romania . [10] YongkunWang, MingweiSun, ZenghuiWang, ZhongxinLiu a, Zengqiang Chen “A novel disturbance-observer based friction compensation scheme for ball and plate system” ISA Transactions53(2014)671–678 2013 ISA. Published by Elsevier Ltd. [11] [10] Samira K. Radi, Yahya A. Faraj, Yousif Amsad “Theoretical Design of a [12] Ball Balancing on Plate Controller “, Journal of Engineering and Development, Vol. 12, No. 4, December (2008) ISSN 1813-7822 [1]