HIL Simulation System of Intelligent Marine Diesel Engine Based on Hybrid Software Development Model

HIL Simulation System of Intelligent Marine Diesel Engine Based on Hybrid Software Development Model

Shu Chang(1) JianGuo Yang(1) (2)
[1] School of Energy and Power Engineering, Wuhan University of Technology, Wuhan, P. R. China, 430063
[2] Key Lab. of Marine Power Engineering &Technique under Minister of Communications of P. R. China, Wuhan, P. R. China, 430063)

[Abstract] A hardware-in-the-loop simulation system of intelligent marine diesel engine by using hybrid software development model technology is introduced in the paper. The hardware-the-loop simulation system is developed on several computers connected with network at low costs and within industrial standards by C language and Labview platform. The multiple computing platforms provided with real-time software in combination with the computer-aided design software,such as Matlab and Simulink are exploited. One of the main characteristics is that the hardware-in-the-loop simulation system includes many technologies, such as different operation systems, multiple hardware target, mixed software development tools and simulation technology. The hybrid software development model is suitable for simulating the control system for the intelligent marine diesel engine.
Keywords: Intelligent Marine Diesel Engine, Hybrid Software Development Model, Hardware-in-loop Simulation

Low-speed marine diesel engine is at the dominant in ship propulsion. The marine diesel engine technology is focusing on the intelligent and even more flexible components for fuel and air supply, compression ratio and valve timing [1]. With integrated exhaust gas after-treatment technologies gaseous and PM-emissions will be reduced. Main challenge will be to optimize the interaction of these components using model based "closed-loop" control strategies and the development of low cost components of these integrated techniques with flexible features. These requirements give birth to new technologies for development of new generation intelligent diesel’s components.
As showing in Table 1, the traditional development approach which depends on hardware engine test bench and software engine simulation can result in high cost and long time because of the process of testing and modeling. These old methods can not meet the development of the next generation intelligent diesel. Hardware-in-the-loop simulation system can reduce the cost of testing and the time of modeling. The development of the Hardware-in-the-loop system is more complicated than designing hardware engine test bench or implement software engine simulation. Hybrid software development model is fit for the development of Hardware-in-the-loop system which involved many disperse technologies.

Table-1 Comparison of Three Technologies
Engine test bench Software simulation HIL simulation
Development time long long medium
Simulation technology low high medium
Run-time cost high low low

The software development model is used to manage the software development process. Every development model has the advantages and the disadvantages with the different kinds of targets. The several classic software development models and the characteristics are shown in Table 2. Not a single development model fit all development process. The several software development models can be used together to complete a complicated project called hybrid software development model [2].

Table-2 Comparison of Different Development Models
Development Models Project size Abilities of variations required Application
Waterfall Model small or large targets bad Hardware design
Rapid Prototype Model only for small targets well Graphic user interface
Incremental Model only for large targets neutral Framework

As showing in Table 2, the waterfall model is fit for the developing products, which has stable specification and immutable requirements such as hardware design. Rapid Prototype Model can reduce the development risk brought about by uncertainty of requirements and is suitable for building Graphic User Interface. Incremental Model divides the whole system into several sub modules and is fit for large project only. Sub modules can be modified quickly depended on the variations required. Incremental Model is suitable for building the framework of the large project. The disadvantage of Incremental Model is that the interface between sub modules must be carefully designed in order to integrate all the sub modules together.
Reuse is an efficient way to use existing experience. This method can reduce the development time and improve quality of product. There are several reuse levels: source level, binary level, and design paten. The source level reuse requires the same translate tool for development. The binary level reuse needs the same interface between callers and callees. Using design paten needs the same application context. The abstraction level order of the three methods is from low to high. But not all part of hand-writing work can be replaced by reusing. The reusable percentage is decided not by the tools but by the problem domain [3]. To accelerate the development of Hardware-in-the-loop simulation system, it’s important to use appropriate existing library and to apply hybrid software development model to manage the development process.
The basic principle of hardware-in-the-loop simulation is that some sub-systems are physically embedded within a real-time simulation model. The electronic control unit (ECU) of diesel engine and parts of the injection system and part of the exhaust valve are real components in the paper. The simulation system communicates with ECU through R serial DAQ devices and PAC. For the different electronic systems, the sensors and input/output signals may be different. According to the application situation, the I/O channel can be extended easily because the R serials Devices and PAC can use many compact I/O models. Every signal channel on I/O models has special address in the computer memory space corresponding. The signals mainly include Digital in/out, A/D, D/A, counting output etc.
Existing experience is useful for develop the new simulation system. The whole system is divided into several sub-systems showing in picture 1.The principle of the division is the reusable character and the function of the sub-system. And each sub-project’s essential character decides the suitable software development model. The all sub-projects are managed by the Incremental Model. Labview development platform can provide uniform interface among the sub-projects which overcome the disadvantages of applying Incremental Model.

