Get Last Flexible Encoder Source Phase Estimate

Recovers the last phase observed by the named encoder source and then calculates the estimated position at this instant in time using the reported velocity of phase change and the time elapsed since phase was last observed. Either an Absolute Source Block or a Companion Source block could be referenced by this block.

Executing the motohawk_flexencoder_project script with an encoder_system_type of 'VarCam' will create a sample project that uses this block in a Flexible Encoder system.

Block ID

Get Last Source Phase Estimate

Library

motohawk_flexenc_lib

Description

This block can be used within Phase Trigger to recover the information. However the block is generally used from the time domain since the reported position is an estimate that takes into account the time that has elapsed between a report being available and the instant at which the estimate is requested. Care should be taken when using only a trigger as the trigger won't execute whilst a valid report does not exist. A source being used for phase reporting could also suffer from a loss error, which would prevent a report being issued.

Also note that phase reporting will generally not operate when a pseudo encoder is active because activating the pseudo encoder typically results in the other system's sources being disabled at some level.

Care also needs to be taken when configuring a source that can move relative to another source. Various windows may now see more or less teeth compared to the absolute source they reference. The variation is dependant upon the direction of relative movement and its speed. Any Halfcycle Encoding setup needs to also be considered with greater care.

Executing the motohawk_flexencoder_project script with an encoder_system_type of 'VarCam' will create a sample project that uses this block in a Flexible Encoder system.

Signals

Absolute Phase (x16 degAfTDC#1)

Absolute Phase describes the phase of the last observed tooth on the referenced source relative to the active absolute source, which is nominally the absolute source assigned to the crank shaft encoder. An estimate of phase change based upon the time elapsed since the tooth was observed and the phase velocity when that tooth was observed is then applied. The EncoderTDCOffset of the active absolute source is also taken into account. The figure below illustrates. The value is always clipped so that it will fall within the cycle angle.

Relative Phase (x16 degAfTDC#1)

Relative phase takes the Wheel Position into account. As such the reported phase angle is always reported in respect to tooth #0. The value is always clipped so that it will fall within the cycle angle.

This attribute is only useful (or valid) when the source contains a unique pattern such that it can synchronize itself. A pattern that won't support synchronization can still report phase, but the location of Tooth#0 is assigned arbitarily. For example a source with 4 equidistant teeth could be used in a variable cam phaser system, but tooth #0 would be arbitarily defined. A controller that wanted to determine the relative phase for such a pattern would need to take the modulus 180 of Absolute Phase.

Tooth

The last tooth observed by the system. Tooth numbering is as defined by the pattern. Use the tooth to exclude certain reports

Wheel Position

The position of the tooth relative to tooth #0 of the pattern.

Status

Use the status to validate whether the obtained phase report should be used. A report is only meaningful if it does not report an error.

m-script motohawk_flexible_encoder_phase_status_enum enumerates the status value.

No Error (value=0)

The obtained phase report is valid.

Error - Not Created (value=1)

Indicates that the phase was requested from a source that has not installed the phase detection capability via the Phase Reporting mask attribute.

Phase Reporting Disabled on Source (value=2)

Indicates that the phase was requested from a source that has had the phase detection capability disabled via the Phase Reporting mask attribute.

Phase Unavailable as not Synchronized (value=3)

Synchronization of the reference absolute source and in some cases the phase reporting source must be attained before valid phase can be reported.

Error - Overrun (value=4)

The internal device driver has suffered an overrun condition. Failure to read the phase from a phase trigger before another phase trigger has occurred is not detected.

Error - Estimate Overflow (value=5)

Either the time and/or the velocity term was so large that the delta position to be applied to the last observed position was larger than one cycle, which is not physically possible.

Block Parameters

Parameter Field Values Comments/Description
Reference Source Name Alpha-numeric text, quote enclosed The name of the Absolute Source Block or Companion Source that this block is to recover the phase from.