Sunteți pe pagina 1din 6

Fuzzy-PID Control Algorithm of the Helicopter Model Flight Attitude Control

Le Zhang1,2, Shaojie Bi2, Hong Yang2


1ǃSchool of Electronic and Information Engineering, Dalian University of Technology, Dalian 116023
E-mail: snowise@126.com
2ǃSchool of Information Engineering, Shenyang University, Shenyang, 110004, China

Abstract: Abstract: One of the key questions in design of the helicopter control system is attitude control. Furthermore,
it has non-linear and multi-variable coupling characteristics and so on. Therefore, it’s a big challenge with the real-time
and reliable attitude control. The three degree-of-freedom helicopter model was used as the controlled object. Through
the research of modeling, controller designing and simulating, the application of control theory and technology can be
made full use of in the complicated system. PID was introduced as the traditional method. Specific to the defects of PID,
the fuzzy control algorithm was used to conquer the defects of pure PID controller. Based on the respective advantage of
PID and fuzzy controller, PID and fuzzy controller were combined together as one controller which fit together with
switch and weighted value. It optimized the flying gesture of the helicopter. The real-time simulation results proved the
feasibility and the validity of the designed method.
Key Words: fuzzy-PID control; three degree-of-freedom helicopter; decouple; threshold switch control; weighted value
control

It is a computer-based control based on fuzzy set, fuzzy


1 INTRODUCTION linguistic variable and fuzzy logic reasoning. The fuzzy
The miniature unmanned helicopter has the advantages of control belongs to the category of intelligent control, and it
flying in any direction, taking–off and landing vertically has become an important and effective way to realize the
and reposing in the air, etc. In recent years, owing to its intelligent control [3]. In the literature [2], the superiority of
unique characteristics and maneuver capability, the the fuzzy control was demonstrated by the comparison with
helicopter plays an essential irreplaceable role in military PID controller. In the literature [4], no steady-state error
and the civil aspect. It did not depend on the conditions of tracking control system was designed which can meet the
the working area, some work which can not be done by the requirements of disturbance rejection and robust tracking, it
vehicle on the ground will be accomplished by the optimized the helicopter attitude.
helicopter. It has the very big application prospect in the In this paper, the structure of the helicopter system was
military, civil as well as the academic research aspect. introduced and analyzed firstly. According to the dynamic
Therefore, the study on the optimization of helicopter has trait of pitch axis, elevation axis and travel axis, the system
great significance both in the partial application of mathematic model was established, the model offered basic
automation technology still in the research on the control for the PID control and theoretical support for the controller
theory [1, 2]. In the automatic control technology, PID improvement. Finally, the fuzzy control was used to control
control is one of the earliest developed control strategies the system. The control results of the simulation
which are widely applied in the process control and the experiments proved that the using of the fuzzy control
motion control, especially for the certain system which can worked better than the pure PID controller. Compared with
be established by the precise mathematical models. the traditional PID control, it had a remarkable
Nevertheless, the actual industrial production processes are improvement. Both the PID controller and the fuzzy
always non-linear and uncertain time-varying systems, it is controller had their respective advantages. Based on their
difficult to establish the precise mathematical models. The excellent merits, PID and fuzzy controller were combined
application of traditional PID controllers can not achieve together as one controller which fit together with switch
the desired control results. and weighted value. It optimizes the flying gesture of the
Facing these complex systems, the traditional control helicopter.
theory became helpless. Intelligent control is an extension 2 3-DOF HELICOPTER SYSTEM MODEL
and development of the traditional control, it has made the
magnificent progress in theory and already has been
2.1 The structure of the helicopter system
successfully used in the aerospace control field. The fuzzy
control combine the traditional expert system based on the The 3-DOF (degree-of-freedom) helicopter system mainly
rules, fuzzy set theory and the achievements of cybernetics. consists of motors, position sensors, the driver of motor, the
motion controller and the interface panels, etc. This system
This work is supported by the Science Foundation of Educational can be divided into three parts, include the helicopter reality
Department of Liaoning Province under Grant 2008Z44, and the China body, electronic control boxes and the control platform
Postdoctoral Science Foundation under Grant 20090461176, and also by which is composed of the motion control card and
the Key Laboratory Foundation of Educational Department of Liaoning
Province under Grant 2008S156.

