/ / Article

Research Article | Open Access

Volume 2014 |Article ID 265897 | https://doi.org/10.1155/2014/265897

S. Sadr, S. Ali A. Moosavian, P. Zarafshan, "Dynamics Modeling and Control of a Quadrotor with Swing Load", Journal of Robotics, vol. 2014, Article ID 265897, 12 pages, 2014. https://doi.org/10.1155/2014/265897

Revised15 Sep 2014
Accepted21 Oct 2014
Published17 Nov 2014

#### 1. Introduction

In this paper, the problem of the quadrotor flying with a suspended load is addressed which is widely used for different kinds of a cargo transport. The paper is organized in two parts. In the first part, a nonlinear model of an underactuated eight-degree-of-freedom quadrotor slung load system is derived on the basis of the Newton-Euler formulation. Next, this dynamic model is verified in comparison with Lagrange method. Then, a nonlinear model based control algorithm is designed for the position and attitude control of the quadrotor with the suspended load. In next part, the description of the input shaping algorithm is presented and, then, this method is implemented to the quadrotor with a suspended load. Finally, simulation results are studied to damp the oscillation of the suspended load.

#### 2. Dynamics Modeling

These assumptions are considered to be sufficient for the realistic representation of the quadrotor with a swinging load system which is used for a nonaggressive trajectory tracking.

##### 2.1. Aerodynamics of Rotor and Propeller

The aerodynamic force and moment are obtained by combining the momentum theory of the blade element [8, 9]. A quadrotor has four motors with propellers. The power applied to each motor, , generates a torque on the rotor shaft, , and a force . These torques and forces are generated by each rotor-propeller and they are proportional to the square of the propeller speed as where is the rotor velocity, is the air density, is the propeller radius, is the thrust factor, and is the momentum factor [9, 10].

##### 2.2. Dynamics Equations of Motion
###### 2.2.1. Kinematics Equation of Quadrotor

As shown in Figure 1, the quadrotor has four rotors which can generate identical thrusts and moments denoted by and , for , respectively. Let . represent a right-hand inertia frame with the -axis being the vertical direction to the earth. The body fixed frame is denoted by . that center of this frame is located on the mass center of the quadrotor. The Euclidean position of the quadrotor with respect to . is represented by the , , and . Also, the Euler angle of the quadrotor with respect to . is represented by the , , and . Thus, the rotation matrix from . to . can be represented by as where and refer to and function, respectively. Also, the translational and the rotational kinematics equations with respect to the inertial frame . can be yielded as where and denote the linear velocity and the angular velocity of the quadrotor with respect to the inertial frame . expressed in the body fixed frame .. So, the rotation velocity transfer matrix can be given as

###### 2.2.2. Newton-Euler Equation of Quadrotor

As the free body diagram of the quadrotor slung load system shown in Figure 2, the Newton-Euler equations for quadrotor in the inertia frame can be obtained as where is the mass matrix of the quadrotor, is the inertia matrix of the quadrotor, is the gravity matrix, is the cable force, and and are the linear and angular aerodynamic friction factor, respectively. Also, and matrices are given as

However, actuator forces and moments are summarized as where is distance of two rotors opposite to each other, to are thrust forces which are generated by rotors 1 to 4, and to are moments which are generated by rotors 1 to 4. So, results in the motion along the axis. Also, , , and create the roll, pitch, and yaw motion, respectively. In this system, is considered system’s input (or the actuator force for changing the cable length) which can be represented in the body frame as where is cable’s force magnitude. Also, the relation between and the cable length can be stated as where is the cable length, is the acceleration of mass relative to the quadrotor in the body coordinate, and is the load mass. So, motion’s equation of the load in the inertia frame can be obtained as: where

And is the load velocity with respect to the quadrotor while it is expressed in the body frame. Equations (5) and (10) are motion equations of system with generalized coordinates as follows:

By considering the constant length of the cable, the system has eight degrees of freedom.

###### 2.2.3. Lagrange Equation of Quadrotor

To obtain the dynamic equations of motion by Lagrange method, generalized coordinates are defined as

So, the kinetic energy for the quadrotor is and the swinging load’s kinetic energy can be attained as where , are the mass diagonal matrix and the swinging load of the quadrotor, respectively. Also, is the swinging load velocity with respect to the quadrotor inertia frame . Moreover, is the inertia moment matrix of the quadrotor in . which can be calculated as where is the inertia moment matrix of the quadrotor in the body frame . Finally, the closed form equation of motion can be obtained as whereas, by considering (9), is the mass matrix, is the nonlinear velocity matrix, and is the gravity matrix. Also, is the generalized force.

###### 2.2.4. Model Verification

In this section, in order to verify the obtained dynamics model since the motion equations by Newton-Euler method are inhomogeneous unlike Lagrange equations, a desired path for the quadrotor flight is defined. Then, by solving Lagrange equations, rotors input are computed for tracking this desired path (solving the inverse dynamics). Next, these forces are exerted to Newton-Euler equations as inputs and these equations are solved (solving the forward dynamics). This procedure shows that responses of Newton-Euler and Lagrange equations are the same as the desired path. To this end, in simulations, a specified path for the quadrotor is considered and the inverse dynamic is solved to obtain the desired forces for the considered path (for Lagrange equations). By defining these forces as inputs for the Newton-Euler equations and solving these equations to find the tracked path by the quadrotor, the dynamics model can be verified. So, a hover flight is defined in  m, and the simulation result is shown in Figure 3. As shown form this figure, both paths are the same. In next scenario, a vertical take-off flight is defined. Therefore, the desired path for this flight is

The simulation result for this path is shown in Figure 4. It is shown that both responses of these dynamic models are the same and are reasonable.

#### 3. Controller Design

##### 3.1. Position and Attitude Control of Quadrotor

The main aim of this section is to design a model based control scheme for a full control of a quadrotor. This control method is a compensation of nonlinear terms based on the accurate knowledge of the dynamics system. Thus, dynamic equations of motion based on the accurate knowledge of the dynamics system can be stated as where , , and are the mass matrix, the nonlinear velocity matrix, and the gravity matrix, respectively. These matrices are obtained based on the physical knowledge and the geometrical dimensions. In Figure 5, the block diagram of this control algorithm is shown. According to this diagram, the control law can be calculated as

Also, this control torque can be applied to the below dynamics equations of the considered system as

Moreover, by considering what is well known about the dynamic parameters of the system, it can be concluded that

So, by substituting (20) into (21) and considering the assumption in (22), it yields

As is the positive definition matrix, so it can be written as which confirms the error convergence by choosing the proper controller gains and .

Using this algorithm and by choosing optimal gains for the designed controller, the position and attitude of the quadrotor are controlled. So, the model can be viewed as two independent subsystems, which are the transitional movement subsystem and the angular movement subsystem. The transitional motion does not affect the angular motion, but the angular motion affects the transitional motion. However, for designing a control algorithm in order to take full control of degrees of freedom, quadrotor’s dynamics equations must be divided into two subsystems: the transitional subsystem and the rotation subsystem. Therefore, the control algorithm is designed in two parts: the position controller and the attitude controller. Figure 6 shows this control algorithm scheme.

Based on quadrotor’s operation in different flights, it is obvious that the quadrotor does not have any actuator force which directly creates a movement along the - and the -axis. Thus, this robot can fly in the and the direction by creation of the pitch and the roll motion. Based on this principle, control forces can be obtained using the transitional subsystem as where , , and are created forces motion along the -, -, and -axis which are calculated according to the desired trajectory. Also, the vector of control forces can be calculated according to the transitional subsystem (transitional motion equation of the quadrotor and swing load) as where , , and are the mass matrix, the nonlinear velocity matrix, and the gravity matrix of the transitional dynamic subsystem, respectively. Also, is the desired acceleration and (where ) is the position error. Moreover, and are controller gains. By solving three equations of (25), simultaneously, control outputs , , and which create motion along the -, -, and -axis are calculated as where is the desired value of the yaw angle. In the same way, the attitude controller is designed according to the rotational subsystem. Therefore, to perform this control propose, the torque control vector or can be considered: where , , and are the mass matrix, the nonlinear velocity matrix, and the gravity matrix of the rotational dynamic subsystem (rotational motion of the quadrotor), respectively. Also, and , are rotation controller’s gains.

##### 3.2. Simulation Results of Designed Position and Attitude Controller

To verify the effectiveness and the application effect of the proposed control method, the simulation study has been carried on the quadrotor with a swinging load. In this section, simulation results of the Model Based Algorithm controller (MBA controller) are compared to a PID controller in different maneuvers. It should be noted that the gains of PID controller are calculated by try and error method. So, controller gains and the system parameters of simulations are described in Tables 1 and 2. In the first case study, a linear path in the - plane at  m is defined. The equation of desired path is defined as follows:

 Controllers gains Value = 100 = 80 = 50 = 8 = 8 40 14 20 = = 80 = = 10 = 8 6
 Parameter Value (Kg) (Kg) (m) (m) (Kg/m2) × (Kg/m2) × (Kg/m2) × = ×

