Lecture 3A.1
2-D Quadrotor Control Now that we understand how to write the equations equations of motion for a quadrotor, let's turn our attention to the model for a planar quadrotor. We saw the equations of motion for the planar quadrotor earlier:
These can now be rewritten in state-space form as shown here:
y z x1 x x 2 y z And the deriatie is !ien b": # # y # # z # # 1 sin # u1 x m # u 2 1 # g cos m 1 # # I xx The first three elements of this deriatie are elocities. The bottom three elements are accelerations. This is $ust a compact wa" of writin! the equations of motion. %n the ri!ht hand side, we hae two inputs, u1 and u2. This ector is the input that will
Titles you can't find anywhere else
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
Titles you can't find anywhere else
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
drie our d"namical s"stem. &" specif"in! appropriate alues for u1 and u2, we can chan!e the state of the quadrotor and !et it to !o where we want it to !o. We can see that the equations of motion, non-linear:
y
u1
sin( '
m
g z
u1 m
cos( '
u2 I xx
The non-linearit" here comes onl" from the fact that we hae sin( and cos( cos( in the equations. )et's consider these equations of motion at a hoer confi!uration. We define a hoer confi!uration as: y # , z # , y # #, u #,1 mg , u 2,# # The hoer confi!uration can onl" be in equilibrium if the thrust ector, u 1, opposes the !rait" ector, so, at hoer, the nominal alue for this input must equal m!. *urther, the nominal alue of u 2 must be +ero. f it were not, then the ehicle would tr" to accelerate. Net we obtain a linearised ersion of this nonlinear model b" considerin! considerin! how the non-linear functions sin( sin( and cos( cos( behae in close proimit" to the hoer confi!uration. When is close to #, sin( sin( behaes rou!hl" lie and cos( cos( is rou!hl" constant. f we replace sin( sin( with , and cos( cos( with 1, we !et the linearised equations below:
y
u1 m
g z
u1 m
u2 I xx
We call this the linearised d"namic model. )et's now loo at the control problem. ma!ine a planar quadrotor tr"in! to follow a specified tra$ector", rT(t.
Titles you can't find anywhere else
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
rT(t denotes a position ector. The fact that it's chan!in! in time is denoted b" the function rT(t as a function of t:
y (t ' r T (t ' z (t ' %f course, this means that both " and + are chan!in! as functions of time. )et's also assume that this function is differentiable. That is, we can differentiate it to calculate the elocit" and differentiate a!ain to calculate the acceleration. We're interested in tain! the ector, rdes - r, and reducin! it to #. rdes bein! the point on the tra$ector" that we want to follow, and r bein! the robot/s current point. )et's define the error ector as rdes - r, rdes bein! the same as rT(t, so the position error is: e p r T (t' - r The elocit" error is !ien b" the deriatie of the position error:
T (t' - r ev r And what we reall" want is for this error to deca" eponentiall" to #:
r T (t' - r K d ev K p e p # As we'e seen before, if we tae the error term and mae it obe" a second-order linear differential equation with positie coefficients, we will !uarantee that the error !oes eponentiall" to #. 0o we command an acceleration which forces this error term to obe" this second-order differential equation
Titles you can't find anywhere else
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
This idea can be etended to deelop a hierarchical control structure:
&efore we consider the bloc dia!ram in its entiret", let/s focus on the inner loop, which is the attitude controller.
)et/s ima!ine that we/re $ust tr"in! to control the attitude of the robot. n other words, we're tr"in! to control the roll an!le, , to hae it follow a specified tra$ector". What that means is, we want to s"nthesi+e u 2, such that !oes to some desired alue. That desired alue is shown as the reference input, c. %f course, as before, we assume that c is differentiable, so we can calculate the deriatie of c, and liewise, calculate the deriatie of .
Titles you can't find anywhere else
Try Scribd FREE for 30 days to access over 125 million titles without ads or interruptions! Start Free Trial Cancel Anytime.
)et's assume we can do that and moe onto the net sub-problem. We want to follow a specified tra$ector". )et's focus on ydes, the " component of that tra$ector". f we rearran!e the top equation of the equations of motion, we can set the roll an!le to be !ien b": c
y g
This effectiel" ensures that the roll an!le will trac the desired acceleration in the "direction. n summar", the inner loop is desi!ned so that coner!es to c, and c is obtained from the "-component of the desired tra$ector". ien c we can write an epression for u2: u2 K p , ( c ' K d , ( c ' *inall", the +-component tells us how to calculate u 1. We tae the middle equation, of the equations of motion and the desired tra$ector", looin! specificall" at the +component, and we can write u 1 such that the +-component tracs the desired +-alue.
des K d , z ( z des z ' K p , z ( z des z '' u1 m( g z 0o we now hae two equations, one for u 1 and one for u 2. n fact, when we put eer"thin! to!ether, we actuall" hae three equations:
des K d , z ( z des z ' K p , z ( z des z '' u1 m( g z u2 K p , ( c ' K d , ( c ' c
1 g
des K d , y ( y des y ' K p , y ( ydes y '' ( y
The one at the bottom tells us what c is. *rom that, we !et u 2, and then u 1 from that. These are the three control equations we can use to drie a quadrotor, assumin! that our assumption that it's close to the operatin! point is alid, and assumin! that it sta"s on the "-+ plane. The onl" thin! left to do is to calculate the constants. These are the !ains, and there are actuall" si of these that need to be calculated.