APP下载

Modeling and Simulation of Two Axes Gimbal Using Fuzzy Control

2022-08-24AymanAlyMohamedElhabibBassemFelembanSalehandDacNhuongLe

Computers Materials&Continua 2022年7期

Ayman A.Aly, Mohamed O.Elhabib, Bassem F.Felemban, B.Salehand Dac-Nhuong Le

1Department of Mechanical Engineering, College of Engineering, Taif University, Taif, 21944, Saudi Arabia

2Control and Mechatronics Division, School of Electrical Engineering, UTM, Johor Bahru, 81300, Malaysia

3Institute of Research and Development, Duy Tan University, Danang, 550000, Vietnam

4School of Computer Science, Duy Tan University, Danang, 550000, Vietnam

Abstract: The application of the guided missile seeker is to provide stability to the sensor’s line of sight toward a target by isolating it from the missile motion and vibration.The main objective of this paper is not only to present the physical modeling of two axes gimbal system but also to improve its performance through using fuzzy logic controlling approach.The paper is started by deriving the mathematical model for gimbals motion using Newton’s second law, followed by designing the mechanical parts of model using SOLIDWORKS and converted to xml file to connect dc motors and sensors using MATLAB/SimMechanics.Then, a Mamdani-type fuzzy and a Proportional-Integral-Derivative (PID) controllers were designed using MATLAB software.The performance of both controllers was evaluated and tested for different types of input shapes.The simulation results showed that self-tuning fuzzy controller provides better performance, since no overshoot,small steady-state error and small settling time compared to PID controller.

Keywords: Gimbal system; self-tuning fuzzy; proportional-integral-derivative(PID) control; cross coupling

1 Introduction

Weapon history has evolved in tandem with human history.Recent weapon systems are evolving to cause the least amount of human harm and to neutralize military facilities.The primary goal of a missile is too accurately to shoot the moving and fixed targets.As a result, it has been steadily producing missiles that use different seeker technologies.The seeker system’s function is to actively track up to the target by detecting and locking on to the object.In this system, there are many sources of noise and disturbances, which come from vibrations of the seeker and maneuvering of the missile while flighting, also there is a decoupling in the line of sight (LOS) between the seeker and the object.So, it is realized that the seeker consists of a two-axis gimbal platform to track stably and make a stabilization loop [1].

In the two-axis gimbal system, dc motors are connected to each axis as actuating parts, for the sensing part, two sensors are used a gyro is used to measure the speed and position sensor for angle measuring.To avoid disturbance and measure stable values, sensors are located on the inner gimbal.Most disturbances result from missile motions, gimbal system geometry, and gimbal system imperfections like mass unbalance [2].Therefore, the dynamics of the plant must be expressed in analytical form before the design of the gimbal system is taken up.The mathematical model and control system of two axes gimbal system has been studied by many research.Rue [3] presented the kinematics and geometrical coupling relationships for two degrees of freedom gimbal assembly for a simplified case when each gimbal is balanced.In [4], Ekstrand derived the equations of motion for the two axes gimbal configuration by assuming the gimbals have no mass imbalance and inertia disturbances and cross-couplings can be eliminated by certain inertia symmetry conditions.For one degree of freedom gimbal studied in [5], the static and dynamic imbalance disturbance torques created by the vibrations of the operating environment can be eliminated by statically and dynamically balancing the gimbal, which is regarded costly and time-consuming.

On the other hand, many controllers were designed and studied for years to stabilize the gimbal system.Nonlinear controllers such as, in [6] Sliding Mode Controller (SMC) is used under the assumption of uncoupled identical elevation and azimuth, although the controller was able to provide good results in terms of control design specifications, it lacks the simplicity of the design.In[7]authors presented a novel control approach to improve the performance of the system against internal and external disturbances, which consists of a backstepping controller, nonlinear disturbance observer,and two third-order reference models.According to simulation results, the controller improved the angular velocity precision and accurately tracks the desired rotation angles and angular velocities with very good transient and steady-state responses.Altan [8] used Model Predictive Control (MPC) with Hammerstein model to improve real time target tracking performance under external disturbance for a three-axis gimbal system.Based on the simulation and experimental results he found MPC algorithm with Hammerstein model provided good tracking to the target while maintaining the stability under external disturbances compared to the PID controller.Linear and optimal controllers (PID, Linear Quadratic.Regulator(LQR))are limited to linear systems, andmuch tuning for parameters is required to obtain good performance and is difficult to be realized.Recently fuzzy logic controlling approach has been developed to improve the performance of the system and to deal with nonlinear models and uncertainties [9,10].Therefore, this paper will focus on the designing of an intelligent controller (fuzzy logic controller) for a two-axis gimbal system and the PID controller will be used for comparison purposes.

