Modeling and Flight Control of a Commercial Nano Quadrotor

June 9, 2018 | Author: A Ram (Bella) Kim | Category: Documents


Comments



Description

2017 International Conference on Unmanned Aircraft Systems (ICUAS) June 13-16, 2017, Miami, FL, USA

Modeling and Flight Control of a Commercial Nano Quadrotor* Gonzalo A. Garcia, A Ram Kim, Ethan Jackson, Shawn S. Keshmiri, and Daksh Shukla software as a first step in a larger development path. The chosen aircraft for this paper was the Crazyflie 2.0, available on the market for less than 200 dollars. Its low cost and ease of assembly comes with a price; it is a challenge for Crazyflie 2.0 to fly stably and perform meaningful tasks.



Abstract: This work presents the flight test validation of an autonomous nano quadrotor called Crazyflie 2.0 in arbitrary trajectory tracking. The complexity of the control tasks were due to the low rigidity and high flexibility of propellers and airframe components, high sensitivity of vehicle inertial dynamic model to the battery location, uncalibrated motors, and unsteady battery depletion rate. Keeping the Crazyflie embedded inner control loop system, different outer loop guidance logics were designed for trajectory following. The guidance logics were running on an external computer and communicated via a radio link with the quadrotor in real-time. Attitude estimations were done using OptiTrack position information. An accurate dynamic model of aircraft was developed using principal moments of inertia and motor performance parameters. The Crazyflie dynamic model was used for the 6-DOF simulations and LQR and MPC implementations. All three guidance techniques, PID, LQR, and MPC, were validated through actual flight tests and fulfilled tracking tasks with an acceptable performance.

The current version of the quadrotor is sold with an embedded inner loop controller composed of cascaded PIDs and several sensors to support their control task. Thrust, attitude, and attitude rate commands are accepted by the embedded controller and delivered via UHF communication. These commands are expected to be generated by a pilot through a gamepad with at least four axes to fly the aircraft and perform maneuvers. The quadrotor presents challenges that make pilot control a very demanding or even impossible task in a limited or closed area. Dynamic behavior changes from flight to flight due to its flexible plastic propellers and motor arms as well as the unfixed location of the battery. Although it is potentially more predictable, the depletion of the battery during flight affects the response curve of the motors, requiring a steady increase in thrust command to achieve the same propeller angular speed or same thrust to keep a fixed height. Motors present a slightly different response for the same command value. Furthermore, the nature of open source software makes it vulnerable to arbitrary changes not necessarily following a common layout, with weak documentation. This increases the chances of hidden errors, especially derived from the superposition of more than one coordinate system.

I. INTRODUCTION Research on quadrotors is growing as it becomes a popular vehicle that is suitable for various types of missions. Its employment today is mainly under the modality of remote control, and not many applications for autonomous operations are been performed outside academic labs or special settings for controlled testing purposes. Bouabdallah and Siegwart [1] presented a control design for attitude, altitude, and position of a quadrotor using integral backstepping, based on a previously estimated aerodynamic coefficients. Jafari et al. [2] developed a LQR for the inner control loop, following fixed set-points at the guidance level. Landry [3] is the only research so far performed with Crazyflie 2.0, developed a time varying LQR to control the quadrotor flying between obstacles. Dunkley et al. [4] performed a hover flight based on PID and using a micro PAL-camera, and a visual-inertial SLAM system running on a ground-based laptop, as the main sensor for the guidance layer. Furci et al. [5] designed the inner loop based on PID controllers and nonlinear PD feedback controller and feedforward control for the outer loop. Jiang et al. [6] presented a detection algorithm using an onboard 3-axis accelerometer to discriminate between success and failure in maneuvers of perching. The work referenced in [4-6] worked with the first version of the Crazyflie, version 1.0.

