Anti-rolling gyro systems (ARG) were introduced long time ago for reducing the roll motion of ships caused by the ocean waves. These systems are composed of gyroscopic stabilizer, which typically controls the roll motion by generating some counteracting roll stabilizing torque. These systems are very sensitive to the outer disturbances and require robust control mechanism to maintain the stable state. In this work, gyroscopic inverted pendulum based on gyroscopic stabilizer is considered to develop control technique for reducing the roll motion effect of the system. The gyroscopic inverted system was modeled in MATLAB/Simulink and fuzzy logic based control technique was developed. The proposed control technique was implemented and tested with the practical system. Furthermore, the performance of the proposed system is compared with a typical PD type controller. Simulation and experimental results show that the proposed system performs well and maintains a stable state under various disturbances.
The inverted pendulum system is a nonlinear and unstable system and is an ideal experimental platform for the research and verification of many control theories [1–7]. There are a lot of inverted pendulum systems, such as single link inverted pendulum [8], double link inverted pendulum [9], triple link inverted pendulum [10], rotary inverted pendulum [11], and inertia wheel pendulum [12]. All of these were designed to validate the balance control algorithms. Most of these inverted pendulums except the inertia wheel pendulum are balanced using driving torque from a fixed foundation or moving cart and can be used for the stabilization of the other mechanical platforms. The inertial wheel pendulum, on the other hand, is used widely for the balance control of some objects, especially unicycle robot [13, 14]. Generally, the inertial wheel pendulum works by generating the torque by controlling the acceleration and deceleration of the spinning flywheel. This requires very high motor driving capabilities and is less efficient. On the other hand, gyroscopic stabilizing devices are more efficient and stable. Instead of controlling the acceleration and deceleration of the flywheel, the gyroscopic stabilizing device can be used to generate greater precession torque with small directional change. Gyroscopic stabilizers use conservation of angular momentum to stabilize unstable bodies by functioning as an actuator using the phenomenon of gyroscopic precession. Therefore, in this work gyroscopic inverted pendulum was chosen as a basic platform. In order to control the system, different control techniques have been implemented by different authors comprising of controllers like PID, fuzzy logic and artificial neural network (ANN). In [15], approximate linearization was used effectively to design a controller for an inverted pendulum. Some researchers used method of applying oscillatory vertical force to the pendulum pivot [16, 17]. In [18], nonlinear auto-regressive moving average (NARMA) was implemented on inverted pendulum system.
In this work, fuzzy logic controller is proposed and implemented for the stability and control of gyroscopic inverted pendulum and compared with a PD type controller, normally used to control such system. In comparison to the previously used control techniques, the proposed controller is simple and does not require complex calculations and logic development. Modeling of the gyroscopic inverted pendulum is done using MATLAB/Simulink. Simulations were carried out to check the response and robustness of the proposed controller. Based on simulation results and parameter calculations the practical test platform was developed. Fuzzy logic was implemented using a microcontroller under normal computational time. Simulation and practical results show that the proposed controller works well to maintain a stable state and can compensate the outer disturbances effectively and efficiently.
This paper is divided into following sections: Section 2 describes the dynamics of the inverted pendulum system. Section 3 consists of modeling and validation of the system comprising of simulation and experimental test system details. Section 4 contains the simulation and experimental test results and Section 5 outlines the conclusion.
To model a gyroscopic inverted pendulum, a coordinate system is assumed. Figure 1 shows the basic coordinate system for the inverted pendulum, where θ is the roll angle along x-axis, α is the gimbal angle along y-axis and φ is the flywheel spin direction along z-axis.
The gyroscopic inverted pendulum is composed of three parts:
Pendulum body frame.
Gyroscope.
Flywheel connected to the gyroscope.
The dynamics of these parts is derived from conservation of
where T is the kinetic energy and U is the potential energy of the system. The kinetic and potential energy equations were derived for all the three parts.
where the torque of pendulum, gyro, and flywheel are:
A disturbance force d(t) acting on the x-y plane was considered and final equation of motion from Euler-Lagrange equation can be derived as follows:
From (
where
It can be observed from (
MATLAB/Simulink was used to model the system with defined parameters and simulations were carried out to check the validity.
Figure 2 shows the basic block diagram of the system, where the controller was designed by using the fuzzy logic.
Proposed fuzzy logic based controller comprises of two inputs, errore(k), change of error Δe(k) and one output i.e., pulse-width modulation (PWM) to derive a motor for generating stabilizing torque. The tilt angle θ was taken as the control parameter and controller was designed to maintain the defined reference tilt angle under varying disturbances. The membership functions of the proposed fuzzy logic based controller are shown in Figure 3.
The developed controller used the following rule base as shown in Table 2.
Figure 4 show the details of the controller block. The proposed fuzzy logic controller was compared with the typical PD type controller to observe the performance and response of the system.
The output of the controller was given as an input to the gyroscopic inverted pendulum system which consists of a DC motor to control the precession motion and generates the compensating torque to stabilize the system. Figure 5 shows block diagram of the gyroscopic inverted pendulum system and the dc motor. For developing this model, the equations derived in Section 2 were utilized.
Figure 6 shows the results obtained by simulation of the modeled gyroscopic inverted pendulum system. A disturbance of θ = 15° was applied at the start of the simulation, and simulation were carried out to observe the response of the proposed fuzzy logic controller and was compared with the typical PD controller. It can be observed clearly from the output results that the fuzzy logic controller provides better response and stabilize the system very effectively and efficiently and is very good in maintaining the reference angle θ = 0°. On the other hand PD controller tries to achieve the stabilization, but it shows a constant oscillations within the range of θ = 1.5° to θ = −1.5°.
Experiments were performed for the stabilization of gyroscopic inverted pendulum using the experimental platform shown in Figure 7.
It can be seen in the Figure 7, the gyroscopic inverted pendulum consists of three different parts. Red one is the flywheel which is coupled to a gyro stabilizer, yellow one is the gyro stabilizer, blue one is a stepping motor used to control the precession motion of the gyro stabilizer, green part shows the pendulum body frame and orange one is an IMU (inertial measurement unit) used to get the angular acceleration and angle values.
Generally, the gyro stabilizer comprises of a flywheel with large inertia which rotates at high speed and generates the natural precession motion and the compensating torque, which acts as a counteracting force and mitigate the external disturbances.
This compensating torque produced by natural precession motion is not enough to stabilize the system. For this, the experimental platform was equipped with a stepper motor. By controlling the motor speed and direction, fast precession motion and bigger torque generation can be obtained.
Proposed fuzzy logic controller and PD controller were implemented using Arduino Uno. Normally, the fuzzy rule base is implemented using some linguistic variable but in case of practical implementation, it is required to convert the rule base into a feasible set of values which will allow the microcontroller to work under its normal computational time.
Hence for practical implementation, the fuzzy rule base was converted into a lookup table. A lookup table was generated using the MATLAB/Simulink and simulation was carried out to obtain the output values under different input scenarios. These output values in the form of a lookup table were used inside of microcontroller algorithm. Figure 8 shows the Simulink block diagram used for generating the lookup table.
The overall flowchart of the proposed control system is shown in Figure 9. The parameter values used for designing the Simulink model and experimental platform are given in Table 3.
Figure 10 shows the results obtained from the experimental platform. It can be observed from the practical results that the proposed fuzzy logic controller is able enough to compensate for the disturbances and perform better than typical PD controller.
Experimental platform was tested under varying disturbances and the response of the proposed fuzzy logic controller was recorded. Figure 11 show the results under varying disturbances applied externally to the system.
The performance of the proposed control system was analyzed using some parameters like sum of square error given as:
Performance index was calculated for both fuzzy logic and PD controller, values obtained are shown in Table 4. The values shows that the proposed system performance is much better than the other types of controller.
An effective and efficient control technique based on fuzzy logic has been proposed in this work. Simulation and practical implementation for stabilizing the gyroscopic inverted pendulum system was performed. Control technique was compared with the previously used control methods especially PD controller. The simulation and experimental results shows that the fuzzy logic based control technique works well to mitigate the disturbances caused by some external effects.
No potential conflict of interest relevant to this article was reported.
Basic coordinate system: (a) flywheel and gimbal axis and angles, (b) pendulum axis and angle. energy using Lagrange’s method.
Basic block diagram of the system.
Membership functions: (a) input membership function
Simulink block diagram for performance comparison.
Gyroscopic inverted pendulum system.
Simulation result of the proposed fuzzy logic controller in comparison to a PD controller.
Experimental platform: (a) normal position, (b) stabilized position.
Simulink block for lookup table generation.
Overall control system flow chart.
Experimental results.
Fuzzy logic controller response for varying disturbances.
Parameters of the sysetem
Symbol | Parameter |
---|---|
Mass of pendulum | |
Mass of gyro | |
Mass of flywheel | |
Height of pendulum | |
Height of gyro | |
Height of flywheel | |
Flywheel speed | |
Gravitational constant | |
Pendulum inertia | |
Gyro inertia (x-axis) | |
Gyro inertia (y-axis) | |
Flywheel inertia (x-axis) | |
Flywheel inertia (y-axis) |
Fuzzy rule base
Δ | NB | NM | Z | PM | PB |
---|---|---|---|---|---|
NB | PB | PB | PM | Z | Z |
NM | PB | PB | PS | Z | NS |
Z | PM | PM | Z | NM | NM |
PM | PS | Z | NM | NM | NB |
PB | Z | Z | NM | NB | NB |
Parameter values used for Simulink model and experimental platform
Parameter | Unit | Value |
---|---|---|
kg | 6.2 | |
kg | 2.23 | |
kg | 1.5 | |
cm | 91 | |
cm | 110 | |
cm | 120 | |
RPM | 5,000 | |
m/s_{2} | 9.81 | |
kgcm^{2} | 1,520 | |
kgcm^{2} | 26 | |
kgcm^{2} | 43 | |
kgcm^{2} | 15 | |
kgcm^{2} | 17 |
Sum of square error
Value | |
---|---|
Fuzzy logic controller | 120.382 |
PD controller | 145.29 |
E-mail: ali rohan2003@hotmail.com
E-mail: mohamedmostafamousa1991@gmail.com
E-mail: khnam@kunsan.ac.kr
E-mail: shkim@kunsan.ac.kr