### Mentors

• Vasanth M
• Shannon Britney Carlo
• Shriramu A R

### Members

• Anani Mani Tripathi
• Goti Dev Pankajbhai
• B Manasa Priya Chandana
• Srinath Seshadri
• Krisha Shah
• Nischith Gowd Hanchanahal

## Aim

To get a clear understanding and to visualize the dynamics and control implementation of various systems starting from basics and extending it to drone, a simulink model will be built after thoroughly understanding the drone dynamics.

## Introduction

Today, drones are everywhere, from ultra high tech military devices to toys for kids going through advanced flying cameras and much more. How do such βapparentlyβ simple machines achieve such precise and impressive flights in varying unstable and unpredictable environmental conditions.

## Mechanical design

In this project the drone is assumed to be made of two beams placed perpendicular to each other as shown in the images.

### z-y or z-x plane view

• Length of bar: 335 mm
• Depth of bar: 60 mm
• Width of bar: 237 mm

### Moment of inertia

• About x axis (pitch axis), Ixx = 0.003 kg/m^2
• About y axis (roll axis), Iyy = 0.003 kg/m^2
• About z axis (yaw axis), Izz = 0.007 kg/m^2

## Battery motor and propeller specifications

### Battery

A lithium battery of nominal voltage 11.4 V is used.

• Power capacity: 43.6Wh
• Maximum allowed current: 77A

### Motor

Voltage vs Rpm values for a standard brushless dc motor is taken and used as a reference. And based on this data an approximate equation directly relating voltage and Rpm is obtained and used in the simulation model.

### Propeller

The section of the propeller blades are similar to the airfoil section, so when accelerated rotationally will produce a thrust force upwards, and a torque due to the drag forces which opposes the motion of the propeller. So the propeller also should produce a equivalent torque to overcome the drag and load, and to keep the propeller in motion.

#### Thrust

thrust = ct β π β πΒ² βπ·^4 ct ->coefficient of thrust π-> density of air n-> number of revolutions per second D-> diameter of propellers The value of ct is found to be related to the rpm by this equation ct = (2x10^-15)Rpm^3 - (4x10^-11)Rpm^2 + (3x10^-7)*Rpm

#### Torque

Torque is related to Rpm using this relation tq = (4x10^-14)Rpm^3 + (8x10^-12)Rmp^2+ (3x10^-6)*Rpm

## Rigid body dynamics of drone

### Fundamendal equations of motion

In the x direction: πΉπ₯ = πππ₯ In the y direction: πΉπ¦ = πππ¦ In the z direction: πΉπ§ = ππz About the x-axis: Mx = $\mathrm{Ixx}\beta \stackrel{\Lambda }{\stackrel{\Lambda }{\mathrm{\Xi Έ}}}$ About the y-axis: My = $\mathrm{Iyy}\beta \stackrel{\Lambda }{\stackrel{\Lambda }{\mathrm{Ο}}}$ About the z-axis: Mz = $\mathrm{Izz}\beta \stackrel{\Lambda }{\stackrel{\Lambda }{\mathrm{Ο}}}$

### Final rigid body equtions

ππ§ = π4 β π1 + π2 β π3 ππ₯ = (πΉ3 + πΉ4) β 0.237/ 2 β (πΉ1 + πΉ2) β 0.237/ 2 ππ¦ = (πΉ3 + πΉ2) β 0.237/ 2 β (πΉ4 + πΉ1) β 0.237/ 2 πΉπππππ₯ = sin$\mathrm{Ο}$ β cosπ β (πΉ1 + πΉ2 + πΉ3 + πΉ4) πΉπππππ¦ = sinπ β cos$\mathrm{Ο}$ β (πΉ1 + πΉ2 + πΉ3 + πΉ4) πΉπππππ§ = cosπ β cos$\mathrm{Ο}$ * (πΉ1 + πΉ2 + πΉ3 + πΉ4)

Normally drone control system consist of two control blocks, position control and attitude control. But this project focuses only on the attitude control block plus the throttle control.

### Motor and propeller block

Input : Voltage[V] (4x1 - vector) Output : Thrust[F] torque[T] (4x1 - vector)

In this block the voltage supplied to each motor is taken as an input and the thrust and the torque generated by each motor is given as an output.

### Linear dynamics block

Input : Thrust[F] Attitude[theta] Vecocity[v] Output: Acceleration[a]

Here theta denotes the roll, pitch and yaw angles. Velcoity is taken as an input to calculate the drag forces.

### Rotational dynamics block

Input: Thrust[F] Torque[T] Output: Angular acceleration[alpha]

With the help of rigid body equations and calculated values of moment of inertia, the angular acceleration vector is calculated using the thrust and torque values.

### PID controllers

The simulink model consist of four PID controllers 1-> For attaining the desired altitude. 2-> For attainging the desired pitch rate. 3-> For attaining the desired roll rate. 4-> For attaining the desired yaw rate.

## Simulation results

• First plot shows the altitude as a function of time. In this simulation the attitudes are assumed to be constants.
• Second plot shows the angulare velocities as a function of time, here throttle input is assumed to be constant.

## Conclusion

• We simulated a mavic pro drone in matlab and simulink and used PID controllers for altitude control. We used mathematical equations behind the rotational and linear dynamics of the drone to implement a mathematical model in matlab and simulink using blocks. Later PID controllers were used to control the position and altitude of the drone.
• Further plans to add position controller and trajectory planner to this model and to simulate a drone following a pariticular trajectory in 3-d space.

## References

1. Modeling, Simulation and Control of Quadcopter using PID Controller, Link
2. MODELING, SIMULATION AND COMPLETE CONTROL OF A QUADCOPTER, Link
3. Simulink-based Quadcopter Control System Model, Link
4. Matlab tech talks, Link