This work included a thorough study of its source code to find out the exact configuration and interconnection of the inner loop controller, and any unnoticed condition, such as minus signs inversion, that could be impeding a stable control. An inadvertent minus sign in one of the control channels will render the overall control task unstable, making it very difficult to find the source of the problem. Hours of experimentation were also necessary to systematically debug any error or unknown condition. The main goal of this work was to design tree guidance logics for arbitrary trajectory tracking, acting as an outer control loop. These included PID, LQR and MPC. This guidance task was performed outside the aircraft, in a lab PC, running a code written in MATLAB and Python software. To determine the position, the quadrotor was equipped with five IR markers, and an indoor IR positioning system continuously gave the location of each marker and an estimated center as the position of the aircraft used to generate the tracking error with respect to the trajectory. A piece of code was also developed to allow attitude estimation from the location of the markers, to provide the current yaw angle information, to compensate for the inaccurate onboard yaw estimation, which suffer from a continuous drifting. The whole flight control system, including the quadrotor and both

The motivation of this work was to experiment with a small commercial quadrotor supported by open source *Research supported by Microsoft Corporation. G. A. Garcia (corresponding author, phone: 784-424-0956; e-mail: [email protected]), A. Ram Kim (email: [email protected]), Shawn S. Keshmiri (email: [email protected]) and Daksh Shukla (email: [email protected]) are with the University of Kansas, Lawrence, KS 66045 USA. E. Jackson is with Microsoft Research, Redmond, WA 9805277005 USA. 978-1-5090-4494-8/17/$31.00 ©2017 IEEE

524

control loops, was coded in MATLAB/Simulink for its simulation and testing the guidance designs. For this purpose some unknown parameters of the aircraft required for its modeling, including its moments of inertia, and the motors thrust and torque coefficients, were obtained by static measurements.

in opposite direction to propeller rotation), are defined by the following relation (note that motor thrusts act in the negative Z -axis, becoming negative values in the body frame):

II. AIRCRAFT AND SENSORS DESCRIPTION

With bi  0 and di  0 , and i the propeller angular speed.

Ti  bi  i2

 i  ( 1)i 1 d i  i2

The aircraft, shown in Figure 1, is the open T3 T2 3 source based quadrotor Crazyflie 2.0 built by 2 Bitcraze [7], weighing 27 T1 T4 g, measuring 92 mm 4 from motor to motor, and 1 with a maximum Y-axis recommended payload of X-axis 27 g. Usable payload was Z-axis reduced to 20-22 g because of the Figure. 1. Crazyflie 2.0 (from [1]). installation of five motion capture IR markers required by the lab positioning system, as explained later. The quadrotor is actuated by four cordless DC motors and four plastic propellers of 45 mm in length, with a delivered maximum thrust of around 57 g (see [7]). The nominal maximum flight time is 7 minutes. In practice, it does not exceed 5 minutes because the fast depletion of the battery has a direct impact on the deliverable thrust power, challenging the controller effectiveness to keep up with the steady variation. The quadrotor comprises two microcontrollers, one for the main control application, and another to handle radio communication with the ground station through a 2.4 GHz channel.

A. Onboard Sensors The aircraft is equipped with a 9-axis MEMS device comprising a 3 axis gyro, 3 axis accelerometer, and 3 axis magnetometer. At the moment of the flight tests, the magnetometer was not being used by the embedded code, and the onboard sensor fusion algorithm had a significant drift in the yaw angle. Sensor fusion algorithm is based on Madgwick et al. [9], where an online gradient descent numerical search is carried out to estimate the aircraft’s attitude, using a quaternion representation. Although the original logic included the magnetic flux readings, the current sensor fusion does not use them, suffering from a flawed yaw estimation. To achieve full control of the quadrotor and complete the goal of autonomous path following, accurate knowledge of position and heading is needed. The aircraft is flyable by human or automatic pilot delivering high level commands through the ground station, including roll and pitch angles, yaw angular rate, and a common thrust value for all motors (a signal that is converted into PWM commands for all motors) to overcome gravity. To replace the human pilot with an autopilot, positioning systems and heading determination are required in the outer loop. As described later, this guidance loop delivering the commands to the inner loop runs outside the aircraft, and its commands are transmitted via radio link.