c
978-1-4244-5182-1/10/$26.00 2010 IEEE 1438
computer. The control relation of the 3-DOF helicopter the two propellers. While the helicopter is traveling, the
system was shown in Figure 1. pitch angle is not zero, the torque is provided by the
component power of the pitch in the vertical direction. The
torque of elevation axis is also controlled by the two
propellers. If the speeds of the two motors are different, the
elevation axis will incline. So the lateral power which made
the helicopter travel around the base was generated [5].
Ignored the disturbance torque of gravity, we can get the
dynamic equations of the three axes, as followed:
The pitch axis equation˖
J eε = K c L1 (V1 + V2 ) = K c L1Vs (1)
The elevation axis equation˖
p = K c L p (V1 − V2 ) = K c L1Vd
J p  (2)
Fig.1 Control frame of the 3-Dof helicopter system The travel axis equation˖
The DC motors which have been installed at the end of the
helicopter were as the power of the two propellers. Three J r r = − F sin( p) L1 (3)
coders were fixed on the pivot point of the balance pole, the The outputs of the controllers are Vs and Vd ,
center of two propellers and the axis of the control box. The
data were feed back to the computer by the coders which Vs = V1 + V2 , Vd = V1 − V2 .
included the angle of the pitch, the elevation angle of the The parameters mentioned in the above dynamic equations
propellers and the traveling speed. According to the control have their own meanings respectively, as followed:
algorithm compiled by the users, the controlled parameters
were worked out and sent to motors. Airscrew rate can be V1 \ V2 : the voltages of the motors, the elevation power F1
controlled conveniently by the control card so that the and F2 provided by them;
attitude angle and speed of the helicopter model was
controlled. ε : the traveling angle of the elevation axis㧧
Owing to the requirement of real-time control, all kinds of J e : the elevation axis moment of inertia㧧
flight data gathered by the motion control card should be
deal with immediately in order to control the helicopter K c : the lifting power constant of the propeller motor㧧
attitude real-time. So the RTW (Real-Time-Workshop)
toolbox of MATALB/Simulink was used to perform the l1 : the length from pivot to the motor˗
task. The sensors installed on the three axes measured and l2 : the length from pivot to the balance block˗
sent the real-time data to the control card. Under the help of
the motion controller card GT-400-SV PCI, we can control ε : the acceleration of the elevation axis˗
the velocity of the propellers. The control model in
J p : the pitch axis moment of inertia˗
GT-400-SV Block Library can output the servo motor
system and get the position of the axis. The gathered data l p : the length from pitch axis to the motor˗
were feed back by the data collection card. Then, the input
voltage will be adjusted by the controller.  : the acceleration of the pitch axis˗
P
2.2 The establishment of the helicopter model P : the traveling angle of the pitch axis˗
r : the rotating speed (rad/sec)˗
sin( p ) : the sine value of the pitch axis angle p . If the
angle is zero, there is no power given to the traveling axis.
Since the power of traveling axis provided by the
component power of the incline propellers in the horizontal
direction. The output of the traveling axis is the input of the
pitch axis. So if we want to get the optimal results of the
attitude, the only task is to design two controllers for the
pitch axis and elevation axis. By the instructions of the
3-DOF helicopter model and the desired controllers above
mentioned, the explanation of the model structure was
carried on theoretically, the control functional block
diagram can be established, as shown in Figure.3
Fig.2 Structure of the three axes
As shown in Figure.2, assuming that the helicopter
suspending in the air and the pitch angle is zero, the torque
of pitch axis is provided by the elevation power F1and F2 of

2010 Chinese Control and Decision Conference 1439


