Home > other >  Move a FFT algorithm, data up to, but they can't explain
Move a FFT algorithm, data up to, but they can't explain

Time:01-14

Rt.
Use cmsis library function..
Data authentication, generate a sin.
Is a dc signal: 3.0
Fs1=50 hz
A1=2.0 v

Fs2=100 hz
A2=0.8 v

Produce 64 points.

Float sindata [64].
for(i=0; i<64; I++)
{
Arm_sin_f32 sindata [I]=3.0 + 2.0 * (2 * PI * 50 * I/64) + 0.8 * arm_sin_f32 (2 * PI * 100 * I/64);
}

Then sorting data, according to the real part, imaginary part assigned to FFT. The buf_in. [128].

Then as FFT
Arm_cfft_f32 (& amp; Arm_cfft_sR_f32_len64, & amp; FFT. Buf_in, 0, 1);
Then the mold:
Arm_cmplx_mag_f32 (& amp; FFT buf_in, & amp; FFT buf_out, 64).
To calculate the frequency component.

for(i=0; i<64; I++)
{
FFT. Buf_out [I]/=32;
}
FFT. Buf_out [0]=/2;

The data to see, is correct. The following figure, among them, the subscript 0 to 3 v, the subscript 14 to 2 v, the subscript 28 0.8 v.
I don't understand is, why is 50 hz subscript 2 v amplitude at 14? 100 hz in 28 subscript 0.8 v? How to corresponding?
Then I sample rate should be 64?
Sampling points are 64.


That how to determine the corresponding frequency is 14?

  • Related