For modeling the quadrotor, below is Equation (1) for a 6 DOF equations of motion, (see Ref. [8] or others) U  RV  QW  g sin  V   RU  PW  g sin  cos W  QU  PV  g cos  cos  (T1  T2  T3  T 4 ) m

  P  tan  (Q sin   R cos  )   Q cos   R sin    (Q sin   R cos  ) cos P  QR  J YY  J ZZ  / J XX  (T1  T2  T3  T4 ) / J XX Q  PR  J ZZ  J XX  / J YY  (T1  T2  T3  T4 ) / J YY R  PQ  J XX  J YY  / J ZZ  ( 1   2   3   4 ) / J XX PN  U cos cos  V (  cos  sin  sin  sin  cos )  W (sin  sin  cos  sin  cos ) PE  U cos sin  V (cos  cos  sin  sin  sin )  W ( sin  cos  cos  sin  sin ) PH  U sin   V sin  cos  W cos  cos

(2)

B. External Sensor External sensor positioning is provided by OptiTrack [10], a motion capture system, working with IR cameras and IR markers installed in the vehicle. Figure 2 shows (1) the location of four of the five markers (in the picture the quadrotor is attached to a scale for thrust measurements). An Figure. 2. IR Markers Location. asymmetrical distribution helps the positioning system to unambiguously determine the center of the quadrotor and its attitude angles. The positioning originally provided by the IR tracking system proved to be accurate and reliable, as opposed to the attitude determination. These angles, calculated by the system based on the reference location of the markers acquired at the beginning of the flight during software setup, turned out to be erratic and flawed. To overcome this problem a piece of code was developed, running on the