Simulation results of the designed controller are shown in Figures 79. As shown in Figure 7, the controller performance in comparison with a PID controller in this maneuver is good. As seen from Figure 8, the quadrotor finds the desired path by the MBA controller earlier than the PID controller. Also, Figure 9 shows the maximum error of the and the position, so that the considered MBA controller has the better performance than the PID controller.

The last case study is a circular path for the quadrotor flight (Figure 10). In this scenario, the superior performance of the proposed MBA controller is compared to the PID controller (Figures 11 and 12). The position error of the quadrotor is converged to the zero after a few seconds by the designed model based control algorithm, while by the PID controller this error has oscillations about zero and it is not zero.

##### 3.3. Antiswing Control of Quadrotor

In the first step of the antiswing controller design procedure, it should be better to find commands that move systems without vibration. So, it is helpful to start with the simplest command. It is known that, by giving an impulse to the system, it will cause vibration. However, if a second impulse is applied to the system in the right moment, the vibration included by the first impulse is cancelled [23]. This concept is shown in Figure 13. Subsequently, input shaping theory is implemented by convolving the reference command with a sequence of impulses. This process is illustrated in Figure 14. The impulse amplitudes and time locations of their sequence are calculated in order to obtain a stair-like command to reduce the detrimental effects of system oscillations. The amplitude and time locations of impulses are calculated by estimation of system’s natural frequency and the damping ratio [30].

If estimations of system’s natural frequency, , and the damping ratio, , for vibration modes of the system which must be canceled are known, then the residual vibration that results from the sequence of impulses can be described as where where and are the amplitude and the time locations of impulses, is the number of impulses in the impulse sequence, and . To avoid the trivial solution of all zero valued impulses and to obtain a normalized result, it is necessary to satisfy the below equation:

In the modeling of a suspended load, the load damping or can be neglected and the frequency of the linear model can be considered: where is length of the cable. When the amplitude of impulses is considered positive and the estimation of system’s parameters is accurate, the simplest shaper or the ZV shaper can be proposed with two impulses in two times and . Convolving this shaper to the step input is shown in Figure 14. The ZV shaper can cancel the oscillation of systems whose natural frequency and damping ratio are specific and known. In this case, this assumption can be considered to drive dynamic equations. The cable is considered inelastic and the aerodynamic force on the suspended load is neglected. So, the exact estimation of natural frequency and the damping ratio does not exist. In 1993, Bohlke proposed a method to increase the robustness of the ZV shaper against errors of system’s parameter estimation [23]. In this proposed method, the derivation of the residual vibration to the natural frequency and the damping ratio must be zero as

These two equations can be written as

Due to adding these two constraints, two variables are required to be added by an impulse with the amplitude at the time to the ZV shaper. The result of this addition is the ZVD shaper with 3 impulses and 5 unknown , , , , and (with the assumption ) for this shaper. Thus, the following equations can be obtained:

By solving these four equations, unknown parameters of the input shaper are calculated as where

For the quadrotor with the suspended load, the cable length is assumed as  m. By estimating the natural frequency and the damping ratio, input shaper’s parameters are obtained as

However, the transfer function of the designed ZVD shaper is

For the small oscillation, suspended load’s motion is caused by the horizontal motion of the quadrotor. So, it is necessary that the shaper is implemented on the part of the desired path. If the part of the desired path for the shaper is defined as consequently, the shaped path for the quadrotor is where is the transfer function matrix of the ZVD shaper in the time domain. By considering the shaped path for the quadrotor controller, the controller performance is improved and the oscillation of the swing load is reduced. In next section, simulation results of the implementing shaper on input commands are shown and discussed.

##### 3.4. Simulation Results of Designed Antiswing Controller

