Modeling and Adaptive Hybrid Fuzzy Control of a Nonlinear Rotor System

The paper deals with the hierarchical modeling, simulation and model-based investigation of a nonlinear 1 DOF helicopter model, which is the most important building block of complex multi-rotor systems. The motivation behind the work is the increasing number of multi-rotor drones with various applications in diverse areas like smart cities and smart infrastructures, such as intelligent surveillance, autonomous (or semi-autonomous) flight, automatic object detection and recognition, carrying various payloads (sensors, packages) etc. In order to make these flying robots intelligent, a sophisticated control strategy is required, which is partly based on sensory information provided by the on-board sensors (gyroscope, accelerometer) recently supported by visual data provided by on-board camera(s) concerning the low-level feedback control loops. Most of the modern drones are built on an embedded computer, and the first layer of control is usually implemented in the firmware, thus the low level control commands are given per se. For the accomplishment of complex tasks (specific "behavior" of the drone) high level control strategies have to be implemented. In order to make these control loops efficient and robust, model based analysis of the controlled system had been carried out along with the real-life tests of the various control strategies. Since both the structure and the parameter set of the model system can be easily changed, model based study is a very efficient way of experimenting with novel control approaches.


INTRODUCTION
The paper deals with the modeling, simulation and control of a 1 DOF helicopter model. Model simulation is a widely accepted method for investigating the behavior of complex systems [2]. The goal of the modeling and simulation is to achieve a reliable model of the system, which is required for testing various control loop designs and controller settings and enables to find the proper control strategy.
In the first part of the paper the rotor device and the model of the rotor system will be presented, and then the structure of the control loops will be introduced. As a starting point a cascade PID -PI controller will be applied for the task, where the PID controller will provide the reference point for the PI controller. The output of the inner PI controller is the motor voltage, which determines the current and thrust force.
After designing an appropriate PID controller for the rotor control, a more sophisticated adaptive thresholded fuzzy controller will be applied, where the optimization of the control is based on the error phase-space. This phase space approach enables to design an optimal fuzzy controller for the rotor control, and besides, that more strict control-criteria can be met, a more insightful description of the working dynamic fuzzy rule set can be obtained.

THE SYSTEM
The system under investigation is a 1 DOF rotor system, which is inherently unstable and hard to control, such as rotor systems in general [4,10]. This system has all important characteristic features of motor-driven rotor systems, thus it will exhibit all the complex phenomena resulting from the nonlinear nature.
The schematic representation of the rotor device can be seen in Fig. 1. The system is basically a balance-like structure with a variable RPM rotor on one end and a counter-weight on the other. The lever can rotate around the pivot point P, and can be balanced around it is equilibrium by controlling the DC-motor propelling the rotor providing the thrust force. In order to obtain the model of the dynamical system an analytical approach was applied. The analysis of the nonlinear model enables to investigate the governing dynamics, and the behavior of the excited and unexcited system for various initial conditions. The model equation [11] of the system is the following: where  is the angle deviation measured from horizontal position, J is the moment of inertia of the system, B is the viscose damping factor, is the nonlinear stiffness constant which can be obtained directly from geometry, m 1 is the mass of the rotor, m 2 is the mass of the counterweight, m b is the mass of the body connecting the rotor and the counterweight, K t is the torque-current ratio, g is the acceleration of gravity, and I m is the motor current.
In order to balance the unstable nonlinear system a controller must be introduced. Starting with the classical PID control design, it is advantageous to linearize the system, which can be accomplished by the aid of state space representation Technical Gazette 28, 1(2021), 1-6 and calculation of the Jacobian of the system for an appropriate linearization point (operating point), corresponding to a certain motor current I 0 . The state variables x 1 , x 2 correspond to the angle deviation  , and angular velocity  respectively. The Jacobian of the system can be derived for the linearization point 0 ( , 0)      corresponding to a steady state position of the system where the angular velocity is zero, and the linear equation obtained is the following: is the "linear stiffness" constant of the system for any particular I 0 corresponding to the linearization point. It is clear from the model equations that the linear representation will be a good description of the nonlinear system only in the vicinity of the linearization point, where the angle deviation from the fixed point is small.
In order to adequately model the nonlinear behavior of the rotor, the torque-current dependence of the system has to be determined, since in the case of the real system the K t thrust-current ratio is a function of  . A series of measurements had been carried out on the system to approximate the functional dependency, where the corresponding values of steady-state current and rotor position had been measured, from which t ( ) interval with residual norm R = 0.0017. The introduction of functional dependence of the thrust-current ratio into the model ensures that the behavior of the system during simulations will be really close to the behavior of the real physical device.

