Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560

Ads

Discussion Groups

Discussion Groups | TMS320C6x | LMS Problem

Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).

  

Post a new Thread

LMS Problem - Goh Chee Wei - May 14 1:29:00 2003



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





(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

Re: LMS Problem - E Oliver - May 14 13:34:00 2003

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



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )