Package: dsp
Delay input by timevarying fractional number of sample periods
The VariableFractionalDelay
object delays
the input by a timevarying fractional number of sample periods.
To delay the input by a timevarying fractional number of sample periods:
Define and set up your variable fractional delay object. See Construction.
Call step
to delay
the input according to the properties of dsp.VariableFractionalDelay
.
The behavior of step
is specific to each object in
the toolbox.
H = dsp.VariableFractionalDelay
returns
a variable fractional delay System object™, H
,
that delays a discretetime input by a timevarying fractional number
of sample periods.
H = dsp.VariableFractionalDelay(
returns
a variable fractional delay System object, 'PropertyName'
,PropertyValue
,...)H
,
with each property set to the specified value.

Interpolation method Specify the method by which the block interpolates between adjacent
stored samples to obtain a value for the sample indexed by the input.
You can set this property to one of  

FIR interpolation filter halflength Specify the halflength of the FIR interpolation filter as a
positive scalar integer. This property applies only when you set the 

Length of Farrow filter Specify the length of the FIR filter implemented using the Farrow
structure, as a positive scalar integer. This property applies only
when you set the 

Number of interpolation points per input sample Specify the number of interpolation points per input sample
at which a unique FIR interpolation filter is computed. You must specify
the number of interpolation points per input sample as a positive
scalar integer. This property applies only when you set the 

Normalized input bandwidth Specify the bandwidth to which you want to constrain the interpolated
output samples. You must enter the bandwidth as a scalar value between 

Initial values in memory Specify the values with which the object's memory is initialized.
The dimensions of this property can vary depending on whether you
want fixed or timevarying initial conditions. The default is For an MbyN framebased input matrix U, you can set the


Maximum delay Specify the maximum delay the object can produce for any sample.
The maximum delay must be a positive scalar integer value. The object
clips input delay values greater than the 

Allow direct feedthrough When you set this property to 

Action for small input delay values in FIR interpolation mode Specify the action the object should take for small input delay
values when using the FIR interpolation method. You can set this property
to 

Action for small input delay values in Farrow interpolation mode Specify the action the object should take for small input delay
values when using the Farrow interpolation method. You can set this
property to 
clone  Create variable fractional delay object with same property values 
getNumInputs  Number of expected inputs to step method 
getNumOutputs  Number of outputs of step method 
info  Characteristic information about valid delay range 
isLocked  Locked status for input attributes and nontunable properties 
release  Allow property value and input characteristics changes 
reset  Reset internal states of variable fractional delay object 
step  Delay input by timevarying fractional number of sample periods 
Delay a signal by a varying fractional number of sample periods:
hsr = dsp.SignalSource; hvfd = dsp.VariableFractionalDelay; hLog = dsp.SignalSink; for ii = 1:10 delayedsig = step(hvfd, step(hsr), ii/10); step(hLog, delayedsig); end sigd = hLog.Buffer; % The output sigd corresponds to the values of the delayed signal % that are sampled at fixedtime intervals. For visualization % purposes, we can instead plot the time instants at which the % amplitudes of signal samples are constant by treating the % signals as the sampling instants. stem(hsr.Signal, 1:10, 'b') hold on; stem(sigd.', 1:10, 'r'); legend('Original signal',... 'Variable fractional delayed signal', ... 'Location','best')
This object implements the algorithm, inputs, and outputs described on the Variable Fractional Delay block reference page. The object properties correspond to the block properties, except:
When you set the DirectFeedthrough property
of the System object to true , the object allows
direct feedthrough. This behavior is different from the way the block
behaves when you select the corresponding Disable direct
feedthrough by increasing minimum possible delay by one check
box on the block dialog. When you enable this block parameter, the
block does not allow direct feedthrough. 