Design IIR filter from absorption data

3 visualizaciones (últimos 30 días)
Marius Tøndel Eliassen
Marius Tøndel Eliassen el 15 de Feb. de 2020
Comentada: Marius Tøndel Eliassen el 24 de Feb. de 2020
Hello!
As the title says, and I have got the coefficients. This:
f = [125 250 500 1000 2000 4000];
alpha = [0.09 0.2 0.5 0.7 0.8 0.9];
N = 1; % Filter order
Fs = 44100 % Sampling frequency
w = f/fs*2*pi; % Frequency in radians
R = sqrt(1-alpha);
% Find R(z) coefficients:
[b,a] = invfreqz(R,w,N,N);
How do I go about from here, as I need to visualize the filter, e.g. a plot of the magnitude response?
Best regards,
Marius

Respuestas (1)

Kaashyap Pappu
Kaashyap Pappu el 24 de Feb. de 2020
The fvtool could be what you are looking for. It will allow you to do the necessary visualizations.
Hope this helps!
  2 comentarios
Marius Tøndel Eliassen
Marius Tøndel Eliassen el 24 de Feb. de 2020
Thanks, I will check that out!
Marius Tøndel Eliassen
Marius Tøndel Eliassen el 24 de Feb. de 2020
That seems a good option for visualization. However my issue now is that my code doesn't give me a realistic filter shape for my coefficients. It should look like a low pass filter, but it is instead giving me something that looks like a shelving filter. It might be something I am missing in that code. What I am trying to do is depicted in the last section before the 3.1 mark in this article. Figure 1 shows it:

Iniciar sesión para comentar.

Categorías

Más información sobre Measurements and Spatial Audio en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by