您的位置: OpenADSP社区论坛 -> Blackfin专区 -> 新手上路 -> [求助]DSP Run time library中的cfir用法
本帖共有993个阅读者
发表帖子 发表投票 回复主题
[求助]DSP Run time library中的cfir用法
goldenmelon(论坛新手)
goldenmelon
头衔:社区公民
帮派:无帮无派
帖数:1
金钱:116
积分:2
注册时间:2011/9/19
楼主信息 | 留言 | Email | 主页 | 编辑 | 管理 | 离线
[求助]DSP Run time library中的cfir用法
哪位大侠介绍下cfir的用法,另外frac16和float之间如何转换?我接收到的数据是复数信号,实部虚部都是float型的,要滤波,如何对接cfir?能否提供一个例程?

这家伙很懒,什么也没有留下!
等级:论坛新手 参考IP地址:*.*.*.*
2011/9/20 0:05:51
尊贵身份标志
andy(论坛版主)
andy
头衔:社区公民
帮派:无帮无派
帖数:2287
金钱:11132
积分:2263
注册时间:2011/6/8
1信息 | 留言 | Email | 主页 | 编辑 | 管理 | 离线

没用过这个,找到一些关于blackfin对cfir的介绍,看是否有用:



void cfir_fr16(const complex_fract16  input[],
              complex_fract16        output[],
              int                    length,
              cfir_state_fr16       *filter_state);
  int k;                    /* Number of coefficients  */
  complex_fract16 *h;       /* Filter coefficients     */
  complex_fract16 *d;       /* Start of delay line     */
  complex_fract16 *p;       /* Read/write pointer      */
}  cfir_state_fr16;
This function implements a complex finite impulse response (CFIR) filter. It generates the filtered response of the complex input data input and stores the result in the complex output vector output.
The function maintains the filter state in the structured variable filter_state, which must be declared and initialized before calling the function. The macro cfir_init, in the filter.h header file, is available to initialize the structure.
  (state).h = (coeffs);  \
  (state).d = (delay);   \
  (state).p = (delay);   \
  (state).k = (ncoeffs)
The characteristics of the filter (passband, stopband, and so on) depend upon the number of complex filter coefficients and their values. A pointer to the coefficients should be stored in filter_state->h, and filter_state->k should be set to the number of coefficients. The function assumes that the coefficients are stored in the normal order, thus filter_state->h[0] contains the first filter coefficient and filter_state->h[k-1] contains the last coefficient.
Each filter should have its own delay line, which is a vector of type complex_fract16 and whose length is equal to the number of coefficients. The vector should be cleared to zero before calling the function for the first time and should not otherwise be modified by the user program. The structure member filter_state->d should be set to the start of the delay line, and the function uses filter_state->p to keep track of its current position within the vector.
where:
    x = input
    y = output
    h = array of coefficients
    k = number of coefficients
    i = {0, 1, ..., length-1}
[–1.0 , +1.0)

这家伙很懒,什么也没有留下!
等级:论坛版主 参考IP地址:*.*.*.*
2011/9/21 9:11:09
songsongyu(论坛新手)
songsongyu
头衔:社区公民
帮派:无帮无派
帖数:23
金钱:294
积分:30
注册时间:2011/7/27
2信息 | 留言 | Email | 主页 | 编辑 | 管理 | 离线

貌似在数字信号处理方面,这个网站给的答案不给力


这家伙很懒,什么也没有留下!
等级:论坛新手 参考IP地址:*.*.*.*
2011/9/29 21:26:07
尊贵身份标志
夜色飘摇(论坛版主)
夜色飘摇
头衔:社区公民
帮派:无帮无派
帖数:350
金钱:1773
积分:332
注册时间:2011/6/8
3信息 | 留言 | Email | 主页 | 编辑 | 管理 | 离线
没用过,不清楚

我要成为勇敢的海上战士!
等级:论坛版主 参考IP地址:*.*.*.*
2011/9/30 10:24:54
Powered by OpenADSP Copyright © 2010 www.Openadsp.com. All rights reserved.154348 Call, 1 Queries, Processed in 0.031250 second(s),