Discrete low-pass filter
3 次查看(过去 30 天)
显示 更早的评论
Hi community!
I have created a Matlab function block. Then I have set its sample time equal to "Ts" (100e-6). After that I implemented a simple low-pass filter code using this block, the results are different from when I build the filter using the "1/s" and "gain" blocks of Simulink. The transfer function of the filter is:
Y/X=1/(1+sTc)
I have implemented it by applying the backward Euler discretizing method as :
Y(k)=(Ts/(Ts+Tc))X(k)+(Tc/(Tc+Ts))Y(k-1)
where X is a sinusoidal function given from outside of the Matlab function block.
Is it something wrong here?
Regards,
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Digital Filter Analysis 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!