where U ,V ,W are the body translational velocities,  , , are the attitude angles, P , Q , R are the body angular velocities, and PN , PE , PH , the inertial position; g corresponds to gravity acceleration, m aircraft mass, and J XX , J YY , J ZZ , the moments of inertia. Motor thrusts Ti and motor reaction torques  i , with i  1 4 (note that torques act 525

ground station, to obtain the attitude from the location of the markers unambiguously. This is detailed in the next Section.

reaction torques exerted by each motor. Moments of inertia J XX , J YY , J ZZ are determined by a procedure based on simple pendulum analysis. By assuming a quadratic relation from propeller angular speed to thrust and to torque, the connecting coefficients are determined by curve fitting.

C. Built-in Inner Loop Control Description The aircraft is equipped with an array of PID controllers mainly for attitude control. The output of the SISO controllers are combined, their outputs are added to a common thrust command, and applied to each of the four motors. Figure 3 details the inner controller architecture, extracted from the open software [7].

A. Modeling of Moment of Inertia The moment of inertia was estimated from a bifilar pendulum method [11]. Two threads are connected parallel to the Crazyflie 2.0, storing energy or torsional torque as the quadrotor is displaced from the resting position, oscillating as it is released.

TCMD

CMD



CMD

PID



PID



 RCMD

PID Yaw

angle / rate

Motor

1

   

Motor

2

Pitch Rate

   

Motor

3

PID

   

Motor

4

Roll Rate

PID



Pitch

   

PID



Roll



Yaw Rate

   P Q R

Figure. 3. Crazyflie 2.0 (extracted from [7]).

This inner loop controller comprises six PIDs connected as shown in Figure 3. The third channel is currently set to bypass the first PID, using the yaw rate R as command instead of the yaw angle  . This is due to a limitation in the current embedded code in which it is unable to accurately estimate the yaw angle, resulting in a continuous drift. The current version of the open source sensor fusion algorithm does not use the magnetometer data, only accelerometers and gyroscopes, achieving only accurate estimations of pitch  and roll  . The current PID gains are found in [7]. As shown in Figure 3, some of the inputs to the bank of PIDs have inverted signs. This is not a problem as long as this sign inversion is accounted for.

Figure. 5. Installation of the moment of inertia test for z axis.

The geometry of the bifilar pendulum is shown in Figure 4. L p is the length of the threads, and b p is the half distance between them. For reliable results, L p should be defined appropriately: the longer the length, the larger the oscillation period of the pendulum. When the pendulum is excited into a simple pendulum motion, the gravity acceleration g can be calculated by  p  g Lp , with  p the angular frequency of oscillation. L p is then adjusted to obtain a correct value for gravity. After L p is determined, the bifilar pendulum is excited in a torsional way. The moment of inertia, J , is estimated from the following equation:

III. PARAMETER ESTIMATION AND SYSTEM MODELING

J 

Specialization of the equations of motion makes necessary the determination of some parameters affecting the dynamics of the aircraft.

mgT p 2 b p 2 4 2 L p

(3)

Lp

bp

bp

Figure. 6. Markers' position and number assignment (in the drawing the quadrotor is heading north, and markers 1 to 4 are below each rotor, while marker 5 is over the battery).

Figure. 4. Bilfilar pendulum geometry. (a) The schematic for the bifilar pendulum. (b) Bifilar test stand for Crazyflie 2.0

with T p the oscillation period. To measure each axis, the object is hung in the corresponding axis. Figure 5 shows the quadrotor hung vertically for the determination of z -axis

In particular, mass m is obtained with a scale, as shown in Figure 2. The scale also used to measure the thrust and 526

moment of inertia Jzz . Each axis measurement experiment was repeated 20 times to compensate for measurement errors. The following Table shows the result with the statistical analysis: TABLE I.

distance for the tail mark (number 5) and its distinctive distances, the rest of markers are identified as the bottom makers. Based on the plane made by the bottom markers and the relative location of the tail marker, the quadrotor’s vertical orientation is determined. With an identical approach, the distances from the tail markers and bottom markers can be used as the front and back of the quadrotor, as seen in Figure 7.

PRINCIPAL MOI

Principal Axis Moments of Inertia

MOI

J XX

JYY

J ZZ

Kg  m2

3 105

2.98 105

6.1105

Standard deviation

5.77 107

4.9 107

1.12 105

Variance

3.331013

2.4 1013

1.26 1012

Average MOI

Figure. 9. Geometry used in pitch angle estimation.

1) Roll angle estimation To estimate the roll angle, the normal vector from the bottom plane is calculated by Nbottom  P1P3  P1 P2 , where P1 , P 2 , P 3 , and P 4 are the positions of markers, 1 , 2 , 3 , and 4 . The sign of the roll angle is determined by the result of the cross product of the vertical plane and the normal vector of the bottom plane. The roll angle is estimated using the geometry in Figure 8.

Figure. 7. Determination of the relative of markers.

B. Attitude Estimation using OptiTrack Position Data Position is tracked by the motion capturing system, OptiTrack [10], which also provides attitude information. This last information turned out to be unreliable, so attitude information was derived from the individual position of the markers (also provided by OptiTrack). To develop the estimation algorithm, the configuration of markers’ position were defined and measured in advanced, shown in Figure 6.

2) Pitch angle estimation To estimate the pitch angle, the projected vector of the bottom plane of the horizon was used. To perform this estimation, the heading vector was calculated using the front

Figure. 8. Geometry used in roll angle estimation.

Figure. 10. Geometry used in yaw angle estimation.

The attitude estimation algorithm calculates the distance between all markers and finds the orientation of the aircraft based on the known pattern of distances. Since the relative positions are known, the calculated distance between the measured positions of the markers can be compared with prior information. Once the algorithm finds the matched

and back marker positions. The pitch angle is the angle between the heading vector and horizon, as seen in Figure 9. 3) Yaw angle estimation For the yaw angle estimation, the heading vector is used. The definition of yaw angle was calculated as the angle 527

between the heading vector and the north component of the unit vector, as seen in Figure 10.

IV. FLIGHT CONTROL SYSTEM DESIGN AND SIMULATION TESTS

