PLCs, DCSs & Controllers


FPGA-based engine control system

August 2005 PLCs, DCSs & Controllers

Automotive control and data acquisition solutions provider, Drivven, needed

reliable, high-performance hardware to prototype an engine control system for a 2004 Yamaha YZF-R6 motorcycle. Engine control requires deterministic loop times on the order of milliseconds and precise fuel and spark timing on the order of microseconds. In addition, the target engine revs to 15 500 RPM. At this speed, there is less than 4 ms per crankshaft rotation, and the system must precisely control fuel and spark events in the angle domain to less than 1°.

Drivven specialises in automotive intellectual property (IP) for FPGAs. Its large library of IP includes cores for tracking the angular position of crankshafts from a variety of position sensing formats and generating precise angle-based fuel and spark commands. The company aims to provide a seamless path from prototype to production for FPGA-based power train controllers.

Limited space on a motorcycle

Because this path includes early stages of prototyping, where flexibility and computing power are paramount, Drivven often chooses PC-based hardware. For this project, Drivven chose a four-slot NI CompactRIO embedded system because of its flexibility, small size, and rugged form factor. With this system, Drivven could easily add sensors and actuators while quickly and easily visualising the data. The controller could also be mounted in the extremely limited space available in a super-sport motorcycle. The project consisted of three major phases.

Phase 1: Custom I/O module development

Drivven created three custom CompactRIO I/O modules. The first module provided 22 single-ended, 12-bit analog inputs, two variable reluctance (VR) sensor inputs, and two hall-effect sensor inputs. This was named the A/D Combo Module. This module implemented low-pass analog filters as well as over/undervoltage protection on all inputs.

The second module provided four channels for driving low-impedance port-fuel injectors and four low-side, inductive-load switches for driving general-purpose solenoids. Each channel could be diagnosed for open or short circuits and disabled appropriately without CPU intervention. The third module provided eight low-side inductive-style drivers for ignition coils.

Each module was designed with cost sensitive circuitry for the purpose of prototyping for a production-oriented control system. As a result, developers can realise the same I/O behaviour in both prototyping and production stages. These three modules monitored all of the motorcycle sensors and controlled its actuators. Drivven is currently developing additional CompactRIO modules for power train control applications, including modules for driving electronic throttle bodies and interfacing with universal exhaust gas oxygen sensors.

Phase 2: Mapping the factory ECU

In this phase, Drivven carefully tapped into critical motorcycle sensors and actuators using CompactRIO, and logged the signals and events at 200 Hz to the CompactRIO flash file system. These signals and events included intake air pressure and temperature, barometric air pressure, coolant temperature, throttle position, crank position, cam position, fuel injection start angle and pulse width, and spark advance. Drivven's FPGA-based engine management VIs were used to track the position of the crankshaft (0,3° resolution) and capture the angle-based timing of the fuel injection and spark events. A low-budget mapping exercise was performed with a rider on a long, straight road with little or no traffic, so it was not necessary to remove the engine from the motorcycle and install it on a dynamometer.

The ECU data was recoded to 1 MB files (up to 20 files at 1 file per minute) while riding the bike at many different combinations of throttle position and engine speed (nearly 700 operating points) to fully map the behaviour of the factory ECU. The rider carefully drove the motorcycle in a manner to reduce transient operation as much as possible.

Periodically, an engineer in a chase vehicle would wirelessly FTP the data files from the CompactRIO to a laptop and analyse them immediately for coverage of operating points. A laptop-based NI LabVIEW application quickly sorted the data into speed/load operating tables while filtering out transient data. A mean and standard deviation was calculated from the data for each operating point. In two hours, the team acquired data for 90% of the motorcycle's operating points, which was ample coverage for fully understanding the mapping of the factory ECU. Later, in the lab, engineers processed the data with LabVIEW again, which provided 3D and 2D visualisation while graphically modifying the raw data to fill in the missing operating points.

Phase 3: Engine control

In the final phase, CompactRIO was used to prototype a research-oriented ECU, achieving performance comparable to the factory ECU, yet providing the ability to carry out future control algorithm research and development, which is not possible with production-oriented electronics.

With CompactRIO, Drivven implemented several of its engine management FPGA cores, which all have configurable LabVIEW FPGA icons placed on the block diagram. These same cores can be ported directly to production FPGA-based controllers. Using LabVIEW Real-Time, a combination of speed-density and alpha-N engine control strategies commonly found in high-performance race applications was implemented.

A speed-density engine control method monitors the intake air pressure and temperature to calculate the theoretical mass (density) of air that enters the combustion chamber on each cylinder's cycle. The speed of the engine, however, will affect the actual mass of air that enters the chamber (due to various restrictions and tuning effects of the air intake and exhaust tracks).

Users can characterise this behaviour by a one-dimensional lookup table of volumetric efficiency (Ve) values versus engine speed. Then users can calculate a fuel injection mass based on the fuel's stoichiometry (for gasoline, about 14,7 parts air to one part fuel).

Many passenger car engine controllers use speed-density for open-loop control until emissions subsystems are operational for closed-loop control. The advantage of speed density is that when making a modification to the intake or exhaust systems, only the Ve table must be modified to account for the changes in volumetric efficiency.

