Problem designing casual filter that eliminates 50hz sine wave

1 次查看(过去 30 天)
Dear friends I have some problem designing this type of filter. The requirements are that I have to design a causal filter that eliminates 50 Hz sine wave signals while the alternating sequence (-1)nu[n] is reinforced with a factor 10.
I assume that the filter should be a BANDSTOP filter so I design it in that way, but when I import it to simulink matlab I am not allowed to connect sine wave input, i get an error which says that I must connect input with discrete sampling time and not continuos sampling time.
I am not sure where is my mistake so help me to solve the problem with the input or tell me how to design filter from the beginning
Thanks in advance All the best!

采纳的回答

Rick Rosson
Rick Rosson 2011-6-17
The issue here is not with the design of the filter, but rather with how you are trying to use it within Simulink. The filter is a discrete-time or digital filter, whereas the sine wave input block is set-up as a continuous-time or analog signal.
To fix this problem, simply double-click on the sine wave block and change the sampling time from the default value of 0 (meaning continuous-time) to a non-zero number like 1/Fs where Fs represents the sampling rate (in samples per second) of the discrete-time filter.
HTH.

更多回答(1 个)

siemprepeligroso
siemprepeligroso 2011-6-18
Dear Mr.Rosson
I did manage to solve this problem by replacing the classical sine wave with DSP sine wave block...but now I doubt that my design meet the requirements. "causal filter that eliminates 50 Hz sine wave signals while the alternating sequence (-1)nu[n] is reinforced with a factor 10."
since it says eliminate 50hz sine wave i think that the filter should be BANDSTOP...is it OK (i need confirmation here) while the other part I am not really able to understand :"alternating sequence (-1)nu[n] is reinforced with a factor 10." how can I achieve this???

类别

Help CenterFile Exchange 中查找有关 Multirate and Multistage Filters 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by