Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
|
Hi I'm implementing a LMS algorithm on a fixed point process C6201, The LMS dosen't seem to be stable when it was to be run for a very long time. for example when the weights is to be update for around 20000 times, the weights will lose its stabilty. I believe that this may be the problem of using finite precision LMS algorithm and also quantizse errors. I'm using a leaky LMS algorithm. Can anyone please advise on gow can I made the LMS to be stable once it converge |
|
|
|
Hi Try using a Normalised-LMS, where you would update your coefficients as: slw = ALPHA / (energy_data) * err [n] for (i=0; i < N; i++) { h[n+1,i] = h [n, i] + slw * data [n - i] } ALPHA = between 0.0 and 1.0 n == time index i == coefficient index err [n] = reference [n] - sum(i=0..N; h[n,i] * data [n - i]) See attached file for a floating point reference code. In fix point use: data = 16-bit data err = 16-bit data h = 16-bit data slw = 16-bit data energy_data = 40-bit accumulator Regards, eduard. PS: You migth have difficulties with the calculation of slw. Just as an idea you might want to play around with: Calculate slw = ALPHA / (energy_data) * err [n] as: 1)16bitreg = ALPHA / mantisa; 2)16bitreg = 16bitreg >> 1 3)16bitreg = 16bitreg * err [n] 4)16bitreg = 16bitreg >> (exponent-1) 5) slw = 16bitreg Comments: o Express energy_data = mantisa * 2^exp, 0<= mantisa< 0x4000 mantisa = 1.15 format (value between 0 and near 0.5) o DIV ALPHA / mantisa; result is positive but it can reach almost 2.0 when ALPHA = 0x7FFF (1.15 format == near 1.0) and mantisa = 0.5. This is why we shift right the result from divide and add 1 to the exponent,ie we keep the proper sign (positive). o You can skip step 2 and replace 4 by "16bitreg = 16bitreg >> exponent" if you use slw as unsigned 1.15 when you update your coefficients in "h[n+1,i] = h [n, i] + slw * data [n - i]" Goh Chee Wei <> wrote: Hi I'm implementing a LMS algorithm on a fixed point process C6201, The LMS dosen't seem to be stable when it was to be run for a very long time. for example when the weights is to be update for around 20000 times, the weights will lose its stabilty. I believe that this may be the problem of using finite precision LMS algorithm and also quantizse errors. I'm using a leaky LMS algorithm. Can anyone please advise on gow can I made the LMS to be stable once it converge _____________________________________ --------------------------------- Type: application/x-zip-compressed |