An alpha-N engine control method is simpler because it looks up the empirical mass of air for each throttle angle (alpha) and engine speed (N) operating point, which results in a two-dimensional look-up table of several hundred points. Many high performance and racing engine controllers must rely on this method because the intake air pressure will not have enough variability over the entire throttle/load range in order to effectively use a speed-density method. When users make mechanical modifications to these engines, many or all of the operating points must be recalibrated.

A combination of these control strategies was used by applying speed density to low-speed and low-load operating points - where intake air pressure had the most variability. An alpha-N method was applied to the rest of the operating map. After Yamaha's use of sensors on the production motorcycle was noted, it was determined that the factory ECU was likely implementing a similar strategy. The data acquired in the mapping phase was used to calibrate these control strategies.

On time - on budget

Experienced riders could not identify significant differences between the factory ECU control and the prototype control. Most importantly, this level of control was achieved without dynamometer time. The goal of prototyping a motorcycle ECU was successfully achieved on time and on budget.

Savings

In past projects, Drivven had spent at least two man-years and $500 000 to develop similar ECU prototyping systems from custom designed hardware. For this project, the equipment costs, including the motorcycle and CompactRIO, were $15 000. The project took approximately three man-months. CompactRIO and LabVIEW Real-Time delivered the reliability and precise timing resources required, and the system was rugged enough to withstand the high temperatures and high vibration of the operating environment.

For more information contact Michael Hutton, National Instruments, 011 805 8197.





Share this article:
Share via emailShare via LinkedInPrint this page

Further reading:

Innovating control and display solutions
PLCs, DCSs & Controllers
Mimic Group, founded in 1971, started with electronic and mimic displays before expanding into control desks, software and display electronics.

Read more...
ABB technology for greater circularity in metals and mining industries
PLCs, DCSs & Controllers
ABB has been selected by GreenIron, an innovative Swedish company working in the mining and metals industries with its patented materials reduction technology, to provide automation and control system solutions for a first commercial facility in Sandviken, Sweden.

Read more...
EtherCAT Box modules for confined spaces
Beckhoff Automation PLCs, DCSs & Controllers
Users of EtherCAT and EtherCAT P Box modules from Beckhoff’s EP and EPP series benefit from 25 years of IP67 expertise in the I/O sector. The broad product range for decentralised distribution of the I/O level directly at the machine or system has been continuously expanded and further developed during this time.

Read more...
ABB updates distributed control system
ABB South Africa PLCs, DCSs & Controllers
Leveraging 30 years of continuous innovation and reliability, ABB’s updated Freelance 2024 distributed control system (DCS) offers greater plant adaptability, faster and more reliable device communication, improved system security, and seamless data exchange.

Read more...
Four ways modern operations control can boost sustainability and efficiency
PLCs, DCSs & Controllers
With the growing importance of digital transformation, HMIs and scada have evolved from control panels to vast operational hubs. Next-gen HMI/scada can bring together data, personalisation, and advanced insights to successfully achieve organisational goals, it is important to think about HMI/scada holistically within the operations ecosystem.

Read more...
The convergence of intelligence: DCS, SCADA and TLC
Schneider Electric South Africa PLCs, DCSs & Controllers
In the early days of industrialisation, control systems were primarily mechanical, and relied on manual intervention and simple feedback loops to manage processes. Now, in the 21st century, industrial process automation systems are mind-blowingly intelligent, and provide almost unparalleled control and monitoring capabilities, making them integral to modern industrial systems.

Read more...
PC-based control for advanced hydrogen storage technology
Beckhoff Automation Editor's Choice PLCs, DCSs & Controllers
The proportion of renewable energies from solar, wind and water is rising continuously. However, sufficient storage options are of the essence to use these energies as efficiently as possible. GKN Hydrogen offers a particularly compact and safe option, low-pressure metal hydride hydrogen storage systems with PC-based control from Beckhoff.

Read more...
ABB modernises key board mill
ABB South Africa PLCs, DCSs & Controllers
ABB has secured a landmark contract to modernise Smurfit Kappa’s Paper Machine 5 at its corrugated cardboard mill near Mexico City. ABB will provide Smurfit Kappa with DCS, accompanied by a comprehensive paper machine drives system, encompassing some of the market’s most advanced drives and motors meticulously designed to optimise PM5’s performance.

Read more...
The synapses of the distributed control system
Schneider Electric South Africa PLCs, DCSs & Controllers
Industrial operations require a distributed control system (DCS) to coordinate and control their process subsystems in real time. Like the brain, a DCS is a multitasking maestro, controlling and coordinating complex processes in a myriad of industrial setting such as large manufacturing plants, providing valuable top-down control.

Read more...
Modular assembly platform for clean manufacturing
Beckhoff Automation PLCs, DCSs & Controllers
JR Automation delivers custom automated solutions for numerous industries. It has done this through its scalable, modular automation platform, FlexChassis, which speeds up time to market while cutting costs. The company chose the XTS linear transport system from Beckhoff because of its speed, and modular design that allows for multiple configurations.

Read more...