International Journal of Fuzzy Logic Systems (IJFLS) Vol.3, No.1, January 2013
FUZZY CONTROL FOR NONLINEARBALL AND BEAM SYSTEM AbdulrahmanA.A.Emhemed College of Electronic Technology-BaniWalid, Libya. abdo_83f@yahoo.com
ABSTRACT This paper studies the control of the ball-and beam system by different controllers. Many nonlinear controllers for ball and beamsystem can achieve in some cases asymptotic stability.On the other hand, many laboratories useProportional Integral Derivative control for the ball and beam system, but theory analysisis based on a linear approximate model. Therefore, some methods of controlfor the ball's position in this system are required for getting ideal system. The fuzzy logic controller will achieved ideal response of the stability of Ball and Beam system.Later in this paper, we will implement a PID control and fuzzy logic control to get the ideal stability. The paper had shown great progress and successful results.
KEYWORDS Ball and beam, PID controller, fuzzy logic control, stability.
1. INTRODUCTION: The ball and beam system is a highly nonlinear and open loop unstable system. To develop an accurate model and great stability of the ball and beam system, the fuzzy controller technique is needed.The ball and beam system is one of the most popular and important bench systems for studying control systems. Many classical and modern control methods have been used to enhance and investigate stabilizeand the ball and beam system. Wen Yu (1999) there are two problems for ball and beam control: (i) many laboratories use simple controllers such as PO control, but theory analysis is based on linear models, and (ii) nonlinear controllers for the ball and beam system have good theory results. But they are seldom used in laboratories. Little effort has been made to analysis PO control with nonlinear models. In this researchWen Yumodifythenormal POcontrolusingtwomethodsfortheball andbeamsystem: parallelandserial PO regulations; then we analyze the stability of these types of PO regulations with the complete nonlinear model. Realexperimentsareappliedtotestourtheoryresults.This papergivesagoodexampleofhow to apply nonlinear theory in the laboratory for control education. Keshmiri (2012) introducedesign for LQR considering two Degrees-of-Freedom andcoupling dynamics. The parameters of the LQR are tuned using (GA). Jacobian linearization method is used to linearize the system around operating-point. Due to the noise of the sensor in the experimental setup, a state observer is designed to observe the velocity of the ball. In order to DOI : 10.5121/ijfls.2013.3103
25
International Journal of Fuzzy Logic Systems (IJFLS) Vol.3, No.1, January 2013
compare the performance of the LQR and study the effect of simplifying assumptions, two control strategies are designed and implemented: (PID) as non-model based control strategy, hybrid PID and LQR as combination of model based and non-model based control strategies. The experimental results of this research prove the model based control strategies of the ball and beam system andusing LQR with GA affected to optimize the stability and getting best result compared to other controllers. Ravichandran and Mahindrakar (2010) present a nonlinear control law to locally asymptotically stabilize the ball on a circular beam system. A series of nonlinear coordinate transformations is applied to the system to transform the original system into a strictfeedback form. This structure paves the way for the application of backstepping technique to arrive at a Lyapunov function. Simulation results show the efficacy of the proposed control strategy. Yang Song, and MinruiFei (2008) their paper studies the stabilization of the ball-and beam system by using switching control and state feedback. A numerical example is shown to illustrate an error in the results of paper. The reason causing such error is analyzed and the corresponding corrections are provided. The step of designing switching control strategy is presented. A lot of researches and studies have dealt with the problems of controlling the ball on a beam system. In this research intelligent control is used to improve the stability compare to classical control.
2. MATHEMATICAL MODELING OF BALL AND BEAM SYSTEM A ball is placed on a beam, as shown in figure 1, where it is allowed to roll with 1 degree of freedom along the length of the beam. A lever arm is attached to the beam at one end and a servo gear at the other. As the servo gear turns by an angle , the lever changes the angle of the beam by . When the angle is changed from the horizontal position, gravity causes the ball to roll along the beam. A controller will be designed for this system so that the ball's position can be manipulated.
Figure 1.Ball and Beam system.
The Lagrangian equation of motion for the ball is given by the following: 26
International Journal of Fuzzy Logic Systems (IJFLS) Vol.3, No.1, January 2013
sin (1) Linearization of this equation about the beam angle, alpha = 0, gives us the following linear approximation of the system:
(2)
The equation which relates the beam angle to the angle of the gear can be approximated as linear by the equation below:
(3)
Substituting equation (3) into (2), so we get:
(4)
Taking the Laplace transform of the equation above, the following equation is found:
.
(5)
Divide equation (5) per θ(s) to get the ball position R(s)to the gear angle θ(s).
.
(6)
!
(7)
Where is: R is radius of the ball (0.013m); d is lever arm offset (0.02m); g is gravitational acceleration (9.81m/s2); J is the moment of inertia of the ball (9.9e-6 kg.m2); L is the length of the beam (1m); M is the mass of the ball (0.12kg);θ is the gear angle; is the beam angle coordinate.It should be noted that the above plant transfer function is a double integrator. As such it is marginally stable and will provide a challenging control problem.
3. PID CONTROL 4. PID algorithm consists of three basic modes are the Proportional, the Integral and the Derivative modes. For systems response settings should be adjusted if PID implementation is used.themost popular method used is Ziegler-Nichols method which uses only one so called ultimate-point or two numbers obtained from the response.The actuating signal for PID control is given by:
ea (t ) = e (t ) + Td
d e (t ) + K dt
i
∫ e (t ) d t
(8)
By transfer equation (8) into In Laplace domain, we get: 27
International Journal of Fuzzy Logic Systems (IJFLS) Vol.3, No.1, January 2013
E a ( s ) = E ( s ) + T d sE ( s ) +
Ki K E ( s ) = (1 + sT d + i ) E ( s ) s s
(9)
The aim of choosing PID as a non-model based control strategy is to study the effect of the dynamic equations in the performance of the control system. In order to study the effect of the coupling in the dynamic equations, the ball and beam system is divided into two subsystems. First, the beam is disconnected from the motor to separately design a PID controller for the motor. The gains are selected based on try and error and ZN method. The PID gains tuned by Ziegler Nicole method for get stability for the system.
5. FUZZY LOGIC CONTROL: The story of fuzzy logic begins by Zadeh’s first paper on fuzzy sets. The term “fuzzy logic” is not used; but Zadehmentions Kleene three-valued logic (just in passing).Goguen’s 1968–1969 paper speaks on logic of inexact concepts but the term “fuzzy logic” occurs there (Is this the first occurrence of the term in the literature?) The paper is very general, introduces algebras called closg, very near to algebras presently called residuated lattices, as algebras of truth functions of connectives for many-valued logics of inexact concepts,As an example he presents the unit real interval [0, 1] with product and its residuum (Goguenimplication), thus a particular t-norm algebra (not speaking on t-norms). Zadeh has written several papers on fuzzy logic; an early paper is his “Fuzzy logic and approximate reasoning” from 1975, where he uses connectives of Łukasiewicz logic min, max, 1 − x, Łukasiewicz implication—but not strong conjunction. What is artificial intelligence? People with different backgrounds give different answers. For us, artificial intelligence is the study of giving machines ability to think in human way and acting as people, i.e., to develop intelligent machines to solve complex real problems and to realize machine intelligence. Concretely, the goal of machine intelligence is to give machines the ability of learning knowledge from the changing environment and circumstances, to represent knowledge in appropriate and tractable forms, to make proper decision using knowledge, and applying knowledge to resolve complex problems in the real world. To achieve this aim, fuzzy logic can be taken as an alternative to the classical logic. Fuzzy Logic Control system is very important and helpful for the system modeling that is very complex and difficult for analysis by conventional quantitative methods and for the accessible sources of information and data that are interpreted qualitatively, doubtfully, therefore it’s a controllers for designing the challenging nonlinear control systems by If-Then laws that is like human intelligence and it increases the accuracy of the control action. Fuzzy controller for this study consist of two inputs ( error E and change of error DE) and one output ( OP), FLC in this study for enhancement the output response for system of the ball position to the gear angle of the Ball and Beam system. The block below shows the structure of the fuzzy logic control and the membership for the inputs and the output, and the surface viewer.
28
International Journal of Fuzzy Logic Systems (IJFLS) Vol.3, No.1, January 2013
Figure 2.the fuzzy logic inputs and the output of the system.
Figure 3.the first input of the fuzzy control “error E”.
Figure 4.the second input of the fuzzy control “change of error DE”.
Figure 5.the output of the fuzzy control. 29
International Journal of Fuzzy Logic Systems (IJFLS) Vol.3, No.1, January 2013
Figure 6. The 3-D D characteristic curve of the fuzzy logic controller “the surface viewer”.
6. RESULT AND DISCUSSION: The system designed using two type of input to observe the result for two cases and that clear in the two cases that fuzzy logic control gives the ideal where the fuzzy rule are same in both cases in sine wave input and step response input, with very limited ed error and more quality response compared to the classical PID control.
Figure 7. The output response of FLC, PID controller in case step input.
Figure 8. The output response of FLC, PID controller in case sine wave input.
30
International Journal of Fuzzy Logic Systems (IJFLS) Vol.3, No.1, January 2013
Figure 9. The output response of FLC, PID controller Figure 10. The output response of FLC, PID controller in case sine wave input. in case step input.
The output response simulation of FLC, PID controller. The overshoot of the output response in the FLC is 0% compared to 2.8 % in in the PID controller case results and FLC has the better transient response compare to PID. Also that clears in sine wave input for FLC is better in less overshoot and better transient response and limited error compare to PID control response.
7. CONCLUSION: This paper presented a modeling and control of Ball and Beam system. This study shows the effect of the intelligent FLC for enhancement the response for system by the ball position to the gear angle of the Ball and Beam system.Different controllers presents that the effect of the fuzzy logic controller achieved ideal response of the stability of Ball and Beam system.We implement a PID control and fuzzy logic control to get the ideal stability and the FLC is better in less overshoot and better transient response and limited error compare to PID control response. The paper had shown great progress and successful results.
REFERENCES [1] [2] [3] [4] [5] [6]
J. Hauser, S. Sastry& P. Kokotovic, “Nonlinear Control via approximate input-output linearization: the ball and beam example”, IEEE Transactions on Automatic Control, 37(3), 392-398, 1992. ASTRÖM, K. J. - HÄGGLUND, T. (1995). “PID controllers. Theory design and tuning”, NC:Instrument Society of America, Research Triangle Park, 1995. ZIEGLER, J. G. - NICHOLS, N.B (1942). “Optimum settings for automatic controllers”.Trans. ASME, 64, 759-768. Wen Yu, “Nonlinear PD regulation for ball and beam system”, International Journal of Electrical Engineering Education, Vol. 46, No.1, 59-73, 2009. Keshmiri, Jahromi, Mohebbi, Amoozgar and g 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, NO. 1, MARCH 2012. HoushyarAsadi, ArashMohammadi, MaysamOladazimi, “Stabilization Ball and Beam by Fuzzy Logic Control strategy”, Fourth International Conference on Machine Vision (ICMV 2011). 31
International Journal of Fuzzy Logic Systems (IJFLS) Vol.3, No.1, January 2013 [7] [8] [9] [10] [11] [12] [13] [14] [15]
C Aguilar-Ibanez, M Suarez-Castanon, and J Rubio, “Stabilization of the Ball on the Beam System by Means of the Inverse Lyapunov Approach”, Mathematical Problems in Engineering. Volume 2012. Aakash A. Ravichandran and Arun D. Mahindrakar, “Stabilization of a Circular Ball-and-Beam System”, 11th Int. Conf. Control, Automation, Robotics and Vision, Singapore, 7-10th December 2010. YangSong, MinruiFei , “Switching stabilization for ball-and-beam system”, 7th World Congress on Intelligent Control and Automation, WCICA 2008. Qing Wang, Man Mi, Guangfu Ma, Spronck, P., “Evolving a neural controller for a ball-and-beam system”, Machine Learning and Cybernetics, 2004. Proceedings of 2004 International Conference on, 757 - 761, 26-29 Aug. 2004. Pierre R. Bélanger, “Control Engineering: A Modern Approach”, USA: Saunders College Publications, 1995 F. Blanchini, “Set invariance in control - a survey”, Automatica, vol. 35, 1747-1767, 1999. W. Yu, “Nonlinear PD Regulation for Ball and Beam System”, International Journal of Electrical Engineering Education, Vol. 46, pp. 37–59, 2009. A. D. Mahindrakar and V. Sankaranarayanan, “State-constrained stabilization of beam-balance systems”, International Journal of Robust and Nonlinear Control, vol. 18, 333-350, February 2008. Li X. and Yu W., “Synchronization of Ball and Beam Systems with Neural Compensation”, International Journal of Control, Automation and Systems, Vol. 8, No. 3, pp.491-496, 2010.
AUTHOR AbdulrahmanA.A.Emhemed is a lecturer at College of Electronic TechnologyBaniWalid, Libya. Currently he is a PhD student at UniversitiTechnologi Malaysia, Faculty of Electrical Engineering, Department of Mechatronics and Robotics Engineering; He has many papers published at conferences and journals. Mr.Emhemed is a member for many international institutes and engineering associations such as Institute of Electrical and Electronics Engineering (IEEE), SCIence and Engineering Institute (SCIEI), and the International Association of ENGineers (IAENG). His area of interesting is Artificial Intelligent, Microcontroller Applications, Robotics, and Process Control.
32