Você está na página 1de 16

: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

flight stabilize sensor 2.1

In the interest of flight stability, or achieving level controlled flight, a combination of sensors will be required to continually monitor the roll and pitch of the quad-copter such that the microcontroller can process the data and effect real time corrections. The pitch is a measurement of the nose of the quad-copter pointing either upwards, positive pitch, or downwards, negative pitch. The roll is a measurement of the rotation around the longitudinal axis of the quad-copter with the right or starboard side down being a positive roll. The yaw is a measurement of the rotation around the vertical axis look in figure below : [1]

:Quadcopter sensors If we want any electronic system to deal intelligently and stable , we must

Figure 2.1:Visual representation of roll, pitch, and yaw. Reprinted under Wikipedia commons license, created by ZeroOne

:IMU (Inertial Measure Unit) 2.1.1

An inertial measurement unit, or IMU, is an electronic device that measures and reports on a craft's velocity, orientation, and gravitational forces, using a combination of accelerometers and gyroscopes[2]. The MPU6000 IC is contain 3axis accelerometer and 3-axis gyroscope that is embedded in APM2.6 board and 3-axis magnetometer that in package with GPS board. IMUs are typically used to maneuver aircraft, including UAVs, among many others, and spacecraft, including shuttles, satellites and Landers. The IMU is the main component of inertial navigation systems used in aircraft, spacecraft, watercraft, and guided missiles among others. In this capacity, the data collected from the IMU's sensors allows a computer to track a craft's position, using a method known as dead reckoning

.[2]

GYROSCOPE

2.1.1.1

A gyroscope is a device for measuring or maintaining orientation, based on the

principles of conservation of angular momentum. The first commercially available -surface-micro

machined angular rate sensors with integrated electronics, they are smaller—with lower power consumption, and better immunity to shock and vibration—than any gyros having comparable functionality This genuine breakthrough is possible only because of the Analog Devices proprietary integrated micro electro-mechanical system (iMEMS) process, proven by use in millions of automotive accelerometers

..[3]

Gyroscopes are used to measure angular rate—how quickly an object turns. The rotation is typically measured in reference to one of three axes: yaw, pitch, or roll. It produces a positive-going output voltage for counter-clockwise rotation around the sensitive axis considered. There are gyroscopes available that can measure rotational velocity in 1, 2, or 3 directions. A 3-axis gyroscope combined with a 3- axis accelerometer provides a full 6 degree-of-freedom (DoF) motion tracking .system

Figure 2.2 show a diagram representing each axis of sensitivity relative to a .package mounted to a flat surface[4]

principles of conservation of angular momentum. The first commercially available -surface-micro machined angular rate sensors with

Figure 2.2: A 3-axis gyro returns rotation rates about each of X, Y & Z axes

Principle of Operation 2.1.1.1.1

MEMS gyroscopes are making significant progress towards high performance and low power consumption. They are mass produced at low cost with small form factor .to suit the consumer electronics market MEMS gyroscopes use the Coriolis Effect to measure the angular rate, as shown in .Figure 2.3

Figure 2.3: Coriolis effect When a mass (m) is moving in direction v → and angular

Figure 2.3: Coriolis effect

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].

Figure 2.3: Coriolis effect When a mass (m) is moving in direction v → and angular

.Figure 2.4: When angular velocity is applied

Gyroscope mathematical model 2.1.1.1.2

A gyroscope is a device used primarily for navigation and measurement of angular :velocity expressed in Cartesian coordinates

W=( w x ,w y ,w z )

(2.1)

It produces a positive-going output voltage for counter-clockwise rotation around the sensitive axis considered. The coordinates are of Inertial Axes (or Body Axes) - based on Center of Gravity (CG) The body axes positions are:

X Axis - Positive forward, through the nose of the object Y Axis - Positive to Right of X Axis, perpendicular to X Axis Z Axis - Positive downwards, perpendicular to X-Y plane

The Angles definitions are:

Pitch - Angle of X Axis relative to horizon. Also a positive rotation about Y Body Axis

Roll - Angle of Y Axis relative to horizon. Also a positive rotation about X Body Axis

Yaw - Angle of X Axis (nose) relative to North. Also a positive rotation about Z Body axis :The angle can be derived by integration of the angular velocity in each direction

(2.2)

t

θ p (t)= w p (τ)+θ p0

t 0

Where p is index which can be (x,y,z ), Pitch is

θ y

, Roll is

θ x

and Yaw

θ z

is

and

θ p0

is the initial angle compared to the earth axis

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 body’s 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 object’s coordinates in earth axes [6]

Advantages of gyroscope sensor 2.1.1.1.3

