This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DSP模数转换后进行FIR滤波,结果不理想

FIR滤波后,依然还存在高频毛刺,结果如下

  • 程序如下:

    void fir_filter(float b[],float c[])
    {
     int i,j=0;
     float sum;
     float h[21]={
          -0.09055792262407, 0.009744804975761,  0.01838867509003,  0.03195961694651,
           0.04917012260358,  0.06836127325356,  0.08774901331544,   0.1053433191277,
            0.1194310387162,    0.128484986607,   0.1316381457976,    0.128484986607,
            0.1194310387162,   0.1053433191277,  0.08774901331544,  0.06836127325356,
           0.04917012260358,  0.03195961694651,  0.01838867509003, 0.009744804975761,
          -0.09055792262407
           };

     for(i=0;i<3000;i++)
     {
      sum=0.0;
      for(j=0;j<21;j++)
      {
       if(i >= j)
       sum+=h[j]*b[i-j];
       else
       ;

      }
      c[i]=sum;
     }
     for(i=0;i<2980;i++)
      {
      c[i]=c[i+20];
      }
    }