A.A. 2014/2015
Roboticsfor Computer Engineering students
Marcello RestelliDipartimento di Elettronica e InformazionePolitecnico di Milanoemail: [email protected]: 02-2399-4015
Sensors and Actuators
2
Effectors and Actuators
Effector– Any device robot that has an impact on the
environment– Effectors must match a robot’s task– Controllers command the effectors to achieve the
desired task
Actuator– A robot mechanism that enables the effector to
execute an action
Robot effectors are very different than biological ones– Robots: wheels, tracks, legs, grippers
Robot actuators:– Motors of various types– Passive actuation
3
Types of Actuators
Electric motorsHydraulicsPneumaticsPhoto-reactive materialsChemically reactive materialsThermally reactive materialsPiezoelectric materials
4
Most Popular Actuators
First robots used pneumatic and hydraulic actuators– hydraulic actuators are expansive, weighing, and their
maintenance is hard● used only in big robots
– pneumatic actuators are used for application requiring stop-to-stop trajectories, such as pick-and-place
Nowadays the most common actuators are electrical motors both DC and AC
– since these motors reach high speeds they are typically reduced by gearing that make the dynamics more complex
– typically each joint has its own motor, but it may happen that the same motor may actuate several joints through transmissions
– for stepper motors internal sensors are not required, but when an error occurs their position is unknown
5
DC Motors
DC (direct current) motors– Convert electrical energy into
mechanical energy– Small, cheap, reasonably efficient,
easy to use
How do they work?– Electrical current through loops of
wires mounted on a rotating shaft – When current is flowing, loops of wire
generate a magnetic field, which reacts against the magnetic fields of permanent magnets positioned around the wire loops
– These magnetic fields push against one another and the armature turns
6
DC Motors
7
DC Motors
8
DC Motors
9
DC Motors
10
DC Motors
11
DC Motors: Brushed and Brushless Motors
Brushes are used to change the magnetic polarity of the electromagnet
Brushed motors are cheap but have many drawbacks– Brushes eventually wear out– Brushes make noise– Limit the maximum speed– Hard to cool– Limit the number of poles
Brushless DC motors overcome these problems but they are more expensive
– Brushes are replaced by computer– Permanent magnets on the rotor– Electromagnets on the stator
12
Operating/Stall Current
When provided with constant voltage, a DC motor draws current proportional to how much work it is doing
– Work = Force * Distance
When there is no resistance to its motion, the motor draws the least amount of currentWhen the robot pushes against an obstacle motors drain more currentIf the resistance becomes very high the motor stalls and draws the maximum amount of current (stall current) at its specified voltage
13
Torque
Torque: rotational force that a motor can deliver at a certain distance from the shaftStrength of magnetic field generated in loops of wire is directly proportional to amount of current flowing through them and thus the torque produced on motor's shaftThe more current through a motor, the more torque at the motor's shaftStall torque: the amount of rotational force produced when the motor is stalled at its recommended operating voltage, drawing the maximal stall current at this voltageTorque units: ounces*inches or N*m
– 9.8 N*m torque means motor can pull a weight of 1kg through a pulley 1m away from shaft
14
Power of a Motor
Power: product of the output shaft's rotational velocity and torqueIf there is no load on the shaft then P=0
– rotational velocity is maximum, but the torque is 0
– the motor is spinning freely
If the motor stalled then P=0– it is producing its maximal
torque– rotational velocity is zero
A motor produces the most power in the middle of its performance range
τm=τs(1−ωmωmax )
ωm=ωmax (1−τmτs )
15
Efficiency of a Motor
Motor efficiency is power out divided by power in
Power out is mechanical energy
Power in is electrical energyPoutput=τ⋅ω
Pinput=V⋅I I=V s−V e
RV e=k e⋅ω
η=PoutputPinput
16
Motor Efficiency and Operating Voltage
DC motors are not perfectly efficient– Due to friction some energy is wasted as heat– Industrial-grade motors (good quality): 90%– Toy motors (cheap): 50%– Micro-motors for miniature robots < 50%
To make the motor run, electrical power must be provided in the right voltage range
– if the voltage is lower than the motor runs fine even if it is less powerful
– if the voltage is higher the life of the motor becomes shorter
17
How Fast do Motor Turn?
Free spinning speeds (most motors)– 3000-9000 RPM (50-150 Hz)
High speed, low torque– drive light things that rotate very fast
What happens with heavy robots or manipulators?– it is required more torque and less speed
The solution consists of using gearing– Trade-off high speed for more torque
18
Gearing
Torque: T = F x r– rotational force generated at the
center of a gear is equal to the gear's radius times the force applied tangential at the circumference
Meshing gears: – by combining gears with different
ratios we can control the amount of force and torque generated
Example: r2 = 3r
1
– Gear 1 turns 3 times while gear 2 turns only once
– T1*360 = T
2*1080
– T2 = 3*T
1 = T
1*r
2/r
1
19
Gearing Effect on Speed
Combining gears has a corresponding effect on speed
– A gear with a small radius has to run faster to keep up with a larger gear
● Increasing the gear radius reduces the speed
● Decreasing the gear radius increases the speed
Torque – Speed tradeoff– when a small gear drives a large one,
torque is increased and speed is decreased
– analogously, when a large gear drives a small one, torque is decreased and speed is increased
20
Designing Gear Teeth
Reduced backlash– the looseness between mashing gear teeth
Tight meshing between gears– increases friction
Proportionally sized gears– a 24-tooth gear must have a radius three times the
size of an 8-tooth gear
Example– Input (driving) gear: 8 teeth– Output (driven) gear: 24 teeth– Effect at the 24 teeth gear
● 1/3 reduction in speed ● 3 times increase in torque
21
Gear Reduction in Series
By putting two 3:1 gear reductions in series (“ganging”) a 9:1 gear reduction is created
– the effect of each pair of reductions is multiplied
– key to achieve useful power from a DC motor
With such reductions, high speeds and low torques are transformed into usable speeds and powerful torques
22
Motor Control: PWM
Motors can be controlled by modulating the input voltage (or current)
Use of linear amplifierPower inefficient and impractical
Alternative: Pulse Width Modulation (PWM)switch voltage ON/OFFfrequency from 2 to 20 kHz (against a 100Hz bandwith)higher frequencies are preferred (non audible), but...
over-heatvoltage spikesinterference become prominent
23
Motor Control: PWM
24
Motor Control: PWM
25
Servo Motors
Specialized motors that can move their shaft to a specific positionFor DC motors is only possible to specify one direction“Servo”
– capability to self-regulate its behavior, i.e. to measure its own position and compensate for external loads when corresponding to a control signal
– often used in hobby radio control applicationsServo motors are built from DC motors by adding
– Gear reduction– Position sensor for the motor shaft– Electronics that tell the motor how much to turn and in
what directionMovement Limitations
– shaft travel is restricted to 180 degrees– sufficient for most applications
26
Sensors
Sensors allow a robot to accomplish more complex tasks autonomouslyTwo main categories
– Internal sensors– External sensors
● sensors with contact● sensors without contact
Other classification– Passive sensors (measure a physical property)– Active sensors (emitter + detector)
27
Encoders
An encoder is a sensor for converting rotary motion or position to a series of electronic pulsesLinear architecture
Consist of a long linear read track, together with a compact read head
Rotary architectureServe as measuring sensors for rotary motion and for linear motion when used in conjunction with mechanical measuring standards such as leadscrews, and convert rotary motion (incremental or absolute) into electrical signalsThey are both effective and low cost feedback devices.
28
Incremental Encoders
It is based on the photoelectric principleIt consists of a disk with two traces where transparent and opaque zones are alternatedThe presence of two traces allows to identify the rotation directionN: number of steps (number of light/dark zones per turn)Since the two signals are ¼ step shifted, resolution is 360°/4N
Notch to define an absolute mechanical zero
29
Absolute Encoders
It is a disk with transparent and opaque areas, placed on concentric ringsFor an N-bit word there are N ringsResolution: 360°/2N
To avoid reading ambiguities binary codes with single variations (Gray code) are usedIn robotic applications at least 12 rings are used (360°/4096)
30
What is perceived?
Sensor may be classified according to what they measure
– distance– proximity– contact– force and torque– vision – position
31
Distance Perception
Measure the distance between a reference point and object placed in front of the sensorHuman beings use stereo-vision, while other animals (like bats, dolphin, and whales) use echolocationKnowing the distance of the surrounding objects is useful for obstacle avoidance and for more complex planning activity
32
Distance Perception: Reflective Optosensors
An ease way to compute distance is to use triangulationReflective optosensors are active sensors
– emitter: a source of light (LED, light emitting diodes)– detector: a light detector (photodiode or
phototransistor)
The emitter scans the surface with a beam of lightThe detector measure the angle corresponding to the maximum intensity of lightCalling s the distance between the emitter and the detector, the distance from the object is computed as
d=s
tanαi
33
Distance Perception: Kinect
Kinect is a motion sensing input device built by Microsoft for Xbox 360A cheap device that provides several sensing informationUsed in many robotic research studies Provides
– 30Hz 8-bit RGB camera (640x480)– 3D scanner
● Infrared projector● Infrared camera (11-bit 640x480)● Range 1.2 – 3.5 m (up to 0.7-6 m)● Angular field of view: 57° h, 43° v
– Multi-array microphone
34
Distance Perception: Phase Shift Telemeter
The light emitted is split into two parts– against the object– against a mirror placed inside the sensor
The beam follows different optical paths and the two reflected waves have different phasesThe distance of the object must lead to phase displacement within [0°;360°]Laser wavelength is around 1e-6mAcoustic waves are not directionalThe solution is to modulate the laser light with a wave characterized by a long wave length
35
Distance Perception: Time-of-Flight Telemeter
It measures the time between the instant the emitter produces the signal and the instant the detector receives its reflectionThe distance covered by the signal is 2dThe time is ΔT = 2d/cThe speed of light is too high for robotic applicationsAcoustic waves are better (v=340 m/s)
– are characterized by low directionality (20 – 40°)– the reflection is dumped and the signal is largely
affected by noise– Polaroid ultrasonic sensors
● range 0.3 – 10m● accuracy 0.025m● cone opening 30°● Frequency 50 KHz
36
Proximity Perception
Proximity sensors measure the presence of objects within a specified distance rangeThey are used to grasp objects and avoid obstaclesSensors
– ultrasonic (low cost)– inductive (perceive only ferromagnetic materials under
the distance of 1mm)– Hall effect (perceive only ferromagnetic materials, may
be small, robust, and cheap)– Capacitive (perceive any object, binary output, high
accuracy only when calibrated for a particular object)– Optical (infrared light, binary output)
37
Tactile Sensors
These sensors are used for manipulation purposesTwo main categories
– binary● are realized by switchers ● typically they are placed on the fingers of a manipulator● they may be arranged in arrays● may be placed also on the external side of the hand to
avoid obstacles– analogical
● soft devices that produce a signal proportional to the local force
● typically realized with a spring coupled with a shaft● otherwise soft conductive material that change its
resistance according to its compression● there are sensors that measure also movements
tangential to the sensor surface
38
Force and Torque Sensors
Typically these sensors are used at joint level and in the wristFor joints driven by DC motors the force is measured by the currentThe measure of the strain is based on elasticity6 parameters in the Cartesian space
– 3 forces along axes– 3 torques around axes
Very expensive
39
Position Sensor
The main sensor to determine the absolute position of a robot is the Global Positioning System (GPS)
– 21 satellites– it is based on the flying time of a radio signal– At least 4 sensors must be perceived– Measuring rate is 2Hz– Accuracy is about 1.5m– with DGPS accuracy arrives at about 2cm
Unfortunately GPS sensors may not be used in indoor environments, underground, underwater, or in urban situations with skyscrapers
40
Inertial Sensor
Gyroscopes– Angular velocities
Accelerometers– Gravitational vector
Magnetometers/compass– Magnetic field vector
Used in many mobile and console devices
41
Sensor Fusion
A man with one watch knows what time it isa man with two watches isn't so sure
To have a better representation of the world we need to combine measurements from multiple sensors that present also redundancySensor fusion is a complex problem
– different sensor accuracy– different sensor complexity– contradictory information– asynchronous perception
Cleverness is needed to put this information together