The gyroscope is used as the underlying measurement of angular velocity. It is.1 used to help the accelerometer separate out gravitational and linear acceleration components, to

help the magnetometer distinguish the Earth’s magnetic field from ambient .magnetic noise, and to help the sensors update their calibration parameters

it can get the rotation accounts for ( roll , pitch , yaw ) better than other sensors .2 that use gravity to calculate the rotation

Principle of work is independently of gravity and this is what makes the motion- .3 .sensing spin around any axis

it give the best value of the angle of pitch ,roll in the high speed These angles.4

.are more accurate in the case of

gyroscope measurement in high speeds

helps Magnetometer to measure yaw angles in the event of an error in .5 Magnetometer through numerical integrated yaw rate that can be measured by . Gyroscope

Disadvantages of gyroscope sensor 2.1.1.1.4

.Can not determine the absolute angles for any axis pitch , roll ,and yaw. 1

The accumulation of errors due to the deviation of the gyroscope with the passage .of time 2

In the case of the gyroscope measures the angles of Roll , pitch and yaw at high.3 speeds there is an increase in noise with this speed

the error gyro bias (the output of the gyro when rotation is zero) .4

Increase with increase integration time so must use accelerometer and .magnetometer to Compensate bias of gyroscope

ACCELEROMETER 2.1.1.2

As is his name, accelerometer measures acceleration, a

A=( a x , a y , a z ¿

(2.3)

axis Accelerometers

measure acceleration in three orthogonal-3

axes .All accelerometers are sensitive to both linear acceleration and gravity. An

accelerometer is a device that measures the proper acceleration of the device(look to figure 2.5). This is not necessarily the same as the coordinate acceleration (change of velocity of the device in space), but is rather the type of acceleration associated with the phenomenon of weight experienced by a test mass that resides in the frame of reference of the accelerometer device. For an example of where these types of acceleration differ, an accelerometer will measure a value when sitting on the ground, because masses there have weights, even though they do

.velocity

axis Accelerometers measure acceleration in three orthogonal-3 axes .All accelerometers are sensitive to both linear acceleration

not change

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

Principles of Operation 2.1.1.2.1

Most accelerometers are Micro-Electro-Mechanical Sensors (MEMS). The basic principle of operation behind the MEMS accelerometer is the displacement of a small proof mass etched into the silicon surface of the integrated circuit and suspended by small beams. Look to .figures (2.6)

axis Accelerometers measure acceleration in three orthogonal-3 axes .All accelerometers are sensitive to both linear acceleration

Figure 2.6 :A sketch of MEMS accelerometer

Consistent with Newton's second law of motion (F = ma), as an acceleration is applied to the device, a force develops which displaces the mass. The support beams act as a spring, and the fluid (usually air) trapped inside the IC acts as a damper, resulting in a second order lumped physical system. This is the source of the limited operational bandwidth and non-uniform frequency response of accelerometers.:

Advantages of accelerometer sensor

2.1.1.2.2

.Measuring the inclination angles ( roll , pitch ) only of Quadcopter.1

Measuring acceleration in slow movements(long term acceleration) but in the.2 .fast movements prefer to use the gyroscope(short them acceleration)

.Measurement of absolute angles for roll , pitch only for Quadcopter.3

.Measuring the linear acceleration on three axes (X,Y,Z) .4

since the earth’s magnetic field is not perfectly parallel to the surface of the.5 earth, its angle varies with position on the Earth, accelerometers are used in .conjunction with compass sensors to provide tilt compensation

Disadvantages of accelerometer sensor

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

particles from the Sun and the magnetosphere. Magnetometers are a frequent .component instrument on spacecraft that

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 System) as

.Figure 2.8

