Dual PSP

The MotoHawk™  Dual PSP block provides an interface to ControlCore's PSP (Periodic Synchronous Pulse) behavior. ControlCore can loosely be thought of as the module's operating system. Such pulses are periodic because they are synchronised to the Encoder within the system. This block allows one or two pulses to be created and managed by ControlCore. This block is a powerful and very flexible block in that it allows for very precise control of pulse generation through its dual termination capability. It is somewhat different to other pulse generation blocks like the MotoHawk™  Injector Sequence Block in that it does not create outputs that span multiple resources. The power of this block would allow the functionality of the MotoHawk™  Injector Sequence Block to be implemented via first principles, but multiple Dual PSP Blocks would be needed.

Block ID

Dual PSP

Library

MotoHawk_lib/Advanced Digital I/O

Description

The "Number of Pulses" parameter defines how many pulses to create on the resource. This blocks allows one or two pulse to be created. The block picture depicts a single pulse arrangement. If two pulses were selected then the 4 ports shown would be duplicated to give 8 total input signals. The first 4 signals would apply to pulse #1 and the second 4 signals would apply to pulse #2.

Angle inputs are before TDC#1 (BfTDC#1), in units of 1/16th of degree crank angle. Time inputs are in microseconds.

Angles are converted internally to Mod(angle, DegInCycle). It is therefore not possible to schedule a pulse more than one cycle into the future.
Eg: 730degBfTDC#1 == 10degBfTDC#1 == -710degBfTDC#1

Start Angle

The Start Angle defines where in the angle domain, as defined by the encoder, a pulse should assert (turn ON). Positive values represent values in degrees before firing TDC#1 (degBfTDC#1) where as negative values represent an angle in degrees after firing TDC#1 (degAfTDC#1). In a 4-stroke (720 degrees crank angle [degCA] per cycle) a value of 710degBfTDC#1 and -10degBfTDC#1 describe the same angle and can be used interchangeably. Equally a value of 1430degBfTDC#1 could be used. They are all the same angle. Consequently a pulse can't be delayed by one cycle by changing its timing from 1430degBfTDC#1 to 710degBfTDC#1 because ControlCore will execute modulo math on the signal which will result in the angles being considered identical.

Also note that the angle is relative to TDC#1. If this block is used on say FINJ2 and that is offset from TDC#1 by 180degCA then that offset must be accounted for by the application.

Max Angle / Stop Angle

Max Angle and Stop Angle have the same characteristics as the Start Angle except they define when the pulse should terminate in the angle domain. They are mutually exclusive signals. The signal that appears on the block is based upon the chosen control mode (Hard Start - Hard Duration, or Hard Start - Hard Stop).

Stop Duration / Max Duration

Stop Duration and Max Duration describe the time in microseconds that the pulse should remain asserted (ON). They are mutually exclusive signals. Which is selected is based upon the chosen control mode (Hard Start - Hard Duration, or Hard Start - Hard Stop).

Enable

The Enable signal defines whether the ControlCore pulse scheduler should allow this pulse to be scheduled when it next looks to try and schedule the pulse. A disabled pulse won't schedule regardless of the timings supplied. A pulse that is currently ON when the Enable signal is set to FALSE to disable shall complete, but it won't subsequently occur until it has been enabled again.

Using the Block

Changing Pulse Timings

How a change in timing affects a pulse that is already active is dependant upon the capability of the module in use. In this respect the PSP behavior is similar to the Multiple PSP Update behavior.

HardStart - HardDuration mode

In this mode, duration is the primary pulse end driver. MaxAngle is exposed on the block and provides a maximum angle clip. Setting MaxAngle = StartAngle will allow a single pulse to deliver over an entire cycle.

HardStart - HardStop mode

In this mode, Stop angle is the primary pulse end driver. MaxDur provides a method of stopping the pulse if a duration is exceeded. Setting StartAngle = StopAngle will result in a ~zero length pulse. MaxDur cannot always be relied upon to stop a pulse during stall, use the Enable port.

Operating in Two Pulse Mode

ControlCore is deterministic in how it schedules pulses when there are two pulses enabled. Upon completing Pulse #1 the scheduler will always then attempt to schedule Pulse #2. The scheduler won't attempt to reschedule pulse #1 until it has completed pulse #2. Pulse #1 won't reoccur if pulse #1 has a Start Angle of 600degBfTDC#1 and pulse #2 has a Start Angle of 360degBfTDC#1 and at 500degBfTDC#1 the timings of the block is updated such that the pulse #1 Start Angle is set to 480degBfTDC#1.

Prevent Overlap

Pulses must not overlap and it is the responsibility of the application to ensure that this does not occur. Pulse generation won't be deterministic if the supplied pulse timings will result in overlap. Consider that the RPM is 6000, that pulse #1 has a Start Angle of 0degBfTDC#1 and pulse #2 has a Start Angle of 360degBfTDC#1. At 6000 RPM, one revolution (360degCA of rotation) takes 10ms to complete. If the duration of pulse #1 was set to 11ms then it would overlap with pulse #2 and result with indeterminate pulse generation.

The DualPSP block's dual termination capability provides a mechansim in which to prevent this from occurring. Dual termination means that the pulse will be terminated by the stop event that occurs first. There is a stop event that occurs in the angle domain and another that occurs in the time domain. The angle domain stop event can be used to terminate a pulse before the next pulse is supposed to start. So in the example, setting pulse #1's Max Angle to 361degBfTDC#1 would ensure that this pulse will terminate before pulse #2 was due to start at 360degBfTDC#1, even if 11ms of duration has been asked for.

Enable Sequencing

The behavior of a pulse when it is enabled is dependant upon the state of the other pulse when it is enabled. If there is only one pulse then, upon enabling, ControlCore will attempt to schedule that pulse. However, if there is already a pulse enabled then the most recently enabled pulse will not be scheduled until after the other pulse has completed, even if the most recently enabled pulse should occur first. If both pulses are disabled and they are enabled together, then the DualPSP block shall attempt to identify what pulse is going to occur first and enable that pulse first and then immediately enable the second pulse.

It is recommended that where a system wants to execute a temporay disable, say by dropping a one of the pulses when in some running condition, that it do this by setting the duration to zero. The pulse still schedules, but the zero duration means that there is no net effect at the actuator.

Start-up / Stall Enabling

The block will ignore the supplied enable condition until it recognizes from the encoder that pulse scheduling is possible. Thus the system won't allow pulses to occur until it knows that they can be accurately scheduled. Equally the pulses will be automatically terminated if the encoder detects that there is no further rotation, regardless of the supplied enable condition.

Encoder Errors

Unexpected pulses may result when there are encoder errors. Pulses may be shortened or not occur quite as expected. An encoder error may result in a step change in the crank angle position, which the pulse scheduler will do its best to handle, but pulse sequencing may be affected and is unavoidable. Pulses will schedule normally again once the encoder error has passed.

Block Parameters

Parameter Field Values Comments/Description
Name Alpha-numeric text, single-quote enclosed Name to be assigned to the block. Should be unique and C-legal (no special characters, such as spaces, dashes or commas (underscore allowed).
Resource Drop-down list Select output resource for this block (target module dependent).
Number of Pulses (1-2) Select value for number of pulses.
Mode Select method for Start/Stop
  Hard Start/Hard Stop Control Start/Stop by Angle
  Hard Start/Hard Duration Control Start by Angle, Stop Time Duration