0% found this document useful (0 votes)
6 views

MAR_Lab Manual

The lab manual for Micro Aerial Vehicles outlines various experiments related to drone technology, including motor control, sensor applications, and thrust measurement. It discusses different types of drone frames, such as monocopters, bicopters, tricopters, quadcopters, hexacopters, and octocopters, highlighting their characteristics and uses. Additionally, it covers the forces acting on drones, kinematics, and major components involved in drone construction and operation.

Uploaded by

panave3104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

MAR_Lab Manual

The lab manual for Micro Aerial Vehicles outlines various experiments related to drone technology, including motor control, sensor applications, and thrust measurement. It discusses different types of drone frames, such as monocopters, bicopters, tricopters, quadcopters, hexacopters, and octocopters, highlighting their characteristics and uses. Additionally, it covers the forces acting on drones, kinematics, and major components involved in drone construction and operation.

Uploaded by

panave3104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Micro Aerial Vehicle, (Lab Manual)

List of Lab Experiments:


1. Experiments on BLDC Motor driving and speed control
2. LIDAR for linear distance Measurement
3. IMU Sensor for force, acceleration, and angle measurement
4. Speed vs Force characteristics of a BLDC-driven propeller using a Load Cell
sensor.
5. Experiments on Thrust force control of a propeller-driven by BLDC motor
6. Roll and Pitch Control of a drone driven by BLDC Motor controlled propeller
mounted on a knuckle joint/Ball Joint using IMU Sensor
7. Height and Yaw control of a quadcopter driven by BLDC motor-controlled
propeller
8. PID controlled pitch angle for two BLDC Controlled propellers
9. Experiments on height measurement of a drone using LIDAR sensor.

Department of Robotics and AI, NMAMIT, Nitte Page 1


Micro Aerial Vehicle, (Lab Manual)

INTRODUCTION
Different Types of Drone Frames: Monocopter to Octocopter
There are so many types of drones that are available in the market and each of them serves a
different purpose so we cannot define any set criteria for their classification. As you already know
that drones have different number of propellers. The majority of commercial drones (or multi-
copters) in the market today are quadcopters, which means they contain four motors. On the other
hand, Quadcopters aren't the only type of drone, and not all drones have four motors. The number
of motors and the design of the frame has a significant impact on the characteristics of a drone.
These have an impact on stability, flight time, speed, and almost every other aspect of a drone. In
this article, we are going to discuss all types of drones on the basis of the number of propellers.
Monocopters
Monocopters are the type of drone which has only one motor and using a single motor, we can
move our drone in upward and downward directions only. Monocopters are ruled out by this basic
concept since an airflow difference cannot be created to direct the drone. The drone will lift off and
fly, but yaw, rudder, and roll motions are not possible for monocopter. Increasing the number of
motors also helps to stabilize the drone. If additional motors, more wings are added, and the angle
between the arms is lowered, this results in more airflow. Higher motors lift more weight capacity,
which means you can carry more gear with your drone.
Bicopters
Bicopters typically have two fixed-pitch propellers, one clockwise (CW) and the other
counterclockwise (CCW). Control is achieved by varying the speed of each rotor independently
and it is possible to generate a desired total thrust. Place the center of thrust both laterally and
longitudinally, and create a desired total torque, or turning force, by altering the speed of each
rotor.

The propellers on a bi-copter rotate in the opposite direction. These propeller pairs will create
lifting thrust without rotating in the same direction. Each rotor generates power and torque along its
axis of rotation, as well as a drag force in the opposite direction of the vehicle's flight path. The net
aerodynamic torque, and the angular acceleration along the yaw axis, are exactly zero if all rotors
spin at the same angular velocity.
Tricopter
Tricopters typically have three fixed-pitch propellers. These can fly in more directions than
bicopters and can also carry a substantial load. Tricopters have three motors in a Y or T

Department of Robotics and AI, NMAMIT, Nitte Page 2


Micro Aerial Vehicle, (Lab Manual)

configuration, with the motors sitting in the distal part of the limbs. If you get your hands on a
tricopter, you'll notice that it has a lot more stability than a bicopter because of the extra blade.
Although, even in a light breeze, a tricopter can become unsteady. Tricopters are more stable than
quadcopters, but they lack the speed and performance of quadcopters.
Tricopters are of two types - Y shape tricopter and T shape tricopter.

In comparison to a quadcopter, a tricopter has more yaw authority which means that when a
quadcopter or hexacopter yaws, half of the motors slow down while the other half speeds up. If the
copter is flying at maximum speed (all motors on), it will have to slow down to achieve yaw. On
the other hand, a tricopter employs a servo to achieve yaw, therefore it loses less thrust in the same
situation.

Quadcopter
The quadcopter is indeed the most popular multi-copter. Everyone loves quadcopter, whether it's a
DIY maker or a professional drone manufacturer because it's been demonstrated that four is the
optimal number for balancing price, performance, stability, and flying time. A quadcopter is a
multi-rotor drone with 4 motors attached. This Drone stabilizes its flight using an electronic sensor
and control system. There are three types of quadcopters - Plus shape quadcopter, Cross shape
quadcopter, and H shape quadcopter.

Department of Robotics and AI, NMAMIT, Nitte Page 3


Micro Aerial Vehicle, (Lab Manual)

All the shapes are stable in forward flight, but quadcopter requires a yaw control input in forward
flight. Yaw control authority is identical for all configurations but the pitch and roll control
authority is about 30% greater in the case of cross configuration. H-frame drones were the first and
the most popular drones. They can handle a lot of FPV (First-person view) gear while running on
a LiPo battery. They feature a wider base, which ensures that they roll steadily. H-frame drone
batteries tend to survive longer since their location prevents them from being readily damaged. It's
also the best drone frame for racing because it has lots of room for easy construction and changes.

