필터 지우기
필터 지우기

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