3 THE DESIGN OF CONTROL SYSTEM

3.1. The traditional PID control


At present, PID control is one of the most widely used
control strategies in the industrial process control. Statistics
indicated that approximately 90% of the industry
controllers are still the PID control currently. The pitch axis
and elevation axis transfer function of the helicopter model
without feedback can be shown as (9) and (10).
ε ( s) −5.82 K p S − 5.82 K i
= 3 (9)
ε c ( s) S − 5.82 K d S 2 − 5.82 K p S − 5.82 K i
p( s) −63.95K p S − 63.95Ki
= 3 (10)
pc ( s) S − 63.95K d S 2 − 63.95K p S − 63.95Ki
Fig.3 The control system frame of the 3-Dof helicopter

2.3 The decoupling of the system 3.2. Fuzzy control

According to Figure.3, the voltage of the first motor was While the helicopter model is running, the controlled
determined by the pitch axis and the elevation axis together. parameters of the model changed with the different flying
If the output of the two controllers were changed, the states. But the three parameters of PID controller are
second motor’s also changed inevitably. So the system can constants, therefore the system had a bad adaptability. In
be regarded as a coupled system with 2 inputs and 2 some cases, the mathematical model of the control process
outputs. The equation of motion by Laplace transform is may not exist, or may be too difficult to work out. The
represented as follows㧦 fuzzy controller doesn’t rely on the precise mathematical
model of the controlled object. Compared with PID
63.95 controller, it’s easy to establish the control rulers based on
p(s) = (V1 ( s ) − V2 ( s )) (4)
the fuzzy linguistic variables, the controller based on
s2
empirical rules would be more effective. Fuzzy logic has
5.82
ε ( s) = (V1 ( s ) + V2 ( s )) (5) the advantage that the solution to the problem can be cast in
s2 terms that the operators will understand easily, so that their
By comparison with the 2 inputs and 2 outputs transfer working experience would be used to design the controller.
function 㧘 the dynamic equations were rewritten as the It can make mechanize tasks easier which are already
equations of state㧦 successfully performed by workers [6, 7]. Put the decoupled
matrix (8) into the system models, the simulation schematic
ª 63.95 63.95 º diagram of decoupled fuzzy control was shown in Fig.4.

ª pº « s2 s 2 » ªV1 º (6) Degree of membership of the output variables were shown
«ε » = « 5.82 »
5.82 » «¬V2 »¼
¬ ¼ « in Figure 5. The deviation and its variation ratio were used
«¬ s 2 s2 »¼ as the input variables, the parameters options of output is
Make a choice of F ( s) ˈlet the product of F ( s ) and G ( s ) identical with the input. Difference between the pitch axis
and the elevation axis is the range of the output variable.
be the main matrix diagonal elements of the original
The selected membership functions of the pitch axis are
transfer function, as followed:
guassmf and trimf, it’s only gaussmf for the elevation axis.
ªG11(s) G12 (s) º ªF11(s) F12 (s) º ªG11(S) 0 º
(7) After numerous simulation experiments, the parameters of
«G (s) G (s)» «F (s) F (s)» = « 0 G22 (S)»¼ the fuzzy controller were selected finally. The deviation,
¬ 21 22 ¼ ¬ 21 22 ¼ ¬
the deviation variation ratio and the output of the pitch axis
The equation˄7˅is the new mathematic model which was
have the same following range㧦{-3㧘-2㧘-1㧘0㧘1㧘2㧘
established by using the method of diagonal matrix and
decoupling. After the system was decoupled, the first 3}㧧The input and output variables map into the following
controlled parameter U1 ( s ) had no effect to the second fuzzy set 㧦{NB㧘NM㧘NS㧘Z㧘PS㧘PM㧘PB}㧧The
range of the elevation axis is㧦{-30㧘-20㧘-10㧘0㧘10㧘
output Y2 ( s ) , U 2 ( s ) and Y1 ( s ) had the same case. By 20㧘30}㧧and its fuzzy set is㧦{NB㧘NM㧘NS㧘Z㧘PS
using the method of diagonal matrix, the main elements of 㧘PM㧘PB}㧧According to the selected fuzzy and range,
the decoupling matrix are F11 (s) = 0.5 , F12 (s) = 0.5 , the edition to the membership function would be complete
respectively. Based on the fuzzy control rulers listed in
F21 (s) = −0.5 , F22 (s) = 0.5 , namely: Table 1, the design of the fuzzy controller was finished.
ª F11 ( s) F12 ( s) º ª 0.5 0.5º
« F ( s ) F ( s ) » = « −0.5 0.5» (8)
¬ 21 22 ¼ ¬ ¼

1440 2010 Chinese Control and Decision Conference


Fig.4 Frame of fuzzy control with decoupling matrix

(a) The output of pitch axis (b) The output of elevation axis
Fig.5 The membership and measurement grade of output U
In the early stage of the control process, the result of fuzzy
Table.1 Rule of fuzzy controller
controller is better, especially in inhibiting the overshoot.
NB NM NS ZO PS PM PB When the system tends to the stable stage, the fuzzy
NB NB NB NM NM NS NS ZO controller is similar to PD controller in nature. So its control
NM NB NM NM NS NS ZO PS result is worse than PID controller’s, the PID controller is
NS NM NM NS NS ZO PS PS selected in the late process. In this system, compared with
ZO NM NM NS ZO PS PS PM
the cursory adjustment of the fuzzy controller, the PID
controller made a precise adjustment.
PS NS NS ZO PS PS PM PM
PM NS ZO PS PS PM PM PB 3.3.2 Fuzzy–PID weighted value control
PB ZO PS PS PM PM PB PB
Figure 6(b) is the schematic diagram of fuzzy-PID
3.3. Fuzzy-PID control weighted value control. In order to avoid the system out of
control which caused by the hard switching, fuzzy-PID
3.3.1 Fuzzy-PID threshold switch control weighted value control was introduced into the system.
Aiming at deviations at the different periods, the proportion
The PID controller has good static performance, while its
of fuzzy control and PID control is different. λ 1 denotes the
response rate is not quick enough. Fuzzy controller is better
at dynamic performance than PID controller, but it can’t proportion of PID controller, λ2 denotes the proportion of
eliminate static error. The fuzzy-PID controller has the
merits both of them, the stable and the quick control effect fuzzy controller, where U=λ2 *Ufuzzy +λ1*UPIDˈ λ2 = 1 − λ1 .
can be obtained at the same time. Therefore, the fuzzy-PID
controller realized the process automation and intelligence
of the attitude control. For the reason that, the study on
fuzzy-PID controller has become a hot spot in this field [8,
9]
.Figure 6(a) is the schematic diagram of fuzzy-PID
threshold switch control. During the continuous control
stage, the system deviation and its variation ratio are
different for a certain controlled object. If the threshold
switch was set, when the deviation was greater than the (a) Frame of fuzzy-PID threshold switch control
threshold, the fuzzy controller was selected in order to
depress the overshoot. If the deviation was smaller, the PID
controller was used to hold the stabilization. This is the
threshold switch control.
In general case, the switch of PID controller and fuzzy
controller obey the following principles. When the
deviation is quite large, the fuzzy controller is selected, or
else the PID controller is selected. The traditional PID
controller often has a quite big overshoot, but a good (b) Frame of fuzzy-PID weighted value control
Fig.6 The Frame of fuzzy-PID control
dynamic stabilization. The overshoot of the fuzzy controller
is smaller, and good dynamic stabilization but not precise
enough. So the above mentioned principles were used.

2010 Chinese Control and Decision Conference 1441


4 THE SIMULATION EXPERIMENT In order to find out the differences among the four
controllers, the analysis of the results were given in Table
4.1 The simulation results 3and Table 4.

