Switching Model Predictive Control for Online Structural Reformations of a Foldable Quadrotor
SSwitching Model Predictive Control for OnlineStructural Reformations of a Foldable Quadrotor
Andreas Papadimitriou and George Nikolakopoulos
Robotics and AI TeamDepartment of Computer Science, Electrical and Space EngineeringLule˚a University of TechnologyLule˚a SE-97187, Sweden
Abstract —The aim of this article is the formulation of aswitching model predictive control framework for the case ofa foldable quadrotor with the ability to retain the overall controlquality during online structural reformations. The majority of therelated scientific publications consider fixed morphology of theaerial vehicles. Recent advances in mechatronics have broughtnovel considerations for generalized aerial robotic designs withthe ability to alter their morphology in order to adapt to theirenvironment, thus enhancing their capabilities. Simulation resultsare provided to prove the efficacy of the selected control scheme.
Index Terms —Model based attitude control, Foldable quadro-tor, Switching control.
I. I
NTRODUCTION
Recent advances in technology have made possible the useof aerial vehicles in a wide range of applications ranging frominspection and maintenance [1]–[3] to exploration [4], [5],search and rescue missions [6], [7], etc.Much research focused to tackle the challenge of fullyautomated solutions while using fixed-frame quadrotors. Tofurther, increase the variety of tasks and corresponding appli-cations, the ability of a Micro Aerial Vehicle (MAV) to alter itsstructure should be further investigated. One way of achievingstructural reformation of the quadrotor is to add Degree ofFreedom (DoF) to enable the motion of the quadrotor arms.However, the lack of a generalized control scheme to adaptand capture the dynamics of this frame reconfiguration limitsthe adaptability of transformable aerial vehicles to differentflight conditions.
A. Background & Motivation
In the related literature, can be found some aerial vehicleswhich have the ability to alter their structural formation.The starting point for this article has been the developmentof a foldable quadrotor with the ability to maintain stableflight, after changing its formation by rotating motion of eacharm individually, that has been presented in [8]. Anotherfoldable quadrotor design was presented in [9], where theplatform was able to decrease its wide-span, by changingthe orientation of its propellers based on an actuated elasticmechanism. Furthermore, in [10] a self-foldable quadrotor has
This work has been partially funded by the European Unions Horizon2020 Research and Innovation Programme Illumineation and Interreg NordProgramme ROBOSOL NYPS 20202891. been presented with a gear-based mechanism to control thecontraction and expansion of the four arms simultaneously.This approach allowed for two possible configurations namelyeither fully expanded when the drone is deployed or fullycontracted when the drone is on the ground. A passive foldablequadrotor has been presented in [11] that utilizes springs foraltering its formation. The maneuverability of this design,while the drone is in its reduced form, was limited and thequadrotor can traverse only for a short time through narrowgaps. Finally, a sliding arm quadrotor has been presented in[12] from a modeling and control point of view.Besides transformable quadrotor platforms, other novelaerial vehicles that can alter their structure have been presentedin the last years.
DRAGON is a dual rotor multilink aerialrobot that alters its formation with the use of multiple servoswhile flying [13] able to traverse through gaps. In the areaof aerial grasping the robotic platform in [14], consists ofmultiple links that can be actuated to adopt its overall shapefor the handling of large objects. The ability of robots to adaptto their environment and on the needs of a mission, it has beeninvestigated in [4]. Where the concept of a hybrid platform hasbeen presented with a combination of multiple robots whichcan collaboratively fly and roll in different formations.
B. Contribution
The novelty of this work stems from the design of a switch-ing Model Predictive Control (MPC) to support the onlinestructural reformation of a foldable quadrotor. The novel pro-posed control framework can count for state and control signalconstraints during the shape transition and adapt to the inducedmodel variations due to the shape transformation. The selectedcontrol scheme is evaluated under iterative simulations duringnavigation of various paths, while the platform is executingsequential transformations. Finally, the effect of the platform’sshape during motion is investigated.
C. Outline
The rest of the article is structured as follows. Section IIdiscusses the modelling of the foldable quadrotor and thecontrol problem. Section III discusses the design of the MPCattitude controller while Section IV presents the simulationresults. Finally, concluding remarks are given in Section V. a r X i v : . [ c s . R O ] A ug I. M
ODELING
In Fig. 1, the conceptual design of the foldable quadrotoris depicted in isometric view for different formations. Asit is indicated, the arms of the quadrotor are connected onservos thus they can rotate around the z -axis. To overcomepossible collision between the propellers at the extreme angles,the motors have been placed alternately upside down. It isimportant to mention that any changes on the formation ofthe arms coming directly from rotation around the z -axis ofthe MAV. Thus, the geometry varies only related to the x and y -axis resulting into a planar-varying geometry as it is depictedin Fig. 2. Fig. 1. Isometric view of the foldable drone conceptual design in X and Hmorphology and a side view displaying the various components.
In this work both symmetrical and asymmetrical formationsare studied. The major changes impacting the quadrotor fromthe different formations are coming from Center of Gravity(CoG) variations and changes in Moments of Inertia (MoI)matrix. The foldable quadrotor is a 6-DoF object with a Body-Fixed Frame B located at the Geomtric Center (GC) of thevehicle. The arms of the platform are able to perform only1-DoF motion around the z -axis.Platform’s CoG is located at rrr CoG ∈ R distance fromthe GC. The offset vector rrr CoG is calculated by taking intoaccount every component of the quadrotor CoG positionvector rrr ( . ) ∈ R . In this article we consider the followingdominant components that characterize the geometry of theMAV. These are the main body of the quadrotor with mass m b and dimensions (2 l × w × h ) denoting the length, width andheight respectively. The arms located at the four corners of theMAV with mass m a,i and offset rrr a,i , where i ∈ Z [1 , is theidentification number of the individual components. Finally,the combination of the motor, rotor and propeller is consideredone component with mass m c and offset rrr c,i from the GC andits own CoG.In Fig 2, θ s,i ∈ S are the angles of the servos actuating thearms, while the offset rrr CoG between the GC of the vehicle is: rrr
CoG = m b rrr b + (cid:80) i =1 ( m a rrr a,i + m c rrr c,i ) m b + (cid:80) i =1 ( m a + m c ) (1) Fig. 2. 2D representation of the foldable quadrotor with highlighted the maingeometrical properties
Altering the formation of the platform, by actuating the servos,the total mass of the platform remain the same or: m = m b + (cid:88) i =1 ( m a + m c ) , (2)since the distance of the components’ CoG is a function ofthe servos angle θ s,i the (1) can be written as, rrr CoG = 1 m (cid:32) m b rrr b + (cid:88) i =1 ( m a rrr a,i ( θ s,i ) + m c,i rrr ( θ s,i )) (cid:33) . (3) The distance, from the geometric center to the servo, isconstant and equal to the dimensions of the body [ w, l ] (cid:62) .The offset vectors rrr ( . ) can be calculated either online or offlinewith the knowledge of the angle θ s,i . The offset on the z -axisof every component to the GC is constant, since it does notchange when they rotate around z -axis, however, the offsets rrr .,x and rrr .,y need to be recalculated. The angle θ s of the servois assumed to be known (Fig. 2). For this study, the position ( . ) min in Fig. 2 denotes the minimum angle that the arm canrotate °, while the ( . ) max denotes the maximum angle °.Under the assumption that the CoG of the combinationmotor, rotor and propeller located in their center, the euclideandistance of the CoG from the servo is α . Based on thegeometrical properties the new position, where the thrust isenerated for every arm can be calculated by: rrr c, = (cid:2) − w − α cos θ s, − r CoG ,y , l + α sin θ s, − r CoG ,x , z (cid:3) (cid:62) (4a) rrr c, = (cid:2) − w − α cos θ s, − r CoG ,y , − l − α sin θ s, − r CoG ,x , z (cid:3) (cid:62) (4b) rrr c, = (cid:2) w + α cos θ s, − r CoG ,y , − l − α sin θ s, − r CoG ,x , z (cid:3) (cid:62) (4c) rrr c, = (cid:2) w + α cos θ s, − r CoG ,y , l + α sin θ s, − r CoG ,x , z (cid:3) (cid:62) (4d)The varying positions of the arms result into a varying controlallocation, since it affects the position of the motors anddirectly the torques around the x, y -axis. Tτ x τ y τ z = b b b br c, x r c, x r c, x r c, x r c, y r c, y r c, y r c, y − κ κ − κ κ f f f f (5) where r c,i x and r c,i y denote the first and second elementrespectively of the rrr c,i . Finally, b and κ are coefficients relatedto the thrust and torque respectively.In addition, the MoI of the platform varies as the armschange position. Each component is characterized by its ownMoI matrix. The total MoI of the platform can be calculatedfrom the individual MoI with the use of the parallel axistheorem at the body frame B . ( III mav ) B = ( III b ) B + (cid:88) ( III a i ) B + (cid:88) ( III m c ) B (6) For this article, as distinct formations are considered for theswitching MPC, the MoI have been extracted directly fromthe CAD model for all the different configurations, instead ofcomputing them from the geometrical properties.III. C
ONTROL S TRUCTURE
The purpose of the attitude switching MPC is to trackthe desired angles φ d , θ d and ψ d given from a higher leveltrajectory controller. For the trajectory tracking, a high levelMPC is formulated and used based on the linearized translationeuler model [15]. Thus, the following states are considered forthe switching MPC, xxx smpc = (cid:2) φ θ ψ ˙ φ ˙ θ ˙ ψ τ x τ y τ z (cid:3) (cid:62) (7)The angular acceleration, rate and torques are given from theNewton-Euler law as: ˙ ωωω = III − ( − ωωω × IIIωωω + τττ ) , (8)where we consider the inertia matrix with zero off-diagonalelements: ( III mav ) B = III = (cid:2) I xx I yy I zz (cid:3) III (9)At this point, it should be noted that ω (cid:54) = ˙ η , where η =[ φ θ ψ ] (cid:62) . The transformation matrix for the angular velocities,from the inertial frame to the body frame, is W η W η W η . ωωω = W η W η W η ˙ ηηη, ω x ω y ω z = − sθ cφ cθsφ − sφ cθcφ ˙ φ ˙ θ ˙ ψ ˙ ωωω = III − ( − WWW ˙ η × IIIWWW ˙ ηηη + τττ ) (10)As far as the torques’ dynamics are concerned, following asimilar approach to [8], they have been assumed to follow thedynamics of a first order system. ˙ τ = 1 τ α ( τ d − τ ) (11)where τ α is the time constant. After linearizing (10) at ω = 0 and τ = 0 it results into the following linear system. ωωω ˙ ωωω ˙ τττ = III III −
000 000 − τ α III ηηηωωωτττ + τ α III (12) A. Linear Parameter Varying System
The attitude modeling of the quadrotor from the lineariza-tion stage depends on the inertia matrix. While the inertiamatrix varies based on the formation of the platform thesystem is subject to parametric changes. The resulting LinearParameter Varying (LPV) system has the following form, xxx k +1 = AAA ( θ S,k ) xxx ( k ) + BBB ( θ S,k ) uuu ( k ) (13)where xxx ( k ) ∈ R n × denotes the system states and uuu ( k ) ∈R m × is the input vector.For the case of the linear switching MPC the followingoptimization is considered:minimize N − (cid:88) k =0 (cid:0) ∆ xxx (cid:62) k QQQ x ∆ xxx k + uuu Tk RRR u uuu k (cid:1) (14a)subject to xxx k, min ≤ xxx k ≤ xxx k, max , k = 1 , ..., N p , (14b) ∆ uuu min ≤ ∆ uuu k ≤ ∆ uuu max , k = 1 , ..., N p , (14c) xxx k +1 | k = f ( xxx k | k , uuu k | k , θ s θ s θ sk | k ) , k ≥ , (14d) xxx = xxx ( t ) (14e)where ∆ xxx k = xxx ∗ k − xxx k and ∆ uuu k = uuu k | k − uuu k | k − , while N p , N c denote the prediction and control horizon respectively. QQQ x (cid:23) and RRR u (cid:31) are the penalty on the state error and on thecontrol input respectively, while the bounds of the constraintsare denoted as ( . ) min , max . The state update of the optimizationproblem is a function of the current states, inputs and the angleof the arms θθθ s and xxx are the initial state conditions.The complete control scheme is displayed in Fig. 3. For areference profile of positions ppp ∗ = [ x, y, z ] (cid:62) and velocities vvv ∗ = [ ˙ x, ˙ y, ˙ z ] (cid:62) the trajectory tracking MPC generates roll,pitch and thrust commands. Next the attitude switching MPCselects the appropriate model based on the switching variable t f which indicates the formation of the platform (X-H-Y andT). The computed torques and thrusts from the switching MPCare given to the parametric varying control mix as defined in(5), which results the necessary forces for the motors. ig. 3. Block diagram displaying the overall control scheme proposed for controlling the foldable quadrotor. IV. S
IMULATION R ESULTS
To evaluate the performance of the attitude switching MPC,two indicative types of simulations are presented. The firstscenario assumes that the quadrotor takes off and hovers ata specific height, while cycling through the four differentformations denoted as X , H , Y , T, while the states of the plantare subject to additive noise. The second scenario tests theability of the foldable quadrotor to follow a square trajectorywhile cycling again through the different configurations.The utilized parameters for the nonlinear quadrotor are: atotal mass of 1kg and arm length 0.15m. To increase theaccuracy, the inertia tensors are computed from the CADmodel directly for the different formations and they are givenin the following table.
TABLE II
NERTIA T ENSOR V ALUES FOR THE DIFFERENT FORMATIONS I xx I yy I zz X 0.004233 0.004380 0.007834H 0.005885 0.001812 0.006918Y 0.005042 0.003096 0.007369T 0.003654 0.003917 0.006792
The attitude switching MPC has a prediction horizonof N p = 40 and a control horizon of N c = 12 witha sampling time of 0.01sec. The input weights are setto RRR u = diag (80 , , , while the yaw reference iskept at ψ ∗ = 0 . The states weight matrix is QQQ x = diag (40 , , , , , , . , . , . , while the rate con-straints are ∆ u ∆ u ∆ u ≤ | [0 . , . , . (cid:62) | and the input con-straints uuu ≤ | [0 . , . , . (cid:62) | . The weights, penalties andconstraints are identical for both simulations. Since on thispreliminary evaluation, the interest is focused on maintaininga stable flight, the formation change of the platform set tohappen at specific time-instances. A. Attitude Control Simulation
For the first simulation the reference signal hold position at[0,0,2] meters in x, y and z axis respectively, while a switchingsignal t f is sent every 15 seconds to update the formation ofthe drone, thus forcing the controller as well to update itsmodel. Fig. 4 shows the time response performance of the position vector. It can be noticed that the error remained under0.04m for x and y , while for z under 0.02m after it reachedthe steady state. Fig. 4. Time response of the foldable quadrotor position in x, y and z -axisduring position hold, while changing its formation. As far as the performance of the attitude controller isconcerned, Fig. 5 shows the generated force levels requiredfor each motor to achieve position hold. It can be noticedthat while the platform is in H or X configuration, which areboth symmetrical formations, there is no major impact fromthe configuration change. On the other hand, the formations Yand T, which result to a major change in the geometry of theplatform and variation of the CoG that has a great impact onthe motor forces. For the T formation, the motor , need togenerate approximately 3.5N, while the motor , about 1.4Nwith the total force to be equal to the gravity force g as happensin all other configurations.In Fig. 6, the torque input generated from the switchingMPC is illustrated. The presented time response of the torquesreaches close to the boundaries in an effort to maintain theposition of the platform. Despite the high amplitude noise thecontroller successfully maintains the position without violatingthe pre-defined constraints. ig. 5. Motor commands during position hold, while altering the morphologyof the platform.Fig. 6. Torque output response of the switching MPC during position holdsimulation. B. Trajectory Tracking Simulation
The trajectory tracking of the linear MPC has a sam-pling time of 0.1sec. The input weights are set to
RRR u = diag (25 , , for the roll pitch and thrust, while the yawreference is kept at ψ ∗ = 0 . The states weights areset to QQQ u = diag (40 , , , , , , . , . , while thestates are defined as [ ppp, vvv, φ ∗ , θ ∗ ] (cid:62) . The rate constraints are ∆ u ∆ u ∆ u ≤ | [0 . , . , . (cid:62) | and the input constraints uuu ≤| [12 , , ∞ ] (cid:62) | .The tracking performance of the foldable quadrotor isillustrated in Fig. 7. The MAV successfully tracks all theway-points despite the formation changes even when thereformation occurs close to a turn.The reference angles θ ∗ and φ ∗ generated from the trajec-tory controller are given in 8 (red dashed line), while the yaw is Fig. 7. Foldable drone trajectory tracking performance for a given squarepath. forced to ψ ∗ = 0 , are successfully tracked from the switchingMPC (black line). Fig. 9 shows the switching controller torqueoutputs. As expected, the τ z remained zero, while the torquesaround the x and y axis remained under 0.02N, resulting intoa smooth transition throughout the entire trajectory. Fig. 8. Roll, pitch and yaw references and responses during the trajectorytracking simulation of the switching attitude MPC.
Finally, similarly to the position hold simulation, Fig 10the morphology of the platform has a major impact on therequired force by each motor.V. C
ONCLUSIONS
This article presented a switching MPC for the onlinestructural reformation of a foldable quadrotor. To evaluate theefficacy of the control scheme, simulation trials have beenperformed during online reformations. The switching MPCscheme has presented the ability to successfully maintain the ig. 9. Torque output response of the switching MPC during the trajectorytracking simulation.Fig. 10. Motor commands during trajectory tracking, while altering themorphology of the platform. performance, despite the alternating of configurations resultinginto a stable flight during all the simulation trials. The overallposition error remained under 4cm in x, y and z -axis. Theincorporation of the switching MPC, with a trajectory trackingcontroller, was successful as the first was able to regulateproperly and track the desired angles with a minimum error.The performance of the switching controller is character-ized by accurate tracking of the way-points for the case offollowing a square trajectory, while changing its formation.During the simulations, the error remained in the level ofcentimeters. Future work will tackle the challenge of deployingthe switching MPC in extended experimental evaluations.R EFERENCES[1] S. S. Mansouri, C. Kanellakis, E. Fresk, D. Kominiak, and G. Niko-lakopoulos, “Cooperative coverage path planning for visual inspection,”
Control Engineering Practice , vol. 74, pp. 118–131, 2018.[2] R. R. S. de Melo, D. B. Costa, J. S. lvares, and J. Irizarry, “Applicabilityof unmanned aerial system (uas) for safety inspection on constructionsites,”
Safety Science
Journal of Physics: Conference Series , vol. 1015, p. 042021, may 2018.[Online]. Available: https://doi.org/10.1088%2F1742-6596%2F1015%2F4%2F042021[4] A.-a. Agha-mohammadi, A. Tagliabue, S. Schneider, B. Morrell,M. Pavone, J. Hofgartner, I. A. D. Nesnas, R. B. Amini, A. Kalantari,A. Babuscia, and J. Lunine, “The Shapeshifter: a Morphing, Multi-Agent,Multi-Modal Robotic Platform for the Exploration of Titan(preprint version),” arXiv e-prints , p. arXiv:2003.08293, Mar. 2020.[5] S. S. Mansouri, C. Kanellakis, D. Kominiak, and G. Nikolakopoulos,“Deploying MAVs for autonomous navigation in dark underground mineenvironments,”
Robotics and Autonomous Systems , p. 103472, 2020.[6] T. Tomic, K. Schmid, P. Lutz, A. Domel, M. Kassecker, E. Mair,I. L. Grixa, F. Ruess, M. Suppa, and D. Burschka, “Toward a fullyautonomous uav: Research platform for indoor and outdoor urban searchand rescue,”
IEEE robotics & automation magazine , vol. 19, no. 3, pp.46–56, 2012.[7] C. Sampedro, A. Rodriguez-Ramos, H. Bavle, A. Carrio, P. de la Puente,and P. Campoy, “A fully-autonomous aerial robot for search and rescueapplications in indoor environments using learning-based techniques,”
Journal of Intelligent & Robotic Systems , pp. 1–27, 2018.[8] D. Falanga, K. Kleber, S. Mintchev, D. Floreano, and D. Scaramuzza,“The foldable drone: A morphing quadrotor that can squeeze and fly,”
IEEE Robotics and Automation Letters , vol. 4, no. 2, pp. 209–216, 2019.[9] V. Riviere, A. Manecy, and S. Viollet, “Agile robotic fliers:A morphing-based approach,”
Soft robotics , vol. 5, no. 5, pp.541–553, Oct 2018, 29846133[pmid]. [Online]. Available: https://doi.org/10.1089/soro.2017.0120[10] T. Tuna, S. E. Ovur], E. Gokbel, and T. Kumbasar, “Designand development of folly: A self-foldable and self-deployablequadcopter,”
Aerospace Science and Technology , 2019, pp. 9116–9122.[12] R. Kumar, A. M. Deshpande, J. Z. Wells, and M. Kumar, “Flight Controlof Sliding Arm Quadcopter with Dynamic Structural Parameters,” arXive-prints , p. arXiv:2004.12920, Apr. 2020.[13] M. Zhao, T. Anzai, F. Shi, X. Chen, K. Okada, and M. Inaba, “Design,modeling, and control of an aerial robot dragon: A dual-rotor-embeddedmultilink robot with the ability of multi-degree-of-freedom aerial trans-formation,”
IEEE Robotics and Automation Letters , vol. 3, no. 2, pp.1176–1183, 2018.[14] T. Anzai, M. Zhao, S. Nozawa, F. Shi, K. Okada, and M. Inaba, “Aerialgrasping based on shape adaptive transformation by halo: Horizontalplane transformable aerial robot with closed-loop multilinks structure,”in , 2018, pp. 6990–6996.[15] M. Kamel, T. Stastny, K. Alexis, and R. Siegwart,