Sensor 1979173803

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 55

O

Se
sors

şe*^

ò^***'**
\** ”
at re Se sors
• Robot's window to the world!
• Sensors measure a physical uantity, they
do
not provide state (more on that iater).
Befo se sors
• Ea Robots did not have sensors
• They were unabie to adapt or cope with
new situations
• Exampie: An industriai grabbing robot
wou grab as it programmed no matter what
was there.
Ea i ati
Robot
lFrom: WŁRlgreț , Ingź d (ØH•) mmUin' m 4 o ß PrøŒlłn $$At@ NrwY orŞ HY.]
AnimaJs can adapt because they have
sensors
• Sensors enabie us to gather information about
the environment.
• Animais have eyes, ears, skin, etc.
• Most creatures process sensory stimuii in a
centrai iocation.
• Some have a distributed control network.
• Example: Octopi
Types of Se I

so
Proprioceptive
rmati
• Exteroceptive
rioceptive
• Information about the state of one's own body
• Exampies:
—Direction your head is facing
Position of your limbs
—Position of your (robot's)
wheels
Exteroceptive
• Information about the state of the externaT
worid relative to r (or the robot's) frame of
reference
• Exampies:
Light level
Temperature
Distance to objects
Sound levels
CeŁ Bump Sensor Right Bump Sensor
(Exterocepfive (Exteroceptive)

*8**
Odomecer Odometer
(PropriocepŃve) (Propriocepcive)

Power
Se so Exa
Jes
Physical Property
Se n sin g Technology
Contact
bump, switch
Distcance
ultrasound, radar, iiafrcd fiO
Light lerel
Sounl level plaotc›cells, c•ameras
Strain microphones
Rotation strain gauges
Acceleration encoders hand potentioinetera
accelerometers canc1
Magnetism
gyrc›scopc•.« compasses
Smell
chemical .xen»ors
Tern
theimal, irâfrc7l red
erature
Inclination incliilonleters, gyroseopes
Piessure pressuie gauges
Table 7.1 Some .sensors andaltinaeters
Altitude the information they me.astirc.
Se rocessing
so
SignaJ To SymboJ

ProbJem
Sensors do not provide state, just a
measurement of a physical quantity (a signal).
• Symbols are an abstraction relating
to exteroception and proprioception.
• Translating sensory information into symbols
is a difficult fundamental problem in
Robotics. (more on this difficuity Iater).
Why do

it?
It is easier to program actions based on
symbols
Robot sees Cat
Robot takes action against the Cat
• To Recognize the Symbol (Cat) certain
signals must be processed
Ultrasonic sensor detects obstacle
Sound sensor registers sound
Temperature sensor detects a change
Sensor Fusion
• Combining muTtipie sensors to get better
information is Sensor Fusion.
• Not simpie: Sensors have noise and
inaccuracy. tombining sensors increases
noise and inaccuracy.
• Sensors are combined for redundancy, to
compiement each other, and for
coordination.
Types of

si
Redundant (competing):
Physical
Logical
• Complementa
—Disjoint sensory inputs read simultaneously
• Coordinated:
—Disjoint sensory inputs read in sequence
LogicaJ Sensors
• A logical sensor is an abstraction of
sensors.
• Enables the perception of a symbol
by processing sensor signal(s)
• Contains all avaiiable methods for
detecting
that symboi
• Example: Cat Sensor
Processes sensor inputs (primary
and/or alternates)
Uses algorithm to conclude Cat
Passive Se

sors
Measure some uantity but do not
interact
• Exampies:
Touch Sensors
Passive Shaft Encoders
— Sound Sensor
Light Sensor (some)
And many more...
Active Sensors
• Composed of Emitters and Detectors
• Output a signai and measure the reaction
• Examples:
Active Shaft Encoders
Light sensors (some)
Ultrasonic
Laser range finders
X-rays
Se so Co Jexity
• Sensors can be divided based upon the ievel
of processing uired
Simple
Complex
• Sensors can also be ivided by their ieveT
of
activity in the world
Passive
Active
Vision

Speech
(Medium)
Sonar
'(Øedium)

OdOmerery
( ČOW)

***P SenSOÏ
J Se

sors
Do not require a great deai of processing to be
useful to the robot
• Example:
Switches/touch
Light sensor
Shaft Encoders
Switc

es
Simple sensors that work by using a circuit.
• 2 values: pressed and not pressed relate to open or
closed circuit

spring
Light Se
• Photoceils
sors
• Refİective Optosensors
• Infra Red Sensors
• Brea Beam Sensors
aft ncod rs
• Measure the angular rotation of an axle/shaft.
• Made either using light sensors or switches.
• Examples: odometer, speedometer.
iex Se

sors
Require a greater amount of processing than
mpie Sensors.
• Examples:
Ultrasonic
Lasers
Camera (Robot Vision)
Jtraso i Se

sors
Active sensors that measure distance by
using pulses of ultrasound and caiculating the
time it takes for a reflection to occur.
• Uses the time of ight principle
Distance = (time x speed of sound) 2
Laser Range Finders
• Active sensors that use iasers to caTcuiate
distance.
• Most use phase-shift analysis instead of
time of fTight to determine distance.
• Phase shift involves sending out a continuous
light wave and measuring the change in
phase.
• Time of fiight can be used for iasers, but
speed of iight makes this expensive.
Cameras
• Complex sensors that ailow the robot
to process snapshots of the
environment.
• Limited by range of distances that can
be focused (Depth of field).
• Return images composed of pixels.
• Can be grayscaie or color.
• 2 or more cameras allows for stereo
vision.
• Send streams of images over time.
Robot Vision Techniques
• Robot vision is very demanding so there
are
some techniques to speed it up.
Use color to recognize objects
Use color and motion aka blob tracking
Use sensor fusion and combine faster/less
complex sensors with cameras
Use environmental knowledge to your
robots advantage.
Sign J to SymboJ

revisited
This probiem is difficu
because:
Sensor noise and errors
Sensor Limitations
Hallucinations
imperfect Information
Sensor

Errors
2 categories of sensor error
Predictable
Unpredictable
• Predictabie sensor errors can be accounted
for with programming/design
• Unpredictable sensor errors are more diPicult
• Can create faise positives and faise negatives
Senso

ise
Outside signals interfere with accurate sensor
reading.
• Examples
— Ambient light level washing out led from light
sensor
Changing ambient sound levels
Electromagnetic interference
DeaJing with Se so

ise
Caiibrate sensors often
• Take muiti readings and process
Take the average of the readings or discard any
extreme outliers.
• Sensor fusion with complementa
sensors
Se so

itations
Sensors exist in the physicai worid so they
obviously have physicai limitations.
• Examples:
Camera resolution and depth of field
Ultrasonic range
Touch sensor sensitivity
Specuiar RefJection
• Light and sound waves refTect off surfaces.
• Very Iittie of the emitted Iight is returned to
the sensor.
• Very smooth surfaces reflect iittie to none
of the wave back sending it in aii directions.
• Waves can take many bounces before they
return ieading to incorrect readings and
haliucinations.
I perfect

Informati
is impossibTe to have perfect information
about the world
• Aii possibilities can not
be
designed/programmed for
• Exampie:
The kidnapped robot
problem
i ng Se
• Some basic
sors
uestions hel when picking
sensors:
What are the goals of the robot?
—What is the environment like that the
robot will
operate in?
—What are the physical limitations of the robot?
XT Se
sors
• We've taiked about them before...
• Touch
• Light
• CoioF
• Sound
• Compass
• Accelerometer
• Itrasonic (sonar)
XT To Se
• is a switch
so
• Function by compieting or breaking a
circuit
• mpiest passive sensor
• Returns if pressed, if not pressed.
#pragma config(Sensor, touchsensor,
S1, sensorTouch)
task main()

//loop while the touchsensor's value is


0 while(SensorVa1ue(touchsensor)== 0)

motor[motorA]= 100;
motor[motorB]= 100;

motor[motorA]= -75;
motor[motorB]= -75;

wait1Msec(1000);
NXT Light

Sensor
Passive and active simpie sensor
• Returns a percentage rating 0 to 100. 100
is bright, 0 is dark.
• Composed of a phototransistor and a LED.
• When LED is on it is an active sensor, when
it
is off it is passive.
• Can detect some color changes with LED on
via the change in refiected iight.
#prapa config(Sensor, S1, lightsensor,
sensorLightActive
//*!!Code automatically Qenerated
by 'ROBOTC' configuration wizard
!!*//task main

wait1Msec(100);
while(SensorVa1ue(lightsensor) <
45)

motor[motorA] - 100;
motor[motorB] - 100;

motor[motorA] - D;
motor[motorB] - 0;
Hightechnic CoJor Sensor
• An active somewhat-complex sensor
• Contains a microcontroiier
• Uses 3 diPerent LED Tights to iliuminate the
target surface and measures the intensity of
each color reflected by the surface (as
destribed by its manufacturer).
• The sensor then calcuiates the coior number
and returns it to the program.
Coì Se be nt
so 0
Ass s
17 1 11
2 12

10
NXT Sound Sensor
• Passive simple sensor
• Uses a microphone to detect sound
• Measures sound intensity in a percentage
(0- 100) between 0 and 90 dB.
• Samples between 20 and 30 Hz...not fast
enough to recognize human speech.
#prapa config(Sensor, soundsensor,
S1,
sensorSounWB)

task main

wait1Msec(1000);

while(SensorVa1ue(soundsensor) <-

50)

motor[motorA] - 75;
motor[motorB] - 75;
Hightechnic Compass
• Sensor
Passive somewhat-complex sensor
• Has a microcontroller
• Contains a digital compass that measures
the earth's magnetic field and returns a
heading angle to the program from 0 to 3S9
degrees.
• Can be influenced by local magnetic
phenomenon, so it must be mounted
away from the NXT and its batteries.
#pragma config Sensor, S1, compasssensor,
sensorl2CHiTechnicCompass)
//^!!Code automatically generated by
'ROBOTC' configuration wizard !!*//