This paper is organized as follows, it started by derivation the mathematical model of the system by using Lagrange equations followed by 3D physical modeling of two-axis gimbal using MATLAB Simscape, after that fuzzy logic controller based Mamdani type designed for inner and outer loops.Finally, the simulation results of both fuzzy and PID controllers are presented.

2 Mathematical Modeling

Let the figure of under consideration system as shown as in Fig.1.

Figure 1: Two axis gimbal system

It contains a body with outer and inner gimbals such that the tracking sensor is mounted on the inner gimbal.In this regard, three references frames can be defined as body frameB, outer frameO,and inner frameI.The coordinate axes of these frames are {XB,YB,ZB}, {XO,YO,ZO} , and {XI,YI,ZI}respectively.As it is seen in figure φ is the rotation angle of outer frame about theZOaxis in the positive direction with respect to the body frame, and θ is the rotation angle of the inner frame about the outer frame aboutYIaxis.

LetLOBis the transformation fromBtoOandLIOis the transformation fromOtoI, the transformation matrices will be:

For the inertial angular velocities of frameB,O, andIwith respect to themselves, the following vectors are introduced:

p,q, andrare stands for roll, pitch, and yaw respectively, as usual notations in the flight system.

Jrepresents the moment of inertia and product of inertia denoted byDord.If we assumed that the center of the gimbal is in the common center of rotation, then there is no mass unbalance in the gimbals.If we consider the stabilization loop of the system, with the above notations, the aim is to keep the sensor non-rotating in the inertial space in the presence of the disturbances, which is achieved by keepingqi=ri= 0.qiandrican be measured in two ways; the first way by fixing a two-axis rate gyro on the inner gimbal.The other way is to use body-fixed rate gyros and using the gimbal angles Ø and θ.For this, consider the following vector:

From the above equation, the relations between angular velocities of the outer gimbal, body, and inner gimbal are as follow:

From Eqs.(6) and (7), the angular velocities of the outer and inner gimbals will be as follows:

2.1 Equation of Motion about the Pitch Axis

The gimbal dynamics model can be derived from the torque relationships about the inner and outer gimbals.The equation of motion for the inner gimbal can be expressed as follows:

whereTUIx(t),TUIy(t), andTUIz(t) are the mass unbalance torque about the inner gimbal axes,TIy(t) is the applied control torque,TIx(t),TIz(t) are the reaction torque between inner and outer gimbal, andTIfω(t) stands for the friction and cable restraint torque and can be generate both linear and nonlinear disturbance as follows:

The inner gimbal motion equation about the pitch axis can be expressed as:

whereTIyis the external torque about the pitch axisTI,fricandTI,CRare non-linear friction and non-lnonlinear cable restraint torque respectively,KIf,KIware the viscous friction and cable restraint coefficients respectively, andTDis the undesired external disturbance torques due to the inertial terms as:

The relation (14) can be considered with some approximation, and it is seen that how the disturbance torques due to theinertial terms can be vanished.For instance, if the products of the inertia are negligible and moments of inertiaJixandJizbe equal, that is,

Then,TDis equal zero.In the procedure of the design, it should be tried satisfying the condition(14) and (15) in order to delete the disturbance due to the inertial terms.By using the relation (9), the Eq.(14) can be rewritten as:

If the body is non-rotating, i.e.,p=q=r= 0, then from the relation (8) we havep0=q0= 0 andTBwill be zero.However,TCis not necessarily zero and the motion of the outer gimbals.In the control point of view,TCrelated to the cross couplings between two axes, andTBis the disturbance due to the rotation of the body.It is obvious that if Eqs.(14) and (15) are satisfied, both terms will vanish.

2.2 The Equation of Motion about the Yaw Axis

The equation of motion for outer gimbal can be expressed as:

In which, all the parameters and coefficients are defined as a similar manner in the Section (2.1)andTOfw(t) again can be written as:

whereTOzis the external torque about the yaw axis and other coefficients are as before with suitable index,JSis the total moment of inertia about the outer gimbalZoaxis.If the inner gimbal rotates,angle θ will change and thereforeJSis an instantaneous moment of inertia aboutZoaxis dependent upon θ variations as follows:

The external undesired disturbance torquesTDin Eq.(21) can be considered as:

where,

These terms of disturbance torque can be interpreted as follows.Suppose the rotation angle of θ is constant, i.e.,˙= 0.It is resulted thatTd3+ 0.Relations (24) and (25) indicate thatTd1andTd2are the disturbance terms of equation motion of the rigid body for the gimbal system aboutZoaxis.Td1is due to the difference of the moments of inertia andTd2comes from the products of inertia and both are dependent upon θ.However, in the case of that θ is varying, the gimbal system is not further a rigid body and an extra term is produced,Td3, which affects the equation of motion.In this case also,we can consider the conditions which cause disturbance rejection.Most of the disturbance terms in relations (24)-(26) can be deleted by satisfying the following conditions:

By using the relation˙θ=qi-qo, the sum of the disturbances terms is:

If the mechanical design is such that the condition (34) is satisfied, then the total disturbance reduce toJiypoq, which cannot be deleted.

The last manipulation which should be done on the derived equation of the outer gimbal is to rewrite the equation according to theriinstead ofrosinceriis the controlled output variable.This can be simply accomplished by using the relations (8) and (9).In the similar manner of the inner gimbal,theTDcan be interpreted by introducing the cross coupling.

By using relation˙θ=qi-qo,TDis rewritten as:

where,

For a non-rotating bodyp,q, andrare zero and we havepo=qo= 0, which results inTb= 0.However, even in this case there is a cross coupling termTcwhich is due to the inner gimbal motion.Tcwill be zero if conditions (27) and (28) are satisfied.

3 Physical Modeling

Physical modeling is a way of modeling and simulating systems that consist of real physical components.It employs a physical network approach, where Simscape blocks correspond to physical elements, such as pumps, motors, and op-amps.By joining these blocks by lines corresponding to the physical connections that transmit power.This approach can describe the physical structure of a system, instead of linear and nonlinear equations.These virtual devices can drastically reduce the cost of testing control systems, software, and hardware.It can also improve the quality of the final product by enabling more complete testing of the entire system.SOLIDWORKS was used to design the gimbal, which consists of 3 parts as in Figs.2 and 3 and connected by two revolute joints.Each joint was driven by a dc-motor (not shown in the figures below) via a gearbox.The mounting point of the camera on the body (3) in the θ direction.

Figure 2: Two axis gimbal Simscape diagram

4 Fuzzy Controller Design

Fuzzy logic and fuzzy sets have been around now for more than 20 years.In 1965, Zadeh first proposed fuzzy sets, which are considered as an approach to processing data, and they became popular in the different fields of science.In (1974) Mamdani presented a fuzzy controller method and it gained high popularity in the engineering field [11-20].Fuzzy Logic similar to the human decision-making methodology deals with vague and imprecise information.

Figure 3: Two axis gimbal SOLIDWORKS design

Thus, it is easier to understand since its working principle depends on the linguistic statements.The fuzzy controller comprises four main phases, which are the fuzzification phase where the input values are converted to a fuzzy variable (linguistic variables).In this paper we used two input variables to control the dc motors, which are error (e) of the dc motor motion, and its derivative error (e.) with three fuzzy subsets are both, which are [H M L] and [N Z P] respectively, by using three Gaussian membership functions as in Figs.4a and 4b.

The output has five subsets represented using z-membership functions as shown in Fig.5, the subsets are [FC SC NC OS OF], whereFCis fast close,SCis slow to close,NCis no change,OSis open slow, andFCis open fast.For the Fuzzy inference system, the MAX-MIN approach was used to determine the degree of membership function of the output variables.In the defuzzification phase, all the consequents were aggregated to obtain a crisp output in order to produce a non-fuzzy control that best represents the degree of certainty of an inferred fuzzy control action.They are several numbers of procedures of defuzzification the rules output-aggregate for the Mamdani method.In this project Center of gravity was used because it is considered the most efficient in that it gives a defuzzification output.

Figure 4: (a) Membership function of the error; (b) Membership function of the derivative error

