Go Down

### Topic: Question about magnitude (Read 3621 times)previous topic - next topic

#### PieterP

#60
##### Jun 15, 2018, 10:38 amLast Edit: Jun 15, 2018, 10:38 am by PieterP
Take a look at the image I posted earlier. You start with a 64 Hz sine wave of 1.25 V peak. The corrected FFT shows an amplitude of 1.25 in the 64 Hz bin, as you would expect, but the 62 Hz and 66 Hz bins are not zero.

#### Noisecontrol

#61
##### Jun 15, 2018, 10:45 am
What is reason of it?

#### PieterP

#62
##### Jun 15, 2018, 10:51 am
Because of the windowing, in this case. But you get the same problem if your input frequency is not an integer multiple of the bin frequency. There's not much you can do about it.

Are you still trying to do A-weighting?

#### Noisecontrol

#63
##### Jun 15, 2018, 10:54 am
Maybe because of a slight oscillation in the main frequency. If the distance between frequencies increases, this problem can be solved

#### Noisecontrol

#64
##### Jun 15, 2018, 11:00 amLast Edit: Jun 15, 2018, 11:02 am by Noisecontrol
I try to analize sound and then caculated dB flat in per bin if it be corrected by a reffrence sound level meter,I can convert dB flat to A weighting and test it.but the hardest part of this project make a amplifire microphon and messurment adc and convert to voltage in per bin by fft.
I try and show my code to you to help me about it
Thanks a lot

#### PieterP

#65
##### Jun 15, 2018, 11:13 am
A-weighting is normally done in the time-domain, using analog filters. Newer devices use digital filters. I couldn't find any online references on using FFT for A-weighting.
If your goal is to create a working A-weighting system, I'd use digital filters.
If you want to learn about DSP and the Fourier transform, to try a new approach to A-weighting, I think you'll have to study the maths behind it first.

#### Noisecontrol

#66
##### Jun 15, 2018, 11:27 am
I find a circuit for a weighting

#### Noisecontrol

#67
##### Jun 15, 2018, 11:41 am
If you see some sound level meter aplication that analized sound in dBA  like audiotools , i think it a-weighting by fft cuz there are no any circuit to do a_weighting in mobile

#### PieterP

#68
##### Jun 15, 2018, 11:51 am
I'm pretty sure that it uses digital filters. You can "convert" analog filters to digital filters. The bilinear transform does exactly that, for example. It's a first-order approximation, but it should do the trick.

#### Noisecontrol

#69
##### Jun 15, 2018, 12:34 pm
How a android mobile do digital filter?

#### PieterP

#70
##### Jun 15, 2018, 12:43 pm
You factor the discrete-time transfer function into second-order polynomials (both the numerator and the denominator), and then you use the coefficients of these polynomials as the coefficients of the BiQuad filters.

Or you could calculate the convolution of the difference equation explicitly. But I think that could result in numeric instability.

Either way, it's going to be much easier than using an FFT.

#### Noisecontrol

#71
##### Jun 15, 2018, 12:59 pm
Can do it by aurdino?
How can i find sample of it in arduino code?

#### MarkT

#72
##### Jun 15, 2018, 02:01 pm
What is reason of it?

The fourier transform is only mathematically defined for periodic waveforms (that repeat for ever)
The DFT (of which FFT is an implementation) is only meaningful if the signal wraps around to the
beginning seamlessly - otherwise you have to use a window to reduce (but not eliminate) wrap-around
artifacts.

The best window is probably Kaiser-Bessel.  It takes a tuning parameter so you can select the properties
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### Noisecontrol

#73
##### Jun 15, 2018, 03:30 pm
Can do bilinear transform by aurdino?
How can i find sample of it in arduino code?

#### MarkT

#74
##### Jun 15, 2018, 03:43 pm
Can do bilinear transform by aurdino?
How can i find sample of it in arduino code?
No, you do this as filter design time - the easiest way to design digital filters
is to find an online calculator, but normally they only exist for low-pass, band-pass
or high-pass, not a specific weighting function.

So the idea is find an analog A-weighting filter, put its poles and zeroes through
the bilinear transform to get Z-transform poles and zeroes, and feed that into
a digital filter tool.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up