Summary Lecture - IEEE Real World Engineering Projects

Smart Vehicles – Summary
 Leyla Nazhand-Ali, Ph.D.
 Assistant Professor
 IEEE member
 Michael Henry
 Graduate Student
1
This Talk
• We will review some topics that we discussed last
week
–
–
–
–
–
Autonomous vehicles
Embedded microprocessors
Programming an autonomous toy car
Infrared sensors
Square waves
• We will also talk about some new concepts:
– Closed loop control
– Design tradeoffs
Decision
Input
Output
Environment
Review: Why We Need Autonomous
Vehicles?
Review: What are Autonomous
Vehicles?
• A fully(semi)-autonomous vehicle can perform all (some) of
its actions without any human control.
• Commercial vehicles already perform many automatic
actions such as anti-lock brake, cruise control, lane
departure warning, …
• Research vehicles have been able to drive themselves in
urban-like areas.
Review: How is Autonomy Achieved?
• In a car, autonomy achieved similar to the way it is
achieved by humans:
– First, we sense the environment
– Second, we process the data we collected through our
senses (Yes, we do use our brains, at least sometimes!)
– Third, we act based on the decision we made
sensors
Controller
(microprocess
or)
actuators
Review: Embedded Microprocessors
• Embedded microprocessors are the
brains of real-time systems, which
execute deadline-based tasks.
• They are usually smaller, cheaper,
easier to program and develop, and
consume less power compared to
general-purpose microprocessors that
are used in PCs.
• They are more reliable and failure
resistant, which is crucial in
embedded systems.
• You probably own dozens, maybe
more than a hundred of them.
Review: State Table
• State tables are a way of
making decisions.
• They are used for programming
and are heavily used in
designing digital hardware.
• For every possible input,
specify the output.
• With the car, the input is the
infrared sensors and the output
is the motors.
• Good for problems with a small
amount of input.
Input
(IR sensors)
Output
(Motors)
Left
Right
Left
Right
White
White
Forward
Full
Forward
Full
Black
Black
Reverse
Full
Reverse
Full
Black
White
Forward
Half
Reverse
Half
White
Black
Reverse
Half
Forward
Half
Review: Infrared Sensing
IR transmitter
• Infrared (IR) is invisible light.
• IR sensor on car transmits IR light
and measures how much bounces
back.
• Black surfaces absorb a lot of light
Black Surface
and reflect little.
• White surfaces reflect a lot of light.
• Based on how much is reflected, the IR transmitter
processor can determine what
surface the sensor is over.
White Surface
Other Sensors Similar to IR Sensor
• With IR sensing, you are sending out
IR light and measuring its response.
• RADAR works by sending out radio
waves and measuring the response.
• LIDAR and SONAR work like RADAR,
but with light and sound, respectively.
• Barcode readers detect black and
white, similar to your project, but they
use visible light.
Review: Square Waves
• Square waves are used to
feed the motor and make it
turn.
• Period is the length of time it
takes to complete one cycle.
• Frequency is how many times
per second the wave
completes a cycle.
• Duty Cycle is the ratio of time
the wave spends being high
and the period of the wave. It
is usually expressed as a
percentage.
One cycle
5V
0V
Period
5V
0V
50% duty cycle
5V
0V
75% duty cycle
1 / Period = Frequency
Sawtooth
Triangle
Square
Voltage
Sine
Voltage
• Waves come in different
shapes.
• Sound travels in a wave.
• AM radio uses changes in
amplitude of the wave to
send data.
• FM radio uses changes in
frequency to do so.
• We use the same
principles to use square
waves for controlling
motors.
Voltage
Other Wave Shapes
5V
0V
Closed Loop Control
• Control of the car can be simplified by thinking of the
control as being a closed loop.
• The sensor provides data from the environment to the
decision maker that starts an action, which in turn, affects
the environment.
Decision
Input from Sensor
Output using Actuator
5
V
Environment
Think, Pair, Share Activity
• Consider the automatic thermostat in your home, which is
responsible to keep the temperature at a certain point.
• Come up with the closed loop that governs this system.
• Identify the input, the output, the decision maker and the
environment variable.
Decision
Input
Output
Environment
Design Tradeoffs
• Most engineering problems involve
design tradeoffs.
– Cost vs. Time: More expensive
equipment will sometimes get the job
done faster.
– Cost vs. Reliability: Expensive parts
break less.
– Time vs. Quality: A project that’s
rushed will not be as high of quality.
• Recognizing and controlling design
tradeoffs is one of the most
important tasks of an engineer.
Design Tradeoffs in Autonomous
Vehicle Project
• In Task #3, there is a tradeoff between the “accuracy
(quality)” of your solution and the speed.
• Drive the car too fast and it will frequently go off course
and need correction.
• The fastest speed setting does not necessarily achieve
the fastest completion time!
Design Tradeoffs in Autonomous
Vehicle Project
• In some design problems, we have to sacrifice
speed, quality and all other design objectives in
order to achieve dependability and reliability.
• With task #4 we sacrificed navigation speed by
using the right hand rule, but made the problem
solvable and guaranteed reaching the destination.
2
1
Even Discoveries Involve Tradeoffs
• For the Infrared discovery activity, you tried to
measure the reflectivity threshold of the sensors.
• Trying to do the measurement quickly by moving
the car on the fastest setting results in a less
accurate number.
80%
70%
60%
50%
40%
30%
20%
10%
Back to Autonomous Vehicles
• Everything you learned and
applied is involved in the
autonomous design process.
– Sensor input (IR sensors)
– Controlled output (Motors and
Waves)
– Decision Making (State Tables)
– Reliability/Fault Tolerance
(Embedded Systems)
Some other Thoughts
• By now you should have realized that the
autonomous design process includes many
diverse engineering topics.
• A successful design benefits from
collaboration of many different fields.