Sei sulla pagina 1di 5

1

Virtual work

Notes by Danylo Malyuta.

1.1

Generalized torque explanation

This document presents an exhaustive overview of how to compute generalized


torques for a 3-D rotating quadcopter (or any other body) whose orientation is
expressed in the Tait-Bryan Euler angles, {, , }. Namely:
zB , ~z0
yB

~y 0

~x0 x
B

Yaw

~z0 ~z00
0
~x 00
~x

~z00
~yB

~y 00

~y 0 , ~y 00
Pitch

~zB

~zB

~x00 , ~x

~yB

~xB

Roll

Figure 1: Tait-Bryan Yaw-Pitch-Roll convention.


Not important for this paper is that the inertial frame {
xi , yi , zI } is the
world frame and the frame {
xB , yB , zB } is the quadcopter body frame.
The virtual work principle tells us:
W =

N
X

Fi ri

(1)

i=1

If we consider just the quadcopter, then the number of bodies N = 1, so:


W = F r

(2)

If we consider just the torques, then acting the quadcopter (and thus model
just the generalized torques), we can express:
B
x
(3)
F = yB
zB
Where F is therefore modeled in the B frame, i.e. the body frame of the
quadcopter.
What is our goal? It is to find Q i.e. the vector of generalized torques that we
can use in an Euler-Lagrange dynamical equation as the right-hand-side term.
How do we do this? One way is to use the definition of generalized forces:
Qj =

N
X
i=1

Fi

r
ri
= F
|{z}
qj
qj

j = 1, . . . , n

(4)

N =1

Where qj is the j-th generalized coordinates, of which there are n such coordinates. In the case of quadcopter attitude, we take the generalized coordinates
as the Tait-Bryan Euler angles of Figure 1, therefore:
1


q1 =
q2 =

q3 =

(5)

To apply equation 4 we would have to know what ri is. Notably, since F is


in the B frame, r has to also be in the B frame. We could for example start
out by writing the angular velocity vector, in the B frame:



0
0

= R 0 + R R + R R R 0
(6)
0
0

= (R e1 ) + (R R e2 ) + (R R R e3 )

(7)

We would thank that we would be able to do the following in order to obtain


r:
Z
r=

= (R e1 ) + (R R e2 ) + (R R R e3 )

(8)

However, angular velocity is not integrable (see for example subsection 3.17 of this document). Therefore we cannot do equation 8. We must
find another way.
This other way is hidden inside equation 2. Indeed, although we cannot
integrate in time as we do in equation 8, we may do so for an
R infinitesimally
small time - which is the case of virtual displacements. Calling = r, we can
write based on equation 7:
r = (R e1 ) + (R R e2 ) + (R R R e3 )


r = (R e1 )



(R R R e3 )

(R R e2 )

(9)

(10)

Hence, using equation 2:


W = F r = FT (R e1 )

(R R e2 )



(R R R e3 )

(11)

However, we have from virtual work theory that:


W =

n
X

Qj rj = QT r

(12)

j=1

By identification of terms in equations 11 and 12, we have:



F T (R e1 )

(R R e2 )
2


(R R R e3 ) = QT

(13)

Finally:

(R e1 )T
Q = (R R e2 )T F = BF
(R R R e3 )T

(14)

We then can use Q = BF for the attitude dynamics of the quadrotor,


expressed using Euler-Lagrange formalism:


d L
L

= Q = BF
(15)
dt q
q
1.1.1

Close examination of equation 9

An important question to ask is: why are we able to write 9 but not 8? Its after
all perhaps the most crucial step in our derivation. We examine this problem
with a quick coding session in Mathematica.
First lets define the rotation matrices:

Lets assume that we start out by defining the Euler angles {, , }. We


assign the following functions:

Which gives:

Now what we will do is navely use equation 8 to obtains the three angles
defining body orientation in the B frame. This gives us:

And now the deal-breaker: we will go back to the frames of the respective
Euler angles by using B , the vector of three orientation angles in the B frame.
If equation8 is correct, this inverse map will give us back exactly the three Euler
angles (vector = [ ]T ), but if it is not then we will get a different time
variation of the Euler angles than the one we entered in In[53] of Mathematica.
Doing this:

, P redic

P redic

P redic

Figure 2: Actual and predicted Euler angles.


On a longer time scale (up to 10 [s]):
4

Figure 3: Actual and predicted Euler angles for a longer period of time.
From the last two figures we can see that the actual Euler angles {, , }
deviate from the predicted Euler angles {P redic , P redic , P redic } that we calculate from the body-frame orientation angles that we have calculated by applying
equation 8. This proves that equation 8 is wrong - i.e. we cannot use that relationship!
However, from Figure 2 we can see that {, , } {P redic , P redic , P redic }
for very small tune t. Indeed, virtual displacement are actually by definition
for such a small t that we say the virtual displacement (from Wikipedia) is an
assumed infinitesimal change of system coordinates occurring while time is held
constant. It is called virtual rather than real since no actual displacement can
take place without the passage of time. Therefore we can see from Figure 2
that indeed equation 9, which is basically equation 8 taken for an infinitesimally
small time, is correct and applicable!
A further observation thats interesting from Figure 3 is that P redic =
exactly; P redic is much less equal to ; finally, P redic is grossly wrong. The
equality P redic = is because the axes x
00 and x
B coincide, which means the
going from B to is exact!

Potrebbero piacerti anche