Hexacopter
The hexacopter has six propellers that are placed in a circle around the hexacopter's main body.
The machine's bottom has a pair of leg-like appendages that allow it to land safely on the ground.
Because of its six propellers, the quadcopter is a more powerful flyer than the quadcopter and can
carry bigger loads. The hexacopter has a substantial advantage that even if one of the propellers
fails, the craft can still fly because of the other five propellers. This implies that if one of the
propellers fails, the drone will not crash to the ground, causing damage to the equipment attached
to it. The contraption will not be able to fly if two propellers fail, but it will stay stable enough to
land safely.

Department of Robotics and AI, NMAMIT, Nitte Page 4


Micro Aerial Vehicle, (Lab Manual)

A hexacopter can go quicker and reach higher altitudes than a quadcopter. Because hexacopters are
more expensive, these are typically employed to transport more valuable cargo that cannot be
destroyed in the event of a crash. They are also larger and more complex to assemble and store than
quadcopters.

Octocopters
This is the drone with eight propellers and is significantly more powerful than either a quadcopter
or a hexacopter. In comparison to previous drones, these can fly higher, move faster, and carry
heavier payloads. The octocopter is also extremely steady in the air, allowing it to capture footage
with high-quality graphics and minimal shaking. These are considered the cream of the crop when
it comes to drones because of their high performance value. They're utilized for highly specialized
tasks that may require them to travel through rain or heavy gusts. The machine's robustness allows
it to withstand severe weather without being thrown off course. Even if two or three propellers are
destroyed, the drone will continue to fly.

Department of Robotics and AI, NMAMIT, Nitte Page 5


Micro Aerial Vehicle, (Lab Manual)

When it comes to attaching costly cameras or delicate cargo to drones, the octocopter is the greatest
option because it has the best chance of keeping the payload secure and completing the job on
schedule. The octocopter is frequently used in movies and television shows that require high-
altitude shots. Because the equipment is so enormous, keeping it in your home might be a hassle.
Additionally, caution should be exercised when carrying the drone in your car or truck to avoid
damage. Because the octocopter consumes a lot of power, it can't stay in the air for very long
before needing to land to recharge. If you want to use the octocopter, keep extra batteries in case
the drone runs out of power before the job is finished.

Department of Robotics and AI, NMAMIT, Nitte Page 6


Micro Aerial Vehicle, (Lab Manual)

Roll, Pitch and Yaw


Roll: A roll moment is a force that
attempts to cause a system to rotate
about its X axis, from side-to-side.
A good example of roll is an
airplane banking.

Yaw: Yaw occurs when a force


attempts to cause a system to rotate
about its Z axis. To visualize yaw,
imagine a model airplane suspended
on a string. If the wind blows just
right, the airplane’s wings and nose
will remain level (no rolling or
pitching), but it will rotate around
the string from which it’s
suspended. This is yaw.

Pitch: A pitch moment attempts to


cause a system to rotate about its Y
axis, from front to back. To envision
pitch, think of the nose of an
airplane pointing downward or
upward.

Department of Robotics and AI, NMAMIT, Nitte Page 7


Micro Aerial Vehicle, (Lab Manual)

Sign Convention Pitch Roll and Yaw

Motor Mixing Algorithm

For CCW Yaw is +ve and CW Yaw is -ve

Department of Robotics and AI, NMAMIT, Nitte Page 8


Micro Aerial Vehicle, (Lab Manual)

Degrees of freedom in quadcopter


Six degrees of freedom: (a) A quadcopter can move longitudinally (forward and backward),
vertically (upward and downward), and laterally (right and left). (b) It can also move
rotationally among each axis to produce roll, pitch, and yaw movements.

Department of Robotics and AI, NMAMIT, Nitte Page 9


Micro Aerial Vehicle, (Lab Manual)

Forces and Moments Acting on a Drone


Major forces acting on a Drone
When a drone moves in the air, various forces act on it. The resultant force will decide its
movement. There are major forces acting on a drone

• Weight
❖ Due to the mass of the drone, the body mass force always acts in the direction of
gravity
❖ Higher the weight of the drone, more power is required to lift and move the drone
❖ Weight of drone = mass of drone × acceleration due to gravity
• Lift:
❖ The vertical force acting on the drone is called lift
❖ This force is due to pressure differences across the drone (in the vertical direction).
Hence, the speed, size, and shape of the propeller blade decide the amount of lift force
❖ Lift is essential to lift the body against the gravity
❖ To create this force, all four propellors run at high speed to lift the drone
• Thrust
❖ The force acting on the drone in the direction of motion is called thrust. However, for
drone dynamics, it is normal to the rotor plane.
❖ During hovering, the thrust is purely vertical. If thrust is inclined then the drone will tilt
forward or backward.
❖ This force is essential to move the drone in the desired direction at equal speed
❖ To get desired motion, two propellors have been given high speed
• Drag
❖ The force acting on the drone in the opposite direction of motion due to air resistance is
called drag
❖ This may be because of pressure difference and viscosity of air
❖ To reduce the drag, the aerodynamic shape of the drone is selected

Department of Robotics and AI, NMAMIT, Nitte Page 10


Micro Aerial Vehicle, (Lab Manual)

Kinematic for Quad-copter

• The thrust produced by each propeller is perpendicular to the plane of rotation of propellors. It
is directly proportional to the square of the angular velocity of the propeller
Fi = kf ×ωi2
• If L is defined as the distance between two motors or propellors for any diagonal of the drone,
then the reaction moments about the X-axis and Y-axis
Mx = (F3 – F4) × L
My = (F1 – F2) × L
• Newton’s second law of motion
• For linear motion: Force = mass × linear acceleration
• For rotational motion: Torque = inertia × angular acceleration

