Embedded Controls Intro W09
Embedded Controls Intro W09
Embedded Controls Intro W09
Laboratory description
Freescale MPC5553 microcontroller
Software development environment
Haptic interface
Lecture Topics
Laboratory Exercises
What is an Embedded System?
Technology containing a microprocessor as a
component
cell phone
PDA
digital camera
Multi-disciplinary!
Industry Trends
Increasing complexity of embedded control systems and
software
Actuators, sensors, processors, networks
Typical small car contains ~70 microprocessors
* Industry Needs for Embedded Control Education, Tutorial Session 2005 ACC
J. Freudenberg (UM), B. Krogh (CMU), J. Cook (Ford), K. Butts (Toyota), J. Ward (Eaton)
An Embedded Design Team
May consist of:
Applications engineers
Model the systems to be controlled, design control
algorithms
Hardware specialists
Low-lever drivers and other hardware specific design
Software engineers
Write C code from specifications given to them by
applications engineers
Applications engineers, hardware engineers
and software engineers have to communicate!
Languages
Some assembly language
device drivers, highly optimized code
Most coding done in C
interest in C++ and Java, but too much overhead for
highly constrained applications
Automatic code generation
automatically generate C code from a Matlab/Simulink
model used to design and test control algorithm
currently useful for rapid prototyping on non-production
processor
also used for high end applications (NASA)
MPC5553/5554 Examples: Automotive
Applications
Powertrain
Fuel and ignition control
Aftertreatment control for diesels
Valve control, turbocharger control, transmission control
including CVT
Control of hybrid-electric powertrains
Safety
ABS, traction control, electronic stability control, rollover
control
Lots of I/O: sensors & actuators
Real time critical: performance & safety
Harsh environment (EMI, noise, vibration, temperature)
Automotive Distributed Systems:
Mobile Networking
High-speed CAN
Low-speed CAN
Local Interconnect Network
(LIN)
Media Oriented Systems
Transport (MOST)
Bluetooth
Intelligent Transportation
System Data Bus (IDB 1394)
FlexRay, Time-triggered
CAN
Application of the MPC555 (predecessor of
the MPC5553)
SeaScan transoceanic pilotless aircraft
ScanEagle Intelligence, surveillance and reconnaissance support;
USS Oscar Austin (DDG 79) Guided Missle Destroyer
The Insitu Group: www.insitu.com
Laboratory Overview
MPC5553 Microcontroller (Freescale)
Originally automotive control, now used in many
applications
Development Environment
Debugger (P&E Micro)
Codewarrior C compiler (Freescale)
Haptic Interface
Force feedback system for human/computer interaction
Rapid Prototyping Tools
Matlab/Simulink/Stateflow, Real Time Workshop (The
Mathworks)
RAppID Toolbox (Freescale)
Real Time Operating System
OSEKturbo RTOS (Freescale)
Freescale MPC5553 Microcontroller
32 bit PPC core
floating point
132 MHz
-40 to +125 HC temperature range
Programmable Time Processing Unit (eTPU)
Additional, special purpose processor handles I/O that would otherwise
require CPU interrupt service (or separate chip)
Quadrature decoding
Pulse Width Modulation
Control Area Networking (CAN) modules
2nd member of the MPC55xx family
real time control requiring computationally complex algorithms
MPC5554 replaces MPC555 for powertrain control
MPC5553 has on-chip Ethernet for manufacturing applications
MPC5553 EVB
* D. Sordid and S. K. Moore, The Virtual Surgeon, IEEE Spectrum, July 2000.
** J. Rosen and B. Hannaford, Doc at a Distance, IEEE Spectrum, October 2006.
Force Feedback
Haptic Wheel
Prof. Brent Gillespie, Mech Eng Dept, UofM
DC motor
PWM amplifier w/ current controller
optical encoder
128/18 gear ratio
Haptic Wheel
(New and Improved for 2009)
Virtual Environments
Virtual wall
Virtual spring-mass
Steer-by-wire Automobiles
&& + mk w =
w k
m z
z
w
k
&&w + Jk z =
w
k
Jw z
Jw
OSEK/VDX compliant
Scalable
Task scheduler
Priority ceiling protocol
Eliminates
deadlock
priority inversion
RAppID Toolbox (Freescale)
Processor and peripheral initialization blocks
Device driver blocks
Enables multitasking with OSEKturbo RTOS
or nested interrupts
RAppID-EC
Lab 8: Two virtual wheels
Two subsystems:
High priority fast subsystem
Low priority slow subsystem
Model the multi-rate system in Simulink
Demonstrate real-time operating system
(RTOS)
Project (at UM):
Adaptive Cruise
Control
Distance Control
Follows target at timed
headway in ACC mode by use
of throttle and brakes
Speed Control
Automatically returns to cruise
set speed when target clears
Headway Path
Adaptive Cruise
Sensor determination
Control Algorithm
algorithm
Project: Adaptive Cruise Control
Driving simulator
Bicycle model of vehicle
6 vehicles interacting
over CAN network
ACC algorithm: 3 states
manual (sliding pot)
constant speed
constant distance
Takes 3+ weeks, all done
with Simulink, Stateflow, and
autocode generation