Clear Filters
Clear Filters

how to set a lowpass filter in simulink?

4 views (last 30 days)
moh mor
moh mor on 22 Jun 2023
Commented: Paul on 23 Jun 2023
I want to design a lowpass filter in simulink. my sampling frequency is 1000 Hz and I want to have transition band between 120 Hz and 880 Hz in order to make my reconstruction filter for DAC, as per to the following picture:
my setting for lowpass filter is in the following, but it arises the represented error:
I decided to use filter designer part in MATLAB. but in addition to the fact that it does not allow you to exceed transition beyond half of sampling frequency, it gives you error: "filter error must be 3 or more." . settings are shown in the following:
what can I do then?
any help would be appreciated.
Thanks.

Answers (1)

Paul
Paul on 22 Jun 2023
Hi moh mor,
The error message from the Lowpass Filter block sounds bit misleading.
If you look on the doc page, it says that the passband and stopband edges must be less than half the Input sample rate. The Stopband edge of 880 Hz is more than half the Input sample rate of 1000 Hz; I suspect that's the problem.
Under the hood, the filter design probably normalizes everything so that 1 corresponds to half the input sample rate, hence the wording of the error message. Just guessing about that.
  2 Comments
moh mor
moh mor on 23 Jun 2023
Thanks. Your first point was correct. Anyway, is not there any option to use filter within 0 to Fs? this makes my filter more relaxed.
Paul
Paul on 23 Jun 2023
I'm not quite sure what this means: "use filter within 0 to Fs". I'm pretty sure you can only specify the frequency response at frequencies 0 < F < Fs/2 because the frequency response has to satsisfy certain symmetry properties at all frequencies outside that range.

Sign in to comment.

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!