“Model-Based Design with MathWorks tools enabled us to use the same model for simulation, control design, and implementation, which saved us time and money.”
Dr. Christian Robl, CR-Realtime Systems
Fuel cells are increasingly being adopted as an alternative energy source in the automotive industry. By converting chemical energy into electrical energy by oxidizing combustible fuel, such as hydrogen or alcohol, fuel cells can serve as a vehicle’s engine, an auxiliary power unit, or a supplement to the alternator.
CR-Realtime Systems recently worked with P21 GmbH, a developer of fuel cell systems and their components, to develop an embedded controller for an electrically heated, microstructured vaporizer and heat exchanger. The company accelerated the control design process with MathWorks products for Model-Based Design.
“MathWorks provides the only tool chain that makes it possible to develop, test, and implement control design without breaking the design flow,” says Dr. Christian Robl, former senior technology manager of fuel cell systems at CR-Realtime Systems.
Dr. Robl and his team set out to develop a controller to regulate the temperature of the output steam in the vaporizer. The vaporizer system consisted of 15 heating rods, as well as valves, mass flow controllers, pressure and mass flow sensors, and thermo couples multiplexed with P21 GmbH’s specialized hardware.
To develop a cost-effective and reliable system, CR-Realtime Systems needed to determine the optimal number and position of heating rods, thermo couples, actuators, and sensors.
Microstructured parts of a thermodynamic system are subject to rapid changes of pressure and mass flow due to the low masses and large planes of the parts. The steam output needed to maintain a given reference temperature throughout these mass flow and pressure changes.
CR-Realtime Systems required a testing system that enabled them to evaluate designs without conducting real-time intensive hardware experiments, as these would expose the team to hazardous fluids and high temperatures.
Finally, they needed to log data in real time to validate their system models by running the controller at 1 kHz.
Using MathWorks products for Model-Based Design, Dr. Robl and his team modeled and simulated an environment, a plant model, and the entire control design of a fuel cell test stand, and then implemented the design through rapid prototyping and then on an embedded system.
They used MATLAB®, Simulink®, Simulink Control Design™, and Control System Toolbox™ to specify and simulate the data-driven parts of the system, including the LQG controller. Engineers used Stateflow® to model the event-driven parts of the system, including the bang-bang controller. Control code was generated automatically using Simulink Coder™.
They replaced their previous rapid prototyping software with xPC Target™, which ran on an industrial PC, together with a host application, and realized immediate benefits and greater flexibility. “xPC Target enabled us to use standard, off-the-shelf hardware to run our prototypes quickly and cost effectively,” says Dr. Robl.
Engineers validated their Simulink model with real data, and then used the data to simulate the control design and determine the vaporizer behavior for different fluids, controller parameters such as reference steam temperature, and the optimal number and configuration of heating rods and thermo couples.
Simulink enabled CR-Realtime Systems to perform “what-if” scenarios and security checks, which revealed that powering the vaporizer was unnecessary when there was no mass flow, as was checking the function of all heating rods.
“With Simulink, we can validate the functionality by running simulations and then inject specific failures to see how the system reacts and ensure the security mechanisms work well,” explains Dr. Robl. “This helped us avoid introducing system failures on the actual system.”
They implemented the steam temperature controller on different targets using the same core model. Using Embedded Coder, they automatically generated optimized C code, which ran on a Freescale™ MPC555 board.
CR-Realtime Systems is using MathWorks tools to design and deploy embedded controls for P21 GmbH’s fuel cell systems and additional embedded control systems for other customers.
Develop an embedded controller for a fuel cell system
Use MathWorks tools to design, simulate, rapidly prototype, and implement the controller