1. Measuring Cam Phase
Assume that you have a single cam phaser to be controlled for a 4‐stroke engine. Such a system contains a production crank trigger wheel and a production cam trigger wheel. Also assume a typical N‐M crank trigger pattern and a multipulse, multiwidth cam trigger pattern. For example, the Delphi cam phaser trigger wheel typically emits about 4 pulses per cam rotation, and each pulse has a different width. Use a Drivven EPT N‐M VI (see Drivven EPT documentation) to track the angular position of the crankshaft over a 4‐stroke cycle (720 degrees). The Drivven EPT N‐M VI requires the cam signal to be high during every other crankshaft tooth gap. If this is not realized by default, Drivven provides FPGA‐based Boolean signal manipulation VIs that offset the incoming position of the cam pulses in terms of a specified number of crank pulses. Then you can extend the offset cam signal to provide sufficient cover over the crank gap. You must study the raw crank and cam signals to determine how much cam offset and extension you need to satisfy the EPT VI requirements. In addition, you need to account for the total range of cam phaser motion. You also may implement filter and inversion logic.
Once you have the EPT tracking crank position (SyncStopped = FALSE), then you can capture the crank position of one of the rising or falling edges of the raw cam signal. Drivven provides an FPGA VI called angle_capture_vt_reva.vi for this purpose. The cam signal may have multiple rising and falling edges. If so, then you can generate an angle‐based window with the FPGA VI called aap_vt_reva.vi to mask all but one particular edge over an angular window. You can convert the resulting captured absolute crank angle ticks (CATs) of the cam rising edge to crank angle degrees (CADs) with respect to a particular cylinder top dead center (TDC) angle in the real-time application. This is the measured cam phase as shown in Figure 1.
Figure 1. This image depicts how you determine the cam phase.
2. Controlling the Cam Phaser
You control the cam phaser oil control valve solenoid using a PWM output from a low-side driver channel from either the Drivven Low-Side Driver Module Kit or the Drivven PFI Driver Module Kit. In the example code provided, the Low-Side Driver Module Kit is used. The real-time application should use the measured cam phase along with a PID control VI from Drivven or NI to generate a duty-cycle output for controlling the cam phase to a desired setpoint. You can sent the resulting PWM duty cycle to the desired low-side driver channel along with the desired PWM frequency.
3. Controller Implementation Project
The cam phase controller example project includes a real-time PXI target, which features an NI PXI‐7813R digital RIO FPGA target. You connect an NI 9151 R Series expansion chassis to the PXI FPGA module and use the Drivven Low-Side Driver Module Kit and an NI 9411 C Series digital input module. Top-level VIs fall under their respective targets. The FPGA VI is responsible for tracking the engine position and measuring the cam position. The FPGA VI also interfaces with the Drivven Low-Side Driver Module Kit and NI 9411 module. The RT VI is responsible for converting the measured cam phase to engineering units, executing the control algorithms, and converting the low-side driver
PWM output to values that the FPGA can use. The LabVIEW Project Explorer is shown in Figure 2.
Figure 2. Cam Phaser Control LabVIEW Project Explorer
4. FPGA Implementation
The FPGA block diagram is described in Figure 3.
Figure 3. Cam Phaser Control—FPGA
- You should place all of the required FPGA code in a single-cycle loop. This requires the entire loop to execute at the FPGA clock rate (typically 40 MHz).
- The EPT N‐M VI reads the cam and crank pattern to determine the current crank angle at any time. The raw crank and cam signals enter the FPGA from an NI 9411 module for this example. The Drivven AD Combo Module Kit is required if the position sensors are VR type sensors. Using the Drivven Integrating Filter VI for glitch filtering is recommended. You may need the Signal Offset and Signal Extension VIs to manipulate the cam signal to meet EPT requirements.
- Use the filtered cam signal for the angle capture. This code shows only one phaser, but you may use multiple cam phasers.
- An angle‐based window is generated by the Angle‐Angle‐Pulse VI configured by the StartPosition and EndPosition parameters.
- During the window, the crank position of the cam rising edge is captured to the CurrentPosition output of the angle capture VI.
- The low-side driver creates a PWM current drive to control the phaser oil control valve. The parameters of the low-side driver are set in the real-time application.
5. Real-Time Implementation
The real-time block diagram is shown in Figure 4.
Figure 4. Cam Phaser Control—RT
- Start the specified FPGA VI and create a reference.
- Use a 5 or 10 ms loop for engine control. Apply a Timed Loop so you can adjust its priority with respect to other loops.
- Calculate the EPT control parameters and combine them in a cluster (refer to the EPT User Manual).
- Calculate the maximum CAT value (refer to the EPT User Manual).
- Write the various crank/cam signal filtering and manipulation parameters along with the EPT control cluster. Read the EPT data cluster.
- Display the EPT data.
- Convert the window StartPosition and EndPosition, which are in CADs, to CATs for FPGA implementation.
- Write the window parameters to the FPGA and read the cam phaser position.
- Convert the cam phaser current position from CATs to CADs.
- Convert the cam phaser position to an offset angle with respect to a fixed crank angle.
- Use a PID Controller VI to control the PWM duty cycle. You can further condition the PID Controller VI output by using a feedforward parameter and additional limits (not shown here).
- Convert the duty cycle and frequency to period and pulse width values that the FPGA can use (refer to the Low-Side Driver Module Kit User Manual).
- Combine the low-side control values into the control cluster.
- Transfer the low-side control cluster to the FPGA.
While sophisticated electrically controlled engine subsystems promise increased efficiency and low emissions for internal combustion engines, controlling them all with a single platform can be difficult to manage. The engine control product line by NI and Drivven offers the tools you need to get your engines up and running.
For more information or a free consultation on your engine control application, contact Drivven at (210) 248-9308 or firstname.lastname@example.org.