Hovering Motion
• Equilibrium Conditions for hovering
mg = F1 + F2 + F3 + F4
All moments = 0

• Equation of motion
m = F1 + F2 + F3 + F4 – mg
m=0

Rise or Fall Motion (Throttle up)


• Conditions for hovering (rise)
mg < F1 + F2 + F3 + F4
All moments = 0

• Conditions for Fall


mg > F1 + F2 + F3 + F4

Department of Robotics and AI, NMAMIT, Nitte Page 11


Micro Aerial Vehicle, (Lab Manual)

All moments = 0

• Equation of motion
m = F1 + F2 + F3 + F4 – mg
m>0

Yaw Motion
• Conditions for hovering
mg = F1 + F2 + F3 + F4
All moments ≠ 0

• Equation of motion
mass* linear acceleration = F1 + F2 + F3 + F4 – mg
Izz *angular acceleration@ Z-axis = M1+ M2+M3+ M4

Pitch and Roll Motion


• Conditions for hovering
mg < F1 + F2 + F3 + F4
All moments ≠ 0

• Equation of motion
mass* linear acceleration = F1 + F2 + F3 + F4 – mg
Ixx * angular acceleration @ x-axis = (F3 – F4)×L

Rigid-body dynamics
• To calculate individual speeds and forces acting on drones, the three-dimensional rigid-body
dynamics should be modeled
• The first step is to identify the reference coordinates, the direction of rotor speed and forces
acting the drones
• For the rigid body, we have to consider the effect of aerodynamic, inertial, gravitational, and
gyroscope
• Aerodynamic Forces: rotation of the propellors in air causes various forces such as friction
and drag
• Secondary aerodynamic effects: blade flapping, ground effect, and local flow fields
• Inertial counter torques: gravitational forces acting at the center of drone affect the rotation
of propellors
• Gyroscopic effects: change in the orientation of drone body and plane rotation of propellors.

Department of Robotics and AI, NMAMIT, Nitte Page 12


Micro Aerial Vehicle, (Lab Manual)

• Based on Newton-Euler equations, all forces and moments acting on a quadcopter are
combined and result in a complete model of the drone dynamics
• This physical model is useful to control the desired motion of the quadcopter

Major Components of Drones


The following are major parts of drones.

1. Frame:
• It should have sufficient strength to hold the propeller momentum and additional weight for
motors and cameras
• Sturdy and less aerodynamic resistance
1. Propellers:

Department of Robotics and AI, NMAMIT, Nitte Page 13


Micro Aerial Vehicle, (Lab Manual)

• The speed and load lifting ability of a drone depends on shape, size, and number of propellors
• The long propellors create huge thrust to carry heavy loads at a low speed (RPM) and less
sensitive to change the speed of rotation
• Short propellors carry fewer loads. They change rotation speeds quickly and require a high
speed for more thrust.
2. Motor
• Both motors brushless and brushed type can be used for drones
• A brushed motor is less expensive and useful for small-sized drones
• Brushless type motors are powerful and energy very efficient. But they need Electronic Speed
Controller (ESC) to control their speed. These brushless motors are widely used for racing
freestyle drones, traffic surveys and aerial photography drones.
3. ESC (Electronic Speed Controller)
• ESC is used to connect the battery to the electric motor for the power supply
• It converts the signal from the flight controller to the revolution per minted (RPM) of motor
• ESC is provided to each y motor of the drone
4. Flight Controller (FC)
• It is the computer processor which manages balance and telecommunication controls using
different transmitter
• Sensors are located in this unit for the accelerometer, barometer, magnetometer, gyrometer and
GPS
• The distance measurement can be carried out by an ultrasound sensor
5. Radio Transmitter sends the radio signal to ESC to pilot to control motor speed.
6. Radio Receiver: Received the signal from the pilot. This device is attached to the quadcopter
7. Battery: High-power capacity, Lithium Polymer (LiPo) is used for most drones. The battery can
have 3S (3 cells) or 4S (4 cells).
• When the pilot or autonomous system gives the drone a command, the flight controller sends
signals to the motors to spin the propellers
• The speed and direction of the motors and propellors are adjusted to achieve the desired
movement. The sensors provide data to the flight controller, which uses it to stabilize the drone
in the air and adjust its movement
• Drones can be controlled manually using a remote controller or programmed to fly
autonomously. Autonomous drones use sensors and pre-programmed instructions to fly to a
specific location, perform a task like taking photos or delivering a package, and return to their
starting point.
How to operate a Drone
• Operating a drone can be a fun and rewarding experience, but it’s important to know how to do
so safely and legally
• Here are some general steps to operate a drone:

1. Read the manual: The first step is to read the drone manual carefully, as each drone model is
unique and has its own set of instructions.
2. Register your drone: Depending on your location, you may need to register your drone with
the appropriate authorities.
3. Charge your drone battery: Make sure your drone battery is fully charged before flying it.

Department of Robotics and AI, NMAMIT, Nitte Page 14


Micro Aerial Vehicle, (Lab Manual)

4. Find a suitable location: Choose a location that is open, clear, and away from any obstacles
like trees, buildings, or power lines.
5. Check the weather: Avoid flying your drone in windy or rainy conditions. Check the weather
forecast before flying.
6. Turn on the drone: Turn on the drone and the remote control.
7. Calibrate the drone: Follow the instructions in the manual to calibrate the drone before flying.
8. Take off: Push the throttle stick slowly and smoothly to take off the drone.
9. Fly the drone: Use the remote control to maneuver the drone in the air. Keep it at a safe
distance from people and property.
10. Land the drone: When you are ready to land the drone, slowly bring it down to the ground
using the throttle stick.
11. Turn off the drone: After landing the drone, turn off the drone and the remote control.

