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.
© Technews Publishing (Pty) Ltd | All Rights Reserved