Figure 5: Output membership function

5 Simulation Results

The two axes gimbal system is validated using MATLAB/Simulink environment is depicted with SimMechanics model in Fig.2.A comparison of the proposed self-tuning fuzzy controller and conventional PID is carried out using step input commands in elevation and azimuth axes.As an example, one case of system response is displayed in Figs.6a and 7a, respectively.The response of elevation illustrates that the rise time of PID control is 0.086 s with a small overshoot amplitude of 0.5% and for fuzzy it was 0.011 s with no overshoots while the steady-state error also improved from 0.0015 to be 0.001.The azimuth response with different step input amplitude assured the superiority of the proposed self-tuning fuzzy compared with the traditional PID.The rise time decreased from 0.093 s to be 0.013 s and the overshoot amplitude is changed from 0.063% to be nearly zero also the steady-state error decrease from 0.006 to be 0.002.The angle rates obtained from the derivation of the angle positions are shown in Figs.6c and 7c.It is clear that the PID controller creates an overshoot and increases settling time.While a fuzzy controller can meet the variation of angle position and improve the transient and steady-state performance by achieving fast response with no overshoot as compared to conventional PID.

Figure 6: (a) The gimbal elevation step response for angular input; (b) the error signal; (c) the angular rate signal

Figure 7: (a) The gimbal azimuth step response for angular input; (b) the error signal; (c) the angular rate signal

To confirm this efficiency, many comparison tests indicated using different inputs shapes.

In the following figures, a sin waves input is applied with different amplitudes for elevation and azimuth axes.The elevation axis response gave an error of 5.24×10-3with PID control and 0.15×10-3with fuzzy control while the azimuth response gave an error of 0.014 with PID control and 0.003 with fuzzy control.The error and control signal presented in Figs.8c and 9c.

Figure 8: (a) The gimbal elevation sinusoidal response for angular input; (b) the error signal; (c) the controllers signals

Figure 9: (a) The gimbal azimuth sinusoidal response for angular input; (b) the error signal; (c) the controllers signals

With the help of the control parameters of the electromechanical simulation model, the proposed fuzzy controller can track the command angle rapidly and accurately, by which high stabilization performance can be attained.

Due to fact, the elevation axis of the system is compatible with the azimuth axis to produce the final motion of the system.Therefore, it is necessary to test the control performance under movable base conditions by simulating the axes at various angles.In Fig.10 the input to elevation is sin wave and for elevation is cosine wave which finally produces a complete circle.

Figure 10: The gimbal response for elevation sin and azimuth cosine inputs

Previous results clearly reflect the efficiency of the self-tuning fuzzy controller compared to the conventional PID.The test assures the superiority of the proposed fuzzy compared with the classical PID control.It has good tracking accuracy whether for azimuth gimbal or elevation gimbal.

6 Conclusion

In this paper, a two axes gimbal system was proposed and formulated utilizing Newton’s second law.The equations for the gimbals’ motion were derived and introduced in two formulations according to the dynamic mass unbalance.The gimbal system was simulated using MATLAB/SimMechanics.A comparison between the system responses with different inputs shapes was made and the comparison results verified the proposed model.The responses have been analyzed, then the performance of the Self-tuning fuzzy controller has been tested using transient response analysis and a quantitative study of error analysis.Based on the obtained results, some observations can be cleared.

The proposed self-tuning fuzzy control provides good adaptivity to the gimbal system which offers high performance so that it can be utilized more efficiently in the dynamical environment that usually imposes large variable base rates.It is clear that the proposed fuzzy controller can reduce the response settling time as compared with the conventional PID controller.

Finally, the proposed fuzzy controller improves the closeness of System response and supports the system relative stability by reducing the response overshoot considerably without increasing the response rise time dramatically.

Acknowledgement:Taif University Researchers Supporting Project number (TURSP-2020/260), Taif University, Taif, Saudi Arabia.

Funding Statement:The authors would like to thank the Deanship of Scientific Research at Taif University for the grant received for this research.This research was supported by Taif University with research grant TURSP-2020/260,https://www.tu.edu.sa/En/Deanship-of-Scientific-Research/83/News/22911/Researchers-Supporting-Project-(TURSP).

Conflicts of Interest:The authors declare that they have no conflicts of interest to report regarding the present study.