Quadcopter controlling
Quadcopter controlling
February , 2023
Hossana , Ethiopia
Figure 1.
A Simple quad rotor drone
Scientists who are researching dangerous places like active volcanoes or areas that spew fumes
can finally observe seismic activity with better detail. All they have to do is attach the camera to
the drone and then fly around the area that they need to study.
Distributing products such as your favourite pizza or a letter for your special someone will never
be the same once drones become widely used for delivery. Drones can easily hold a parcel,
depending on the payload attachment.
As explained earlier, drones can make delivery easier. With this same ability, health care
services and emergency response units can help their patients more quickly and efficiently when
the situation demands it.
5. Military Applications
Long before drones became a way to share some cool videos on social media, the military
benefited greatly from drone technology. Drones can be used by the military for the following
purposes:
Air strike
Bomb detection
Spying
A quad employs different control mechanism such as roll, pitch, and yaw which in most cases
are represented by angle of rotation around the center of the quad craft. These angles make up for
the control of the altitude of the quadcopter and to track the altitude of the quadcopter, a two-
coordinate system is required. There is the body frame system which is attached to the quad at its
center of gravity and the earth frame system which is fixed to the earth and it is sometimes refer
to as an inertial coordinate system. The angular different between the two coordinate helps
define the behavior of the quad altitude in space. The attitude system can be derived by rotating
the body frame around the z axis of the earth frame by the yaw angle 𝜑, which is tend followed
by rotating around the y-axis by the pitch angle 𝜙 and finally by rotating around the x-axis by
the roll angle 𝜃.
Figure 2:
The diagram in figure 2 shows how the force generated by each motor affects a change the
direction of the quadcopter along the angles on the coordinate system.
[ ]
cosθcos∅ cosθsin −sinθ
R = −cos ∅ sin+sin ∅ sinθcos cos ∅ cos +sin ∅ sinθsin sin ∅ sinθ
sin ∅ sin +cos ∅ sinθcos −sin∅ cos+ cos ∅ sinθsin cos ∅ cosθ
The matrix R describes the attitude of the UAV as it changes with time.
Control system of drone(Quad copter) 5
Figure 3:
DYNAMIC MODEL
The dynamic model of a quad copter is a subsystem that is divided into two subsystems known
as the rotational subsystem that represent (roll angle, pitch angle and yaw angle) and
translational subsystem that represent (Z position, X position, Y position). The rotational side of
the Quad copter is completely actuated while the translational side of the subsystem is under
actuated
MOMENT ACTION ON THE QUADROTOR
An effect of rotation is the force generated called aerodynamic force and moment generated
called aerodynamic moment. The aerodynamic moment is the combination of aerodynamic force
multiplied by its distance. It is dependent on the geometry of the propeller and by identifying the
moment and force generated by the propeller, we can understand the moment acting on the
quadcopter. From figure 3.1, when F2 is multiplied by the moment arm, a negative moment is
generated about the y-axis. Using the same concept, F4 generates a positive moment and the total
moment about the x-axis can be expresses as
𝑀𝑋 = (𝐹4 − 𝐹2)𝑙
Same concept is applied for My Where :
𝑀𝑦 = (𝐹1 − 𝐹3)𝑙
[ ]
( F 4−F 2 ) l
Mb = ( F 1−F 3 ) l
( F 1+ F 3−F 2−F 4 ) lc
Inertial Matrix
The inertial matrix for a quadcopter is a diagonal matrix as shown below. The structure of the
matrix is because quad copters are built symmetrically with respect to the coordinate systems
that were explained
[
𝐽 = 0 Jy 0
]
Jx 0 0
0 0 Jz
Which are defined below and these parameters would be used for simulation:
𝐽𝑥 = 𝐽𝑦 = 0.03𝑘𝑔𝑚2, 𝐽𝑧 = 0.05𝑘𝑔𝑚2
[ ]
0.03 0 0
J= 0 0.03 0
0 0 0.05
From the matrix above 𝐽𝑥, 𝐽𝑦 and 𝐽𝑧 are the area moments of inertia about the principle
axes on the body frame.
ω b = 𝑅v Ƞ̇
Ƞ̇ = R v
[
𝐽 = 0 Jy 0
]
Jx 0 0
−1
ωb
0 0 Jz
[]
φ
Ƞ= θ
ψ
[ ]
1 0 −sin (θ )
R v = 0 cos (φ) cos ( θ ) sin (φ)
0 −sin ( φ) cos ( θ ) cos (φ)
The overall block diagram of a quad copter (drone) is as given below which is
assembled using SIMULINK program on MATLAB.
Where:
Ƞ=n r = roll (φ ¿
J = inertia matrix
T final = (T res - ω b × J ωb ) p = pitch (θ ¿
dot = derivative
inv = invers y = yaw (ψ ¿
The Overall block diagram of quad copter (drone) control on SIMULINK only controlling
the Pitch (θ ¿.
And after linearize our system, we can find out our step response and our linear system
Transfer function also.
After linearize our system we can find our Transfer function on the linear analysis workspace,
on MATLAB, which is putted as linsys1.
In order to make any analysis using our linear system transfer function on MATLAB, we move
our transfer function (linsys1) to MATLAB workspace. And we find it as state space form (in
terms of A, B, C&D).so we can change the state space form in to Transfer function as,
tf(linsys1) on the MATLAB command window. Then we get our transfer function as;
C( s) 33.33
= 2
R( s) s
After linearization the above transfer function becomes marginally stable, which have two poles
at the origin with constant amplitude that oscillates without damping.
ControlSystemDesigner(linsys1), and we get our transfer function’s Bode plot, Root locus and
Step response.
Figure 7: controlSystemDesigner
From our transfer function and 2nd order format our damping ratio is zero, this also be the reason
for marginal stability of our system.
In order to see some effect on our response we can change the edit compensator. e.g.; when we
add a real zero on our system at -1 location. Which means our controller C = s+1, the root locus
will be shifted and the step response also changes as shown below;
Figure 9: Root locus and step response after adding a real zero
Then from the step response, we can find out steady state = 1.and the transient responses as;
ts = 0.485 s, tr = 0.0608 s …., so using a real zero we gate acceptable result.
As real zero we can add other parameters like real pole, integrator, derivative, lead, lag…. on
different location, to see the effect on our step response.
num = [33.33];
den = [1 0 0]
sys = tf(num,den);
s = tf('s');
C = s+1;
loop_tf = C*sys;
closed = feedback(loop_tf,1);
step(closed)
We can get our closed loop after addition of controller as shown below, which is the
same as explained on the above.