Abstract
This article aims to study a solution that can solve the problem of tracking control for yaw motion of an unmanned helicopter. The non-affine nonlinear equation is converted to a simplified affine model. The unknown parameters are estimated by the Levenberg–Marquardt algorithm. An autonomous flight controller is developed with the Lyapunov-based adaptive controller for a discrete-time system. For flight data collection and verification purpose, the software-in-the-loop is constructed based on Simulink and X-Plane simulator. The designed system is applied in the control of the yaw motion of an R30 V2 helicopter under ideal and turbulent environments. The performance of the proposed method is compared with the fuzzy logic controller, and the simulation results show that the quality of the current approach is considerably better.
Introduction
An unmanned helicopter is a mobile robot that integrates navigation and positioning sensors and control algorithms. Its natural dynamic is strongly unstable and changes dramatically among flight conditions, such as hovering, cruising, taking off, and landing. Moreover, some states are immeasurable, and dynamic coupling is observed among the state variables and control inputs. Dynamic coupling expresses the strict relationship between states. Any change in each control input affects the multiple state variables. 1,2 System identification and control of the helicopter remain challenging because of its naturally complex dynamic. However, the helicopter is also well-known for its high mobility, such as taking off and landing vertically and flying forward, backward, and laterally. Such mobility is widely applied in many applications, especially tricky tasks where fixed-wing and vertical takeoff and landing hardly operate. Since the dynamic models of the helicopter are inherently unstable and highly nonlinear, the design of the autonomous flight controller is able to improve the stability and performance of the helicopter. However, the estimation of the accurate model is still a challenging topic.
Also, the yaw angle expresses the rotational motion of the helicopter around the z-axis of the reference coordinate system at the center of gravity. Controlled yaw angle with high accuracy in complex environmental conditions has great significance in motion control of the helicopter and execution of real tasks. For example, performing rescue missions in hard-to-reach areas (e.g. performing sea rescues), inspecting electrical lines, monitoring forest fires, inventorying wildlife, spraying pesticides in agriculture, and so on. The problem is that the torque produced by tail rotors, which compensates to that produced by the main rotor to maintain the stable state of the helicopter, is unbalanced. Thereby causing unstable and inaccurate yaw dynamics, particularly in the relatively high-frequency region. Hence, the yaw response oscillates more than other attitude motions. Moreover, the yaw dynamic is inherently nonlinear. Its input variables are nonlinear as illustrated by the general form
Synthesis of controllers for systems that are non-affine in control signal is a difficult task. 7 Hence, indirect non-affine control method was proposed. Non-affine model is firstly converted into the affine model using Taylor series approach 12 and Mean Value Theorem. 13,14 Another proposed approach to obtain affine model 15 is that the dynamic model rewritten as the linear affine formulation, then a robust nonlinear controller is applied based on an out-feedback algorithm for velocity and altitude tracking. Because the original dynamic of aircraft is highly nonlinear and non-affine, therefore, this conversion may not keep certain key dynamic. Hence it affects the performance of the control approach, especially for tracking control.
On the other hand, the nonlinear control approach is also considered a good approach. It can maintain the stabilization state of the system at a larger scale. The popularly effective approaches of nonlinear control are fuzzy logic and neural networks. 16,17 Fuzzy logic can handle problems of uncertainties in the nonlinear system. The rules of the controller are easily designed by expressing human experience through the logic operator IF/THEN. This controller is used widely in the industrial and UAV fields. However, the system has characteristics of high order, time variation, and random disturbance. Its performance is imperfect. So, the fuzzy controller is usually combined with other methods, for example, the fuzzy-proportional–integral–derivative (PID) controller and backstepping adaptive fuzzy control. 18 Besides, fuzzy logic requires an expert of knowledge to build the control rule. It means one has the extensive background of the dynamic system. Moreover, the generation of the control rule is done by tuning manually. It is difficult to achieve the performance requirements by using the same approach on MIMO system.
Along with fuzzy logic, the neural network is also the practical solutions for the nonlinear system. Neural network eliminates the complex mathematical problem in the traditional method because of its self-learning capability. The capability of the activation function to map nonlinearly in the hidden neurons solves the high nonlinear control problem, which is an impractical solution in the traditional approach. Hence, the neural network is employed in a wide range of uncertainties. However, the stability, error convergence, and robustness have not been fully proved for these off-line trained neural network-based control systems because of the high nonlinearity of the neural networks and the lack of feedback. 19 The adaptive neural network is proposed to overcome this problem. The adaptation law is derived using the Lyapunov method. Therefore, the stability of the entire system and the convergence of the weight adaptation are guaranteed. Additionally, the adaptive neural network is constructed based on Lyapunov. It does not require the prior training process. The weight matrix is updated online. So, it is able to overcome the disturbance problem. Not only disturbance but also friction is also a significant factor affecting the high-quality robot tracking control. Hence, the idea of a control strategy with friction compensation based on neural network approach has been proposed to minimize the effect of friction. 20 In this study, a modified neural network structure with additional sigmoid jump activation function was used to approximate accurate friction modeling.
Moreover, an essential requirement of the tracking control algorithm is the robustness against noise and minimal error. To deal with these problems, the Kalman-based active observer controller 21 is an excellent solution to estimate the system state and disturbances. It recoups the unmodeled terms for ensuring the overall stability of the system. Besides, the sliding mode control is also a practical approach for tracking. 22,23 The sliding mode combines a smooth nonlinear control law for approximating unknown parameters. 22 Hence, controller performance is better with lower control efforts in comparison with the pure sliding mode controller. Furthermore, synthesizing the backstepping controller 24 based on a path following error dynamic is also a practical solution for tackling the model uncertainty and nonlinearity problem in tracking control.
System identification estimates the process based on input/output signals of the actual flight data. It is important to analyze and design the controller. Many identification methods, such as neural network, fuzzy logic-based model, Wiener model, and nonlinear aggressive network with exogenous input, are available. 25 –29 In this article, the Levenberg–Marquardt (LM) method, proposed by Marquardt DW and Coleman TF, 30 –33 was used for identification task. This technique is developed and integrated into MATLAB (MathWorks) as a toolbox. So, it is useful for predicting task.
Different from the proposed methods above, in this article, the adaptive control based on neural approximation is the proposed solution to tracking control of yaw motion of a small-scale unmanned helicopter. Yaw dynamic is considered as a second-order system for the yaw rate state variable. Its unknown parameters are estimated by LM. Due to the use of the Lyapunov stability theory, the off-line training process is not a requirement. The weight matrix is updated online. So, the measured error and effect of the environmental disturbance are eliminated. The designed control system is verified and compared with the fuzzy controller under ideal and turbulent environments. The simulation results show that the current method gives the performance much better than that’s fuzzy.
The remainder of the article is organized as follows. Second section presents the non-affine nonlinear and simplified model of the yaw channel. Third section describes the system identification in detail. Fourth section introduces the adaptive theory for the discrete-time system and control law. Fifth section presents the algorithm of the design system. The simulation results are shown in sixth section. And, the final section is conclusions.
Yaw dynamic
The principle model of yaw dynamic is referenced in Na et al.. 4 Some key points are presented as follows
where θ is the yaw angle, γ is the angular rate, Izz is the inertial around the z-axis, N vf is the torque of the vertical fin, N hs is the torque of the horizontal fin, N fus is the torque of the fuselage, N tr is the torque of the tail rotor, and N mr is the torque of the main rotor. Given that equations (1) and (2) can be simplified, the dynamic expression of the yaw channel is as follows:
where z 1 and z 2 are the damping constants, l tr is the distance from the tail rotor to the z-axis, and F tr is the thrust of the tail rotor. The torque N mr, which is produced by the main rotor, can be computed using the blade element method, is as follows
with C d ≈ C d0 + C d1 α + C d2 α 2, C l = aα, and ϕ = ν 1/(Ωr), where Ω is the velocity of the main rotor, ϕ is the angle of attack of the blade element, c is the inflow angle, α is the chord of the blade, r is the velocity of the radial distance, a is the slope of the lift curve, ρ is the density of the air, and ν1 is the induced speed. Equation (5) can be determined as follows
where
By substituting equation (8) into equation (7), we obtain the following
where
Equations (6) and (10) show that the tail rotor thrust F tr and main rotor torque N mr maintains a coupling relationship. Simultaneously, these nonlinear equations are complicated. Therefore, designing the controller is difficult. A simplified equation is thus used as follows
where
where
where z 1 and z 2 are the damping constants. Equation (13) expresses the coupled relationship between the tail rotor force and the main rotor torque. This equation is nonlinear in the control input, which contains two-order time variants. Designing a controller for a system with non-affine nonlinear control input is extremely complicated. Based on the proposed yaw dynamic 29
where a 1, a 2, b 1, and b 2 are the unknown parameters. Assuming x 1 and x 2 correspond to θ, γ, respectively, u denotes a tail rotor collective input, g denotes a vector [b 1, b 2]. The equations (14) and (15) can be presented as
where
System identification
LM method
The nonlinear least-squares method estimates the parameter, which was described in detail in previous studies. 30 –33 LM has been considered as the combination of the steepest algorithm and the Gauss–Newton algorithm. During operation, LM switches between these two algorithms. The update rule of LM can be briefed as
where J is the Jacobian matrix; μ, the combination coefficient, is always positive; I is the identity matrix; e is the error; and the value of combination coefficient, μ, is the condition for switching. Specifically, if μ is very small (nearly zero). The Gauss–Newton method is used. Otherwise, if value of μ is large. The steepest descent method is used. LM has been realized and integrated as function in MATLAB. Hence, it is available to use for identification work. The procedure of system identification will be introduced in the next section.
System identification procedure
The helicopter used is a Raptor 30v2 in X-Plane simulator. To collect estimated data, software-in-the-loop (SIL) is constructed based on the Simulink and X-Plane simulation environments. Four PID controllers developed in Simulink send commands to the X-Plane to maintain the operations of the helicopter at trim condition as shown in Figure 1. Simultaneously, the flight data are sent from X-Plane to Simulink via user datagram protocol (UDP). Given that the helicopter is at the trim condition, the maneuver (Figure 2) is sent to the cyclic pedal input. A total of 10 eligible data sets are stored to estimate the process. The identity of the yaw motion is performed through the LM method, following the sequence of the flowchart shown in Figure 3. The last step in the system identification procedure is validation. This step decides which estimated model is the best by comparing the response of the actual system with that of the predicted model. The quality of the expected result is calculated in percentage by the variance accounted for, as shown in equation (18), where i = 1, 2, 3,…N, and N is the total number of data. xi
is the measured value, and

