Sign in

username:

password:



Not a member?

Search c55x



Search tips

Subscribe to c55x



c55x by Keywords

AIC23 | C5509 | CCS | CSL | EMIF | EVM | GEL | GPIO | HPI | Interfacing | JTAG | McBSP | OMAP | Omap15 | OMAP59 | RTDX | SDRAM | TMS320VC5509 | USB | XDS5

Ads

Discussion Groups

Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).

  

Post a new Thread

q format - sunil - May 1 9:36:54 2006



i am implementing l.m.s algortihm for noise cancellation..i have intialised the
co-efficients zeros...but after running some time..the coeffiencts get peak values -32767 or
32768..all the coeffients are only either these two values..except one or two...i had changed
the u value many times but got the same result...mine is q15format..
   if i change the qformat will it be the solution for my problem??
   
  if so..how can i change my format...from q15 to q31..
   
  thanq and regards
  sunil

______________________________
New Year Gift for Members of DSPRelated.com.  Details here.


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

Re: q format - Mannava - May 3 9:38:02 2006

Hi,
   
  In LMS FIR filter has an equation like
   
  yn = xn conv hn where u initialise all the hn to 0 initially using a circular buffer and hn
are in q-15 then
   
  u will get yn in q-30 and left shift for extra sign gives q-31 and now take the higher 15
bits u r having q-15
   
  but this is in a for loop right for all hn so say filter order is 10 then 10 is represented
by 4 bits in magnitude as 1010 but u need to preceed a 0 to make it positive right so it will
become 01010.... now u need 5 bits for a value 10...
   
  so imagine ur mult operation only takes highest posible numbers in the filter for 16 bits
then obviously the value will have to saturate... to avoid overflow here 
   
  take xm in 5.11 or q-11 format and hn in q-15 format and ur output will be in q-11 format.
question is how do I convert this? u need to right shift the values of q-15 by 4 to get into
q-11 format basically u r allowing some precision loss by giving room for dynamic range and its
OK here
   
  when u calculate en as en = yn -x^n then
   
  yn is filtered signal and x^n is delayed or secondary signal depending on configuration of
noise cancel algo.... then both need to be in same format for subtraction
   
  take x^n in q-11 or 5.11 format and yn is also in q-11 or 5.11 then en is in 5.11 or q-11
format....
   
  ur mu value will be typically 0.01 to 0.06 say which will be in q-15 depends on lambda that u
canculate in for the configuration....  so
  2*mu*en will be in 5.11 format and now

  h(n+1) = hn + 2*mu*en*yn
   
  again u cannot add a 5.11 with 1.15 format since hn is in 1.15 and 2*mu*en*yn is in q-11 then
u need to convert 2*mu*en*yn to q-15 back by giving a left shift by 4. now ZOOM and u have ur
thumbs up with the values not saturating suprisingly right....!!
   
  ur accumulator is 40 bit instead of 32 bit right did u wonder why is it so in 55X?? its only
to give room for 8 bits in guard to tackle 256 overlows....   anyways ur val always goes into
guard bits when its overflowing and when u take care of giving some dynamic range at input
itself u will avoid this....
   
  Now its ur turn sunil.... try this up... it will work..... Basically to tell u the truth I
did this algo in my final yr project with all this fixed math in place and I had simillar
issues by the way.....  one more thing take the order of the filter for expermentation purpose
to be 10 but really u need to calculate the order of the filter from the classical aspect as he
explains for the adaptive filter....
   
  HINT:  Try using LMS instruction which runs in 1 cycle for noise reduction it will owrk...
give a pipeline latency of 2 cycles for result to capture and u will see o/p
   
  Prem

sunil <s...@yahoo.co.in> wrote:  i am implementing l.m.s algortihm for noise
cancellation..i have intialised the co-efficients zeros...but after running some time..the
coeffiencts get peak values -32767 or 32768..all the coeffients are only either these two
values..except one or two...i had changed the u value many times but got the same result...mine
is q15format..
if i change the qformat will it be the solution for my problem??

if so..how can i change my format...from q15 to q31..

thanq and regards
sunil

______________________________
New Year Gift for Members of DSPRelated.com.  Details here.


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