To verify the effectiveness and the application effect of the control method for canceling the oscillation of the suspended load, the simulation routine has been carried on the quadrotor with the suspended load. In addition, for estimating the natural frequency and the damping ratio, this system is compared to a cart-pendulum system. So, the natural frequency of system is assumed as (33). Also, the damping ratio of oscillation mode of the swing load is related to the aerodynamics drag on the load and suspension system and, so, the damping ratio is zero according to the small scale of system consideration. Moreover, the system parameters used in the simulation are listed in Table 2. Moreover, the desired path is defined as the line-curve-line and simulation results are shown in Figure 15. By comparing Figure 15 with Figure 16, it can be concluded that the designed feed-forward controller can effectively cancel the oscillation of the suspended load. In addition, Figure 17 shows the position error of the quadrotor both with ZVD shaper and without ZVD shaper. As seen from this figure, the error is converged to zero after a few seconds when input shaping is implemented on desired command, and the performance of the controller is better. Also, it is clear that, by implementing input shaping on a desired path, the required time for tracking the desired path is increased. So, the quadrotor requires more time for tracking the desired path.

In the second senario, the square path is designed for the quadrotor flight. In Figures 18 and 19, simulation results are shown both with ZVD shaper and without it. As can be seen from these figures, the feed-forward controller can cancel the oscillation. Also, Figure 20 shows the position error of the quadrotor with input shaping. As shown from this figure, error is zero after few seconds.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### References