Diagram of the SIL for collecting flight data from X-Plane®.

Maneuver for collecting yaw flight data motion.

Flowchart of the estimated procedure. LM: Levenberg–Marquardt.
The best result of the system identification is shown in Figure 4. The output of the predicted model agrees with the measured value. The estimated values are shown in the Table 1.

Result of the yaw motion identification.
The predicted values.
Adaptive control of a discrete-time system
In this section, a direct adaptive control is presented. The adaptation laws based on the discrete-time Lyapunov stability theory ensures a stable closed-loop tracking control. The augmented error approach provides a suitable way to derive adaptation and control law for uncertain system and guarantee global stability. More details about this approach are presented in the studies. 34,35
The adaptation law
The structure of the radial basis function (RBF) neural network is shown in Figure 5. Where
where

RBF neural network structure.
Based on the system identification results, the yaw dynamic can be written as
where x(k) is the state vector, u(k) the control input, and y(k) the plant output. The designed controller gives good tracking performance applied to the plant in equation (21). Define
where
where
Substituting equations (22) and (24) into equation (25) gives
where
The control signal is calculated following the adaptive law
where
Note that, in equation (26), the nonzero inherent network approximation error
where
where β is a positive, nonzero constant. Substituting equation (31) into (29)
which leads to the time-domain relation
The auxiliary signal v(k) will be determined subsequently, as part of the design procedure. And the augmented error signal
where
Stability analysis
Considering the discrete-time Lyapunov function as
The first difference
Substituting equation (31) into equation (35)
where
Since
Substituting equation (32) into equation (36)
If
If
The aim is that
where
Substituting
Because
and
Then,
Then
Algorithm of the design system
As presented in the yaw dynamic section, the yaw dynamic is the second-order system, where state vector as yaw angle (ψ) and yaw rate (r). And the relationship between these variables is presented following equation
Assuming yd as the target value
Defining y as the state feedback value
Defining E as the tracking error
where
Based on the Lyapunov techniques, the proposed control law is as following
where
in which, e 1(k) is the augmented error
where
The diagram of the control scheme of adaptive radial basis function neural network (ARBFNN) follows
Figure 6 is the structure of the developed system. The role of the measurement block is to collect the flight data. The controller block uses three PID controllers to manage pitch, roll, and vertical motion. Yaw motion is controlled by the current method. Its structure is illustrated in Figures 7 and 8. It involves a controller, which is designed based on an adaptive RBF neural network algorithm and the yaw dynamic. The controller processes and generates the commands, lateral (Lat), longitudinal (Lon), collective (col), and pedal (Ped) cyclic, corresponding to the desired and feedback signals. These commands are sent to X-plane via UDP protocol. The algorithm of the adaptive controller is expressed in the following steps: Step 1: Initial values: c
1, β, γ, εf
, G, W, c, b, E, K
Step 2: Calculate the output of the hidden layer; equation (19) is as follows
Step 4: Update neural network weights; equation (53) is as follows
Step 5: Calculate the approximation function; equation (22) is as follows
Step 6: Calculate the output control signal; equation (52) is as follows

