Real-time controls prototyping

During the spring semester, I had the opportunity to teach a real-time control development course. Our target area was automotive systems, and I wanted to take students through a complete cycle of development from prototyping to deployment on an embedded system. The ultimate task for the students was to develop a real-time air flow controller for an engine using actual mass air flow (MAF) sens...


During the spring semester, I had the opportunity to teach a real-time control development course. Our target area was automotive systems, and I wanted to take students through a complete cycle of development from prototyping to deployment on an embedded system.

The ultimate task for the students was to develop a real-time air flow controller for an engine using actual mass air flow (MAF) sensors and electronic throttle body valves (ETVs) implemented on a 32-bit ARM processor. The development platform that made it possible was LabVIEW real-time. Many of the students did not have any LabVIEW programming experience, so they also had to learn to program LabVIEW. For the first couple of weeks we reviewed PID control concepts and signal processing. For homework, the students went through the self-paced LabVIEW tutorials. By the third week, we were ready to start programming in real-time.

For their first set of labs, the students were given a Bosch ETV and told to determine its characteristics and dynamics using the LabVIEW system ID tool kit and manufacturer specifications. Once I/O and system parameters were understood, the teams of two were told to control the position of the ETV. The feedback mechanism on the ETV is a potentiometer, so they controlled position by measuring the resistance value on that sensor. A PID control was implemented on the valve position. After tuning, the students learned that a PI control was the actual way to go, as the D gain was virtually zero.

Initial programming was done on a 400 MHz Power PC operating on a Compact RIO (cRIO). To give the students a feel for changing target processors, the FPGA (3 million gate, 40 MHz clock) on the cRIO was used as a second target. The only real change that the students needed to make was to avoid any floating point calculations on the FPGA, which was quite easy. Neither the Power PC nor the FPGA were taxed at all by the control requirements. Finally, the target was changed to the ARM processor (ARM7TDMI-S based high-performance 32-bit RISC Microcontroller with Thumb extensions). We were expecting to have to keep the integer programming limitation from the FPGA, but to our surprise, the ARM processor had a nice floating point emulator that worked quite well for our purposes.

Generating the flow

The next step was to insert the MAF into the feedback loop. To do this, a large fan was used to generate the flow that would normally be seen by an operating automobile engine. The MAF output is a frequency proportional to the rate of airflow. To simplify the programming of the overall system, a frequency to voltage converter chip was used.

Within a few days, the students were controlling the air flow without any problem. They did have to retune their controllers because of the inherent lag in the actual system. However, this was easily done with the system ID and control design tool kits. For their final exam, I provided them with a Delphi ETV rather than a Bosch. They had to redesign their controllers, within a week, to yield the same performance as the Bosch ETVs. This type of hardware replacement happens quite often in reality, so I thought that I would give them a taste of the real world. Well, I should have given them only a few hours to make the changeover, as most of them were done in less than one day.

So the lesson that the students, and I, learned was that with the new generation of rapid prototyping tools for controllers, development and deployment is easy and quick. You still need to understand controls and modeling; that was clear by the many times the students' ETVs started flapping in a very unstable mode.

Finally, I did make it clear to the students that this was really a prototype development situation. The actual production system would probably employ a custom programmed processor to fully optimize system performance at the lowest price. I really do not foresee LabVIEW real-time running on every car on the road, but it is tempting!

Author Information
Thomas R. Kurfess, Ph.D., P.E. teaches at Clemson University's International Center for Automotive Research in Greenville, SC. He welcomes donations of other products for his students to review and apply, and can be reached at .

The Top Plant program honors outstanding manufacturing facilities in North America. View the 2015 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
Doubling down on digital manufacturing; Data driving predictive maintenance; Electric motors and generators; Rewarding operational improvement
2017 Lubrication Guide; Software tools; Microgrids and energy strategies; Use robots effectively
Prescriptive maintenance; Hannover Messe 2017 recap; Reduce welding errors
The cloud, mobility, and remote operations; SCADA and contextual mobility; Custom UPS empowering a secure pipeline
Infrastructure for natural gas expansion; Artificial lift methods; Disruptive technology and fugitive gas emissions
Mobility as the means to offshore innovation; Preventing another Deepwater Horizon; ROVs as subsea robots; SCADA and the radio spectrum
Research team developing Tesla coil designs; Implementing wireless process sensing
Commissioning electrical systems; Designing emergency and standby generator systems; Paralleling switchgear generator systems
Natural gas engines; New applications for fuel cells; Large engines become more efficient; Extending boiler life

Annual Salary Survey

Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.

There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.

But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.

Read more: 2015 Salary Survey

Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Society for Maintenance and Reliability Professionals an organization devoted...
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.
The maintenance journey has been a long, slow trek for most manufacturers and has gone from preventive maintenance to predictive maintenance.
Featured articles highlight technologies that enable the Industrial Internet of Things, IIoT-related products and strategies to get data more easily to the user.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.
Maintenance Manager; California Oils Corp.
Associate, Electrical Engineering; Wood Harbinger
Control Systems Engineer; Robert Bosch Corp.
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me