| DSP Blockset | Search  Help Desk |
| Time-Varying Lattice Filter | See Also |
Apply a variable lattice filter to the input.
Library
Filter Realizations, in FilteringDescription
The Time-Varying Lattice Filter block applies a moving average (MA) or autoregressive (AR) lattice filter to the top input (In), which must be a discrete-time signal. The filter reflection coefficients are specified by the input to the MA or AR port, and can vary with time.
The Filter type parameter specifies whether the filter is an all-zero (FIR or MA) filter or all-pole (AR) filter.
The block constructs an nth order MA filter using the n reflection coefficients contained in the vector input to the MA port.
k = [k(1) k(2) ... k(n)]
The block constructs an nth order AR filter using the n reflection coefficients contained in the vector input to the AR port.
k = [k(1) k(2) ... k(n)]For both designs, the coefficient vector inputs can change over time to alter the filter's response characteristics during the simulation.
Initial Conditions
In its default form, the filter initializes the internal filter states to zero, which is equivalent to assuming past inputs and outputs are zero. The block also accepts optional nonzero initial conditions for the filter delays. Note that the number of filter states (delay elements) per input channel islength(k)The Initial conditions parameter may take one of four forms:
The empty matrix, [], causes a zero (0) initial condition to be applied to all delay elements in each filter channel.
The scalar value is copied to all delay elements in each filter channel. Note that a value of zero is equivalent to setting the Initial conditions parameter to the empty matrix.
The vector has a length equal to the number of delay elements in each filter channel, length(k), and specifies a unique initial condition for each delay element in the filter channel. This vector of initial conditions is applied to each filter channel.
The matrix specifies a unique initial condition for each delay element, and can specify different initial conditions for each filter channel. The matrix must have the same number of rows as the number of delay elements in the filter, length(k), and must have one column per filter channel.
Sample-Based Operation
When the check box is not selected (default), the block assumes that the input is a 1-by-N sample vector or M-by-N sample matrix. Each of the N vector elements (or M*N matrix elements) is treated as an independent channel, and the block filters each channel over time.Frame-Based Operation
When the Frame-based inputs check box is selected, the block assumes that the input is an M-by-N frame matrix. Each of the N frames in the matrix contains M sequential time samples from an independent signal. The illustration below shows a 6-by-4 matrix input:
The Number of channels parameter specifies the number of independent channels (columns), N, in the matrix, and the block filters each channel independently over time. Frame-based operation provides substantial increases in throughput rates, at the expense of greater model latency.
In frame-based operation, the Filter update rate parameter determines how frequently the block updates the filter coefficients (i.e., how often it checks theMA or AR input). There are two available options:
The block updates the filter coefficients (from input MA or AR) for each individual scalar sample in the framed input. This means that each output sample could potentially be computed by a different filter (assuming that the MA or AR input is updated frequently enough).
The block updates the filter coefficients (from input MA or AR) for each new input frame, rather than at each sample in the frame. This means that each output sample in a given frame is a result of an identical filtering process.
Dialog Box

MA or AR input port is enabled or disabled appropriately.References
Oppenheim, A. V. and R. W. Schafer. Discrete-Time Signal Processing. Englewood Cliffs, NJ: Prentice Hall, 1989. Proakis, J. and D. Manolakis. Digital Signal Processing. 3rd ed. Englewood Cliffs, NJ: Prentice-Hall, 1996.See Also
Discrete Filter (Simulink)filter (MATLAB)