1. S. G. Vazquez and J. M. Valenzuela, “A new nonlinear PI/PID controller for quadrotor posture regulation,” in Proceedings of the 7th IEEE Electronics, Robotics and Automotive Mechanics Conference, pp. 642–647, October 2010. View at: Publisher Site | Google Scholar
2. G. Lee, D. Y. Jeong, N. Khoi, and T. Kang, “Attitude control system design for a quadrotor flying robot,” in Proceedings of the 8th International conference on Ubiquitous Robots and Ambient Intelligence (URAI ’12), Incheon, Republic of Korea, 2012. View at: Google Scholar
3. G. Hoffmann, “The Stanford testbed of autonomous rotorcraft for multi agent control (STARMAC),” in Proceedings of the 23rd Digital Avionics Systems Conference (DASC ’04), vol. 2, October 2004. View at: Publisher Site | Google Scholar
4. Z. Fang and W. Gao, “Adaptive integral backstepping control of a Micro-Quadrotor,” in Proceedings of the 2nd International Conference on Intelligent Control and Information Processing (ICICIP ’11), pp. 910–915, Harbin, China, July 2011. View at: Publisher Site | Google Scholar
5. B. Erginer and E. Altug, “Design and implementation of a hybrid fuzzy logic controller for a quadrotor VTOL vehicle,” International Journal of Control, Automation and Systems, vol. 10, no. 1, pp. 61–70, 2012. View at: Publisher Site | Google Scholar
6. G. V. Raffo, M. G. Ortega, and F. R. Rubio, “Backstepping/nonlinear ${H}_{\infty }$ control for path tracking of a quadrotor unmanned aerial vehicle,” in Proceedings of the American Control Conference (ACC ’08), pp. 3356–3361, Seattle, Wash, USA, June 2008. View at: Publisher Site | Google Scholar
7. E. de Vries and K. Subbarao, “Backstepping based nested multi-loop control laws for a quadrotor,” in Proceedings of the 11th International Conference on Control, Automation, Robotics and Vision, pp. 1911–1916, Singapore, December 2010. View at: Publisher Site | Google Scholar
8. D. Mellinger, N. Michael, M. Shomin, and V. Kumar, “Recent advances in quadrotor capabilities,” in Proceedings of the IEEE International Conference on Robotics and Automation (ICRA ’11), pp. 2964–2965, Shanghai, China, May 2011. View at: Publisher Site | Google Scholar
9. M. Hehn and R. D’Andrea, “A flying inverted pendulum,” in Proceedings of the IEEE International Conference on Robotics and Automation (ICRA ’11), pp. 763–770, May 2011. View at: Publisher Site | Google Scholar
10. V. Ghadiok, J. Goldin, and W. Ren, “Autonomous indoor aerial gripping using a quadrotor,” in Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, 2011. View at: Google Scholar
11. E. Doyle, J. Bird, T. A. Isom et al., “An Avian-inspired passive mechanism for quadrotor perching,” in Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, San Francisco, Calif, USA, 2011. View at: Google Scholar
12. A. Mattio, “Development of autonomous cargo transport for an unmanned aerial vehicle using visual servoing,” in Proceedings of the ASME Dynamic Systems and Control Conference, pp. 407–414, October 2008. View at: Google Scholar
13. P. E. I. Pounds, D. R. Bersak, and A. M. Dollar, “Grasping from the air: hovering capture and load stability,” in Proceedings of the IEEE International Conference on Robotics and Automation (ICRA ’11), pp. 2491–2498, Shanghai, China, May 2011. View at: Publisher Site | Google Scholar
14. M. Korpela, W. Danko, and Y. Oh, Designing a system for mobile manipulation from an unmanned aerial vehicle [Master thesis], 2005.
15. K. Sreenath, N. Michael, and V. Kumar, “Trajectory generation and control of a quadrotor with a cable-suspended load—a differentially-flat hybrid system,” in Proceedings of the IEEE International Conference on Robotics and Automation (ICRA ’13), pp. 4888–4895, May 2013. View at: Publisher Site | Google Scholar
16. I. Palunko, R. Fierro, and P. Cruz, “Trajectory generation for swing-free maneuvers of a quadrotor with suspended payload: a dynamic programming approach,” in Proceedings of the IEEE International Conference on Robotics and Automation (ICRA ’12), pp. 2691–2697, 2012. View at: Publisher Site | Google Scholar
17. N. Michael, J. Fink, and V. Kumar, “Cooperative manipulation and transportation with aerial robots,” Autonomous Robots, vol. 30, no. 1, pp. 73–86, 2011.
18. J. Thalapil, “Input shaping for sway control in gantry cranes,” IOSR Journal of Mechanical and Civil Engineering, vol. 14, no. 4, pp. 36–46, 2012. View at: Google Scholar
19. P. Benes and M. Valasek, “Input shaping control with reentry commands of prescribed duration,” Applied and Computational Mechanics, vol. 2, pp. 227–234, 2008. View at: Google Scholar
20. P. Benes, O. Marek, and M. Valasek, “Input shaping control of electronic cams with adjusted input profile,” Bulletin of Applied Mechanics, vol. 8, no. 29, pp. 10–14, 2011. View at: Google Scholar
21. M. Kenison and W. Singhose, “Input shaper design for double-pendulum planar gantry cranes,” in Proceedings of the IEEE International Conference on Control Applications, vol. 1, pp. 539–544, Kohala Coast, Hawaii, USA, August 1999. View at: Publisher Site | Google Scholar
22. M. A. Ahmad, Z. Mohamed, and Z. H. Ismail, “Hybrid input shaping and PID control of flexible robot manipulator,” Journal of the Institution of Engineers, vol. 72, no. 3, pp. 56–62, 2009. View at: Google Scholar
23. K. A. Bohlke, Using input shaping to minimize residual vibration in flexible space structures [M.S. thesis], Princeton University, 1993.
24. D. Blackburn, W. Singhose, J. Kitchen et al., “Command shaping for nonlinear crane dynamics,” Journal of Vibration and Control, vol. 16, no. 4, pp. 477–501, 2010. View at: Publisher Site | Google Scholar
25. O. J. M. Smith, “Posicast control of damped oscillatory systems,” Proceedings of the IRE, vol. 45, no. 9, pp. 1249–1255, 1957. View at: Publisher Site | Google Scholar
26. C. J. Swigert, “Shaped Torques Techniques,” Journal of Guidance and Control, vol. 3, no. 5, pp. 460–467, 1980. View at: Publisher Site | Google Scholar
27. T. Mita and T. Kanai, “Optimal control of the crane system using the maximum speed of the trolley,” Transactions of the Society of Instrument and Control Engineers, vol. 15, pp. 833–838, 1979. View at: Google Scholar
28. J. Yu, “Nonlinear feedback control of a gantry crane,” in Proceedings of the American Control Conference, pp. 4310–4314, Seattle, Wash, USA, June 1995. View at: Google Scholar
29. H. Lee, “Modeling and control of a three-dimensional overhead crane,” ASME Transaction on Journal of Dynamic Systems, Measurement and Control, vol. 120, no. 4, pp. 471–476, 1998. View at: Publisher Site | Google Scholar
30. C. Adams, J. Potter, and W. Singhose, “Modeling and input shaping control of a micro coaxial radio-controlled helicopter carrying a suspended load,” in Proceedings of the 12th International Conference on Control, Automation and Systems (ICCAS ’12), pp. 645–650, October 2012. View at: Google Scholar
31. M. Z. M. Zain, M. O. Tokhi, and Z. Mohamed, “Hybrid learning control schemes with input shaping of a flexible manipulator system,” Mechatronics, vol. 16, no. 3-4, pp. 209–219, 2006. View at: Publisher Site | Google Scholar