Simulation of a Ball on a Beam Model Using a Fuzzy-dynamic and a Fuzzy-static Sliding-mode Controller

This study presents the design of a Fuzzy Static (FS) and a Fuzzy Dynamic (FD) Sliding-Mode Controllers (SMC) for both basic and complete ball on beam system. At first, the FSSMC was designed for the simplified and the complete models. Then, the FDSMC was designed on the simplified and the comprehensive models of the system in which the ball is placed on a beam as well. In addition, the lyapunov stability and linearization were used to check the stability of the system. There is an in-built issue of chattering with (FSSMC). However, (FDSMC) counter it well. Also, FDSMC is effective with respect to matched disturbance rejection. It has been found out from this research study that the designs of the models which utilize a FDSMC with a comprehensive model of the system were more efficient than the designs that utilize the basic system’s prototype. Lastly, a comprehensive comparative analysis is provided and MATLAB/SIMULINK outcomes confirm the dominance of FDSMC.


INTRODUCTION
The issue of the positioning of the ball on a system in which the ball is positioned on a beam has been the matter of great interest in many previous researches.The consideration of the nonlinear system of a ball on a beam has created an issue.For example, it was supposed that a system of a ball on a beam is not considered as an input-output linearizable because the degree related to this is not clearly explained (Marton and Lantos, 2006;Tomlin and Sastry, 1997).To overcome this problem, a simplified nonlinear model (i.e., by neglecting some terms in designing a controller) was utilized to estimate the real model of a system in which the ball is placed on a beam.Applying this technique (a simplified nonlinear prototype) of the system in which the ball is placed on a beam (Manan Khan et al., 2012;Almutairi and Zribi, 2010), most of the researchers have presented a variety of controllers; as an example, look to Chen and Balance (2002) and Li et al. (2003).From the point of view of previously carried out researches, the "the linear feedback is approximated in the condition if the system is near to singularities.On the contrary, an approximate sliding mode is used for the controller by changing it to the "exact feedback-linearization controller."The changing of the denominator of the control law is carried out in order to overcome the issue of singularity.Because of this alteration in the control mechanism, the resulting bounded sliding surface causes an overall efficiency to decrease.
In 1965 Fuzzy Logic was presented as a new kind of mathematical set method by Zadah (Jaradat et al., 2012), which consists of the fuzzy set theory that was proved to be the foundation theory of fuzzy logic.The fuzzy control system is basically established on the fuzzy logic principle that mainly comprises of three phases; fuzzification, inference engine and defuzzification.The first phase converts the inputs into fuzzy sets.While, the inference engine describes the fuzzy rules in the second phase, which is related to the outputs via specific rules using the sets of inputs.The last phase pools the outcomes of the fuzzy rules and infers the decision, which is then transformed from fuzzy sets to a sharp value (Magzoub et al., 2013).
Ball and beam are a practical example which is used in many laboratories because it is easy to understand.It is an open loop system which is not stable due to the unrestricted movement of the ball on the beam.Many applications (Chang et al., 2012;Hung and Chung, 2006;Nagarale and Patre, 2013a, b) show that FLC is superior to conventional controls in terms of control performance.It can be developed and implemented relatively easily and is capable of providing adequate control.The elimination of the need for a detailed modeling work is another advantage.Moreover, less sensitive, more tolerant to process state deviations and also to process parameter changes are presented.However, the limitation of the FLC is the lack of a sound design methodology.The feedback control is required to hold the ball in the actual position on the beam.In this research study, a fuzzy-stationary and fuzzy-dynamic sliding mode control of the model will be applied by considering both simplified and complete modes.Moreover, the study of the system input, output linearization will be carried out and the stability will be monitored by using the lyapunov stability theory.Controller designs and the simulation results will be shown using a MATLAB/SIMULINK program.Figure 1 shows a real system in which the ball is positioned on a beam.METHODOLOGY Modeling of the system in which the ball is placed on the beam: Considering the Fig. 1, which shows a system of a ball on beam, there is a ball on a beam which is allowed to move freely over the length of the beam with one degree of freedom.One end of the beam is fixed with a lever arm and the other side with a servo gear.By changing the servo gear with an angle (θ), the beam angle is altered by the lever with an angle (α).By altering the angle horizontally, the ball is rolled over on the beam due to gravity.Mathematically, the system comprises of the dynamic prototype of the system and the dynamics of DC servomotor in which the ball is positioned on a beam.The equations from are described as equations of motion which describe the system of the ball placed on a beam are presented by Manan Khan et al. (2012) and Almutairi and Zribi (2010 The factors k 1 , k 2 , k 3 and k 4 are the functions of the system parameter as below: ν in : Voltage given as input of motor u (t) = K 3 v in (t) : Control input to the ball on a beam system Modeling of the system by utilizing the simplified prototype: This section presents the designing of dynamic mode controllers and the stationary for the system of a ball on the beam by utilizing the simplified method (i.e., neglect the term 2 α& r ).The Eq. ( 1) and ( 2) can be revised as: ( ) State space model of the system: After the term 2 α & r is ignored in Eq. ( 4), now the condition of the system can be presented as: A model after the simplification of the system will be redrafted as: And suppose that the system's output is presented as: Linearization of the system model: Jacobian method has been used to get the linear model around the origin X e = [0 0 0 0] T , which is the stable point of the system.So the linear model will be as the following: After the stability is checked around this point (local stability), the system is found locally unstable then globally will be unstable.

DESIGN OF A FSSMC AND FDSMC BY UTILIZING THE SIMPLE MODEL
The general design procedure of FSSMC and FDSMC is discussed in this section.The basic block diagram for a ball on a beam with FSSMC and FDSMC are illustrated in Fig. 3.These proposed controllers are approximates the discontinuous control and minimizes the chattering problem of SMC.And they are an extension of an SMC with the boundary layer as shown in Fig. 4.This extension will guarantee asymptotic stability of fuzzy controllers, which they lack in them.

Fuzzy logic controller:
The system has a Single-input-Single-output.The linguistic variables for the components of input membership functions s i are developed in Table 1.The output membership function is a singleton function, whose fuzzy sets are described on the normalized universe of discourse as: where, u e is an equivalent control derived using equivalent control technique and k is the gain of the control, the output and input membership functions are revealed in Fig. 5.The singleton membership function is given as: where, u i is an element of a universe of discourse.The general fuzzy rule for the FSSMC and FDSMC is defined as: where, ˘G and ˘I are fuzzy sets.The compositional rule of inference, which determines the impact of the antecedent measure of the fuzzy rule on ensuing part of the fuzzy rule, is described as: The crisp output value is taken out from the fuzzy output via the center of an area defuzzification principle known as:   The outcome of the defuzzified output for fuzzy inputs has the form: Fuzzy static sliding mode controller: The SMC theory (Chen and Balance, 2002;Li et al., 2003) utilizes uneven control action to stimulate state trajectories toward a particular hyperplane in the state space and to preserve the state trajectories sliding on the particular hyperplane until stable equilibrium state is reached (Fig. 6).This standard offers assistance to design a FSSMC.The first controller with a sliding mode for a system of a ball on a beam will be designed by utilizing the basic prototype of the system which consists of a ball on a beam in Eq. ( 5).This controller aims to adjust the position of r to the required constant value defined as r d while causing α to reach to its stability value α e = 0.
For FSSMC let the regulation error to be: Then, a slidcharacterizede can be characterized as: where, b 1 , b 2 and b 3 are the sliding hyperplane parameters.In order to design the control input u (t) so that the state trajectories are determined and enticed toward the sliding hyperplane and then keep sliding on it, the following inequality must be satisfied: So that implies: where, k 1 and k 2 constants chosen strictly positive.Asymptotically causes the system's output to become stable y = x 3 = r to its required value r d and it results in stabilizing all the other states of the system.The simulation is carried out to form the controller and the surface into the MATLAB to form s-function and after that, a SIMULINK is used to achieve the required results and it is supposed that α, Ӕ and JӔ are reaching to zero while t→∞ otherwise r→r d .The designed controller encounters the undesirable and unwanted issue of chattering which is also faced by all the other variable-structure controllers.A schematic of the dynamic sliding-mode controller is suggested which resolves the issue of chattering as follows.
Fuzzy dynamic sliding mode controller: For FDSMC defining the error sliding hyperplane as: Then the resultant is: This is guaranteed that: Hence, it is verified that the controller with a FDSMC ensures the asymptotic convergence of all the conditions of the system to their required values.This causes a condition of the system to become asymptotically stabile to their required states after the application of the system of a ball on a beam.

Design of a FSSMC and FDSMC by utilizing the comprehensive model:
A FDSMC and a FSSMC for the system of a ball on a beam, by utilizing the precise model of the system, are presented without ignoring the part 2 α & r .Similar to design of FSSMC and FDSMC by utilizing simplified model, the error sliding hyperplane and the sliding hyperplane can be defined.As noticed previously from the earlier discussed section the proposed static controller was encountering the problem of noise in the control signal, which is practically not desirable.So these types of controllers with comprehensive model have been presented in this portion to resolve this issue.So that it causes the states of the system to become steady asymptotically up to the required values, once implemented in the system of a ball on a beam.

SIMULATION RESULTS
The controllers will be designed by using MATLAB/SIMULINK software.Parameters of the system are extracted from the Quanser ball on a beam apparatus (Motion, Rotary and Servo Plant, Year).In the Table 2, the detailed values of the parameters of the system in which the ball is placed on a beam are presented for simulation purpose.
Figure 7 to 9 shows the simulation results of ball position r d , the output of the system controller and the angle of the beam α output with respect to time respectively, when simplified model has been used.It is clear that the issue of chattering has been resolved up to a greater extent and the desired output ball position is being achieved faster when FDSMC have been used in comprehensive models compare to FSSMC and conventional SMC.
From Fig. 10 to 12, it can be concluded from the above observations that ball was positioned at the positive responses in all the circumstances are satisfactory and the problem of chattering has been overcome in the case of using the FDSMC in a complete model.Also, the system is healthy for the coordinated disturbances under the design control law

CONCLUSION
This study presents a method to create a schematic of a Fuzzy Static (FS) and Fuzzy Dynamic (FD) Sliding-Mode Controllers (SMC) for both a complete and a simplified system of a ball on the beam.Firstly, a FSSMC is designed on the simplified and the complete and model.Then, a FDSMC is designed for the complete and the simplified Ball on a Beam system as well.In addition, the lyapunov stability and linearization have been used to check the system's stability.The result drawn from this research study is that the design which uses the FDSMC in comprehensive prototype of the system is more efficient than the ones that were designed by utilizing the basic conventional prototype of the system.Simulations are shown using MATLAB/SIMULINK program.
1) where, α (t) : Angle of the beam r (t) : Position of the ball θ (t) : Angle of servo gear g : Gravitational constant m : Mass occupied by ball M : Mass occupied by beam L : Beam length The system's parameters are: R m : Resistance of an armature of the motor J m : Operative inertial moment K m : Torque constant of motor K g : Ratio of gear d : Level arm offset K b : Back EMF constant J 1 : Moment of inertia of the beam

Fig. 1 :
Fig. 1: Real ball on a beam system

Fig. 3 :
Fig. 3: The block diagram of FSSMC/FDSMC for a ball on a beam system

Fig. 4 :Fig
Fig. 4: The main idea of FSSMC and FDSMC schematic diagram

Fig. 7 :Fig. 10 :
Fig. 7: The response of the system for ball position in a simplified model

Table 1 :
Table of the fuzzy rules

Table 2 :
Values of the parameters of the ball on a beam system