Training engineers: Designing embedded control systems for auto apps

Jim Freudenberg and Jeff Cook

January 25, 2010

Jim Freudenberg and Jeff CookJanuary 25, 2010

In 1999, senior research engineers at one of Detroit's "Big Three" automotive OEMs drew our attention to the shortage of graduating seniors fully prepared for careers in embedded systems engineering. While new electrical engineers have a good grasp of signal processing and control theory, many have never implemented a control system on an embedded processor. Likewise, recent graduates in computer engineering understand microprocessor hardware and programming but are less familiar with control design, signal processing, and the challenges of implementing real-time embedded systems.

The key to bridging this gap was to educate teams of electrical and computer engineers to collaborate on cross-disciplinary projects, where they learn to develop algorithms and implement them on hardware. Under the guidance of Detroit engineers, and with the invaluable assistance of numerous graduate students over several years (especially Noah Cowan, now a professor of mechanical engineering at Johns Hopkins University), the University of Michigan developed an elective course for seniors and first-year graduate students in both engineering disciplines. Throughout the semester-long course, students are exposed to industry-standard tools and technologies, and to model-based design for embedded control systems.

EECS 461: Embedded Control Systems

The course is built around a series of labs employing the Freescale MPC5553 microprocessor and a "haptic wheel" designed by Professor Brent Gillespie in the Department of Mechanical Engineering.

Students use the knowledge gained in eight laboratory exercises over the course of a semester to design and implement a driving simulator using the haptic wheel to steer a mathematical vehicle model along a virtual road. Ultimately, every team's driving simulator is connected via a controller-area network (CAN) and simulated on a single road. Students implement an adaptive cruise controller to maintain a preset distance between virtual cars on the road.

In the lab, students use Simulink to design controls for the haptic wheel. A haptic wheel is a force feedback system that enables human-computer interaction through the sense of touch. Fundamentally, it is a physical wheel driven by a DC motor. An optical encoder provides position information for feedback.

In the lab, students use Simulink to design controls for the haptic wheel. A haptic wheel is a force feedback system that enables human-computer interaction through the sense of touch. Fundamentally, it is a physical wheel driven by a DC motor. An optical encoder provides position information for feedback.

EECS 461 incorporates three hours of lectures and three hours of laboratory work each week. We introduce each new system and control concept in the lecture, typically with a homework assignment employing Simulink and Stateflow. The concepts are then applied in the lab using a different peripheral device on the MPC5553 each week. For most of the course, students interface with hardware and implement algorithms by hand-coding in C. This helps them understand the microprocessor architecture, the operation of peripheral devices, and the intricacies of low-level device-driver programming.

In the first lab, students employ a University of Michigan"designed interface to the microprocessor containing two banks of digital input DIP switches and a bank of LED displays connected to digital output pins. The exercise is straightforward: Two binary values are input using the DIP switches. The values are summed, and the result output to the LEDs. In subsequent labs, students program queued analog-to-digital conversion and examine issues of sampling and signal aliasing. They use the optical encoder and quadrature decode function of the MPC5553-enhanced Time Processing Unit (eTPU) to measure the position of the haptic wheel. In a related homework problem, students model the quadrature decode operation of the microprocessor using Stateflow.

In the fourth week, students program the MPC5553 to generate a pulse width modulated (PWM) signal to control the speed and direction of the haptic wheel and implement two simple haptic virtual worlds: a virtual spring, in which a restoring torque is generated proportional to the wheel angular displacement, and a virtual wall, in which the wheel is permitted to rotate freely up to a specified displacement, at which point the motor generates a strong restoring force, or virtual wall.

The following lab introduces interrupt processing: A sine wave from a signal generator is periodically sampled and its value used to modulate the duty cycle of a PWM signal. The input signal is then reconstructed from the PWM signal using a low-pass filter to attenuate the high-frequency content, leaving only the sinusoidal modulation frequency. Concurrently, students model the DC motor in Simulink and investigate PWM motor control in simulation.

< Previous
Page 1 of 2
Next >

Loading comments...

Most Read

  • No Articles

Most Commented

  • Currently no items

KNOWLEDGE CENTER