Help with THD+N calculations
- From: "rcoup" <robert.coup@xxxxxxxxx>
- Date: 30 May 2006 20:49:08 -0700
Hi All,
My DSP knowledge is far too rusty and I've been hitting my head against
the wall for a little while now. Archives of the group have got
tantalisingly close but I'm still confused. The fun situation is
calculating THD+N of an audio signal.
What I'm doing:
a. 1KHz sine wave is my fundamental.
b. Notch Filter to remove the 1KHz
c. FFT (8Kpoint)
d. Get magnitudes (mag[] = sqrt(re[]^2 + im[]^2))
e. Calculate the total energy over the range 20Hz to 20KHz
Ex = sum(sqr(mag[k])) with k in 3-3143 (the FFT bins i'm
interested in)
f. thdn = sqrt(Ex) / (3143-3+1)
Now I need to compare that with the amplitude of the fundamental to get
my %age... whats an easy way to do that? Have I messed up anything so
far (i'm thinking i should be removing DC...)?
Thanks in advance,
Robert
.
- Follow-Ups:
- Re: Help with THD+N calculations
- From: Fred Marshall
- Re: Help with THD+N calculations
- Prev by Date: Re: Weekend Puzzle
- Next by Date: Re: Programming the FLASH - TMS320C2812
- Previous by thread: Programming the FLASH - TMS320C2812
- Next by thread: Re: Help with THD+N calculations
- Index(es):
Relevant Pages
|