ARM DSP 库的FFT算法点数增加到8192的疑问?
<p> </p><p> 最近要用到ARM M4的芯片做一个FFT算法,对音频信号做分析;但是ARM 的DSP库最大只有4096个点的FFT算法;</p>
<p> 若要做8192的FFT,要生成一个旋转因子表与位反转表,但是位反转表不知道怎么生成?希望有网友帮忙解释一下;</p>
<p>方案一:打算看能不能自己修改出一个8192点的FFT;</p>
<p>调用函数:</p>
<pre>
<code class="language-cpp">void arm_cfft_f32(
const arm_cfft_instance_f32 * S,
float32_t * p1,
uint8_t ifftFlag,
uint8_t bitReverseFlag)</code></pre>
<p>Parameters 参数解释<br />
<strong>S</strong> points to an instance of the floating-point CFFT structure<br />
<strong> p1</strong> points to the complex data buffer of size 2*fftLen. Processing occurs in-place<br />
<strong>ifftFlag </strong>flag that selects transform direction</p>
<p> value = 0: forward transform<br />
value = 1: inverse transform</p>
<p> <strong>bitReverseFlag </strong>flag that enables / disables bit reversal of output</p>
<p> value = 0: disables bit reversal of output<br />
value = 1: enables bit reversal of output</p>
<p> </p>
<p>这其中S里包含旋转因子表与位反转表;</p>
<p>如16点的:</p>
<p>const arm_cfft_instance_f32 arm_cfft_sR_f32_len16 = {<br />
16, twiddleCoef_16, armBitRevIndexTable16, ARMBITREVINDEXTABLE__16_TABLE_LENGTH<br />
};</p>
<p>旋转因子生成有函数,所以8192的也能生成;</p>
<p>/** <br />
* \par <br />
* Example code for Floating-point Twiddle factors Generation: <br />
* \par <br />
* <pre>for(i = 0; i< N/; i++) <br />
* { <br />
* twiddleCoef= cos(i * 2*PI/(float)N); <br />
* twiddleCoef= sin(i * 2*PI/(float)N); <br />
* } </pre> <br />
* \par <br />
* where N = 16 and PI = 3.14159265358979 <br />
* \par <br />
* Cos and Sin values are in interleaved fashion <br />
* <br />
*/<br />
const float32_t twiddleCoef_16 = {<br />
1.000000000f, 0.000000000f,<br />
0.923879533f, 0.382683432f,<br />
0.707106781f, 0.707106781f,<br />
0.382683432f, 0.923879533f,<br />
0.000000000f, 1.000000000f,<br />
-0.382683432f, 0.923879533f,<br />
-0.707106781f, 0.707106781f,<br />
-0.923879533f, 0.382683432f,<br />
-1.000000000f, 0.000000000f,<br />
-0.923879533f, -0.382683432f,<br />
-0.707106781f, -0.707106781f,<br />
-0.382683432f, -0.923879533f,<br />
-0.000000000f, -1.000000000f,<br />
0.382683432f, -0.923879533f,<br />
0.707106781f, -0.707106781f,<br />
0.923879533f, -0.382683432f<br />
};</p>
<p>反转表,为个表没看懂是怎么生成的,希望有网友帮忙解释一下;</p>
<p>const uint16_t armBitRevIndexTable16 =<br />
{<br />
//8x2, size 20<br />
8,64, 24,72, 16,64, 40,80, 32,64, 56,88, 48,72, 88,104, 72,96, 104,112<br />
};</p>
<p> </p>
<p></p>
<p>您好,请问这个问题有解决吗,我最近也遇到了这个问题,分析20kHz以上频率的信号,需要更高的频率分辨率</p>
Shellywho 发表于 2024-12-29 11:54
您好,请问这个问题有解决吗,我最近也遇到了这个问题,分析20kHz以上频率的信号,需要更高的频率分辨 ...
<p>已经解决,用程序自己生成数据</p>
页:
[1]