The parameters of PID controller were shown in Table 2. Table.3 Comparison of PID, fuzzy and threshold switch control

Table.2 Parameters of PID controller Rising Transiti


Over on time
time˄ Analysis
parameter K ep K ei K ed K pp K pi K pi shoot
S˅ ˄S)
value 3.2 0.02 1.5 0.55 0 1 Pitch
Pitch Pitch Long transition
axis˖
axis:17% axis˖8 time if the
2
parameters of
PID Elevat
Elevatio the controlled
Control ion Elevation
n axis˖ object were
axis˖ axis18% changed.
13
2
Pitch
Pitch axis Pitch Smaller
axis˖
˖8% axis˖6 overshoot, but
3
the desired
Fuzzy Elevat
Elevatio outputs has
Control ion Elevation
n axis˖ slight
(a) Pitch axis evolution of fuzzy-PID threshold switch control axis˖ axis˖8% fluctuation.
7
2
Pitch Smooth outputs
Pitch axis Pitch
axis˖ lines, but a
˖7% axis˖6 large overshoot
Thresho 2
while the
ld Elevat
Elevation Elevatio parameters of
switch ion
axis˖ n axis˖ the controlled
Control axis˖
10% 6 object were
3 changing.
Table.4 Comparison of PID, fuzzy and weighted value control
(b) Elevation axis evolution of fuzzy-PID threshold switch control Transiti
Rising Over
on time Analysis
time˄S˅ shoot
˄S)
Pitch Pitch Short transition
Pitch axis
axis˖ axis˖ time, but a big
˖2 overshoot
16% 12
when the
PID
Elevatio Elevatio parameters of
Contro Elevation
n axis˖ n axis˖ the controlled
l axis:2
12% 13 object were
changed.
Pitch
(c) Pitch axis evolution of fuzzy-PID weighted value control Pitch axis Pitch
axis˖ Output of the
˖5 axis˖8
Fuzzy 4% fuzzy
Contro Elevatio Elevatio controller often
Elevation
l n axis˖ n axis˖ has fluctuation.
axis˖3
5% 7
Pitch
Pitch Compared with
Weigh Pitch axis axis˖
axis˖7 pure fuzzy
ted 5%
controllers, the
Value Elevatio Elevatio
Elevation fluctuation was
Contro n axis˖ n axis˖
axis˖3 suppressed.
l 5% 6
(d) Elevation axis evolution of fuzzy-PID weighted value control Through the control results, we can get some conclusions.
Fig.7 Response evolution of fuzzy-PID control The PID controllers had a short rising time, but a large
The Figure 7 showed the 3-DOF helicopter system control overshoot. After the fuzzy controllers were used to control
results under four kinds of controllers. According to the the object, compared with the steady results of the pure PID
factual simulation, the helicopter needed to adjust the controller, the outputs had slight fluctuation. But the fuzzy
attitude in the controlled process. So the given input control could track the given parameters well and had a
variables should change with the flying attitude. Increase smaller overshoot than PID controllers. The lines of the
and decrease of the given input variables experiments were traditional PID controllers result were smooth, and had a
done in the simulation. The results were shown in Figure 7.

1442 2010 Chinese Control and Decision Conference


