Quantcast
Channel: C2000™︎ 微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 12199

低通滤波器疑问

$
0
0

static inline _iq FILTER_FO_run(FILTER_FO_Handle handle,const _iq inputValue)
{
FILTER_FO_Obj *obj = (FILTER_FO_Obj *)handle;

_iq a1 = obj->a1;
_iq b0 = obj->b0;
_iq b1 = obj->b1;
_iq x1 = obj->x1;
_iq y1 = obj->y1;


// compute the output
_iq y0 = _IQmpy(b0,inputValue) + _IQmpy(b1,x1)
- _IQmpy(a1,y1);


// store values for next time
obj->x1 = inputValue;
obj->y1 = y0;

return(y0);
} // end of FILTER_FO_run() function


//! \brief Runs a first-order filter of the form
//! y[n] = b0*x[n] - a1*y[n-1]
//!
//! \param[in] handle The filter handle
//! \param[in] inputValue The input value to filter
//! \return The output value from the filter
static inline _iq FILTER_FO_run_form_0(FILTER_FO_Handle handle,const _iq inputValue)
{
FILTER_FO_Obj *obj = (FILTER_FO_Obj *)handle;

_iq a1 = obj->a1;
_iq b0 = obj->b0;
_iq y1 = obj->y1;


// compute the output
_iq y0 = _IQmpy(b0,inputValue) - _IQmpy(a1,y1);


// store values for next time
obj->y1 = y0;

return(y0);
} // end of FILTER_FO_run_form_0() function

这两个滤波器有什么不一样? 使用场合有什么不同?


Viewing all articles
Browse latest Browse all 12199


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>