C. Thrust and Torque Quadratic Coefficients In equation 2, coefficients bi and d i were obtained by solving the respective equations. Thrust and propeller angular speed were used for bi . The thrust exerted through a rod of known length was used to obtain torque indirectly, and propeller angular speed was used for d i . Figure 11 shows the measure thrust in N and angular speed in rad/s per each motor in a period of 1,000 s, from fully charged battery to discharge. Despite some outliers and missing data points due to some errors in measurements, the solution for bi shows a consistent constant value for each motor. Figure 12 shows the result for parameter d i , obtained through a similar procedure of computing the applied torque first. Both experiments were performed at a constant thrust command of 50,000, a typical value for hovering.

As mentioned before, the flight control system consists of two loops: the inner loop control working onboard the quadrotor, containing 6 PIDs, and the outer loop to be run outside the aircraft. The outer loop controller to be run on a PC, also called guidance, is the main contribution of this work. The lab computer, acting as a ground station, has access to the information about the position of the aircraft, as well as indirect access to information about its speed, attitude angles, and flight trajectory. These data are fed into the guidance. Its output, acting as the inner controller command, is sent to the aircraft via radio communication. The guidance will generate roll CMD and pitch  CMD command angles, the yaw angular rate command RCMD , and the thrust command TCMD , as required to reduce asymptotically the trajectory tracking errors. -10

5

Motor 1 Motor 2 Motor 3 Motor 4

4

0.1 0.05 0

Measured angular speed [rad/s]

x 10

0.15

Calculated parameter d [Kg-m2]

Measured Thrust [N]

0.2

0

100

200

300

400

500

600

700

800

900

1000

Motor 1 Motor 2 Motor 3 Motor 4

3500 3000 2500 2000 1500

3 2 1 0 -1 -2

0

100

200

300

400

500 600 Time [s]

700

800

900

1000

-3

0

100

200

300

400

500 600 Time [s]

700

800

900

1000

-8

x 10

Figure. 12. Parameter Motor 1 Motor 2 Motor 3 Motor 4

Calculated parameter b [Kg-m]

4

3

.

Three different guidance approaches were designed and tested based on PID, LQR, and model predictive controller (MPC). The final PID gains as well as the weighting matrices for LQR and MPC were determined through several flight tests.

2

1

Guidance commands are function of the error of the trajectory following, so a dynamic model including inertial position and velocity is required for both the LQR and MPC approaches as model-based controllers.

0

-1

-2

di

0

100

200

300

400

500 600 Time [s]

Figure. 11. Parameter

700

bi

800

900

A. Guidance based on PID and LQR PID and LQR guidance formulations are based on the geometry showed in Figure 13. Acting as a virtual target, point o draws a trajectory __curve in space with the desired flight speed. A segment ab is subtended at o in the direction of its speed vector, and point d is computed at the __ minimum distance from the aircraft location p to the plane constructed by the segment ab and a vertical line. Three distance errors are then generated: the cross track error between p and d , the along track error, the horizontal distance between d and o , the height error, and the vertical distance between same points. The task of these outer loop controllers is the minimization of these errors.

1000

.

As mentioned before, the embedded controller accepts four commands: thrust command, pitch and roll commands, and yaw rate command - the last three in degree (/second). Thrust command is a PWM % command applied to each motor. As the code was written, an intermediate variable goes from 10,000 to 60,000, corresponding linearly to 0% to 100%, is sent to the aircraft. A value of 10,000 means that no power delivered to the motor, while 60,000 is the maximum power fed to the motor.

528

The dynamic model chosen for the design of LQR is as follows:

A

dS AL  N AL dt dS AC  N AC dt dS H  NH dt dN AL  U cos err  V sin err (4) dt dN AC  U sin err  V cos err dt dN H  W dt d err  R dt where the variable S represents the signed length of the distance errors (positives, as shown in Figure 13), and N their time rate of change. Subscript AL , AC , and H corresponds to the along track, across track and height errors, respectively. The error in yaw angle is defined as  err   CMD  . A simplifying approximation has been made in these equations: the moving target is assumed to have small acceleration, removing these terms from the speed equations. The effect of this approximation is considered as a disturbance.

 S AL  0  S  0  AC    S H  0 d    N AL   0 dt  N AC  0     N H  0  err  0   