Precautions During the Drone Use


• Drones can be a fun and useful tool, but they can also be dangerous if not used properly. Here
are some precautions to keep in mind when using a drone:

1. Know the laws and regulations:


• Before flying a drone, make sure you know the laws and regulations in your area
• This includes any local, state, and federal regulations, as well as any restrictions on where you
can fly your drone.
2. Always keep your drone in sight:
• It’s important to keep your drone within your line of sight at all times
• This will help you avoid collisions with other objects or people.
3. Fly in open areas

Department of Robotics and AI, NMAMIT, Nitte Page 15


Micro Aerial Vehicle, (Lab Manual)

• Try to fly your drone in open areas away from people, buildings, and other obstacles
• This will help you avoid accidents and crashes.
4. Respect people’s privacy:
• Don’t fly your drone over private property without permission
• Also, avoid flying your drone close to people’s homes or in areas where people have a
reasonable expectation of privacy.
5. Avoid flying in bad weather:
• Drones are not designed to handle extreme weather conditions like strong winds, heavy rain, or
snow
• Avoid flying your drone in these conditions, as they can cause your drone to crash or become
damaged.
6. Keep your drone in good condition:
• Regularly check your drone for any signs of damage or wear and tear
• Replace any damaged parts before flying.
7. Practice safe battery use:
• Always use the manufacturer’s recommended batteries and charger
• Avoid charging your batteries unattended and never use damaged or swollen batteries.
8. Be prepared for emergencies: Keep a first aid kit and a fire extinguisher nearby in case of
emergencies. Also, be prepared to land your drone quickly if necessary.
• By following these precautions, you can help ensure a safe and enjoyable drone experience for
yourself and others.
Application and Development of Drones
• Drones or UAE has a lot of application in space, defense, and military purposes, delivery of
food items, and spraying of pesticides in farming
• Refer to the post for the application of drones in industries on this website
• Application of drone and scope of CFD modeling

Department of Robotics and AI, NMAMIT, Nitte Page 16


Micro Aerial Vehicle, (Lab Manual)

Department of Robotics and AI, NMAMIT, Nitte Page 17


Micro Aerial Vehicle, (Lab Manual)

Experiment 01:
Aim: To determine the thrust Force and RPM of the propeller
Requirement: BLDC motor, Propeller, Arduino Uno, Power supply, Load Cell, Load cell
amplifier, Lenear guide way, IR Sensor.
Procedure:
Block Diagram:
1. Open Ardino IDE and write the code
2. Fix all the components and take readings based on the rotation.

Power
ESC Supply

Load Cell
BLDC
Motor

IR Sensor Load Cell


Amplifier

Arduino Uno

Department of Robotics and AI, NMAMIT, Nitte Page 18


Micro Aerial Vehicle, (Lab Manual)

Ardion UNO Programme to acquire Thrust Force using Load cell output
Ardion UNO Programme to acquire RPM using IR Sensor output
#include <Servo.h>
#include <HX711.h>
const int LOADCELL_DOUT_PIN = 4;
const int LOADCELL_SCK_PIN = 3;
const int sensorPin = 2; // Connect the signal pin of the IR sensor to digital pin 2
unsigned long startTime = 0;
volatile int count = 0;
HX711 scale;
Servo ESC;
int Speed;
void setup() {
Serial.begin(9600);
attachInterrupt(digitalPinToInterrupt(sensorPin), countPulses, RISING);
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
ESC.attach(9, 1000, 2000);
}
void loop() {
Speed =00;
ESC.write(Speed);
if (scale.is_ready()) {
scale.set_scale();
long x = scale.get_units(10);
float UG = (((x + 74440.3) / -243811) - 0.62) + 0.5;
if (UG < 0) {
UG = UG / -1;
} else {
UG = UG;
}
Serial.println(UG, 1);
} else {
Serial.println("HX711 not found.");
}
unsigned long currentTime = millis();
if (currentTime - startTime >= 1000) { // Calculate RPM every second
float rpm = (count / 2) * 6.0; // Calculate RPM
Serial.print("RPM: ");
Serial.println(rpm);
count = 0;
startTime = currentTime;

Department of Robotics and AI, NMAMIT, Nitte Page 19


Micro Aerial Vehicle, (Lab Manual)

}
delay(1000);
}
void countPulses() {
count++;
}

Observation:
TRIAL Sl No BLDC Motor Speed (RPM) Thrust Force in (N)
1 50
TRIAL-I 2 60
3 70
1 50
TRIAL-I 2 60
3 70
1 50
TRIAL-I 2 60
3 70
50
AVERAGE 60
70

Conclusion: Thrust and RPM of the motor is calculated

Department of Robotics and AI, NMAMIT, Nitte Page 20


Micro Aerial Vehicle, (Lab Manual)

Experiment 02: Experiment to measure the RPM of the motor


or propeller
Aim: To measure the rpm of a propeller
Requirement: Aero USB 2.0, Computer, MatLab Simulink.
Procedure:
1. Open matlab, then open a Similink and create a new blank Quarc Model
2. Add Hil initializer block, select Quanser Aero usb 2.0 and apply
3. Create the blank model as shown figure
4. Adjust the voltage and take readings
5. Repeat the same for a different voltage value
Block Diagram:

Observation:
Sl Voltage (V) Motor RPM
No
1. 5V 0

Department of Robotics and AI, NMAMIT, Nitte Page 21