THE CONTROLLER
After having the linearized system, a cascade controller can be designed with appropriate parameters for reference tracking or disturbance rejection as well. For the outer PID controller the usual filtered-derivative PID is applied here, and the controller parameters are obtained by the Ziegler-Nichols method. In the inner loop a traditional PI controller is applied, which is responsible for the voltage control variable (DC motor) based on a current reference signal. The following figures in the results section show the behavior of the controlled system. It can be seen that the performance of the control is acceptable, but due to the nonlinear nature of the problem a more robust control can be achieved by applying a fuzzy controller, based on a properly constructed fuzzy inference system.
The fuzzy PI controller seems to be the most popular fuzzy controller, it is the first stage moving from the classic PID-controller to a fuzzy controller, and in most cases this can be tuned so that the control requirement could be satisfied with it [6,8]. The fuzzy PI controller has two inputs: error (e) and its discrete derivative (Δe), and one output: the increment of control signal (Δu). The rule base shows symmetry (with different signs) and can be illustrated in table form. For example in Tab. 1 a typical rule base of a fuzzy PI-controller can be seen, where both inputs have 5 terms: negative big: NB; negative: N; zero: Z; positive: P; positive big: PB; the consequence terms are NEGB; NEG; ZERO; POZ and POZB.
A fuzzy PD controller can be constructed easily from the fuzzy PI controller by adding a constant offset value (operating point value) to the basic output of the fuzzy controller.
Traditionally the position balancing control problems are solved by PD-type motor control algorithms [3]. The PD-type controls are fast, and if the plant shows integral property, no static error occurs. The Fuzzy controller applied here for the rotor system uses the max-prod inference method and the centre of area (CoA) defuzzification. The detailed description and concepts of Fuzzy control can be found in the corresponding literature, for example in [1]. During the investigation of the controlled rotor system several controlling approaches were analyzed. The classic PI controller of the inner loop was the same for all test cases, and the impact of the type and parametrization of the master controller was in the focus of experiments.
The test cases of experiments were the classic PID, fuzzy PD, fuzzy PI, and finally a novel architecture, which is a hybrid of fuzzy PD and fuzzy PI, and incorporates the advantageous properties of both basic controller architectures. In the proposed control architecture, the well-known cascade control loop was modified by introducing an adaptive feedback loop (see Fig. 2), which can be treated as a special adaptive thresholded Fuzzy-PID architecture, where the delayed signal applied for the implementation of the integrator part of the controller will be thresholded adaptively based on the actual set-point reference.
The Δe error signal is given as a windowed discrete derivative. This approach enables the efficient elimination of steady-state control error, while maintaining fast response times and stability of the controller. The signal flow diagram of the implementation of the adaptive feedback can be seen in Fig. 3. The basic concept behind this design is to use the same fuzzy rule-base for both the fuzzy PI and fuzzy PD controllers in one unified adaptive controller architecture, thus the PI or PD behavior can be switched in real-time in an adaptive way, depending on the actual offset source used for determination of control signal. It can be seen from the signal flow network of the adaptive feedback architecture, that the dynamic threshold (DTH) function has an input of 1 ( )   , which is an estimated value of motor current, based on an interpolation polynomial. The interpolation polynomial is based on measurements carried out on the rotor equipment, ensuring that the behavior of the model and the real physical device are very close to each other.
The adaptive Fuzzy-PID architecture introduced above enables to efficiently control strongly nonlinear systems. The tuning of the adaptive fuzzy architecture is based on the phase-plane representation of the e -Δe trajectories [5,7]. Phase-plane method is an efficient graphical representation of the transient behavior of the system in the form of two dimensional trajectories. These trajectories contain valuable information about stability, and the actual behavior of the controller [9]. In the case of a properly operating control the trajectory approaches a fix point in the origin of the e -Δe plane. If the control has some unwanted phenomena, the trajectories reflect the problem, and also suggest how to improve the control strategy.

RESULTS
The results presented here correspond to the test cases investigated. In each test case the reference signal of position control is given as a square wave corresponding to angle set-point (blue signal in the figures), and the red signal is the actual angle (controlled variable). The initial conditions for the simulations are horizontal lever position and zero velocity. The PID controller tuning is based on the Ziegler-Nichols method, and the fuzzy controller design and tuning was based on expert approach applying information provided by phase-planes.  The voltage and current signals (Fig. 5) contain significant spikes corresponding to fast switches in reference signal. The phase plane trajectories (Fig. 6) suggest stable system behavior.

Fuzzy PD Master Controller
The angle reference tracking with fuzzy-PD is much faster without overshoot, but there is an apparent steadystate error (Fig. 7). In spite of faster controller response the amplitudes of spikes in voltage and current signals are significantly smaller (Fig. 8). The phase-plane trajectories (Fig. 9) suggest two fix points without unwanted limit cycles, with the fix points out of the origin.

Fuzzy PI Master Controller
In order to eliminate the steady-state error the fuzzy PI architecture was introduced, but the control system cannot be stabilized with this architecture, the angle oscillates around the reference (Fig. 10), and the inner loop also shows heavy oscillatory behavior (Fig. 11). The phase-plane trajectories clearly show the limit cycle around the origin (Fig. 12) indicating the unstable periodic behavior in the control.

Adaptive Fuzzy Hybrid Master Controller
With the hybrid architecture introduced above, a very fast and precise control can be achieved without steadystate error, overshoot and oscillations (Fig. 13). The settling time is short, and the inner loop voltage and current signals are similar to the fuzzy-PD case, with the effect of the integrator of the hybrid architecture (Fig.  14). This structure successfully incorporates the advantageous properties of fuzzy-PD and fuzzy-PI controllers, eliminating the oscillations, while maintaining the fast response time and absence of steady-state error.
The phase plane also suggests a responsive, stable system without steady-state error (Fig. 15). It is also apparent from the figure that the shape of the phase-plane trajectories of the hybrid architecture is very similar to those of the classical PID, except the initial rise-time period.

Figure 15
Phase plane (adaptive fuzzy hybrid master)

CONCLUSION
The paper presented a model-based simulation and control of a highly nonlinear system. The analytic modeling was supported by measurements carried out on the physical device, which enabled to construct a more realistic mathematical model of the complex nonlinear system. For the control of the nonlinear system a novel fuzzy-hybrid controller was introduced, incorporating the advantageous features of different control methods. The proposed hybrid method is capable of handling nonlinear control problems, where traditional approaches fail to perform well. These results suggest that this approach can be reliably applied as a high level control strategy in the case of complex multi-rotor systems as well.