Figure 1 Schematic structure of the HIL simulation system
PC is responsible for interacting with operator of the whole system and print report. It is based on Windows operation system. Because Windows can provide excellent user express and has the largest market share and operators can be familiar with the use of the system as soon as possible. Rapid Prototype Model can be used to manage the development of this module. Rapid Prototype Model is suitable for develop GUI interacts with people. GUI product with good quality can only be done by handwrite code and may be modified frequently by the variant of requirement or the expression of user.
The DAQ sub-system is responsible for Data acquisition and signal coordination. This system is based on NI’s PXI and R Series Intelligent Data Acquisition devices which can provide high capacity for data acquisition and online signal processing. Figure 2 is the Schematic structure DAQ program. Signals and the crank angles are packaged in the Signal Acquisition Card, and is sent to the PXI controller’s main memory and then showed on screen and saved to disk. Design pattern is a general reusable solution to a commonly occurring problem in software design. The Producer/Consumer design pattern is geared towards enhanced data sharing between multiple loops running at different rates. DAQ program is designed by using Producer/Consumer design pattern. The MVC design pattern is used to separate the Display GUI and the Data Acquisition. Labview provided a lot of libraries, such as first in and first out (FIFO), encoder and filter. Use these libraries can accelerate the development process and improve the quality.

Figure 2 Schematic structure of the DAQ system
The controllers are based on NI’s CompactRIO PAC, which is powered by NI LabVIEW FPGA and LabVIEW Real-Time technologies. Labview can compile simulation model to fpga code and run on CompactRIO PAC and can satisfy the real time ability required by the HIL system. DAQ subsystem and PAC subsystem’s requirement are clear. Use Waterfall Model to develop the signal acquire program and integrate into the HIL system. The HIL system uses some real components to replace the software modeling process.

Figure 3 Schematic structure of exhaust valve simulation subsystem

For example, ECU controls the exhaust valve’s open and close time by sending the control signals to the actuator and receives the valve’s feedback to confirm the result. A concrete exhaust valve is connected to ECU and the controller can send the signals to the ECU for simulating the virtual exhaust valve’s behaviors by delaying the concrete exhaust valve’s corresponding signals. The delayed time can be decided by the crank angle when the controlled signal is sent by ECU [4]. The Figure 3 shows the structure of the exhaust valve simulation sub-system. This simulation method can reduce the effort of modeling the exhaust valve and the cost for other real valves. The control signals and feedback signals are showed in the Figure 4.

Figure 4 Control variable and feedback variable

The paper presents that Hybrid Software Development Model can manage the development process of HIL Simulation System. Labview is a uniform development environment for the different hardware targets and can provide many reusable libraries,which can improve the quality and speed of development processes. Further research can focus on automating the process of applying Hybrid Software Development Model by creating special management tools or customizing existing management tools.
[1] The electronically controlled ME engine: The dawn of the era of the intelligent engine HSB International, v 52, n 7-8, p 55-59, July/August 2003
[3]Todd L. Software Libraries and Their Reuse. Library-Centric Software Design LCSD 2005
[4]JIANG Dan-na ZHANG Fu-jun ZHAO Chang-lu. Research on Improving the Real-Time Performance of the Diesel Engine Model Using the Method of "Cylinder Moving". CHINESE INTERNAL COMBUSTION ENGINE ENGINEERING 2006 27(2)