0 0 0 0 0 0 0

0 0 0 0 0 0 0

1 0 0 0 0 0 0

0 0  0    g sin err   g cos err  0 0 

0 1 0 0 0 0 0

0   S AL  0   S AC  0  SH    0   N AL   0   N AC    0  N H  0   err 

0 0 1 0 0 0 0

0 0 0 g cos err  g sin err 0 0

0 0 0 0 0 0 1

0   0       0     0   R    0   T  1 m   0 

(6)

B

where the symbol  represents departure from the equilibrium point. The trim condition is set as hover, where trim states are defined as zero: Utrim  Vtrim  Wtrim  0 , and trim   trim  0 , so in this case the total variables are equal to the perturbed ones. The state vector is defined by x  [ S AL , S AC , S H , N AL , N AC , N H , err ]T , and the virtual control vector as u  [  ,  , R, T ]T (denoted virtual input here as it does not actuate the servos). Note that for hover, the trim thrust term has cancelled out the gravity term, leaving the perturbed thrusts. The PID guidance equation are as shown: CMD (t )  Kp AL  S AL (t )  KiAL  S AL (t )dt

North

North

 cmd

Height

CMD (t )  Kp AC  S AC (t )  KiAC  S AC (t )dt

b

I

RCMD  KpR  err

o

TCMD  KpH  S H  KiH  S H (t )dt

with no derivative terms in roll, pitch, and thrust commands, and only proportional terms in the yaw rate command channel. Before feeding these values to the inner loop, trim command values are added. Only the thrust trim command is different from zero. In this case, it has a value of 48,000.

error height

East

p

error across

d

For LQR, the model in (6) is expanded to account for integration. The following equations generate the integral effect of the three distance errors:

a

Figure. 13. Guidance Geometry.

 S AL  S   AC   z1   S AL  1 0 0 0 0 0 0   S H    z   z2    S AC    0 1 0 0 0 0 0   N AL   z3   S H   0 0 1 0 0 0 0   N AC    NH   err    CI

From (1) the linearized body velocities are:

U   g  V  g 

(7)

(5)

W   (T1  T2  T3  T4 ) m  T / m Given the final linear state space equation:

(8)

The augmented system is:  x   A  z   C    I 529

0   x   B   u 0   z   0 

(9)

horizon control vectors U , are calculated as follows (see [13]):

where weighting matrices Q LQR and RLQR are required to compute the LQR gain matrix (see [12] for LQR theory). B. Guidance based on MPC The dynamic model used by the MPC is slightly different from the previous one. From Equation (1), position and speed equations are restated as:

U  (T Q  R)1 (T Q x 1 T QX cmd )

with

PN  VN PE  VE VN  U cos  V sin

(10)

VE  U sin  V cos  R

0 0 0 0 0

1 0 0 0 0

0 1 0 0 0

X

0 0  g cos CMD  g sin CMD 0

0 Bd

0 0

Ad Bd

Bd

Ad N 2 Bd

Ad N 2 Bd

0   u1   Ad      0   u2   Ad 2  3 0   u3    Ad  x 1         N Bd   uN   Ad 



(14)



U

and Q and R obtained by expanding the cost:

0   PN  0   PE  0   VN     0   VE  0    

J  e2T ET

QMPC e N 1T    0

0   e2      QMPC  e N 1  E

Q

A

0   0    g sin CMD   g cos CMD  0

 x2   x  3    x4        x   N 1   Bd   Ad Bd  Ad 2 Bd    A N 1 B d  d

where VN and VE are the aircraft horizontal speed components described in the inertial frame. After linearizing at the same flight condition and at the origin, i.e. PN trim  PE trim  0 and VN trim  VE trim  0 :  PN   0     PE   0  VN    0     VE   0     0   

(13)

0 0     0      0   R  1 

(11)

 u1T UT

 RMPC T  uN    0