Micro Aerial Vehicle, (Lab Manual)

1
2. 10V 0
1
3. 15V 0
1

Result: RPM for each motor with varying voltages is observed

Department of Robotics and AI, NMAMIT, Nitte Page 22


Micro Aerial Vehicle, (Lab Manual)

Experiment 03: Experiment to Identify the Encoder


Aim: To Identify different types of encoders used in Aero usb 2.0 experimental setup
Requirement: Aero USB 2.0, Computer, MatLab Simulink.
Procedure:
1. Open matlab, then open a Similink and create a new blank Quarc Model
2. Add Hil initializer block, select Quanser Aero usb 2.0 and apply
3. Create the blank model as shown figure
4. Cheque to see which encoder responds to by operating motor and arms
5. Repeat the same for all encoder

Block Diagram:

Observation:
Sl Encoder Identify
No
1 Encoder 0

Department of Robotics and AI, NMAMIT, Nitte Page 23


Micro Aerial Vehicle, (Lab Manual)

2 Encoder 1
3 Encoder 2
4 Encoder 3

Result: Encoder for Motor 0, Motor 1, Pitch and yaw are identified

Department of Robotics and AI, NMAMIT, Nitte Page 24


Micro Aerial Vehicle, (Lab Manual)

Experiment 04: Experiment to Determine pitch and yaw angle


Aim: To determine pitch and your angle
Requirement: Aero USB 2.0, Computer, MatLab Simulink.
Procedure:
1. Open matlab, then open a Similink and create a new blank Quarc Model
2. Add Hil initializer block, select Quanser Aero usb 2.0 and apply
3. Fix your rotation and take readings for pitch
4. Adjust the sine wave amplitude and repeat, pitch rotation and find readings for yaw,
repeat the same.
Block Diagram:

Observation:
Pitch Angle
Sl Amplitude Pitch Angle (θ) deg
No
Minimum Maximum
1 2

Department of Robotics and AI, NMAMIT, Nitte Page 25


Micro Aerial Vehicle, (Lab Manual)

2 4
3 6
Yaw Angle
Sl Amplitude Yaw Angle (θ) deg
No
Minimum Maximum
1 8
2 10
3 12

Result: Pitch and Yaw angle for different amplitudes are calculated

Experiment 08:

Department of Robotics and AI, NMAMIT, Nitte Page 26


Micro Aerial Vehicle, (Lab Manual)

PID controlled pitch angle for two BLDC Controlled propellers


MATHEMATICAL MODELLING OF A QUADCOPTER AND
SIMULATION
Consider a quadcopter of masses 𝑚1 ,𝑚2 , 𝑚3 , 𝑚4 of each rotor respectively. Where the masses
are all the same m= 0.468kg. where 𝑚1 and 𝑚3 rotors rotate anticlockwise direction and rotors
𝑚2 and 𝑚4 rotates clockwise direction, by this the quadcopter is balanced. This way, the four
propellers can generate lift and thrust simultaneously. Let 𝜔1 , 𝜔2 , 𝜔3 and 𝜔4 be the rotational
speed of each rotor respectively. The speeds possible for the motor of battery 1800mAh (Li-po)
are 4000 rpm to 6000 rpm. We will have to calculate the 6 values by using Newton Euler's
equation. The absolute linear position of quadcopter is defined in the frame as x, y, z axes with ξ.
The angular position is given by η for 3 axes.

TABLE 4.1 Given parameters


SL NO PARAMETERS VALUE SI UNIT
1 Mass: 𝑚1 0.468 Kg
𝑚2 0.468 Kg
𝑚3 0.468 Kg
𝑚4 0.468 Kg
2 Speed 𝜔1 4000 Rpm
𝜔2 4000 Rpm
𝜔3 4000 Rpm
𝜔4 4000 Rpm

Department of Robotics and AI, NMAMIT, Nitte Page 27


Micro Aerial Vehicle, (Lab Manual)

Fig 4.1 Diagram representing a quadcopter


The quadcopter is assumed to be rigid body and thus Newton-Euler equations can be used to
describe its dynamics. In the body frame, the force required for the acceleration of mass mVB and
the centrifugal force νx(mVB) are equal to the gravity RTG and the total thrust of the rotors TB

m𝑽̇𝑩 + 𝝑(𝒎𝑽𝑩 ) = 𝑹𝑻 𝑮 + 𝑻𝑩 (4.1)

In the inertial frame, the centrifugal force is nullified. Thus, only the gravitational force and the
magnitude and direction of the thrust contribute to the acceleration of the quadcopter

Pitch angle θ determines the rotation of the quadcopter around the y-axis. Roll angle φ determines
the rotation around the x-axis and yaw angle ψ around the z-axis. The vector q represents the
linear and angular position vectors.

x 
 =  y  (4.2)
 z 

 
 =   (4.3)
 

Department of Robotics and AI, NMAMIT, Nitte Page 28


Micro Aerial Vehicle, (Lab Manual)

 
q=  (4.4)
 

Let vb be the angular velocities of the body frame

vxb 
 
vb = v yb  (4.5)
v 
 zb 

 p
v =  q  (4.6)
 r 

ROTATIONAL MATRIX FROM BODY FRAME:

 C C C S − S C C S + S C 
 
R=  S C S S S + C C S S C − C S  (4.7)
 − S C S C C 
 

Where c=cos and s= sin

Wη is the transformation matrix for angular velocities from the inertial frame to the body frame.

n' =  *v (4.8)

 .   1 ST CT   p 
 .  
  =  0 C − S   q  (4.9)
   0 S / C C / C   r 
  

Using equation 4 calculate v

v =  '

