DeepLearningControl
DeepLearningControl
Somil Bansal∗ Anayo K. Akametalu∗ Frank J. Jiang Forrest Laine Claire J. Tomlin
For these flights, we recorded the state (s) and input (û) data. -2
0 2 4 6 8 10
Note that since we do not necessarily care about how closely time(s) Measured
we track a trajectory during the data collection process, the NN output
4
Y acceleration (m/s 2)
feedback controller discussed in Section IV-B is sufficient
2
to fly Crazyflie directly on the desired trajectories (that is,
no feasible reference calculation is required); however, in 0
general, the entire data can also be collected manually with -2
experts flying the system.
-4
A picture of Crazyflie flying during one of our experiments 0 2 4 6 8 10
is shown in Figure 1. One of our experimental videos can be time(s)
x (m)
y (m)
is available through (2). In this section, our goal is to use this 1 0
yaw (rad)
4
z (m)
Using the full model, we first compute a dynamically 2
-1
feasible reference that is as close as possible to the de-
0
sired sinusoid-yaw trajectory (shown in Figure 5), using
-1.1 -2
the sequential convex programming method outlined in 0 1 2 3 4 0 1 2 3 4
time(s) time(s)
Section IV-A. The reference trajectory is then flown us-
ing the near-hover LQR scheme along with a yaw rota- Fig. 5: The reference, NN model and model-free trajec-
tion as described in Section IV-B. One of the tracking tories obtained during the experiments. The NN model
videos recorded during our experiments can be found at: track the desired trajectory closely even though it involves
https://www.youtube.com/watch?v=AeIfZbkjWPA. We label both translational and rotational motion at the same time,
the results corresponding to this experiment as ‘NN model’ which the NNs were not explicitly trained on, indicating the
trajectory. generalization capabilities of deep neural networks.
The desired and NN model trajectories are shown in Figure
5. As evident from the figure, the NN model trajectory is able with a careful choice of the network architecture and its
to track the desired trajectory closely. This illustrates that: inputs, the NN model can be used effectively to control the
• the trained NNs are able to generalize the dynamics system. Thus, deep neural networks seem to present a good
beyond the training data. In particular, the NN models alternative for the system identification of complex systems
capture the nonlinear couplings between translational such as quadrotors, especially in scenarios in which it is hard
and rotational accelerations, and can be used to track to derive a physics-based model of the system.
the trajectories they were not trained on. Remark 5: Note that even though neural networks present
• even simple NN architectures, such as one used in this one approach to identify the complex system dynamics,
paper, have good generalization capabilities and can be it is not the only approach. In our experience, one can
used to control a quadrotor on complex trajectories. use the general nonlinear model of quadrotor derived using
From the results thus far it is not clear how much of Newtonian-Euler formalism [2], [8] along with the control
the control performance is due to the open-loop signal scheme proposed in Section IV to get good tracking as well.
derived from the NN model, since the LQR control may Our goal in this paper, however, was to test the efficacy
be correcting for model inconsistency. Therefore, we opted of neural network in learning a dynamic model, and not to
to fly Crazyflie using simply the LQR controller and desired compare different system models. In practice, one can use
trajectory as a reference and no open-loop control. We label the physics-based model to collect data about the system and
the results corresponding to this experiment as the ‘model- then use a neural network to learn incremental unmodeled
free’ trajectory. dynamics (on top of the physics-based model) which might
In Figure 6, we show the (absolute) tracking error for the lead to an improved control performance.
NN model and model-free trajectories. The NN model has
a significantly lower tracking error compared to the model- VI. C ONCLUSION
free trajectory, indicating that the open-loop control derived Traditional learning approaches proposed for controlling
from the NN model results in better tracking of the desired quadrotors have focused on improving the control perfor-
trajectory. The reduced tracking error is thus the result of mance for specific trajectories. In this work, we use deep
the availability of an accurate dynamics model. In general, neural networks to generalize the dynamics of the system
to ensure a small tracking error, we need a good open-loop beyond the trajectories used for training. Our experiments
control, which in turn need a good dynamics model that indicate that even simple NNs such as feed-forward net-
accurately represents the system dynamics around the desired works can also have good generalization capabilities and can
trajectory. learn the dynamics of a quadrotor to good accuracy. More
Our experiments thus indicate that given the state-input importantly, we demonstrate that the learned dynamics can
data of a complex dynamical system (quadrotors in our case), be used effectively to control the system. Thus NNs are not
deep neural networks are capable of learning the system only useful in being a good function approximator, but in this
dynamics to a good accuracy, and can represent the system instance we can actually exploit the function that it produces
behavior beyond the data they were trained on. Moreover, for control purposes. For future work, it will be interesting
0.6 0.6 [13] C Nicol, CJB Macnab, and A Ramirez-Serrano. Robust adaptive
control of a quadrotor helicopter. Mechatronics, 21(6):927–938, 2011.
x error (m)
y error (m)
0.4 0.4 [14] Ali Punjani and Pieter Abbeel. Deep learning helicopter dynamics
models. In Robotics and Automation (ICRA), 2015 IEEE International
0.2 0.2 Conference on, pages 3223–3230. IEEE, 2015.
[15] Morgan Quigley, Ken Conley, Brian Gerkey, Josh Faust, Tully Foote,
0 0 Jeremy Leibs, Rob Wheeler, and Andrew Y Ng. ROS: an open-source
0 1 2 3 4 0 1 2 3 4 robot operating system. In ICRA workshop on open source software,
time(s) time(s) volume 3, page 5, 2009.
0.2 1.5 [16] Guilherme V Raffo, Manuel G Ortega, and Francisco R Rubio. An
NN Model
integral predictive/nonlinear H∞ control structure for a quadrotor
1
[17] J. B. Rawlings and D. Q. Mayne. Model predictive control: Theory
0.1
and design. Nob Hill Pub., 2009.
0.5
0.05 [18] Anand Sanchez-Orta, Vicente Parra-Vega, Carlos Izaguirre-Espinosa,
and Octavio Garcia. Position–yaw tracking of quadrotors. Journal of
0 0 Dynamic Systems, Measurement, and Control, 137(6):061011, 2015.
0 1 2 3 4 0 1 2 3 4
time(s) time(s)
[19] John Schulman, Jonathan Ho, Alex X Lee, Ibrahim Awwal, Henry
Bradlow, and Pieter Abbeel. Finding locally optimal, collision-free
Fig. 6: (Absolute) Tracking error for model-free and NN trajectories with sequential convex optimization. In Robotics: science
and systems, volume 9, pages 1–10. Citeseer, 2013.
model trajectories. Model-free trajectory has a significantly [20] Ilolger Voos. Nonlinear control of a quadrotor micro-UAV using
higher tracking error compared to the NN model, especially feedback-linearization. In Mechatronics, 2009. ICM 2009. IEEE
in the translational motion, indicating that nonlinear coupling International Conference on, pages 1–6. IEEE, 2009.
[21] Eric A Wan and Ronell Van Der Merwe. The unscented kalman filter
between translational and rotational motions should be taken for nonlinear estimation. In Adaptive Systems for Signal Processing,
into account while designing a controller, which in this work Communications, and Control Symposium 2000. AS-SPCC. The IEEE
is captured by training a NN model that accurately represents 2000, pages 153–158. Ieee, 2000.
[22] Rong Xu and Ümit Özgüner. Sliding mode control of a quadrotor
the system dynamics. helicopter. In Decision and Control, 2006 45th IEEE Conference on,
pages 4957–4962. IEEE, 2006.
[23] Ma Zhaowei, Hu Tianjiang, Shen Lincheng, Kong Weiwei, Zhao
to analyze whether combining a NN model with a physics- Boxin, and Yao Kaidi. An iterative learning controller for quadrotor
based model can lead to an improved control performance, UAV path following at a constant altitude. In Control Conference
thus utilizing both the known information about the system (CCC), 2015 34th Chinese, pages 4406–4411. IEEE, 2015.
as well as the generalization capabilities of NNs.
R EFERENCES
[1] Pieter Abbeel, Adam Coates, and Andrew Y Ng. Autonomous heli-
copter aerobatics through apprenticeship learning. The International
Journal of Robotics Research, 2010.
[2] Randal Beard. Quadrotor dynamics and control Rev 0.1. 2008.
[3] Patrick Bouffard. On-board model predictive control of a quadrotor
helicopter: Design, implementation, and experiments. Technical report,
DTIC Document, 2012.
[4] Eli Brookner. Tracking and kalman filtering made easy, John Wiley
and Sons. Inc. NY, 1998.
[5] Markus Hehn and Raffaello D’Andrea. A flying inverted pendulum. In
Robotics and Automation (ICRA), 2011 IEEE International Conference
on, pages 763–770. IEEE, 2011.
[6] Markus Hehn and Raffaello DAndrea. An iterative learning scheme
for high performance, periodic quadrocopter trajectories. In European
Control Conference (ECC). IEEE, pages 1799–1804, 2013.
[7] Wolfgang Hoenig, Christina Milanes, Lisa Scaria, Thai Phan, Mark
Bolas, and Nora Ayanian. Mixed reality for robotics. In IEEE/RSJ Intl
Conf. Intelligent Robots and Systems, pages 5382 – 5387, Hamburg,
Germany, Sept 2015.
[8] Gabriel M Hoffmann, Haomiao Huang, Steven L Waslander, and
Claire J Tomlin. Quadrotor helicopter flight dynamics and control:
Theory and experiment. In Proc. of the AIAA Guidance, Navigation,
and Control Conference, volume 2, 2007.
[9] Wolfgang Honig, Christina Milanes, Lisa Scaria, Thai Phan, Mark
Bolas, and Nora Ayanian. Mixed reality for robotics. In Intelligent
Robots and Systems (IROS), 2015 IEEE/RSJ International Conference
on, pages 5382–5387. IEEE, 2015.
[10] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet
classification with deep convolutional neural networks. In Advances
in neural information processing systems, pages 1097–1105, 2012.
[11] Benoit Landry. Planning and control for quadrotor flight through
cluttered environments. Master’s thesis, Massachusetts Institute of
Technology, 2015.
[12] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning.
Nature, 521(7553):436–444, 2015.