Problem designing casual filter that eliminates 50hz sine wave
1 view (last 30 days)
Show older comments
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!
0 Comments
Accepted Answer
Rick Rosson
on 17 Jun 2011
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.
0 Comments
More Answers (1)
See Also
Categories
Find more on Multirate and Multistage Filters in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!