− S   
.
 p  1 0
 q  =  0 C C S  =  . 
      (4.10)
 r   0 − S C C   . 

 
Department of Robotics and AI, NMAMIT, Nitte Page 29
Micro Aerial Vehicle, (Lab Manual)

 I XX 0 0 
 
I = 0 IYY 0  (4.11)
 0 I ZZ 
 0

The value of I is used in the Simulink

Where I XX = 4.856*10−3 , IYY = 4.856 ∗ 10−3 , I ZZ = 8.801*10−3

The force is calculated by using the formula,

Fi = ki2 (4.12)

Finally, the Thrust force and the torque is calculated by using the formula;

T = ∑4𝑖=1 𝑓𝑖 =k ∑4𝑖=1 𝜔𝑖2 Where k =2.980*10−6 (4.13)

0 
T = 0 
B
(4.14)
T 

The Torque is calculated by using the formula;

   lk (−2 + 4 
2 2

   
 B =    = lk (−12 + 32  (4.15)
     4 =  
   i =1 mi 

By using these 15 equations the calculations are performed

Calculations done using the equations

The angles  ,  ,  are obtained from the research paper[2]

Department of Robotics and AI, NMAMIT, Nitte Page 30


Micro Aerial Vehicle, (Lab Manual)

Where  = 0.98, = 0.99,  = 0.99

 C C C S − S C C S + S C 
 
R=  S C S S S + C C S S C − C S  (4.16)
 − S C S C C 
 

 C (0.98)C (0.99) C (0.98) S (0.99) − S (0.98)C (0.99) C (0.98) S (0.99) + S (0.98)C (0.99) 
 
R =  S (0.98)C (0.88) S (0.98) S (0.99) S (O.99) + C (0.98)C (0.99) S (0.98) S (0.99)C (O.99) − C (0.98) S (0.99) 
 − S (0.99) 
 C (0.99) S (0.98) C (0.99)C (0.98) 
(4.17)

 0.9997 0.0002 0.0175 


 
R =  0.0171 0.9997 −0.0172  (4.18)
 −0.173 0.1717 0.999 
 

v =  ' (4.19)

− S   
.
 p  1 0
 q  =  0 C C S   . 
     (4.20)
 r   0 − S C C   . 
 

 p  1 0 − S (0.99)  0 
 q  =  0 C (0.99) C (0.99) S (0.99)  0  (4.21)
    
 r   0 − S (0.99) C (0.99)C (0.99)  0 

 p  1 0 −0.173  0 
 q  =  0 0.999 0.173  0  (4.22)
    
 r   0 −0.173 0.999  0 

 p  0
 q  = 0 (4.23)
   
 r   0 

Department of Robotics and AI, NMAMIT, Nitte Page 31


Micro Aerial Vehicle, (Lab Manual)

 I XX 0 0 
 
I = 0 IYY 0  (4.24)
 0 I ZZ 
 0

Where I XX = 4.856*10−3 , IYY = 4.856 ∗ 10−3 , I ZZ = 8.801*10−3

 0.0048 0 0 
 
I = 0 0.0048 0  (4.25)
 0 0.0088 
 0

For performing the simulation, we calculate the values of R and I rest values like Thrust force and
torque are obtained from the code which we get for the simulation

4.1 SIMULATION USING MATLAB


For the mathematical model to be done or to calculate the output values to substitute the formulas
we have to obtain a few values through MATLAB simulation, such as the positions x, y, z, the
values of 𝑤𝑖 (i=1,2,3,4) and the angles Φ, θ, ψ. The quadcopter dynamic motions are simulated by
using MATLAB software using a PID controller. After implementing the PID controller in software,
a quadcopter prototype is developed. Step signal is given as input signal controlling quadcopter
dynamic motions using PID controller.

Quadcopter pitch and roll moments are simulated using PID and PD controller. PID and PD results
of pitch and roll moments responses are compared to choose the proper controller for pitch and
roll moments. The parameters of the PID controllers were generated by using the Tune function,
imbedded in the Simulink PID Controller blocks. These values where afterwards used to simulate
the performances of the quadcopter. The control strategy for a single axis was tested in Simulink
and then implemented on the system. The contribution of the authors consists of applying the
dynamic equations from classical and Lagrange mechanics to this particular type of UAV in order
to obtain a physical model of the considered quadcopter

Department of Robotics and AI, NMAMIT, Nitte Page 32


Micro Aerial Vehicle, (Lab Manual)

MATLAB
SOFTWARE

SELECT A MATHEMATICAL MODEL

m𝑽̇𝑩 + 𝝑(𝒎𝑽𝑩 ) = 𝑹𝑻 𝑮 + 𝑻𝑩
NEWTON EULER EQUATION

 0.9997 0.0002 0.0175 


   0.0048 0 0 
R =  0.0171 0.9997 −0.0172  
I = 0 0.0048 0 

 −0.173 0.1717 0.999   0 0.0088 
   0

PID CONTROLLER ROLL PITCH YAW


P=0.137 P=0.173 P=1.450
I=0.1423 I=0.174 I=0.15
D=0.0044 D=0.013 D=0.00

CODING DONE FOR x-axis =1m=I unit


SIMULATION y-axis=1m=1unit
z-axis=1m=1 unit

SIMULATION OUTPUT VALUES OF ROLL, PITCH AND YAW


Department of Robotics and AI, NMAMIT, Nitte AND THEIR GRAPHS ARE OBTAINED Page 33
Micro Aerial Vehicle, (Lab Manual)

Fig 4.2 Flowchart of the simulation performed using MATLAB

4.2 SIMULATION RESULT:


The simulation has been performed using MATLAB for different dimensions, for 10m,20m, and
30m along the x, y, and z axis

Drone moving at a direction of 10m in X, Y and Z axis

(a) (b) (c)

Fig 4.3 Simulation results for 10m (a) X-direction, (b) X+Y axis, (c) X+Y+Z axis

Department of Robotics and AI, NMAMIT, Nitte Page 34


Micro Aerial Vehicle, (Lab Manual)

Drone moving at a direction of 20m in X, Y and Z

(a) (b) (c)

Fig 4.4 Simulation results for 20m (a) X-direction, (b) X+Y axis, (c) X+Y+Z axis

Drone moving in a direction of 30m in X, Y and Z

(a) (b) (c)

Fig 4.5 Simulation results for 30m (a) X-direction, (b) X+Y axis, (c) X+Y+Z axis

Department of Robotics and AI, NMAMIT, Nitte Page 35


Micro Aerial Vehicle, (Lab Manual)

Programme to find roll, yaw and pitch


% Time vector
t = 0:0.4:90;

% Movement distances
x_dist = 10; % meters
y_dist = 10; % meters
z_dist = 10; % meters

% Movement times
x_time = x_dist/2; % seconds
y_time = y_dist/2; % seconds
z_time = z_dist/2; % seconds

% Generate x, y, z coordinates for the drone's path


x = [linspace(0, 10, length(t)/3), linspace(10, 10, length(t)/3), linspace(10, 10, length(t)/3)];
y = [linspace(0, 0, length(t)/3), linspace(0, 10, length(t)/3), linspace(10, 10, length(t)/3)];
z = [linspace(0, 0, length(t)/3), linspace(0, 0, length(t)/3), linspace(0, 10, length(t)/3)];

% Generate yaw, roll, and pitch values for the drone


yaw = mod(2.4*t,360);
roll = mod(10*sin(10*t), 360);
pitch = mod(10*cos(10*t), 360);

% Plot the roll, pitch, and yaw values over time


figure

subplot(3,1,1)
plot(t, roll)
title(sprintf('Roll (final angle: %d deg)', round(roll(end))))
xlabel('Time (s)')
ylabel('Angle (deg)')
xlim([0, 90]) % set x-axis limits to [0, 90]
ylim([0, 360]) % set y-axis limits to [0, 360])

subplot(3,1,2)
plot(t, pitch)
title(sprintf('Pitch (final angle: %d deg)', round(pitch(end))))
xlabel('Time (s)')
ylabel('Angle (deg)')
Department of Robotics and AI, NMAMIT, Nitte Page 36
Micro Aerial Vehicle, (Lab Manual)

xlim([0, 90]) % set x-axis limits to [0, 90]


ylim([0, 360]) % set y-axis limits to [0, 360])