AHRS (Attitude and Heading Reference

illustrated in

particles from the Sun and the magnetosphere. Magnetometers are a frequent .component instrument on spacecraft that

Figure 2.8: 9-Axis MARG

Advantages of magnetometer sensor 2.1.1.3.1

It can calculate the absolute angles for Yaw and it prefer to use for long term .1 measurements of yaw 2.Can be used( calibrate ) for ( gyroscope sensor ) .sensitivity

.determine heading (yaw orientation) using magnetic north as a reference.3

Additionally, the compass sensors are typically only used for rotational.4 information around the Z or yaw axis, while gyros provide information around the .X, Y, and Z axes (pitch, roll, and yaw)

The compasses are often used in combination with gyroscopes, where the.5 gyroscopes provide a heading signal for faster motions, and the filtered compass output provides a heading signal with a longer time constant to be used for bias .and heading compensation

Disadvantages of magnetometer sensor 2.1.1.3.2

.Affected by any magnetic field in the environment causing ( interference).1

Sensitive linear acceleration causing lower (performance) of this sensor when .2 .there is a linear acceleration

.

:BOROMETER SENSOR 2.1.2

A barometer is a scientific instrument used in meteorology to measure atmospheric pressure. Pressure tendency can forecast short term changes in the weather. Numerous measurements of air pressure are used within surface weather analysis to help find surface troughs, high pressure systems and frontal boundaries.

Barometers and pressure altimeters (the most basic and common type of altimeter) are essentially the same instrument, but used for different purposes. An altimeter is intended to be transported from place to place matching the atmospheric pressure to the corresponding altitude, while a barometer is kept stationary and measures subtle pressure changes caused by weather

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

10.0000225577 h¿ 5.2558 (2.4)

P=101325¿

Where p is the air pressure measured in pascale, and h is the altitude measured .based on air pressure measured

Add a pressure sensor to a MARG or AHRS, and you get a slightly smarter MARG or AHRS – I haven’t found any standard terms. I simply refer to them as “10-axis solutions” as illustrated in .Figure 2.9

Barometric pressure does not have a linear relationship with altitude. As altitude increases, the pressure decreases

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

Advantages of barometer sensor 2.1.2.1

Works to measure air pressure and altitude of the Quadcopter by using the.1 .specific. formula

Works to reduce the error of the GPS in determining the altitude where error of-2 GPS in determining the altitude could be up to 30m, but this will be reduce by use Barometer .because it measures the height based on the atmospheric pressure

Measure the heights of up to 11 km unlike.3 sonar which measures at its best 10m

Disadvantages of barometer sensor 2.1.2.2

Affected by wind and weather.1 Reading of this sensor for altitude not adjustable accurately .

SENSOR FUSION 2.1.3

Sensor fusion is algorithms that intelligently combines data from several sensors for the purpose of improving application or system performance. Combining data

from multiple sensors corrects for the deficiencies of the individual sensors to calculate accurate position and orientation information as illustrated in Figure

These algorithms are designed to integrate real-time data and measurement

.. 2.10 outputs into a unified interpretation. These algorithms are discussed in details in

.chapter 3

Measure the heights of up to 11 km unlike.3 sonar which measures at its best 10m

.Figure 2.10 : Sensor fusion input and output example

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.

  • 2.2 Option sensors

Additional sensors that Our Quadcopter used to stabilize vertical and horizontal speed like Sonar sensor and Optical flow sensor and we going to .explain in details of them

SONAR SENSOR 2.2.1

Quadcopter will attempt to maintain a constant distance from the ground for

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

but

more

generally called

Additional sensors that Our Quadcopter used to stabilize vertical and horizontal speed like Sonar sensor andradar which evaluate transducers ) work on a principle similar to radio or sound attributes of a target by interpreting the echoes from waves respectively . look to figure 2.11. Figure 2.11: Ultrasonic Sensor XL-MaxSonar EZ4 :Determining distance 2.2.1.1 To determine the distance to an object, it is necessary to implement a timing loop in your microcontroller code to measure the length of time required for the sound wave generated by the emitter to To understand idea see figure 2.12 traverse the distance to the object . . Figure 2.12 : Principle of an active sonar diagram " id="pdf-obj-11-19" src="pdf-obj-11-19.jpg">

(also known as

transceivers

when they both send and receive,

Additional sensors that Our Quadcopter used to stabilize vertical and horizontal speed like Sonar sensor andradar which evaluate transducers ) work on a principle similar to radio or sound attributes of a target by interpreting the echoes from waves respectively . look to figure 2.11. Figure 2.11: Ultrasonic Sensor XL-MaxSonar EZ4 :Determining distance 2.2.1.1 To determine the distance to an object, it is necessary to implement a timing loop in your microcontroller code to measure the length of time required for the sound wave generated by the emitter to To understand idea see figure 2.12 traverse the distance to the object . . Figure 2.12 : Principle of an active sonar diagram " id="pdf-obj-11-27" src="pdf-obj-11-27.jpg">

which evaluate

transducers) work on a principle similar to

radio

or

sound

attributes of a target by interpreting the echoes from

waves respectively. look to

figure 2.11.

Additional sensors that Our Quadcopter used to stabilize vertical and horizontal speed like Sonar sensor andradar which evaluate transducers ) work on a principle similar to radio or sound attributes of a target by interpreting the echoes from waves respectively . look to figure 2.11. Figure 2.11: Ultrasonic Sensor XL-MaxSonar EZ4 :Determining distance 2.2.1.1 To determine the distance to an object, it is necessary to implement a timing loop in your microcontroller code to measure the length of time required for the sound wave generated by the emitter to To understand idea see figure 2.12 traverse the distance to the object . . Figure 2.12 : Principle of an active sonar diagram " id="pdf-obj-11-49" src="pdf-obj-11-49.jpg">