task main(){
if(SensorVa1ue(compassSensor)==0)(//Due
north
motor[motorA]=1
00;
motor[motorB]=100;
Hightechnic AcceJerometer
Sensor
• Passive somewhat-compiex sensor
• Has its own microcontrolier
• Contains a 3 axes acceTerometer that
measures acceieration on 3 axes: x,y, and z.
• Acceieration is measured between -2 and
2 g with scaling of about 200 counts per g.
This is refreshed 100 times a second.
• Can be used to measure tiit in 3 dimensions.
Acce ete
i Axes
Gyro Vs AcceJerometer
• An acceieration sensor iike that inciuded
in our sets cannot easily be used for
balancing like a gyro can.
• This is because the accelerometer is sensitive
to the vibration of the motors (and is
sensitive to acceleration in ali directions) and
that cannot be easily distinguished from
gravity.
• Whereas the Gyro sensor detects anguTar
acceieration perpendicuiar to a particular
axis.
NXT UJtrasonic Sensor
• The most complex sensor we have in ciass.
• Active complex sensor
• Contains a microcontroiler
• Works like a bat emits a high frequency
sound and detects the refiections. Measures
the time to receive the refiections to
determine the distance within 2-3 cm
accuracy.
NXT UJtrasonic

Sensor
Range returned is between 0 to 25S cm.
• Accuracy depends on temperature and to a
lesser extent humidity.
• Certain surfaces (iike glass) do not return
an accurate reading.
• Other ultrasonic sensors can
interfere (crosstalk).
#prapa config(Sensor, S1,
sensorSONAR)
sonarsensor,
//^!!Code automatically generated by
'ROBOTC' confipration wizard
!!*//
task main

motor[motorA] - 75;
motor[motorB] - 75;

while(SensorVa1ue(sonarsensor) >
20);

You might also like