Open-Source Internship opportunity by OpenGenus for programmers. Apply now.
Table of contents
- Comprehensive Introduction Drones
- Quadcopter Flight Dynamics
- Simulation Implementation
Comprehensive Introduction Drones
Drones are Unmanned Aerial Vehicles(UAV) that are remotely controlled either by humans or by computer programs. They range in size from under one pound to several hundred pounds. Drones were initially conceptualized and developed with militant motivation to reduce human participation. Primitive versions of Drones were in use since the Civil War (1861-1865). The U.S. military began using modern drones in 1995, the first used drones were deployed with intelligence gathering applications an weaponized drones in strike tasks.
Later Drones started finding more peaceful and productive applications such as civilian roles ranging from search and rescue, surveillance, traffic monitoring, farmers use them to check on fields and crops, firefighters fly drones over forests to check for wildfires, filmmakers may use them to record scenes in movies, scientists may fly drones into big storms to gather information such as temperature and wind speed. Currently, companies like Amazon and Walmart are interested in using drones to deliver goods to people's homes. Today there exists a combination of both commercial and personal drones.
Different drones are capable of traveling varying heights and distances. Very close-range drones usually have the ability to travel up to three miles and are mostly used by hobbyists. Close-range UAVs have a range of around 30 miles. Short-range drones travel up to 90 miles and are used primarily for espionage and intelligence gathering. Mid-range UAVs have a 400-mile distance range and could be used for intelligence gathering, scientific studies and meteorological research. The longest-range drones are called “endurance” UAVs and have the ability to go beyond the 400-mile range and up to 3,000 feet in the air.
Drones are also classified based on the flight approach as,
It is satisfying to understand and simulate such sofiesticated systems in great detail.
Quadcopter Flight Dynamics
A quadcopter is a drone with 4 propellers. When formulating the dynamics we assume that the propellers are symmetrical positioned and oriented about the center of the drone and the center of mass of the drone lies within the drones body. Before exploring the motion of the drone we should understand the Forces that act on the drone,
Thrust – The force acting on an object perpendicular to the surface. It is a vector quantity, unit – N
Lift – The force that directly opposes the weight of the aircraft. It is a vector quantity, unit – N
Drag – The force acting opposite to the relative motion of any object moving. It is a vector quantity, unit – N
Dimension of Newton - M1 L1 T-2
Torque – The twisting force that tends to cause rotation. It is a vector quantity, unit – Nm
Dimension of Newton meter - M L2T−2
Torque can be determined using the formula,
Here,
- r is the radius
- F is the force
- θ is the angle between F and lever arm
Even number of propellers reasoning
Most Multi-Rotor drones use even number of propellers, this is an easy way to balance the net Torque created by the propellers. To explain, Newtons 3rd Law states that for every action, there is an equal and opposite reaction. In accordance to Newtons 3rd Law the propeller rotation generates a torque opposite of its own onto the body of the drone, if this torque is not dealt with it will lead to instability. An easy way to deal with this torque is to use an additional propeller that rotates in the opposite direction equivalent to the first one, similarly this imbues an equivalent torque in the drone that cancels the prior propeller’s caused torque. Hence, the pair of propeller’s torque balance out and the net torque on the drones body is zero.
Flight Maneuvers
It is important to note that the propellers are designed to push air in the same direction (downwards) regardless of the direction of rotation of the propeller. For our equations we are going to neglect drag. Consider the following convention,
The individual thrusts generated by our drones will be obtained using,
Here,
-
‘i’ refers to the ith propeller
-
A is the cross-sectional area of the propeller
-
ρ is the density of air
-
v is the velocity
The net lift of the drone can be found by the summation of individual thrusts of each of the propellers,
The Weight is given by,
Now we can explore the following flight maneuvers,
1. Hovering
Hovering is the configuration of the drone in which it remains at the same point without any change in position or orientation. When the weight and the Lift are equal the drone's vertical position remains the same.
2. Ascent and Descent
During Ascent the drone's altitude/height with respect to ground in consideration is expected to increase, this can be achieved when,
During Descent the drone's altitude/height with respect to ground in consideration is expected to decrease, this can be achieved when,
3. Forward and Backward Motion
The forward and backward motions are impossible to achieve in the quadcopters because there are no actuators that control force about the axis. To creatively overcome this issue drones, manipulate their pitch in order to direct a portion/component of their Lift to act in the forward or backward direction.
4. Left and Right Motion
Similar to Forward and Backward the Left and Right motions are possible via manipulation roll.
5. Left (Anticlockwise) and Right (Clockwise) Rotation
The controlled torque imbalance will allow us to rotate the drone in both clockwise and anticlockwise directions.
By convention anticlockwise torque is positive
When the thrust/force generated by clockwise rotating propellers is increased the torque generated by them in turn is increased. Whereas the thrust generated by the anticlockwise rotating propellers remains the same. Naturally, there will be a net negative torque and equivalent positive torque in the drone's body. This torque allows the drone to rotate left,
Simulation Implementation
! In Linux system
Tools Used
ROS - Robot Operating System is an open-source robotics middleware suite. Although ROS is not an operating system but a set of software frameworks for robot software development
Mavros - Package provides communication driver for various autopilots with MAVLink communication protocol. Additional it provides UDP MAVLink bridge for ground control stations.
Ardupilot - ArduPilot is an open source, unmanned vehicle Autopilot Software Suite, capable of controlling autonomous vehicles such as Multirotor drones Fixed-wing and VTOL aircraft.
Gazebo – Gazebo is a toolbox of development libraries and cloud services to make simulation easy. It allows us to Iterate fast on your new physical designs in realistic environments with high-fidelity sensor streams.
Logic
Ardupilot is used for flight control with the help of high-level commands.
Object Recognition Using Yolov3
YOLO is the abbreviation for ‘You Only Look Once’, The YOLO model was first described by Joseph Redmon, et al. in the 2015 paper titled “You Only Look Once: Unified, Real-Time Object Detection.” The approach involves a single neural network trained end to end that takes a photograph as input and predicts bounding boxes and class labels for each bounding box directly. The technique offers lower predictive accuracy (e.g. more localization errors), although it operates at 45 frames per second.Further improvements to the model were proposed by Joseph Redmon and Ali Farhadi in their 2018 paper titled “YOLOv3: An Incremental Improvement.”
We use the DARKNET ROS package, which comes with a pretrained yolo net. It reads data from a specified topic in the config.yaml file. It reads every frame and published bounding boxes, predictions,etc as topics that will be available across all other nodes
Result
The expected simulation should look something like this,
Code and Packages
All required packages and personal deployment tutorials can be found from Intelligent-Quads
References
Drone Infographics can be found A Comprehensive Review of Unmanned Aerial
Vehicle Attacks and Neutralization Techniques
Intelligent Quads is a community dedicated to helping people learn how to become developers of intelligent drone applications.