Top Banner
Sensors - 1 Intro to Sensors
34

Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Dec 23, 2015

Download

Documents

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
Page 1: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 1

Intro to Sensors

Page 2: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 2

Physical Principles of SensingGeneration of electrical signals in response to nonelectrical influences

• Electric Charges, Fields and Potentials• Magnetism• Induction• Resistance• Piezoelectric Effect• Pyroelectric Effect• Hall Effect• Seebeck and Peltier Effects• Mechanical Measurements• Sound Waves• Optical Properties of Material

Page 3: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 3

Physical Principles of SensingGeneration of electrical signals in response to nonelectrical influences

• Electric Charges, Fields and Potentials– Coulomb’s Law

• Capacitance

• Magnetism– Faraday Law

• Induction– Varying magnetic field produces a current

• Resistance– Electrical resistance

• Piezoelectric Effect– Generate an electric charge due to stress

• Pyroelectric Effect– Generate an electric charge due to heat

• Hall Effect– Interaction between moving electric carriers and an external magnetic field

• Seebeck and Peltier Effects– The basis for a thermocouple

• Mechanical Measurements– Kinematics, Dynamics, Time

• Sound Waves• Optical Properties of Material

qC

V

1 22

1

4

q qF

r

q F v B

Page 4: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 4

Resistive Sensors

• Potentiometers– Symbol:

• Strain Gauges (Piezoresistive Effect)• Resistive Temperature Detectors

– Metals (Linear, positive temperature coefficient)– Symbol:

• Thermistors– Semiconductors (non-linear, negative temp coef)– Symbol:

+tº

-tº

Page 5: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 5

Resistive Sensors

• Light-Dependent Resistors– Symbol:

Cadmium Sulfide Photoresistor

How would you:1.increase reaction time?2.increase sensitivity?

Page 6: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 6

Packaging

Page 7: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 7

Signal Conditioning for Resistive Sensors

• Voltage Divider

• Differential Amplifiers

• Instrumentation Amplifiers

+ v–

R1

R2v2

Page 8: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 8

Capacitive Sensors

SENSORS AND SIGNAL CONDITIONING, 2nd Edition, by Ramon Pallas-Areny and John Webster.

Page 9: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 9

Electromagnetic Sensors

• Sensors based on Faraday’s Law

• Hall Effect Sensors

q F v B

Electronic Compass

Magnetic Field Sensor Board Uses a 3A Hall-effect sensor

Page 10: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 10

Piezo Gyro

Piezoelectric Sensors

• Appearance of electric polarization in a material that strains under stress, and vice versa.

• No DC component (a constant stress initially generates a charge that slowly dissipates)

Accelerometer

Page 11: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 11

Pyroelectric Sensors

• Change in temperature causes a change in electric charge

• Fast (thin with high sensitivity)

• Incident radiation must be modulated due to parasitic charges that may neutralize the surface charge induced

Page 12: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 12

Distance Sensors

• IR Distance Sensor

• Sonar

IR Distance Sensor

Hagisonic StarGazer Robot Localization System

Page 13: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 13

Actual Differential Photocell Sensor Schematic

Differential Sensor+5V

Rphoto1

Rphoto2

Vsensor

47K

Page 14: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 14

Statistical Considerations• How many times do you need to sample a

sensor?

– Mean ()

• What is the error?– Variance (2)– Standard Deviation ()

• Problem: definition of requires us to know the distribution’s mean, , not the approximation

i

ixNx

1

22 )(1

iixN

x

Page 15: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 15

Statistical Considerations

• Thought:– Expect

• Consider Degrees of Freedom and redefine:

22 x

22 )(1

1xx

N iix

Page 16: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 16

Cd Sensor Homework

0

255

-90 90Angle

Analog ReadoutHandyboard

Page 17: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 17

0

255

-90 90

Light to the Right

Light to the Left

AmbiguousRegion

AmbiguousRegion

OK!

How to Follow a Light Source

1. Determine the Unique Cd Sensor Parameters (Homework)2. Rotate until light is located (How do you know the light has been found?)

Page 18: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 18

What would you select for:•Upper limit•Lower limit

Page 19: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 19

What would you select for:•Upper limit•Lower limit

Page 20: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 20

CdS Structure

Page 21: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 21

The Search Behavior

Exploring the use of PID Controllers

Page 22: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 22

0

1023

-90 90

Light to the Right

Light to the Left

AmbiguousRegion

AmbiguousRegion

OK!

CdS Homework / Lab

Homework : Determine the thresholds for each region

Lab: Program the robot to follow the light!

Page 23: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 23

0

1023

-90 90

Light to the Right

Light to the Left

Search Analog Readout Limits

Upper Limit

Lower Limit

Page 24: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 24

0

1023

-90 90

Light to the Right

Light to the Left

Search Reduced Limits → Reduced Oscillations?

Upper Limit

Lower Limit

Page 25: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 25

0

1023

-90 90

Light to the Right

Light to the Left

Search The Limit

Setpoint Limit

Page 26: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 26

A Short Introduction to Modern Control Theory

Control Plantu(t) e(t) d(t) y(t)

Page 27: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 27

1023

Light to the Right

Light to the Left

Search LabUsing a PD Controller

Setpoint LimitMake the speed of the turns proportional

to the distance from the setpoint

power = reading - setpoint

0

When is power negative?When is it positive?

How would you implement this in your Search code?

Page 28: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 28

Implementing Proportional Feedback Control“Follow” Motor Command

power = reading – setpoint

• If power > 0, Turn ?• If power < 0, Turn ?

{ motor( left_motor, );

motor( right_motor, );

}

Page 29: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 29

Proportional FeedbackHow to increase the speed of the correction?

power = pgain*(reading – setpoint)

Page 30: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 30

Proportional FeedbackHow to increase the speed of the correction?

power = pgain*(reading – setpoint)

Problem:Instability – can begin oscillating with ever increasing amplitude

Page 31: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 31

Modification: Add Differential Controls

PD Controllers use both proportional and differential controls. Think of differential control as a velocity term. If you need to change direction and your velocity is large, you do not need as large of a correction compared to when the speed was low.

Page 32: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 32

Modification: Add Differential Controls

power = pgain*(reading – setpoint) - dgain*velocity

where velocity = (reading – old_reading)

PD Controllers use both proportional and differential controls. Think of differential control as a velocity term. If you need to change direction and your velocity is large, you do not need as large of a correction compared to when the speed was low.

Page 33: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 33

Summary of PID Controller Characteristics

Controller Benefits Drawbacks

P Simple

Cheap

Steady state error

Large overshoot & settling time

Poor transient response

Prone to instability (large gains)

I Eliminates steady-state error Poor damping

Large overshoot & settling time

Poor transient response

Reduces stability

D Increases damping

Reduces overshoot

Reduces settling time

Improved transients

Improves stability

Steady-state error

Cannot be used alone

Page 34: Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric.

Sensors - 34

Lab Report

Be sure to contrast and compare how the robot performs using:

– Thresholds (e.g., no controller)– Proportional Controller – Proportional-Differential Controller

PS Bring a Bright light with a Wide beam(12V flashlight if available!)