Figure 2.11: Ultrasonic Sensor XL-MaxSonar EZ4

:Determining distance 2.2.1.1

To determine the distance to an object, it is necessary to

implement a timing loop in your microcontroller code to measure the

length of time required for the sound wave generated by the emitter to

To understand idea see figure 2.12 traverse the distance to the object

.

.

Additional sensors that Our Quadcopter used to stabilize vertical and horizontal speed like Sonar sensor andradar which evaluate transducers ) work on a principle similar to radio or sound attributes of a target by interpreting the echoes from waves respectively . look to figure 2.11. Figure 2.11: Ultrasonic Sensor XL-MaxSonar EZ4 :Determining distance 2.2.1.1 To determine the distance to an object, it is necessary to implement a timing loop in your microcontroller code to measure the length of time required for the sound wave generated by the emitter to To understand idea see figure 2.12 traverse the distance to the object . . Figure 2.12 : Principle of an active sonar diagram " id="pdf-obj-11-67" src="pdf-obj-11-67.jpg">

Figure 2.12 : Principle of an active sonar diagram

Distance determine by knowing the speed of sound which approximate 341m/s in air. the sonar sensor uses these information ,along with the time difference between sending and receiving the sound pulse , to determine : distance to an object using the following equation

Distance to object = (T)*341/2

(2.5)

Where T= time between when an ultrasonic wave is emitted and when it is received division by 2 because the sound wave has to travel to the object and back

:Type of our sonar sensor 2.2.1.2

XL-EZ4 have a Maximum range of 7.65 meters but for Any type of sonar sensors we must Take into account the maximum altitude of Sonar

Sonar Maximum Altitude is calculated as 60 percent of the factory specified maximum Sonar range for the Sonar type selected, so Sonar is used for

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.

Advantages of sonar sensor 2.1.2.3

.Installed the height of the quad to fly at a certain height-1 .Works to avoid collision -2 .Determine the height of quadcopter - 3

Disadvantages of sonar sensor 2.1.2.4

.the pulses that are sent by sonar may get her diffraction or refraction.1

the pulses which sends by sonar may collide with something else and received .2 .by sonar

.it does use to

measure the high rises , but instead of it we use Barometer .3

the pulses sent by the sonar may absorb by other body , leading to not return .4 .these pulses

OPTICAL FLOW SENSOR 2.2.2

Optical flow is used to mimic the behavior of how bees orient and navigate themselves through various environments . Applying the optical flow technique to a quadcopter is similar to a how a bee flies and avoids objects. Optical flow sensing is achieved by using a camera as a sensor .we use

ADNS3080 optical flow sensor. There are 3D optical flow sensor but our optical flow sensor is 2D in (X-Y)plane see figure 2.13.

  • 2.2.2.1 Simple principle working of this sensor:

The camera takes two images, one at t = -1 and one at t = 0 and images are then compared with each other(convolution) to determine if the camera went through a translation and in some cases a rotation . If the camera moved then the corresponding translation or rotation will be reflected in the odometry values given by the optical flow algorithm.

OPTICAL FLOW SENSOR 2.2.2 Optical flow is used to mimic the behavior of how bees orient

Figure 2.13: Optical Flow Sensor ADNS-3080

  • 2.2.2.2 How it works

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)

OPTICAL FLOW SENSOR 2.2.2 Optical flow is used to mimic the behavior of how bees orient

Figure 2.14: example of movement pixel

2.2.2.2.1 Sensor’s 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.

2.2.2.2.1 Sensor’s x and y values can be converted to real distances based on altitude In

Figure 2.15: lower and higher altitude effect on the optical flow values.

2.2.2.2.1 Sensor’s x and y values can be converted to real distances based on altitude In

(2.6)

  • 2.2.2.2.2 Compensate for vehicle roll and pitch changes

Change in the vehicle’s 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 camera’s view in the 1st pic to the edge of the view in the 2nd pic see figure 2.15..

2.2.2.2.1 Sensor’s x and y values can be converted to real distances based on altitude In

Figure 2.16 : compensate roll & pitch vehicle changes

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.

The expected change in sensor values can be calculated directly from the change in roll and

(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 fixed- focus lens Rotating the sensor will confuse the sensor and is used meaning it cannot focus on objects closer than 30cm (1 foot).