blockShiftSample

Shift the input clock by a fraction of the last interval and provide it as output clock

Information

This block shifts the first activation of clock output y by fraction shiftCounter/resolution of the period (or for a non-periodic signal by a fraction of the last interval). Here, shiftCounter and resolution are positive Integer parameters.

To be more precise: The block constructs (conceptually) a clock “cBase”

Clock cBase = subSample(superSample(u, resolution), shiftCounter)

and clock y starts at the second clock tick of cBase.

Example

The following example generates a periodic clock of 20 ms period, and then shifts it with shiftCounter = 4 and resolution = 3:

ShiftSample_Model.png     ShiftSample_Result.png
model simulation result

The first activation of clock output y of block shiftSample1 is shifted in time (4/3*20ms). The parameter values shiftCounter = 4 and resolution = 3 are visible at the bottom of the icon.

Parameters

TypeNameDefaultDescription
Shift first clock activation for 'shiftCounter/resolution*interval(u)' seconds
IntegershiftCounter0Numerator of shifting formula
Integerresolution1Denominator of shifting formula

Connectors

TypeNameDefaultDescription
Interfaces.ClockInputuConnector of clock input signal
Interfaces.ClockOutputyConnector of clock output signal