subplot(3,1,3)
plot(t, yaw)
title(sprintf('Yaw (final angle: %d deg)', round(yaw(end))))
xlabel('Time (s)')
ylabel('Angle (deg)')
xlim([0, 90]) % set x-axis limits to [0, 90]
ylim([0, 360]) % set y-axis limits to [0, 360])

% Animate the drone's movement


drone_Animation(x, y, z, roll, pitch, yaw)

% Display the time taken for each movement


disp(['Time taken for x-axis movement: ', num2str(x_time), ' seconds'])
disp(['Time taken for y-axis movement: ', num2str(y_time), ' seconds'])
disp(['Time taken for z-axis movement: ', num2str(z_time), ' seconds'])

% Display the value of each angle as a single digit


disp(['Roll angle: ', num2str(round(roll(end))), ' deg'])
disp(['Pitch angle: ', num2str(round(pitch(end))), ' deg'])
disp(['Yaw angle: ', num2str(round(yaw(end))), ' deg'])

Drone Simulation
function animation = drone_Animation(x,y,z,roll,pitch,yaw)
D2R = pi/180;
R2D = 180/pi;
b = 0.6; % the length of total square cover by whole body of quadcopter in meter
a = b/3; % the legth of small square base of quadcopter(b/4)
H = 0.06; % hight of drone in Z direction (4cm)
H_m = H+H/2; % hight of motor in z direction (5 cm)
r_p = b/4; % radius of propeller
%% Conversions
ro = 45*D2R; % angle by which rotate the base of quadcopter
Ri = [cos(ro) -sin(ro) 0;
sin(ro) cos(ro) 0;
0 0 1]; % rotation matrix to rotate the coordinates of base
base_co = [-a/2 a/2 a/2 -a/2; % Coordinates of Base
-a/2 -a/2 a/2 a/2;
0 0 0 0];
base = Ri*base_co; % rotate base Coordinates by 45 degree

Department of Robotics and AI, NMAMIT, Nitte Page 37


Micro Aerial Vehicle, (Lab Manual)

to = linspace(0, 2*pi);
xp = r_p*cos(to);
yp = r_p*sin(to);
zp = zeros(1,length(to));
%% Define Figure plot
fig1 = figure('pos', [0 50 800 600]);
hg = gca;
view(68,53);
grid on;
axis equal;
xlim([-5 15]); ylim([-5 15]); zlim([-5 15]);
title('(quadcopter) Drone Animation')
xlabel('X[m]');
ylabel('Y[m]');
zlabel('Z[m]');
hold(gca, 'on');

%% Design Different parts


% design the base square
drone(1) = patch([base(1,:)],[base(2,:)],[base(3,:)],'r');
drone(2) = patch([base(1,:)],[base(2,:)],[base(3,:)+H],'r');
alpha(drone(1:2),0.7);
% design 2 parpendiculer legs of quadcopter
[xcylinder ycylinder zcylinder] = cylinder([H/2 H/2]);
drone(3) = surface(b*zcylinder-b/2,ycylinder,xcylinder+H/2,'facecolor','b');
drone(4) = surface(ycylinder,b*zcylinder-b/2,xcylinder+H/2,'facecolor','b') ;
alpha(drone(3:4),0.6);
% design 4 cylindrical motors
drone(5) = surface(xcylinder+b/2,ycylinder,H_m*zcylinder+H/2,'facecolor','r');
drone(6) = surface(xcylinder-b/2,ycylinder,H_m*zcylinder+H/2,'facecolor','r');
drone(7) = surface(xcylinder,ycylinder+b/2,H_m*zcylinder+H/2,'facecolor','r');
drone(8) = surface(xcylinder,ycylinder-b/2,H_m*zcylinder+H/2,'facecolor','r');
alpha(drone(5:8),0.7);
% design 4 propellers
drone(9) = patch(xp+b/2,yp,zp+(H_m+H/2),'c','LineWidth',0.5);
drone(10) = patch(xp-b/2,yp,zp+(H_m+H/2),'c','LineWidth',0.5);
drone(11) = patch(xp,yp+b/2,zp+(H_m+H/2),'p','LineWidth',0.5);
drone(12) = patch(xp,yp-b/2,zp+(H_m+H/2),'p','LineWidth',0.5);
alpha(drone(9:12),0.3);

%% create a group object and parent surface


combinedobject = hgtransform('parent',hg );
set(drone,'parent',combinedobject)

Department of Robotics and AI, NMAMIT, Nitte Page 38


Micro Aerial Vehicle, (Lab Manual)

%yaw_txt = text(0.05, 0.95, ['Yaw angle: ', num2str(round(yaw(i))), ' deg'], 'Units', 'normalized',
'Color', 'white');
% drawnow

for i = 1:length(x)

ba = plot3(x(1:i),y(1:i),z(1:i), 'b:','LineWidth',1.5);

translation = makehgtform('translate', [x(i) y(i) z(i)+0.1]);


%set(combinedobject, 'matrix',translation);
rotation1 = makehgtform('xrotate',(pi/180)*(roll(i)));
rotation2 = makehgtform('yrotate',(pi/180)*(pitch(i)));
rotation3 = makehgtform('zrotate',yaw(i));
%scaling = makehgtform('scale',1-i/20);
set(combinedobject,'matrix',...
translation*rotation3*rotation2*rotation1);

%movieVector(i) = getframe(fig1);
%delete(b);
drawnow
% pause(0.2);
end

Department of Robotics and AI, NMAMIT, Nitte Page 39


Micro Aerial Vehicle, (Lab Manual)

Thrust Force Calculation


Components Required

Tiger Motor: https://robokits.co.in/multirotor-spare-parts/tiger-motor-esc-and-propeller/t-


motor-motor/manned-aircraft/tiger-motor-gear-450-combo?cPath=&

https://robocraze.com/products/a2212-1400kv-brushless-motor-simonk-30a-esc-1045-
propeller-
set?currency=INR&variant=40192718143641&utm_medium=cpc&utm_source=google&utm
_campaign=Google%20Shopping&https://robocraze.com/?utm_source=googleads&utm_med
ium=ppc&gclid=Cj0KCQjwqc6aBhC4ARIsAN06NmP7owNMW5THoCS616lzvptPjJ6R3TJf
YzzgXreAPxBoNJK1YVhSr5saAusEEALw_wcB

Maximum of 280grmas

Weighing Machine:

Department of Robotics and AI, NMAMIT, Nitte Page 40


Micro Aerial Vehicle, (Lab Manual)

STATIC THRUST CALCULATION


Calculations of static thrust are needed in order to ensure that the proper propellers and motors have been selected.
Static thrust is defined as the amount of thrust produced by a propeller which is located stationary to the earth. This
calculation is particularly important for this project because quadrotor helicopters are more likely to perform at low
speeds relative to the earth. This low-speed performance ensures that the calculations of static thrust can be applied to a
wide range of flight conditions. Also, it is important to note that the final calculations of static thrust are estimates and
not actual values.
The first step in calculating static thrust is determining the power transmitted by the motors to the propellers in terms of
rpm. Aircraft-world.com has compiled empirical data used to calculate power [1], and the formula used for their
datasheet is given in Equation 1.

Where power is in watts and rpm is in thousands. For example, a 6X4 APC propeller has a propeller constant of 0.015
and a power factor of 3.2. Given a rotational speed of 10,000 rpm, the calculation goes as
follows: Power=0.015X103.2=24 W.
The next step is to determine the thrust produced by a propeller. Equation 2 gives thrust based on the Momentum
Theory.

A commonly used rule is that velocity of the air at the propeller is v=½Δv of the total change in air velocity:
Therefore, and equation 3 is derived.

Equation 4 gives the power that is absorbed by the propeller from the motor. Equation 5 shows the result of solving
equation 4 for Δv and substituting it into equation 3. In doing so, Δv is eliminated and torque can be calculated.

Finally, it is advantageous to express the results of equation 5 in terms of mass. Newton’s Law, F=ma, is used to obtain
equation 6.

Department of Robotics and AI, NMAMIT, Nitte Page 41


Micro Aerial Vehicle, (Lab Manual)

Solving for mass is useful for quadrotor helicopters because it can be directly related to the mass of the aircraft. In
particular, a thrust (mass) that equals the mass of the aircraft is needed for hovering. The importance of hovering will
be addressed in the following section (DC Motors).
1. https://www.aircraft-world.com/Datasheet/en/hp/emeter/hp-propconstants.htm

Department of Robotics and AI, NMAMIT, Nitte Page 42

You might also like