我想实现一个1阶高通滤波器,在matlab中通过FDATool工具,导出了相关的数据,如下:
/*
* Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
*
* Generated by MATLAB(R) 7.2 and the Signal Processing Toolbox 6.5.
*
* Generated on: 16-Aug-2013 09:03:09
*
*/
/*
* Discrete-Time IIR Filter (real)
* ——————————-
* Filter Structure : Direct-Form I
* Numerator Length : 2
* Denominator Length : 2
* Stable : Yes
* Linear Phase : No
*
* Implementation Cost
* Number of Multipliers : 3
* Number of Adders : 2
* Number of States : 2
* MultPerInputSample : 3
* AddPerInputSample : 2
*/
/* General type conversion for MATLAB generated C-code */
#include "tmwtypes.h"
/*
* Expected path to tmwtypes.h
* C:\Program Files\MATLAB\R2006a\extern\include\tmwtypes.h
*/
/*
* Warning – Filter coefficients were truncated to fit specified data type.
* The resulting response may not match generated theoretical response.
* Use the Filter Design & Analysis Tool to design accurate
* single-precision filter coefficients.
*/
const int NL = 2;
const real32_T NUM[2] = {
1.000200033, -1.000200033
};
const int DL = 2;
const real32_T DEN[2] = {
1, -0.9991999865
};
现在的问题是,通过这个东西,怎么样在2812中编出IIR滤波器来?或者说,知道了滤波器Z域传递函数,怎么编出IIR滤波器来? 本人对这些东西不太懂,求指点,如果有相关例程更好了,谢谢大家了
Eric Ma:
Yangyang,
C2000在滤波器上有相应的库和例程,下载ControlSUITE软件,参照
C:\ti\controlSUITE\libs\dsp\FixedPointLib\v101\examples_ccsv4
Eric
我想实现一个1阶高通滤波器,在matlab中通过FDATool工具,导出了相关的数据,如下:
/*
* Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
*
* Generated by MATLAB(R) 7.2 and the Signal Processing Toolbox 6.5.
*
* Generated on: 16-Aug-2013 09:03:09
*
*/
/*
* Discrete-Time IIR Filter (real)
* ——————————-
* Filter Structure : Direct-Form I
* Numerator Length : 2
* Denominator Length : 2
* Stable : Yes
* Linear Phase : No
*
* Implementation Cost
* Number of Multipliers : 3
* Number of Adders : 2
* Number of States : 2
* MultPerInputSample : 3
* AddPerInputSample : 2
*/
/* General type conversion for MATLAB generated C-code */
#include "tmwtypes.h"
/*
* Expected path to tmwtypes.h
* C:\Program Files\MATLAB\R2006a\extern\include\tmwtypes.h
*/
/*
* Warning – Filter coefficients were truncated to fit specified data type.
* The resulting response may not match generated theoretical response.
* Use the Filter Design & Analysis Tool to design accurate
* single-precision filter coefficients.
*/
const int NL = 2;
const real32_T NUM[2] = {
1.000200033, -1.000200033
};
const int DL = 2;
const real32_T DEN[2] = {
1, -0.9991999865
};
现在的问题是,通过这个东西,怎么样在2812中编出IIR滤波器来?或者说,知道了滤波器Z域传递函数,怎么编出IIR滤波器来? 本人对这些东西不太懂,求指点,如果有相关例程更好了,谢谢大家了
user6024019:
回复 Eric Ma:
请问是其中的哪个例程,我找不到。。。
我想实现一个1阶高通滤波器,在matlab中通过FDATool工具,导出了相关的数据,如下:
/*
* Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
*
* Generated by MATLAB(R) 7.2 and the Signal Processing Toolbox 6.5.
*
* Generated on: 16-Aug-2013 09:03:09
*
*/
/*
* Discrete-Time IIR Filter (real)
* ——————————-
* Filter Structure : Direct-Form I
* Numerator Length : 2
* Denominator Length : 2
* Stable : Yes
* Linear Phase : No
*
* Implementation Cost
* Number of Multipliers : 3
* Number of Adders : 2
* Number of States : 2
* MultPerInputSample : 3
* AddPerInputSample : 2
*/
/* General type conversion for MATLAB generated C-code */
#include "tmwtypes.h"
/*
* Expected path to tmwtypes.h
* C:\Program Files\MATLAB\R2006a\extern\include\tmwtypes.h
*/
/*
* Warning – Filter coefficients were truncated to fit specified data type.
* The resulting response may not match generated theoretical response.
* Use the Filter Design & Analysis Tool to design accurate
* single-precision filter coefficients.
*/
const int NL = 2;
const real32_T NUM[2] = {
1.000200033, -1.000200033
};
const int DL = 2;
const real32_T DEN[2] = {
1, -0.9991999865
};
现在的问题是,通过这个东西,怎么样在2812中编出IIR滤波器来?或者说,知道了滤波器Z域传递函数,怎么编出IIR滤波器来? 本人对这些东西不太懂,求指点,如果有相关例程更好了,谢谢大家了
Eric Ma:
回复 user6024019:
Yangyang,
C:\ti\controlSUITE\libs\dsp\FixedPointLib\v101\examples_ccsv4\2833x_FixedPoint_IIR16
-ERIC
我想实现一个1阶高通滤波器,在matlab中通过FDATool工具,导出了相关的数据,如下:
/*
* Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
*
* Generated by MATLAB(R) 7.2 and the Signal Processing Toolbox 6.5.
*
* Generated on: 16-Aug-2013 09:03:09
*
*/
/*
* Discrete-Time IIR Filter (real)
* ——————————-
* Filter Structure : Direct-Form I
* Numerator Length : 2
* Denominator Length : 2
* Stable : Yes
* Linear Phase : No
*
* Implementation Cost
* Number of Multipliers : 3
* Number of Adders : 2
* Number of States : 2
* MultPerInputSample : 3
* AddPerInputSample : 2
*/
/* General type conversion for MATLAB generated C-code */
#include "tmwtypes.h"
/*
* Expected path to tmwtypes.h
* C:\Program Files\MATLAB\R2006a\extern\include\tmwtypes.h
*/
/*
* Warning – Filter coefficients were truncated to fit specified data type.
* The resulting response may not match generated theoretical response.
* Use the Filter Design & Analysis Tool to design accurate
* single-precision filter coefficients.
*/
const int NL = 2;
const real32_T NUM[2] = {
1.000200033, -1.000200033
};
const int DL = 2;
const real32_T DEN[2] = {
1, -0.9991999865
};
现在的问题是,通过这个东西,怎么样在2812中编出IIR滤波器来?或者说,知道了滤波器Z域传递函数,怎么编出IIR滤波器来? 本人对这些东西不太懂,求指点,如果有相关例程更好了,谢谢大家了
user6024019:
回复 Eric Ma:
我装了controlsuite之后,文件为C:\tidcs\c28\DSP2833x\v131\DSP2833x_examples,为啥跟你的不一样呢?
我想实现一个1阶高通滤波器,在matlab中通过FDATool工具,导出了相关的数据,如下:
/*
* Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
*
* Generated by MATLAB(R) 7.2 and the Signal Processing Toolbox 6.5.
*
* Generated on: 16-Aug-2013 09:03:09
*
*/
/*
* Discrete-Time IIR Filter (real)
* ——————————-
* Filter Structure : Direct-Form I
* Numerator Length : 2
* Denominator Length : 2
* Stable : Yes
* Linear Phase : No
*
* Implementation Cost
* Number of Multipliers : 3
* Number of Adders : 2
* Number of States : 2
* MultPerInputSample : 3
* AddPerInputSample : 2
*/
/* General type conversion for MATLAB generated C-code */
#include "tmwtypes.h"
/*
* Expected path to tmwtypes.h
* C:\Program Files\MATLAB\R2006a\extern\include\tmwtypes.h
*/
/*
* Warning – Filter coefficients were truncated to fit specified data type.
* The resulting response may not match generated theoretical response.
* Use the Filter Design & Analysis Tool to design accurate
* single-precision filter coefficients.
*/
const int NL = 2;
const real32_T NUM[2] = {
1.000200033, -1.000200033
};
const int DL = 2;
const real32_T DEN[2] = {
1, -0.9991999865
};
现在的问题是,通过这个东西,怎么样在2812中编出IIR滤波器来?或者说,知道了滤波器Z域传递函数,怎么编出IIR滤波器来? 本人对这些东西不太懂,求指点,如果有相关例程更好了,谢谢大家了
Eric Ma:
回复 user6024019:
应该是在controlSUITE的安装目录下啊,不是在tidcs中。
Eric
我想实现一个1阶高通滤波器,在matlab中通过FDATool工具,导出了相关的数据,如下:
/*
* Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
*
* Generated by MATLAB(R) 7.2 and the Signal Processing Toolbox 6.5.
*
* Generated on: 16-Aug-2013 09:03:09
*
*/
/*
* Discrete-Time IIR Filter (real)
* ——————————-
* Filter Structure : Direct-Form I
* Numerator Length : 2
* Denominator Length : 2
* Stable : Yes
* Linear Phase : No
*
* Implementation Cost
* Number of Multipliers : 3
* Number of Adders : 2
* Number of States : 2
* MultPerInputSample : 3
* AddPerInputSample : 2
*/
/* General type conversion for MATLAB generated C-code */
#include "tmwtypes.h"
/*
* Expected path to tmwtypes.h
* C:\Program Files\MATLAB\R2006a\extern\include\tmwtypes.h
*/
/*
* Warning – Filter coefficients were truncated to fit specified data type.
* The resulting response may not match generated theoretical response.
* Use the Filter Design & Analysis Tool to design accurate
* single-precision filter coefficients.
*/
const int NL = 2;
const real32_T NUM[2] = {
1.000200033, -1.000200033
};
const int DL = 2;
const real32_T DEN[2] = {
1, -0.9991999865
};
现在的问题是,通过这个东西,怎么样在2812中编出IIR滤波器来?或者说,知道了滤波器Z域传递函数,怎么编出IIR滤波器来? 本人对这些东西不太懂,求指点,如果有相关例程更好了,谢谢大家了
Eric Fu:
回复 user6024019:
Yangyang 你好 ,
具体的路径在ControlSuite->libs->dsp->FixedPointlib中。例程中有些关键的代码是不可见的,只要会调用函数就行。