Quadcopter Sensors
Quadcopter Sensors
If we want any electronic system to deal intelligently and stable , we must add the
sensors to sense the surrounding environment ( electronic sensors) the sensor
known as a tool for collecting information from the surrounding environment
system , whether physical or chemical . Information ..etc. and transfer to another
type of energy often into electrical energy to be understood by the internal
environment to be processed and handled , and for this reason the sensor known
.as the adapter
GYROSCOPE
2.1.1.1
Figure 2.2: A 3-axis gyro returns rotation rates about each of X, Y & Z axes
When a mass (m) is moving in direction v and angular rotation velocity is applied, then the mass
.will experience a force in the direction of the arrow as a result of the Coriolis force
And the resulting physical displacement caused by the Coriolis force is then read from a capacitive
sensing structure.
Most available MEMS gyroscopes
use a tuning fork configuration. Two masses oscillate and move constantly in opposite directions (Figure
2.4). When angular velocity is applied, the Coriolis force on each mass also acts in opposite directions,
which result in capacitance change. This differential value in capacitance is proportional to the angular
velocity > and is then converted into output voltage for analog gyroscopes or LSBs for digital
gyroscopes.
When linear acceleration is applied to two masses, they move in the same direction. Therefore, there will
be no capacitance difference detected.
The gyroscope will output zero-rate level of voltage or LSBs, which shows that the MEMS gyroscopes
are not sensitive to linear acceleration such as tilt, shock, or vibration[5].
wx , wy , wz )
(2.1)
p ( t ) = w p ( ) d + p 0
(2.2 )
t0
p0
, Roll is
x and Yaw
is
In many times we need to work with earth Axis coordinates which are defined as
follow:
X Axis - Positive in the direction of North
Y Axis - Positive in the direction of East (perpendicular to X Axis)
Z Axis - Positive towards the Centre of Earth (perpendicular to X-Y Plane)
In order to convert from body axes to earth axes we use the DCM algorithm which
discussed in chapter 3 . The matrix is used to convert the angles from angles
referring to the bodys movement from its previous position, to angles referring to
its movement from the position before it. When it is then multiplied with all the
previous matrixes, since each matrix represents one movement, the multiplied
outcome represents all the movements since the beginning of the measurements,
thus multiplying the body axes coordinates, [Xb, Yb, Zb], with the above mentioned
.matrix, will result in the objects coordinates in earth axes [6]
ACCELEROMETER 2.1.1.2
As is his name, accelerometer measures acceleration, a
A=(
ax , a y , az
(2.3)
A 3-axis accelerometer returns X, Y & Z acceleration in the sensor's frame of reference Figure :2.5
However, an accelerometer in gravitational free fall toward the center of the Earth
will measure a value of zero because, even though its speed is increasing, it is in
.an inertial frame of reference, in which it is weightless
2.1.1.2.2
2.1.1.2.3
it can not determine whether the acceleration resulting from linear speed or .1
.from gravity
it can not measure the angles Yaw because the movement perpendicular to .2
.gravity and thus affect evenly over the body of the quadcopter
Very sensitive to vibration and cause of these errors in the measurement of .3
angles either pitch or roll , and there are mistakes on the pitch and roll angles
.measured if accompanied by a linear acceleration
MAGNETOMETER 2.1.1.3
A magnetometer is a scientific instrument used to measure the strength or direction
of the magnetic field, either produced in the laboratory or existing in nature. The
Earth's magnetic field (the magnetosphere) varies from place to place, for various
reasons such as inhomogeneity of rocks and the interaction between charged
particles from the Sun and the magnetosphere. Magnetometers are a frequent
.component instrument on spacecraft that explore planets
A 3-axis magnetometer will return the X, Y & Z components of the ambient
magnetic field as illustrated in Figure 2.7 . This is nominally the earth field for many
applications, but may include significant offsets and distortions due to hard/soft
iron effects. The magnetometer is subject to the same issue as an accelerometer
if one of the sensor axes is parallel to the ambient magnetic field vector the other
two sensor axes will return values of zero. The good news is that since the earth
magnetic field and gravity are never collinear, between our accelerometer and
magnetometer, we have enough information to figure out the current device
of how we rotate
orientation, regardless
.the sensor
Figure 2.7: A 3-axis magnetometer will allow you to align yourself with the earth's magnetic field
Add a magnetometer to an IMU, and you have a MARG (Magnetic, Angular Rate, and Gravity)
sensor. Add a compute engine to a MARG, and you get an AHRS (Attitude and Heading
System) as
.Figure 2.8
Reference
illustrated in
Barometric pressure does not have a linear relationship with altitude. As altitude increases, the
pressure decreases .
The simplified mathematical equation used to calculate altitude from air pressure
Figure 2.9: A full 10-axis sensor subsystem = accelerometer + gyro + magnetometer + pressure
So remember, use DOF when describing motion. Use axis or axes when describing sensor
.configurations. And when in doubt, draw a picture
The advantage of using sensor fusion based detection devices is that they provide
a better estimation of accuracy, over a wide range of operating conditions. The
integrated sensory information provides reliable, multilateral and high-level
recognition mechanisms.
avoiding object by using this sensor and this sensor is very useful in
different flight modes like Loiter ,ALT hold and Land
Ultrasonic (sonar) sensor (also known as transceivers when they both send and receive,
but more generally called transducers) work on a principle similar to radar which evaluate
attributes of a target by interpreting the echoes from radio or sound waves respectively. look to
figure 2.11.
determining altitude only when the Sonar itself is detecting the ground and
is below its Sonar Maximum Altitude, so the type of our Sonar sensor
has Maximum Altitude of 4.59 meters.
Important Note: If the Sonar gets an unreliable return below the Sonar Maximum
Altitude, it is ignored and the Barometer altitude is used.
The mouse sensor returns the average movement (in the x and y directions) of surface features
that it sees. A single pixel move will not cause the sensor to return 1. It will return a higher
value around 5. This value is referred to as the scaler below. In the example below as
illustrated in Figure 2.14, the value returned would be about 1.6 ( (-5+5+5) / 3)
2.2.2.2.1 Sensors x and y values can be converted to real distances based on altitude
In order to convert values from the sensor to real distances moved, we need to
take into account the altitude. This is necessary because as you can see from the
two pictures below, if we have two quads moving the same distance, but one at a
low altitude, the other at a higher altitude, the lower quad will see surface features
appear to move further and this will result in a higher optical flow values see figure
2.15.
Figure 2.15: lower and higher altitude effect on the optical flow values.
(2.6)
2.2.2.2.2
Change in the vehicles roll and pitch will also cause changes in the x and y values returned by
the sensor. Unlike the lateral movement calculations these are not dependent upon the distance
of the visible objects. In the picture below you can see that as the quad has rolled 10 degrees but
both flowers have moved from the center of the cameras view in the 1st pic to the edge of the
view in the 2nd pic see figure 2.15..
The expected change in sensor values can be calculated directly from the change in roll and
pitch given the formula below. We subtract these expected changes from the real values returned
by the sensor.
(2.7)
once we have the x/y movements we can integrate these values over time with the current
yaw to arrive at an estimate of position. Finally ,there is some problems that
effect on the senor like: The sensor only works in well lit environments and A fixedfocus lens Rotating the sensor will confuse the sensor and is used meaning it cannot focus
on objects closer than 30cm (1 foot).