List of Tables
3. Imperial College Ricardo Consulting Engineers Hydra Engine and Instrumentation Instrumentation
3.6. Data Acquisition and Control through LabVIEW
Apart from the control provided by the Cussons Control Unit, additional control and data acquisition were provided by a National Instrument CRIO Real-Time PowerPC with an embedded FPGA and through the LabVIEW software. The benefit of the FPGA was that it
160
gave a fast response time and a deterministic operation which did not depend on resources of other components, such as a host computer. Data acquisition was at 80MHz and automatic control would not be slowed by other processes.
The main hardware was a National Instrument CRIO-9022, Real-Time PowerPC embedded controller for CompactRIO, together with a cRIO-9114 8-slot reconfigurable chassis. There was an on-board FPGA, a programmable hardware chip with a high acquisition rate. The Real-Time embedded controller allowed for deterministic operation. This was important for synchronising the engine and the laser and other imaging equipment. Modules were installed onto the chassis for different control and data acquisition, such as reading thermal couples, digital and analogue input and output.
The chassis and modules were controlled through three levels of LabVIEW VI. The FPGA VI collected the data and executed controls such as air heater and laser/image acquisition synchronisation. It also carried out some basic processing. The Real-Time VI was on-board of the CRIO which dealt with collecting the data from the FPGA to prevent the buffer on the FPGA overflowing and stored it temporarily on the chassis which had a larger memory than the FPGA. Then a window host PC based VI contained the main user interface which collected the data from the Real Time VI and performed most of the post processing such as pressure display, heat release calculation, temperature conversion and data saving. A representation of the hierarchy of the three levels of LabVIEW programes is shown in Figure 3-14.
Figure 3-14: Hierarchy of control and data transfer of the three levels of LabVIEW VIs.
3.6.1. Modules and Their Applications on the National Instrument Control Unit
The CRIO had different modules connected to it for different data logging and control functions. The NI9213 16-channel thermocouple module was connected to
161
thermo couples measuring ambient air temperature (TC1), coolant temperature (TC8), oil temperature (TC7), inlet air temperature (TC0) and fuel temperature (TC9).
An 8-channel +/-10VDC analogue input (NI9201) read the speed (AI0, where 0-10V equals 0-6000rpm), torque (AI1, where 0-10V equals -50 to 50Nm) and air flow rate (AI3, reading multiplied by 10). It also measured the in-cylinder pressure (AI2) and the current clamp reading for injection timing (AI4).
The 8-channel TLL digital input/output module (NI9401) read the crank angle signal from the shaft encoder (DI00 for the signal at every 0.2 CAD and DI01 for the signal at every revolution). It also output a TTL signal for triggering laser or imaging devices (DI04) at desired crank angle degree and another output to control the air heater setting (DI05).
The NI9203 8-channel +/- 20mA current analogue input read the intake pressure through the Druck XT1570 pressure transducer. And finally the NI9421 8-channel 24V sinking digital input module measured the fuel flow which recorded at 1627.9 pulses per cc of fuel flow.
3.6.2. User Interface of the LabVIEW Vi
The top level of the user interface (on host PC) is shown in Figure 3-15 and contained display of various temperature, pressure, indicators and control. Starting from the top left corner going clockwise, the “Charge Amp Range Setting” corresponded to the setting on the charge amplifier so the correct multiplication factor could be applied for the pressure reading. The “Delay between readings FPGA” was the time between measuring variables such as temperatures, engine speed, torque, intake pressure and air flow rate. “Time to wait (Win)” was the looping time for the windows host interface that balanced resources, speed and the ability to relieve the buffers in the RT host.
162
Figure 3-15: Top level LabVIEW user interface on the host PC
The next frame to the right had the speed in RPM and torque registered in Nm.
Another frame displayed all the intake air information and control which included the intake pressure, air flow rate, ambient air temperature and the intake air temperature. There was the control for the air heater with a button for on/off and the input for intake temperature required.
On the top right corner, there were two readings for the future if a fuel rail pressure and temperature sensor is installed. Below it was the triggering control for imaging and laser, with an on/off switch, and the timing at which the trigger was applied.
Bottom right corner contained the save in-cylinder pressure button and the choice to save different number of cycles. There was also an option to either save half cycles or full cycles and an indicator showing whether saving was in progress.
The column to the left had the coolant and oil temperature. Below it had the fuel temperature, fuel flow rate, IMEP, CA50, maximum change in pressure (Max dpdCAD) and the location of it (MaxdPdCAD location).
163
The main chart in the middle showed the in-cylinder pressure and current clamp reading at the top and the ability to adjust TDC with a maximum pressure called
“Peak location” indicator. Also, due to the occasional errant shaft encoder signal, the acquisition of pressure could be reset by the “pressure reset” button so the pressure readings corresponded to the correct CAD. Below were the heat release rate and the change of pressure charts which could be toggled using the tabs above.
In the bottom left corner was the error message display. Above it was the stop button for the Vi and display whether there was an overflow of the pressure data or the temperature data in the buffer from the FPGA. Finally, there was a request for the FPGA buffer size and the actual buffer size returned from the FPGA and an indicator of the Real Time CPU usage rate.
3.6.2.1. Apparent Net Heat Transfer Rate (ANHTR) (Heat Release) Calculations
An apparent net heat transfer rate (ANHTR) (or otherwise less accurately described as heat release rate (HRR) elsewhere in this thesis) programme was embedded into the LabVIEW user interface and it calculated the heat release rate with a heat loss mechanism and pressure rise rate in real time. The net heat release rate (dQn/dt) in J per CAD was calculated by using equation (3-1). γ was the ratio of specific heats taken as a constant 1.35, commonly used for unburned gas in a diesel combustion chamber (Heywood (1988)) or it can be calculated using equation (3-2) where cp, in J/kgK is the specific heat at constant pressure calculated using equation (3-3), where T is temperature in K, and R, in J/kgK is
164
For equation (3-1), p was the pressure inside the cylinder in Pa, dV/dt was the rate of change in volume in the engine in m3, V was the volume of the cylinder in m3, dP/dt was the change in pressure in Pa. Qht was the heat loss to the wall calculated using equation (3-4) where Aw was the wall area in m3, hc was the heat transfer coefficient defined in equation (3-5), Tg was the gas temperature in K and Tw is the wall temperature in K.
The heat transfer coefficient was calculated using the Woschni correlation shown in equation (3-5) where B was bore diameter in m, p was pressure in kPa, Tg was gas temperature and w was the average cylinder gas velocity in m/s.
ℎ𝑐 = 3.26 𝐵−0.2𝑝0.8𝑇𝑔−0.55𝑤0.8 (3-5) The average cylinder gas velocity could be calculated using equation (3-6) where C1 is 2.28, N was the engine speed in rmp, C2 used is 0.000324, Vd was the displaced volume of the engine in m3, Tref was the temperature of the gas at BDC in K, pref was the gas pressure at BDC in Pa, Vref was the volume at BDC in m3, p was the pressure at the current crank angle in Pa and pm was the motored pressure at the same point in Pa.
𝑤 = 𝐶1𝑁 + 𝐶2 𝑉𝑑𝑇𝑖𝑛
𝑝𝑖𝑛𝑉𝑖𝑛(𝑝 − 𝑝𝑚) (3-6)