Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Virtual work
1.1
~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
N
X
Fi ri
(1)
i=1
(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)
= R 0 + R R + R R R 0
(6)
0
0
= (R e1 ) + (R R e2 ) + (R R R e3 )
(7)
= (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)
W = F r = FT (R e1 )
(R R e2 )
(R R R e3 )
(11)
n
X
Qj rj = QT r
(12)
j=1
(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)
= Q = BF
(15)
dt q
q
1.1.1
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:
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 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!