Documentation Center 
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('PropertyName',PropertyValue,...) returns a variable fractional delay System object, H, with each property set to the specified value.
InterpolationMethod 
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  Linear  FIR  Farrow . When you set this property to FIR, the object uses the Signal Processing Toolbox™ intfilt function to compute an FIR filter for interpolation. The default is Linear. 
FilterHalfLength 
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 InterpolationMethod property to FIR. For periodic signals, a larger value of this property (that is, a higher order filter) yields a better estimate of the delayed output sample. Setting this property to a value between 4 and 6 (that is, a 7th to 11th order filter) is usually adequate. The default is 4. 
FilterLength 
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 InterpolationMethod property to Farrow. The default is 4. 
InterpolationPointsPerSample 
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 InterpolationMethod property to FIR. The default is 10. 
Bandwidth 
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 0 and 1. You can use this property to take advantage of the bandlimited frequency content of the input. For example, if the input signal does not have frequency content above Fs/4 (where Fs is the sampling frequency), you can specify a value of 0.5 for the Bandwidth property. A value of 1 for the Bandwidth property corresponds to half the sampling frequency (Fs). This property applies only when you set the InterpolationMethodproperty to FIR. The default is 1. 
InitialConditions 
Initial values in memory Specify the values with which the object's memory is initialized. The dimensions of this property can vary depending on the setting of the FrameBasedProcessing property, and whether you want fixed or timevarying initial conditions. The default is 0. When you set the FrameBasedProcessing property to false, the object supports ND input arrays. For an MbyNbyP samplebased input array U, you can set the InitialConditions property as follows:
When you set the FrameBasedProcessing property to true, the object treats each of the N input columns as a frame containing M sequential time samples from an independent channel. For an MbyN framebased input matrix U, you can set the InitialConditions property as follows:

MaximumDelay 
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 MaximumDelay to the MaximumDelay. The default is 100. 
DirectFeedthrough 
Allow direct feedthrough When you set this property to true, the object allows direct feedthrough. When you set this property to false, the object increases the minimum possible delay by one. The default is true. 
FIRSmallDelayAction 
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 Clip to the minimum value necessary for centered kernel, or Switch to linear interpolation if kernel cannot be centered. This property applies only when you set the InterpolationMethod property to FIR. The default is Clip to the minimum value necessary for centered kernel. 
FarrowSmallDelayAction 
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 Clip to the minimum value necessary for centered kernel, or Use offcentered kernel. This property applies only when you set the InterpolationMethod property to Farrow. The default is Clip to the minimum value necessary for centered kernel. 
FrameBasedProcessing 
Treat input as frame based or sample based Set this property to true to enable framebased processing. When you do so, the object accepts MbyN input matrices and treats each of the N input columns as a frame containing M sequential time samples from an independent channel. Set this property to false to enable samplebased processing. When you do so, the object supports ND inputs and treats each element of the input as a separate channel. The default is true. 
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. 
Both this object and its corresponding block let you specify whether to process inputs as individual samples or as frames of data. The object uses the FrameBasedProcessing property. The block uses the Input processing parameter. See Set the FrameBasedProcessing Property of a System object for more information.