*As Featured on NI.com
Original Authors: Bipin Adaki, Varroc Engineering Ltd.
Edited by Cyth Systems
We needed to develop a prototyped controller to validate the algorithms with the physical assembly of the integrated starter generator (ISG) while the actual controller was designed and developed.
We used the modular CompactRIO platform, which gave the flexibility of changing the input and output signals, along with LabVIEW and the LabVIEW Model Interface Toolkit to import custom simulation models and tune the algorithms by advanced signal processing.
A key segment of Varroc group is the electrical-electronics business. Its key electrical-electronics products include magneto, lighting, starter motors, CDI, handlebar assemblies, RR, and instrument clusters. Varroc group works on the design and development of the integrated starter generator assemblies and its controller.
Internal combustion engines rely on the inertia of each cycle (or stroke) for its next stroke. For a typical four-stroke engine, the power for the movement of the piston comes through the power or combustion stroke, which is one of the four strokes of a four-stroke engine. An ISG is a device used to rotate or crank an internal combustion engine to compress the charge for the first combustion. This combustion process then generates enough inertia for the engine to run on its own. After the engine is started, the same ISG works as the generator and supplies power to the vehicle auxiliary and to charge the battery. Although this system can be used in conventional engine-powered vehicles, one of the key contributors to the hybrid’s fuel efficiency is its ability to automatically stop and restart the engine under different operating conditions. A typical hybrid vehicle uses an ISG on the engine crank shaft. The ISG performs functions such as fast, quiet starting, automatic engine stops/starts to conserve fuel. It also recharges the vehicle batteries.
Our team is responsible for the testing of ISG assembly. In the past, once the ECU and its low-level driver software were developed, the high-level algorithm needed to be integrated with the ECU. It was only after this integration, that the process of algorithm validation was initiated, leading to a longer time to market. For this project, our strategy was to quickly validate our high-level algorithm on a prototyping platform while the design and development of the actual ECU happened in parallel.
Left: The ISG Assembly Connected to the Drive Board Being Controlled by the Prototyped ECU, Right: Integrated Starter Generator
Validating the Control Algorithm on a Prototyping Platform
Our control algorithms were written in The MathWorks, Inc. MATLAB® and Simulink® software. We wanted to accelerate the process of validation of these algorithms by moving forward from software simulations to hardware implementation without waiting on the actual controller development cycle. The challenge was to look for a prototyping platform that was flexible and scalable to allow integration of additional I/Os during the process of validation but at the same time allows us the ease of programming and signal processing to tune our control algorithms.
We used the CompactRIO platform to prototype our controller. We used the LabVIEW FPGA Module to write the low-level driver IP without going into HDL programming languages. Our FPGA IP allowed us to generate PWM signals for the inverter or motor drive, acquire speed sensor pulses and calculate RPM, control relays, and so on.
Using the LabVIEW Model Interface Toolkit, we were able to compile our control algorithm from The MathWorks, Inc. Simulink® software and seamlessly integrate it into our LabVIEW code and run it deterministically on an ARM Cortex-A9 processor (Xilinx Zynq-7000 SOC) on the CompactRIO running the NI Linux Real-Time OS. This model communicates with the FPGA to generate PWMs according to the set point as well as capture the feedback from the system. The NI-9401 module allowed us to provide high-speed switching signals of 5 kHz to 10 kHz to our power inverter board. We used NI-9403 to capture feedback using a Hall effect sensor for motor position sensing as well as to capture other signals like the wheel speed, ignition, clutch, and so on. We also monitored parameters like the three-phase motor voltages and current and the battery voltage through the NI-9229.
With the inherent UI capabilities of LabVIEW, developed the user interface for our project without putting in any additional efforts. The UI allowed us to visualize the signals in real time and proved handy for debugging as well.
Digital Signal Processing to Improve Effectiveness of Algorithm
The development of such a system that needs to be deployed in a noisy environment requires additional signal-conditioning and signal-processing techniques like adaptive filtering and averaging of samples. With the ready-to-use libraries within LabVIEW along with the signal processing toolkit, we easily designed and tuned our filtering parameters like windowing, averaging, and so on to enhance the quality of the signal before providing it to the control algorithms.
Real-Time Parameter Logging
A major challenge in control algorithm development is to have the insight of how various parameters in the control algorithm are changing according to the stimulus as well as the real-world conditions. The Technical Data Management Streaming (TDMS) file writing capability in LabVIEW gave us the ease to implement parameter logging. We could derive insights from this data that helped us tune or modify our control algorithms.
By following this approach of rapid prototyping and using the NI platform, we validated our control algorithms within a time span of four to six months. Using LabVIEW and user-programmable FPGA-based hardware, we quickly prototyped our controller and validated the control algorithm without waiting for the design and development of the actual controller. The ease of use of the NI platform helped us reduce the development and validation time of our control algorithms by 50 percent and gave us insights to modify them. We are looking to build on this approach and continue using our expertise on the CompactRIO platform and LabVIEW for our future projects as well.
Bipin Adaki, Varroc Engineering Ltd.
Edited by Cyth Systems