Diagram of the system.

Control scheme of the developed system.

Block diagram of the closed-loop neural-based adaptive control scheme.
In this article, the initial values are defined following
Simulation results and discussions
The simulation is performed in two cases: ideal and turbulent environments, which are set up in X-Plane simulator as shown in Figures 14 (a) and 14 (b), respectively. The simulation results are shown in Figures 9 to 13. In the ideal condition, the fuzzy and the proposed method maintain an effective yaw angle that captures the target value. However, the adaptive RBF neural network controller provides better quality. The current method rapidly reaches the target value, fuzzy results in the slower response, as shown in Figures 9 and 11. The peak values in Figures 11 and 12 are caused by the slower response of the system in comparison with the changes of the target values. Similarly, in the turbulent condition, although the oscillation appears in both controllers, as shown in Figures 10 and 12, the current method still maintains effective yaw angle agreement with the desired value. The curve of fuzzy has a prominent oscillation. Despite, fuzzy rapidly reaches the desired value. The reason, that is, the characteristic of the helicopter is changed dramatically in the wide range, apart from the random disturbance effect. Fuzzy is well-known as a good solution to the nonlinear system. But determining the rule table to achieve the expected quality is the hard task, especially complex system as the helicopter. On the contrary, the proposed method is designed based on the adaptive solution. The neural network weight is updated online using the Lyapunov approach. So, the stability of the entire system and the convergence of the weight adaptation are guaranteed as shown in Figure 13. Hence, it can work effectively under the random disturbance effect and the large range of change.

Results of the fuzzy and RBF under ideal environment.

Results of the fuzzy and RBF under turbulent environment. NN: neural network.

Error of yaw angle in an ideal condition. NN: neural network.

Error of yaw angle in a turbulent condition. NN: neural network.

Yaw rate and approximation value. NN: neural network.

X-Plane® flight conditions (a) Ideal condition; (b) turbulent condition.
Conclusions
This study, the adaptive based on neural approximation has proposed for tracking control of yaw motion. Firstly, the LM method was applied to estimate the affine model of the yaw channel. Then, adaptation and control law are defined based on the Lyapunov and the augmented error approach. Finally, the design system is evaluated under ideal and turbulent environments. Compared with the performance of the fuzzy controller, that of the proposed method is significantly better. The proposed approach has the potential for actual system development. The future works of this study are to develop a fully autonomous flight control system based on the proposed method and to implement the proposed method in real flight tests of small-scale unmanned helicopters.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This study was supported by the Ministry of Science and Technology of Taiwan under grant number MOST 106-2221-E-035-058 and MOST 107-2623-E-006-007 -D.
