21.07.2015 Views

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

"TMS320C55x DSP Library DSPLIB Programmer's Reference"

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

dlmsnh Number of filter coefficients. Filter order = nh – 1.nh ≥ 3nxoflagLength of input and output data vectorsOverflow flag. If oflag = 1, a 32-bit overflow has occurred If oflag = 0, a 32-bit overflow has not occurredDescriptionAdaptive delayed least-mean-square (LMS) FIR filter using coefficients storedin vector h. Coefficients are updated after each sample based on the LMSalgorithm and using a constant step = 2*mu. The real data input is stored invector dbuffer. The filter output result is stored in vector r .LMS algorithm uses the previous error and the previous sample (delayed) totake advantage of the C55x LMS instruction.The delay buffer used is the same delay buffer used for other functions in theC55x <strong>DSP</strong> <strong>Library</strong>. There is one more data location in the circular delay bufferthan there are coefficients. Other C55x <strong>DSP</strong> <strong>Library</strong> functions use this delaybuffer to accommodate use of the dual-MAC architecture. In the DLMS function,we make use of the additional delay slot to allow coefficient updating aswell as FIR calculation without a need to update the circular buffer in the interimoperations.The FIR output calculation is based on x(i) through x(i–nh+1). The coefficientupdate for a delayed LMS is based on x(i–1) through x(i–nh). Therefore, byhaving a delay buffer of nh+1, we can perform all calculations with the givendelay buffer containing delay values of x(i) through x(i–nh). If the delay bufferwas of length nh, the oldest data sample, x(i–nh), would need to be updatedwith the newest data sample, x(i), sometime after the calculation of the first coefficientupdate term, but before the calculation of the last FIR term.AlgorithmFIR portionnh1r[j] h[k]* x[i k] 0 i nx 1k0Adaptation using the previous error and the previous sample:e(i) des(i 1) r (i 1)h k (i 1) h k (i) 2*mu * e(i 1) * x(i k 1)Overflow Handling MethodologyNo scaling implemented for overflow prevention.Special Requirements Minimum of 2 input and desired data samples. Minimum of 2 coefficients4-32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!