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.

x-y plane view

image 1

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.

image_3

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.

image_4

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 = Ixx θ˙˙ About the y-axis: My = Iyy ϕ˙˙ About the z-axis: Mz = Izzβ€‰ΟˆΛ™Λ™

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Ο• βˆ— cosπœƒ βˆ— (𝐹1 + 𝐹2 + 𝐹3 + 𝐹4) πΉπ‘π‘Ÿπ‘œπ‘π‘¦ = sinπœƒ βˆ— cosΟ• βˆ— (𝐹1 + 𝐹2 + 𝐹3 + 𝐹4) πΉπ‘π‘Ÿπ‘œπ‘π‘§ = cosπœƒ βˆ— cosΟ• * (𝐹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.

Control system representation of drone

image_7

Motor and propeller block

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

image_8

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]

image_9

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]

image_10

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

image_13

  • 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