0   u1      RMPC   uN 

(15)

U

R

The vector X cmd  [x , x , , x ] contains the desired value for X within the horizon, i.e. the future trajectory, as shown in Figure 14. T 2

T 3

T T N 1

B

where the yaw angle  in the speed equations has been replaced by the yaw angle command  CMD , to simplify the equations, under the assumption that both quantities should be close if the inner loop controller works properly. The state vector is x  [PN , PE , VN , VE ,  ]T and the virtual control vector is u  [ ,  , R]T . To reduce the MPC computation workload, the vertical dynamics are not included in the MPC formulation, and will be controlled similarly as in the PID case (its inclusion in the MPC is straightforward). The

xcmd

xcmd

xcmd

x N 1

2

x N xcmd

x1 Trajectory

detailed in (10), denoted x (t )  A x (t )  B u (t ) , is discretized using first order forward approximation at a sampling rate dt as x [k  1]  ( I  dt A)x [k ]  dt B u [k ] , and expressed as x [k  1]  Ad x [k ]  Bd u [k ] . This model is used for the predictive calculations. MPC formulation is based on the following cost function:

uN

Predicted flight path

1

x2

model

N 1

N

u2

u1

xcmd [0]

x [0] u [0] Flight path

Figure. 14. MPC Flight Horizon.

V. FLIGHT TESTS

Flight tests were conducted to test the guidance designs. A closed trajectory of a figure eight at a constant height was N (12) selected. LQR and MPC guidance methods were selected for J   e k 1T Q MPC ek 1  u k T R MPC uk k 1 comparison. Figures 15 and 16 shows part of the flight test for some of the main variables. Figure 15 shows the where the tracking error is defined by ek  xk CMD  x k . horizontal position tracking. MPC has slightly better tracking Note that u  u , as its trim value is zero. Subscript k is performance than LQR, but both present a slow oscillation used for the prediction horizon time as opposed to [ k ] that around the trajectory. The tracking is expected to be indicates real discrete time. The algorithm cycle starts with improved by further tuning of the weighting matrices. The x [0] u [0] the measured the already applied , and the following matrices were used for the flight tests: calculation of x1 using (10). From this value, the set of 530

changing to keep the quadrotor facing forward during flight.

QLQR  diag ([50,50,107 , 0.5, 0.5,1,1, 0.005, 0.005,5 103 ]) RLQR  diag ([1,1,1,1])

(15)

QMPC  diag ([1000,500, 0.5, 0.5,10]) RMPC  diag ([0.5, 0.5, 0.5])

Figure 17 shows the inner controller required tracking the trajectory. difference between the calibration.

motor command generated by the to keep the quadrotor upright and This graph shows an important motors and their difference in

1.5 4

7

0.5

6

Z-axis [m]

1

5

Thrust command

0

-0.5 MPC LQR Trajectory

-1

-1.5 20

25

30

35

40 Time [s]

45

50

4

3

55

1

60

0

MPC LQR Trajectory

1

10

20

30

40 Time [s]

50

60

70

Figure. 17. Motor thrust command.

The effects of battery depletion had on the thrust delivered by the motors is visible in Figure 17. All motors show the same pattern of increase in thrust command during a flight window of 70 seconds for the same expected height. Closer to the end of the battery charge at around 5 minutes of flight, the thrust command had already reached the maximum levels to saturate the motors, substantially degrading the control task.

0.5 X-axis [m]

Motor 1 Motor 2 Motor 3 Motor 4

2

1.5

0

-0.5

-1

5

Although there is potential room for improving the tracking and diminish the oscillations by further tuning of the weighting matrices, the impact of the external disturbances and split nature of its guidance and control, would limit it. The aircraft flexible structure and unpredicted center of mass has been treated as an external disturbance, and its substantial magnitude makes it a significant interference to the control task. Also, the effect of having the guidance running outside the aircraft, communicated through a slow radio link with irregular time intervals and delays, pose another challenge to the control task. In a general control setting, these drawbacks would have been corrected from an initial design level, facilitating the control task.

