Top Banner

of 16

Quadcopter Sensors

Feb 16, 2018

Download

Documents

SalahAL-Hakimi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/23/2019 Quadcopter Sensors

    1/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 anothertype 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.

    2.1fight stabilize sensor

    In the interest of ight stability, or achieving level controlled ight, 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 eect real time corrections. !he pitch is a

    measurement of the nose of the quad-copter pointing either upwards, positive pitch, or

    downwards, negative pitch. !he roll is a measurement of the rotation around the

    longitudinal a"is of the quad-copter with the right or starboard side down being a positive

    roll. !he yaw is a measurement of the rotation around the vertical a"is look in #gure below

    $%&'

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

    2.1.1IMU (Inertial Measure Unit):

    n inertial measurement unit, or IMU, is an electronic device that measures and

    reports on a crafts velocity, orientation, and gravitational forces, using a

    combination of accelerometers and gyroscopes$*&. !he +/// I0 is contain

    1a"is accelerometer and 1-a"is gyroscope that is embedded in +*. board and1-a"is magnetometer that in package with 23 board. I+s are typically used to

    maneuver aircraft, including 4s, among many others, and spacecraft, including

    shuttles, satellites and 5anders. !he I+ 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 I+s sensors allows

    a computer to track a crafts position, using a method known as dead reckoning

    $*&.

    2.1.1.1GY!"#!$%

    gyroscopeis a device for measuring or maintaining orientation, based on the

  • 7/23/2019 Quadcopter Sensors

    2/16

    principles of conservation of angular momentum. !he #rst commercially available

    surface-micro-

    machined angular rate sensors with integrated electronics, they are smaller6with

    lower power consumption, and better immunity to shock and vibration6than any

    gyros having comparable functionality !his genuine breakthrough is possible onlybecause of the nalog 7evices proprietary integrated micro electro-mechanical

    system (i+8+3) process, proven by use in millions of automotive accelerometers

    $1&..

    2yroscopes are used to measure angular rate6how quickly an ob9ect turns. !he

    rotation is typically measured in reference to one of three a"es' yaw, pitch, or roll.

    It produces a positive-going output voltage for counter-clockwise rotation around

    the sensitive a"is considered. !here are gyroscopes available that can measure

    rotational velocity in %, *, or 1 directions. 1-a"is gyroscope combined with a 1-

    a"is accelerometer provides a full degree-of-freedom (7o:) motion tracking

    system.

    :igure *.* show a diagram representing each a"is of sensitivity relative to a

    package mounted to a at surface$;& .

    Figure 2.2: " #$a%is gyro returns rotation rates about each of &, ' ( a%es

    2.1.1.1.1$rinciple o& !peration

    +8+3 gyroscopes are making signi#cant progress towards high performance andlow power consumption. !hey are mass produced at low cost with small form factor

    to suit the consumer electronics market.

    +8+3 gyroscopes use the 0oriolis 8ect to measure the angular rate, as shown in

    :igure *.1.

  • 7/23/2019 Quadcopter Sensors

    3/16

    Figure 2.#: )oriolis effect

    When a mass (m) is moving in direction* 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.ost available !" gyroscopes

    use a tuning for# configuration. $wo masses oscillate and move constantly in opposite directions (%igure

    &.'). When angular velocity is applied, the Coriolis force on each mass also acts in opposite directions,

    which result in capacitance change. $his differential value in capacitance is proportional to the angularvelocity and is then converted into output voltage for analog gyroscopes or *"+s for digital

    gyroscopes.

    When linear acceleration is applied to two masses, they move in the same direction. $herefore, there will

    be no capacitance difference detected.

    $he gyroscope will output ero-rate level of voltage or *"+s, which shows that the !" gyroscopes

    are not sensitive to linear acceleration such as tilt, shoc#, or vibration/0.

    Figure 2.: When angular *elocity is applied.

  • 7/23/2019 Quadcopter Sensors

    4/16

    2.1.1.1.2G'roscope atheatical odel

    gyroscope is a device used primarily for navigation and measurement of angular

    velocity e"pressed in 0artesian coordinates'

    W=( wx ,wy ,wz )

    (2.1)

    It produces a positive-going output voltage for counter-clockwise rotationaround the sensitive a"is considered. !he coordinates are of Inertial "es (or "is relative to horiAon. lso a positive rotation about = "is - ositive in the direction of 8ast (perpendicular to = "is)

    @ "is - ositive towards the 0entre of 8arth (perpendicular to =-> lane)In order to convert from body a"es to earth a"es we use the 70+ algorithm which

    discussed in chapter 1 . !he matri" is used to convert the angles from angles

    referring to the bodyDs movement from its previous position, to angles referring to

    its movement from the position before it. Chen it is then multiplied with all the

    previous matri"es, since each matri" represents one movement, the multiplied

    outcome represents all the movements since the beginning of the measurements,

    thus multiplying the body a"es coordinates, $=b, >b, @b&, with the above mentioned

    matri", will result in the ob9ectDs coordinates in earth a"es $&.

  • 7/23/2019 Quadcopter Sensors

    5/16

    2.1.1.1.*d+antages o& g'roscope sensor

    %.!he gyroscope is used as the underlying measurement of angular velocity. It is

    used to help the accelerometer separate out gravitational and linear acceleration

    components, to

    help the magnetometer distinguish the 8arthDs magnetic #eld 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

    that use gravity to calculate the rotation

    1.rinciple of work is independently of gravity and this is what makes the motion-

    sensing spin around any a"is.

    '.it give the best value of the angle of pitch ,roll in the high speed !hese angles

    are more accurate in the case of gyroscope measurement in high speeds.

    /.helps +agnetometer to measure yaw angles in the event of an error in

    +agnetometer through numerical integrated yaw rate that can be measured by

    2yroscope.

    2.1.1.1.,-isad+antages o& g'roscope sensor

    0an not determine the absolute angles for any a"is pitch , roll ,and yaw. %.

    !he accumulation of errors due to the deviation of the gyroscope with the passage

    of time *.

    1.In the case of the gyroscope measures the angles of ?oll , pitch and yaw at high

    speeds there is an increase in noise with this speed

    '.the error gyro bias (the output of the gyro when rotation is Aero)

    Increase with increase integration time so must use accelerometer and

    magnetometer to 0ompensate bias of gyroscope .

    2.1.1.2*##%%!M%/%

    s is his name, accelerometermeasures acceleration, a

    *0( ax , ay , az (2.)

  • 7/23/2019 Quadcopter Sensors

    6/16

    1-a"is ccelerometers measure acceleration in three orthogonal

    a"es .ll accelerometers are sensitive to both linear acceleration and gravity.n

    accelerometer is a device that measures the proper acceleration of the device(look

    to #gure *.E). !his is not necessarilythe same as the coordinate acceleration

    (change of velocity of the device in space), but is rather the type of accelerationassociated with the phenomenon of weight e"perienced by a test mass that resides

    in the frame of reference of the accelerometer device. :or an e"ample of where

    these types of acceleration dier, an accelerometer will measure a value when

    sitting on the ground, because masses there have weights, even though they do

    not changevelocity.

    2.-:" #$a%is accelerometer returns &, ' ( acceleration in the sensors frame of reference Figure

    Fowever, an accelerometer in gravitational free fall toward the center of the 8arth

    will measure a value of Aero because, even though its speed is increasing, it is in

    an inertial frame of reference, in which it is weightless.

    2.1.1.2.1$rinciples o& !peration

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

  • 7/23/2019 Quadcopter Sensors

    7/16

    Figure 2./ :" sketch of 00 accelerometer

    !onsistent "ith #e"ton$s second la" of motion (F = ma)% as an acceleration is applied to

    the de&ice% a force de&elops "hich displaces the mass. The support beams act as a spring%

    and the fluid (usually air) trapped inside the '! acts as a damper% resulting in a second

    order lumped physical system. This is the source of the limited operational band"idth and

    non-uniform freuency response of accelerometers.

    *d+antages o& acceleroeter sensor 2.1.1.2.2

    %.+easuring the inclination angles ( roll , pitch ) only of Guadcopter.

    *.+easuring acceleration in slow movements(long term acceleration) but in the

    fast movements prefer to use the gyroscope(short them acceleration).

    1.+easurement of absolute angles for roll , pitch only for Guadcopter.

    ;.+easuring the linear acceleration on three a"es (=,>,@).

    E.since the earthDs magnetic #eld is not perfectly parallel to the surface of the

    earth, its angle varies with position on the 8arth, accelerometers are used in

    con9unction with compass sensors to provide tilt compensation.

    -isad+antages o& acceleroeter sensor 2.1.1.2.

    %.it can not determine whether the acceleration resulting from linear speed or

    from gravity.

    *.it can not measure the angles >aw because the movement perpendicular to

    gravity and thus aect evenly over the body of the quadcopter.

    1.4ery sensitive to vibration and cause of these errors in the measurement ofangles either pitch or roll , and there are mistakes on the pitch and roll angles

    measured if accompanied by a linear acceleration.

    2.1.1.M*G%/!M%/%

    magnetometeris a scienti#c instrument used to measure the strength or direction

    of the magnetic #eld, either produced in the laboratory or e"isting in nature. !he

    8arths magnetic #eld (the magnetosphere) varies from place to place, for various

    reasons such as inhomogeneity of rocks and the interaction between charged

  • 7/23/2019 Quadcopter Sensors

    8/16

    particles from the 3un and the magnetosphere. +agnetometers are a frequent

    component instrument on spacecraft that e"plore planets.

    1-a"is magnetometer will return the =, > H @ components of the ambient

    magnetic #eld as illustrated in :igure *. . !his is nominally the earth #eld for many

    applications, but may include signi#cant osets and distortions due to hardJsoftiron eects. !he magnetometer is sub9ect to the same issue as an accelerometer K

    if one of the sensor a"es is parallel to the ambient magnetic #eld vector the other

    two sensor a"es will return values of Aero. !he good news is that since the earth

    magnetic #eld and gravity are never collinear, between our accelerometer and

    magnetometer, we have enough information to #gure out the current device

    orientation, regardlessof how we rotate

    the sensor.

    Figure 2.7: A 3-axis magnetometer will allow you to align yourself with the earth's magnetic el!

    Add a magnetometer to an IMU, and you have aMARG (Magnetic, Angular Rate, and Gravity)

    sensor. Add a compute engine to a MARG, and you get anAHRS (Attitude and Heading

    ReferenceSystem)as

    illustrated in:igure *.L.

    Figure 2.": #-Axis $A%&

  • 7/23/2019 Quadcopter Sensors

    9/16

    2.1.1..1*d+antages o& agnetoeter sensor

    %.It can calculate the absolute angles for >aw and it prefer to use for long term

    measurements of yaw *.0an be used( calibrate ) for ( gyroscope sensor )sensitivity.

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

    ;.dditionally, the compass sensors are typically only used for rotational

    information around the @ or yaw a"is, while gyros provide information around the

    =, >, and @ a"es (pitch, roll, and yaw).

    E.!he compasses are often used in combination with gyroscopes, where the

    gyroscopes provide a heading signal for faster motions, and the #ltered compass

    output provides a heading signal with a longer time constant to be used for biasand heading compensation.

    2.1.1..2-isad+antages o& agnetoeter sensor

    %.ected by any magnetic #eld in the environment causing ( interference).

    *.3ensitive linear acceleration causing lower (performance) of this sensor when

    there is a linear acceleration.

    .

    2.1.2!!M%/% "%"!:

    A barometeris a scientific instrument used in meteorologyto measureatmospheric pressure.

    2ressure tendency can forecast short term changes in the weather. 3umerous measurements

    of air pressure are used withinsurface weather analysisto help find surface troughs, high pressure

    systems and frontal boundaries.

    +arometers 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 #ept stationary and measures subtle pressure changes caused by weather

    http://en.wikipedia.org/wiki/Meteorologyhttp://en.wikipedia.org/wiki/Atmospheric_pressurehttp://en.wikipedia.org/wiki/Atmospheric_pressurehttp://en.wikipedia.org/wiki/Surface_weather_analysishttp://en.wikipedia.org/wiki/Surface_weather_analysishttp://en.wikipedia.org/wiki/Surface_weather_analysishttp://en.wikipedia.org/wiki/Trough_(meteorology)http://en.wikipedia.org/wiki/Altimeter#Pressure_altimeterhttp://en.wikipedia.org/wiki/Altitudehttp://en.wikipedia.org/wiki/Atmospheric_pressurehttp://en.wikipedia.org/wiki/Surface_weather_analysishttp://en.wikipedia.org/wiki/Trough_(meteorology)http://en.wikipedia.org/wiki/Altimeter#Pressure_altimeterhttp://en.wikipedia.org/wiki/Altitudehttp://en.wikipedia.org/wiki/Meteorology
  • 7/23/2019 Quadcopter Sensors

    10/16

    +arometric pressure does not have a linear relationship with altitude. As altitude increases, the

    pressure decreases .

    $he simplified mathematical e4uation used to calculate altitude from air pressure

    1

    0.0000225577

    h

    5.2558

    (2.4

    )P=101325

    Chere pis the air pressure measured in pascale, and his 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

    havent found any standard terms. I simply refer to them as 10-axis solutionsas illustrated in

    Figure 2.9.

    Figure 2.#: A full 1-axis sensor susystem accelerometer * gyro * magnetometer * +ressure

    So remember, use DOF when describing motion. Use axis or axes when describing sensor

    configurations. And when in doubt, draw a picture.

    2.1.2.1*d+antages o& baroeter sensor

    %.Corks to measure air pressure and altitude of the Guadcopter by using the

    speci#c. formula.

    *-Corks to reduce the error of the 23 in determining the altitude where error of

    23 in determining the altitude could be up to 1/m, but this will be reduce by use

  • 7/23/2019 Quadcopter Sensors

    11/16

    1.+easure the heights of up to %% km unlike

    sonar which measures at its best %/m

    2.1.2.2-isad+antages o& baroeter sensor

    %.ected by wind and weather.?eading of this sensor for altitude not ad9ustable accurately

    2.1."%"! 3U"I!

    Sensor fusion is algorithms that intelligently combines data from several sensors

    for the purpose of improving application or system performance. 0ombining data

    from multiple sensors corrects for the de#ciencies of the individual sensors to

    calculate accurate position and orientation information as illustrated in :igure

    *.%/.. !hese algorithms are designed to integrate real-time data and measurementoutputs into a uni#ed interpretation. !hese algorithms are discussed in details in

    chapter 1.

    :igure *.%/ ' 3ensor fusion input and output e"ample.

    !he advantage of using sensor fusion based detection devices is that they providea better estimation of accuracy, over a wide range of operating conditions. !he

    integrated sensory information provides reliable, multilateral and high-level

    recognition mechanisms.

    2.2 !ption sensors

  • 7/23/2019 Quadcopter Sensors

    12/16

    dditional sensors that Mur Guadcopter used to stabiliAe vertical and

    horiAontal speed like 3onar sensor and Mptical ow sensor and we going to

    e"plain in details of them.

    2.2.1"!* "%"!

    Guadcopter will attempt to maintain a constant distance from the groundfor

    avoiding ob9ect by using this sensor and this sensor is very useful in

    dierent ight modes like 5oiter ,5! hold and 5and

    Ultrasonic (sonar) sensor (also #nown as transceiverswhen they both send and receive,

    but moregenerally called transducers) wor# on a principle similar to radarwhich evaluate

    attributes of a target by interpreting the echoes from radioor soundwaves respectively. look to

    #gure *.%%.

    :igure *.%%' ltrasonic 3ensor =5-+a"3onar 8@;

    2.2.1.1-eterining distance:

    !o determine the distance to an ob9ect, 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

    . .!o understand idea see #gure *.%* traverse the distance to the ob9ect

    :igure *.%* ' rinciple of an active sonar diagram

    http://en.wikipedia.org/wiki/Radarhttp://en.wikipedia.org/wiki/Radar
  • 7/23/2019 Quadcopter Sensors

    13/16

    7istance determine by knowing the speed of sound which appro"imate

    1;%mJs in air. the sonar sensor uses these information ,along with the time

    dierence between sending and receiving the sound pulse , to determine

    distance to an ob9ect using the following equation'

    -istance to ob4ect 0 (/)5,162

    (*.E)

    Chere !N time between when an ultrasonic wave is emitted and when it is

    received division by * because the sound wave has to travel to the ob9ect

    and back

    2.2.1.2/'pe o& our sonar sensor:

    78%9, have a +a"imum range of .;

  • 7/23/2019 Quadcopter Sensors

    14/16

    2.2.2!$/I#* 3!? "%"!

    Mptical ow is used to mimic the behavior of how bees orient and navigate

    themselves through various environments . pplying the optical ow

    technique to a quadcopter is similar to a how a bee ies and avoids ob9ects.

    Mptical ow sensing is achieved by using a camera as a sensor .we useA53"1676 optical flow sensor. $here are 15 optical flow sensor but

    our optical flow sensor is &5 in (8-9)plane see figure &.:1.

    2.2.2.1 "iple principle @orAing o& this sensor:

    !he camera takes two images, one at t N -% and oneatt N / 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 reected in the odometry values given by the optical ow

    algorithm.

    :igure *.%1' Mptical :low 3ensor 7B3-1/L/

    2.2.2.2 Ho it or!s

    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 . This value is referred to as the scaler!elow. In the example !elowas

    illustrated in :igure *.%;" the value returned would !e a!out 1.# ( ($%%) & ')

    :igure *.%;' e"ample of movement pi"el

  • 7/23/2019 Quadcopter Sensors

    15/16

    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. !his is necessary because as you can see from thetwo pictures below, if we have two quads moving the same distance, but one at alow altitude, the other at a higher altitude, the lower quad will see surface featuresappear to move further and this will result in a higher optical ow valuessee #gure*.%E.

    :igure *.%E' lower and higher altitude eect on the optical ow values.

    (2.6)

    2.2.2.2.2 Compensate for vehicle roll and pitch changes

    hange in the vehicles roll and pitch will also cause changes in the x and y values returned !y

    the sensor. *nli+e the lateral movement calculations these are not dependent upon the distance

    of the visi!le o!,ects. In the picture !elow you can see that as the -uad has rolled 1 degrees !ut

    !oth flowers have moved from the center of the cameras view in the 1st pic to the edge of the

    view in the /nd picsee #gure *.%E..

    :igure *.% ' compensate roll H pitch vehicle changes

  • 7/23/2019 Quadcopter Sensors

    16/16

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

    pitch given the formula !elow. 0e su!tract these expected changes from the real values returned

    !y the sensor.

    (2.)

    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.:inally ,there is some problems thateect on the senor like'The sensor only wor+s in well lit environments and A fixed$focus lens otating the sensor will confuse the sensor and is used meaning it cannot focus

    on o!,ects closer than 'cm (1 foot).