T o develop a research engine control unit (ECU) that would be suitable for prototyping engine control algorithms as well as sensor and actuator design, we needed reliable, high-performance hardware and custom software. Motorcycles, automobiles, and trucks ship with factory ECUs designed to maximize performance while minimizing cost. However, factory ECUs have closed software and hardware. The control gains, lookup tables, and constants used in the control algorithms are also calibrated for a particular engine design. The development and use of a research ECU allow engine researchers to set up a control system with baseline performance equal to the factory ECU and then investigate methods for improving control performance. Our project involved the development of a research ECU for the 2004 Yamaha YZF-R6 motorcycle. Engine control requires deterministic loop times on the order of milliseconds as well as precise fuel and spark timing on the order of microseconds. In addition, the target engine revs to 15,500 r/min. 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 • . The chosen approach to this problem depended heavily on field programmable gate arrays (FPGAs). An FPGA is a chip that consists of unconfigured logic gates. Unlike the fixed, vendor-defined functionality of an applicationspecific integrated circuit (ASIC) chip, an FPGA can be configured and reconfigured for different applications. FPGAs are used in applications where the cost of developing and fabricating an ASIC is prohibitive or the hardware must be reconfigured after being placed into service. FPGAs appear in devices such as electronic instruments, consumer electronics, automobiles, aircraft, copy machines, and application-specific computer hardware. Because FPGAs can be used to implement custom algorithms in hardware, they offer benefits over processors, such as precise timing and synchronization, rapid decision making, and simultaneous execution of parallel tasks. However, floating-point processors have a computational advantage since FPGAs are limited to integer math. This limitation can be partially overcome by using high-level development tools, code, or IP cores that convert floating-point calculations to integer math. However, a combined FPGA/processor architecture can be used in control applications to take advantage of the strengths of each device. Drivven, Inc.'s library [1] includes cores for tracking the angular position of crankshafts from a variety of positionsensing formats and generating precise angle-based fuel and spark commands. These tools provide a seamless path from prototype to production for FPGA-based powertrain controllers. Because this path includes early stages of prototyping, where flexibility and computing power are paramount, we often choose PC-based hardware. For this project, which involved engine-control algorithm development as well as road testing, we chose a National Instruments (NI) CompactRIO (Figure 1 ) embedded control system because of its flexibility, small size, and rugged form factor. With this system, we can add sensors and actuators while readily visualizing the data. In addition, we can mount the controller in the limited space available in a super-sport motorcycle. The unique computational feature of the CompactRIO system is that it includes both a real-time processor and an FPGA. Both devices are programmable using the LabVIEW graphical development environment. With this combined architecture, multiple control approaches and algorithms can be quickly designed and tested on the motorcycle. Using the CompactRIO embedded control system, we prototyped a new engine control system for the Yamaha FIGURE 1. CompactRIO embedded control system (4-slot configuration) from National Instruments. The real-time processor in the device controller is connected to an FPGA on the backplane of the chassis through an internal PCI bus. A fully loaded 4-slot CompactRIO system weighs approximately 1.68 kg (3.71 lb) excluding a battery or power supply. The CompactRIO system, without external connectors attached, is 17.8 cm × 8.9 cm × 8.9 cm (7.0 in × 3.5 in × 3.5 in). Real-Time Processor
Since FPGAs can be utilized to implement custom calculations in hardware, they offer advantages over processors, for example, exact timing and synchronization, rapid decision making, and concurrent execution of parallel operations REF .
Motorcycle control prototyping using an FPGA-based embedded control system
IEEE Control Systems Magazine
Engineering