1
$\begingroup$

Disclaimer: I have read a lot about signal processing, but I taught everything myself and therefore have some gaps in theory and practice.

I am currently working on a measurement software that is supposed to calibrate the loudspeakers to the listening position. For this, I use maximum sequences (MLS) as excitation signal. The calibration algorithm works so far that I can calculate an impulse response and a corresponding frequency response. Now I have noticed that with MLS signals 90% of the energy is on the high frequency range and I would like to build a low pass filter that has -3dB per octave ("pinking filter"), which I then apply to the excitation signal and inverted to the measured signal. Since it will be used to measure the listening position/speaker, I thought it's best to make it a linear-phase FIR filter. However, when designing this filter I just can't get any further and only find rough approaches, or IIR filters in Laplace form. As a filter designer, I have tried: http://t-filter.engineerjs.com, but I can't get anywhere near what I want. Also, I found this page: https://www.firstpr.com.au/dsp/pink-noise/, which is probably often shared on this topic, but even from it I do not manage to extract a reasonable filter.Does anyone have a suggestion how I can continue? Is the way I chose the right one?

P.s. In the end I want to program everything in c++, which is why I need to understand every step, so most Matlab examples don't help me.

$\endgroup$
2
  • $\begingroup$ I'd argue that code in any language you're able to read wouldn't be that bad, you'll translate anything you'd learn into "your" C++ anyways (and if you're able to write C++, reading not-overcomplicating MATLAB code is probably a-ok) :) But, yeah, understanding is the primary goal. $\endgroup$ Jun 13, 2022 at 13:18
  • $\begingroup$ True, but I meant that I can't do anything with Matlab commands like "pinknoise(z)", because I still don't understand how it works. $\endgroup$ Jun 13, 2022 at 14:56

1 Answer 1

1
$\begingroup$

If you want to a simple pink filter you can just use this https://ccrma.stanford.edu/~jos/sasp/Example_Synthesis_1_F_Noise.html

The pink filter is minimum phase so it can easily be inverted by flipping the numerator and denominator coefficients. So you can generate your MLS sequence, run it through the pink filter, play it, acquire the acoustic signal, run it through the inverse pink filter and than unwind the MLS to get the impulse response.

That's a fairly inefficient approach. Most acoustic measurement these dats systems use frequency shaped pseudo random noise or logarithmic sweeps. There is no real advantage to using MLS and it adds extra complexity.

The trickiest part here is to manage signal to noise as a function of frequency and also make sure that measurement errors and non-linear distortions are properly detected and managed. Acoustic background noise is actually not really pink but more brown at low frequencies where you will have the most noise problems.

$\endgroup$
2
  • $\begingroup$ I have read about the frequency shaped pseudo random noise (developed by S.Müller). However, I never found anything about how he accomplishes this. Thanks for the pink filter, if this is minimum phase I will give it a try. $\endgroup$ Jun 13, 2022 at 14:52
  • $\begingroup$ frequency shaped pseudo random noise is fairly simple and has been around for quite a while. If you are interested ask a separate question $\endgroup$
    – Hilmar
    Jun 14, 2022 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.