24
Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation” https://youtu.be/oMy5y-eQVeE

Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Watch the video clip

“ A computationally efficient motion primitive for

Quadrocopter trajectory generation”

https://youtu.be/oMy5y-eQVeE

Page 2: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Imagine Ball Catching with Quadcopter

xq0

xb0

xbf

xqf

floor

xb(t)

Page 3: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

zq ≥ hmin

u ≤ umax

rf ≤ df zqf∽ hfxq0

xb0

xbf

xqf , 𝑥qf

floor

𝑥𝑏𝑜xb(t)

Imagine Ball Catching with Quadcopter

Page 4: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

𝑋𝑞 = 𝑓(𝑋𝑞, 𝑢)

zq ≥ hmin

u ≤ umax

rf ≤ df zqf∽ hf

xq0 xb0

Constraint :

Initial condition : 𝑥𝑏𝑜

Terminal condition :

Eq. of motion :

How to design cost function ?

Minimum energy consumption or minimum time with constraints ?

Imagine Ball Catching with Quadcopter

Optimal Control !

Page 5: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

(rf−df)2, (zqf-hf)

2, ( 𝑥qf)2 Cost @ terminal

Objectives of the optimal control :

• Minimization of the error, E(x(tf)) :

• Minimization of energy, 𝑡0

𝑡𝑓 𝐿 𝑥 𝑡 , 𝑢 𝑡 𝑑𝑡 : 𝑡

0

𝑡𝑓 𝑢(𝑡) 𝑑𝑡

• Minimization of energy & time, 𝑡0

𝑡𝑓 𝐿 𝑥 𝑡 , 𝑢 𝑡 𝑑𝑡 : 𝑡

0

𝑡𝑓(1 + 𝑏 𝑢 𝑡 )𝑑𝑡

zq ≥ hmin

u ≤ umax

xq0 xb0

Constraint :

Initial condition : 𝑥𝑏𝑜

𝑋𝑞 = 𝑓(𝑋𝑞, 𝑢)Eq. of motion :

Integration of cost rate

during flight

Page 6: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Data-Driven Control with Machine Learning

System 𝑋 = 𝑓(𝑋, 𝑢)

Controlleru= 𝐾(𝑦)

u

y

I.

II.

I. Data Driven Models : System Id.

II. Determine Optimal Control Polity

Challenges :

• Nonlinear

• Unknown Dynamics

• High Dimensional

What is Control ? :

• Optimization constrained by

dynamics

What is Machine Learning ?

• Powerful NL optimization tool

based on data

Prof. Steve Brunton, Univ. of Washington

Page 7: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Improving a Quadrotor Model

using Flight Data

Modeling Dynamic Systems for

Multi-Step Prediction with

Recurrent Neural Networks

Nima Mohajerin, Uni. Of Waterloo

Page 8: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Motivation

• Complex nonlinearities, e.g. :

• Simple changes to a quadrotor physical characteristics (payload

modification, changing actuators, etc.) may cause significant change in the

dynamical model that requires additional modeling efforts.

Predicting the behaviour of a dynamic system has always been a challenging

and important problem in engineering.

Page 9: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Flight data can be used to improve the physics-based model in a grey-

box modeling scheme.

Motivation

We would like to obtain a model that can perform multi-step predictions of

the quadrotor behaviour by using motor inputs only

Page 10: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

• Recurrent Neural Networks (RNNs) are not only universal

approximators but also have internal dynamics.

• considered strong candidate for accurate representation of

dynamical systems.

m inputs, s hidden and

n output neurons

Data driven modeling – regression with RNN

Page 11: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Looks like a state-space representation

Data driven modeling – regression with RNN

Page 12: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Learning Algorithms for RNNs

Data driven modeling – regression with RNN

1. Real Time Recurrent Learning :

network weights are continually updated as the network

receives input elements

suitable when it is required to train the network while

continually running it

2. Back Propagation Through Time :

gradient is calculated for a (finite) time horizon and any

gradient based method can be applied to update the network

weights.

Page 13: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Learning Algorithms for RNNs : RTRL

Data driven modeling – regression with RNN

𝑧𝑙(𝑘) 𝑦𝑖(𝑘)

𝑦𝑖(𝑘)

Page 14: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Learning Algorithms for RNNs : RTRL

Data driven modeling – regression with RNN

cost function can be either the instantaneous error or a total error over

a given period such as

Page 15: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Multi-Step Prediction for Dynamic Systems

Input sequence of length T starting at a time instance k0 + 1, U(k0 + 1; T)

system response to this input is an output sequence denoted by Y(k0 + 1; T)

Our Problem is :

Given an input sequence U(k0 + 1; T), the multi-step prediction problem seeks

an accurate estimate of the system output, 𝑌(k0 + 1; T) , over the same time

horizon, T

Page 16: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

.

.

.

k=k0+1

k=k0+T

Multi-Step Prediction for Dynamic Systems

Cost function to be minimized :

Page 17: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Quadrotor frames and variables

Physics based modeling – Quadrotor Model

Page 18: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Physics based modeling – Quadrotor Model

Page 19: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Hybrid Models for Multi-Step Prediction

• some characteristics of the system might be too difficult or expensive

to accurately model, such as the vortex ring effect on a quadrotor

• A grey-box modeling approach can speed up the modeling process

and increase the prediction accuracy of the model.

Page 20: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

hybrid model consists of two black-box modules and a white-box module

• black-box modules : Input Model (IM) and Output Model (OM)

• white-box module : Motion Model (MM).

Hybrid Models for Multi-Step Prediction

Page 21: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

• IM module generates the torques and thrust

• MM module updates the states of the quadrotor for one step using

Equations

• OM module compensates for the prediction error introduced by the MM

module because of the unmodeled dynamics and noise

Hybrid Models for Multi-Step Prediction

Page 22: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Hybrid Models for Multi-Step Prediction

Parallel Configuration

OM module only account for the error from unmodeled dynamics and

noise of MM module

Page 23: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

White-box model vs. hybrid-parallel model in a single-step prediction scenario

Results

Page 24: Watch the video clip - AiFrenz model.pdf · Watch the video clip “ A computationally efficient motion primitive for Quadrocopter trajectory generation”

Results

Hybrid Black box

Multi-step case :

An improvement more than an order of magnitude is observed by using

the hybrid-parallel model