long rising time and overshoot. The pure fuzzy controllers fuzzy control were used to optimize the flight.
conquered the large overshoot while the parameters of the
controlled object were changing. The lines of the results 5 CONCLUSION
had trifle vibration. The 3-DOF helicopter simulation platform and its three
The hardware design of the threshold switch principle is dynamic equations of the axis were introduced in the paper.
realized by the switch. In the switching process, there in no Based on the decoupling to the system, PID control, fuzzy
output to the system, the helicopter is out of control at the control, threshold switch control and weighted value
moment, it will make a large deviation. The principle of control were designed and applied in the actual simulation.
threshold switch control has inherent flaw itself. Since the After the parameters of controllers were selected, the
threshold is pre-settled, if the system deviation is greater real-time simulation experiments of the pitch axis and
than the threshold, a sudden switch will happen. But the elevation axis were carried on. The conclusion can be
outputs of the fuzzy controller and PID controller are drawn that the weighted value control has the advantages of
different, which will be the inputs of the two motors, there smaller overshoot, short transition time and stable
must be some shock, it may cause the system out of control. operation. In the actual control process, the superiority of
The method of weighted value control gets fine results. Not the weighted value control was also proved. Through the
only the overshoot of traditional PID controller was comparison of simulation results, we can find that, for a
reduced but also the fluctuation of fuzzy controller was certain controlled object, there is little influence on the
suppressed. output even if the parameters of the controlled object were
changed.
4.2 Real-time control
RTW toolbox the real-time control software REFERENCES
MATLAB\Simulink was used to accomplish the control [1] J Shan, H T Liu, S Nowotny. Synchronized
task. The MATLAB\Simulink works on the basic of Trajectory-tracking Control of Multiple 3-DOF
Windows operating system, but the real-time control task Experimental Helicopters , IEE Proceedings of Control
was performed by its internal core instead of Windows theory Appl. (S1350-2379), Vol.152, No.6, 683-692, 2005.
operating system. In the control process of the 3-DOF [2] M Lopez-Martinez, M G Ortega, C Vivas, F R Rubio.
helicopter, the control modules of GT-400-SV Block Nonlinear L2 control of a laboratory helicopter with variable
Library were applied in the control subsystem of motors speed rotors, Automatica, Vol.43, No.4, 655-661, 2007.
and angle. The schematic diagram was compiled and [3] V A Oliveira ,L V Cossi, ,M C M Teixeira ,A M, F Silva.
connected to the external target by the MATLAB\Simulink, Synthesis of PID controllers for a class of time delay systems ,
then, the controller and the real-time simulink model were Automatica, Vol.45, No.7, 1778-1782, 2009.
connected. It is proved that the weighted value control [4] X. C. Yue, Y. Yang, Zhi-yong Geng. No Steady-state Error
makes the best results. Aiming at the bad reversal of the Tracking Control of 3-DOF Experimental Helicopter
model, the weighted value controllers were added into the System, Journal of System Simulation, Vol.19, No.18,
4279-4283, 2007.
system. The fine simulation results were obtained in Figure
[5] N. Dai, Y. L. Si. Helicopter Flight Control System Modeling
8.
and Simulation by MATLAB, Journal of System Simulation,
Vol.18, No.1, 240-242, 2006.
[6] L. Zhang, Cvetko Andreeski, Georgi M. Dimirovski, Y. W.
Jing, Reliable Adaptive Control for Uncertain Switched
Fuzzy Systems, Proceedings of 17th IFAC World Congress,
Seoul, Korea, 7636-7641, 2008.
[7] L. Zhang, Y. W. Jing, Georgi M. Dimirovski, Fault-tolerant
Control of Uncertain Time-delay Discrete-time Systems
(a) Real-time response evolution of positive control Using T-S Models, Proceedings of IEEE International
Conference on Fuzzy Systems, London, UK, 1344-1349,
2007,.
[8] H. X. Li, L. Zhang, K. Y. Cai, Guanrong Chen. An improved
robust fuzzy-PID controller with optimal fuzzy reasoning,
Proceedings of IEEE Transactions on Systems, Man, and
Cybernetics, Part B: Cybernetics, Vol.35, No.6, 1283-1294,
2005.
[9] J. W. Xu, X. Feng. Design of adaptive fuzzy PID tuner using
(b) Real-time response evolution of reverse control optimization method, Proceedings of Fifth World Congress
Fig.8 Real-time simulation of the helicopter on Intelligent Control and Automation, 2454- 2458, 2004.
As shown in Figure 8, after the changing of the controller,
the system can run steadily, it has a good reversing
performance and a short transition time. Both the PID and

2010 Chinese Control and Decision Conference 1443

S-ar putea să vă placă și