## [answered] M AE -436 Due Date: 18th Nov. With six degrees of freedom (

solve the whole assignment in matlab code, thank you

M AE -436 Due Date: 18th Nov., 2016 Problem Set - IV The purpose of this assignment is to use the concept of rigid body dynamics to model the motion of a quadcopter.

A quadcopter is a flying vehicle with four equally spaced rotors, usually attached at the corner of a square frame

(cf. Fig. 1). With six degrees of freedom (like conventional fixed wing airplane) and only four independent motors,

of motion with following tasks: Fig. 1. A Schematic of a Quadcopter 1) Let us consider two frames to analyze the motion of a quadcopter. The inertial frame is assumed to be attached

to the ground with gravity pointing in the negative z -direction. The body frame is attached to the quadcopter

with the rotor axis pointed in the positive body z -direction, denoted by zB and the arms pointing in the xB

and yB direction as shown in Fig. 1. If we define the position of the quadcopter in the inertial frame as

r = {x, y, z}T , then show that the translational and rotational equations of motion are given as follows: 0 T cos ? sin ? cos ? + sin ? sin ? ?r = ?g

0

sin ? sin ? cos ? ? cos ? sin ?

+

(1) m

1

cos ? cos ? ?

1

0

? sin ? p ? q

=A

, A = 0 cos ? cos ? sin ? (2)

?? ? r

0 ? sin ? cos ? cos ?

?

I ?? = ?? ? (I?) + ? (3) where (?, ?, ?) denote the 3 ? 2 ? 1 Euler angle sequence and (p, q, r) denotes the body angular rates of the

quadcopter. Notice that the moment of inertia matrix, I , is a diagonal matrix due to the symmetric geometric

shape of the quadcopter. T is the combined forces of rotors in the direction of body z -axis, i.e., zB :

T = 4

X

i=1 Ti = k 4

X ?2i (4) i=1 ? consists of roll, pitch and yaw moments. Notice that the roll moment is generated by decreasing the second

rotor angular velocity and increasing the fourth rotor angular velocity. Similarly, the pitch moment is generated by decreasing the first rotor angular velocity and increasing the third rotor angular velocity. The yaw moment

is generated by increasing the angular velocities of two opposite rotors and decreasing the angular velocities

of the other two rotors. kl(??22 + ?24 ) L M

kl(??21 + ?23 )

?=

=

(5) N

b(?21 ? ?22 + ?23 ? ?24 )

where, l is the distance between the rotor and center of mass of the quadcopter.

2) Let us consider the following value of parameters to simulate the quadcopter motion in MATLAB while using

the in-built command ?ODE45? to solve the quadcopter equations of motion:

g = 9.81m/s2 , m = 0.450kg, l = 0.225m, k = 2.98 ? 10?6 , b = 1.14 ? 10?6

?3 Ixx = Iyy = 4.85 ? 10 ?3 2 kg ? m , Izz = 8.80 ? 10 2 kg ? m (6)

(7) The initial conditions corresponds to the quadcopter being at rest at the inertial frame origin with body frame

aligned with the inertial frame. The control input, i.e., angular velocities of the four rotor are computed as

follows:

a) For first one second, the quadcopter is ascended by increasing all of the rotor velocities from the hover

thrust. Then, the ascend is stopped by decreasing the rotor velocities for the following one second.

?i = ?ihover + 70 sin(2?t/4), t ? 1, i = 1, 2, 3, 4 ?i = ?ihover ? 77 sin(2?t/4), 1 ? t ? 2 (8)

(9) The quadcopter should be hovering at an altitude after this thrust profile.

b) For the next one second, i.e., 2-3 second period, the quadcopter is put into a roll motion by increasing

the velocity of the fourth rotor and decreasing the velocity of the second rotor. In the next one second,

the roll rate is made zero by the increasing the velocity of the second rotor and decreasing the velocity

of the fourth rotor.

?22 = ?22hover ? 702 sin(2?(t ? 2)/4), ?24 = ?24hover + 702 sin(2?(t ? 2)/4), 2 ? t ? 3 (10) ?22 (11) = ?22hover 2 + 70 sin(2?(t ? 2)/4), ?24 = ?24hover 2 ? 70 sin(2?(t ? 2)/4), 3 ? t ? 4 At the end of the maneuver, the quadcopter flying at constant roll angle. Comment on the quadcopter

translational and rotational motion.

c) For the next one second, the quadcopter is put into a pitch motion by increasing the velocity of the third

rotor and decreasing the velocity of the first rotor. In the next one second, the pitch rate is stopped by

the opposite maneuver.

?21 = ?21hover ? 702 sin(2?(t ? 4)/4), ?23 = ?23hover + 702 sin(2?(t ? 4)/4), 4 ? t ? 5 (12) ?21 (13) = ?21hover 2 + 70 sin(2?(t ? 4)/4), ?23 = ?23hover 2 ? 70 sin(2?(t ? 4)/4), 4 ? t ? 5 Comment on what happened to quadcopter translational and rotational motion.

Plot quadcopter position in an inertial frame, velocity in body frame, Euler angles and angular velocity (?)

versus time for the whole duration of the simulation.

3) Let us consider the following auto pilot for the quadcopter:

m

(14)

T = (g + (z?r ? z)

? + (zr ? z))

cos ? cos ?





? + (?r ? ?)

L = Ixx (?? r ? ?)

(15)





? + (?r ? ?)

M = Iyy (??r ? ?)

(16)





? + (?r ? ?)

N = Izz (?? r ? ?)

(17) where subscript ?r? represents the reference signal for the variable. Simulate the motion of the quadcopter for

120 seconds with following initial conditions:

x = y = x? = y? = z? = p = q = r = 0, z = 1m, ? = ? = ? = 10? The desired or reference position of the altitude is zr = 10m. All other reference variables are zero. Once

again, plot the quadcopter position in an inertial frame, velocity in body frame, Euler angles, angular velocity

(?) and rotor angular velocities versus time for the whole duration of the simulation. Comment on translational

and rotational motion of the quadcopter. What would you do to make the quadcopter hover at an altitude of

10m at a given x and y location. Notice that rotor angular velocities can be computed as follows:

T

4k

T

2

?2 =

4k

T

?23 =

4k

T

2

?4 =

4k ?21 = M

2kl

L

?

2kl

M

+

2kl

L

+

2kl

? N

4b

N

?

4b

N

?

4b

N

+

4b

? (18)

(19)

(20)

(21)

(22)

Solution details:
STATUS
QUALITY
Approved

This question was answered on: Sep 18, 2020

Solution~0001013377.zip (25.37 KB)

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy from our tutoring website www.aceyourhomework.com (Deadline assured. Flexible pricing. TurnItIn Report provided)

STATUS

QUALITY

Approved

Sep 18, 2020

EXPERT

Tutor