4

VI. CONCLUSION

-1.5 20

25

30

35

40 Time [s]

45

50

55

60

Figure. 15. Horizontal tracking.

Figure 16 shows the yaw angle tracking for the MPC guidance. At 20 seconds into the flight, the yaw command was switched from 90 degrees to 180, and then continued

6 Command Measured

YAw Angle

x 10

This work presented side by side comparisons of different guidance logics in navigating a light quadcopter following an arbitrary trajectory. An attitude estimation algorithm was used to calculate the distance between all markers and to find the orientation of the aircraft based on the known pattern of distances. The outer loop logics, running on an external PC, has been designed to generate the necessary commands for the inner loop. A virtual point is used a reference point to navigate the aircraft. An onboard COTS control system was used to control the aircraft close to the virtual target and indirectly track a desired trajectory. Guidance, navigation, and control algorithms were

3

2

1

0

20

25

30

35

40 Time [s]

45

50

55

60

Figure. 16. Yaw angles.

531

successfully validated in actual flight tests. MPC and LQR based guidance algorithms shown equally acceptable performance. ACKNOWLEDGMENT Authors would like to thank Microsoft Research (MSR) and University of Kansas for their support. REFERENCES [1] S. Bouabdallah and R. Siegwart, “Full Control of a Quadrotor.” [2] [3] [4] [5]

[6]

[7] [8] [9]

[10] [11] [12] [13]

EEE/RSJ International Conference IROS, San Diego, CA, USA, Oct 29 - Nov 2, 2007, pp. 153-158. H. R. Jafari, M. Zareh, J. Roshanian, and A. Nikkhah, “An Optimal Guidance Law Applied to Quadrotor Using LQR Method,” Trans. Japan Soc. Aero. Space Sci., vol. 53, no. 179, 2010, pp. 32–39. B. Landry, “Planning and Control for Quadrotor Flight through Cluttered Environments,” Master’s Thesis, Dept. Elect. Eng. and Comp. Sc., MIT, Cambridge, MA, 2015. O. Dunkley, J. Engel, J. Sturm, and D. Cremers, “Visual-inertial navigation for a camera-equipped 25g nano-quadrotor”, in Aerial Open Source Robotics IROS, Chicago, IL, September 2014. M. Furci, G. Casadei, R. Naldi, R.G. Sanfelice and L. Marconi, “An Open-Source Architecture for Control and Coordination of a Swarm of Micro-Quadrotors”, ICUAS Conference, Denver, CO, June 2015, pp.139-146 . H. Jiang, M. T. Pope, M. A. Estrada, B. Edwards, M. Cuson, E. W. Hawkes and M. R. Cutkosky, “Perching Failure Detection and Recovery with Onboard Sensing”, International Conference on IROS, Hamburg, Germany, Sept-Oct 2015, pp. 1264-1270. https://www.bitcraze.io/crazyflie-2/ T. S. Tsay, “Guidance and Control Laws for Quadrotor UAV,” WSEAS Transactions on Systems and Control, vol. 9, 2014, pp. 606613. S. O. H. Madgwick, A. J. L. Harrison, and R. Vaidyanathan, “Estimation of IMU and MARG Orientation using a Gradient Descent Algorithm,” IEEE International Conference on Rehabilitation Robotics, ETH Zurich Science City, Switzerland, June 29 - July 1, 2011, pp. 1-7. http://www.optitrack.com/ M. De Lellis, “Modeling, Identification and Control of a Quadrotor Aircraft,” Master’s Thesis, Dept. Elect. Eng. and Control. Eng., Czech Technical University, Prague, Czech, 2011. K. Zhou, and J. C. Doyle, Essentials of Robust Control, Prentice Hall, Englewood Cliffs, NJ, 1998. G.C. Goodwin, S.F. Graebe and M. E. Salgado, Control Systems Design, Prentice Hall, Upper Saddle River, NJ, 2001.

532

Copyright © 2024 DOKUMEN.SITE Inc.