Struggling with user weighting curves

Hi all-

First off I’ve got a 401 so old code here 1.924.

I’m trying to do what should be dirt simple: I want to spectrum analyze an external pink noise signal but have it display as a flat horizontal line using a custom user curve.

This should be dirt simple as it’s just 10dB/decade across a few decades. It didn’t take me long to write one up that covered 1Hz to 10KHz - four decades.

Here’s how I built it:
I pinned 1KHz as my 0dB gain point
I pinned 1/100/1000/10000Hz in exact 10dB increments
I filled in the interim values using linear spacing (~1.12dB per step in the file below)

This gives me severe droop between my pinned decade values. All my decade values are flat but between the decades it droops by three dB.

When I go in & try to manually fix this I seem to get caught in an overshoot loop and for the life of me it won’t cooperate. Am I doing something wrong? Thanks.

Pink Noise 1Hz - 20KHz 10dB/decade normalized to 0dB gain @ 1KHz

1, 30
2, 28.96
3, 27.84
4, 26.72
5, 25.60
6, 24.48
7, 23.36
8, 22.24
9, 21.12
10, 20
20, 18.96
30, 17.84
40, 16.72
50, 15.60
60, 14.48
70, 13.36
80, 12.24
90, 11.12
100, 10
200, 8.96
300, 7.84
400, 6.72
500, 5.60
600, 4.48
700, 3.36
800, 2.24
900, 1.12
1000, 0
2000, -1.04
3000, -2.16
4000, -3.28
5000, -4.40
6000, -5.52
7000, -6.64
8000, -7.76
9000, -8.88
10000, -10

Hi @Chicago, I think the issue is that the interpolation assumes a linear interpolation, while you are expecting a log.

For example, pink noise falls off at 10 dB/decade. There are 3.32 octaves per decade. So, we’d expect 3.01 dB per octave (3.01 * 3.32 = 10)

So, let’s say we specified a weighting that was:

20, 0
200, -10

OK, so it’s clear to see this would give 0 dB atten at 20 Hz and -10 dB at 200 Hz. But since this is linear, what happens at the midpoint? the midpoint is 110 Hz. And at 110 Hz, it will deliver -5 dB. But is that what we want?

Playing out the octaves, we’d expect:

20 0 dB
40 -3.01 dB
80 -6.02 dB
160 -9.03 dB
200 -10 dB

So, back to the midpoint at 110 Hz and the -5 dB we get from linear interpolation, that’s not what we want. In fact, at 110 Hz, we can see from the short table above the value should be between -6 and -9 dB.

And that is what is probably causing your scalloping.

The fix here would be generate a lot more points for your weighting–perhaps 5 or 10 points per octave.

Alternately, it would be useful to add a way to specify log interpolation for a given weighting file. That way you could specify pink noise as follows

!LogInterpolation
10 20
1000 0
100000 -20

I’ve added the issue here: Add ability to specify log interpolation on weightings file · Issue #34 · QuantAsylum/QA40x · GitHub

I’ve got QA401. This came up recently and I got in a bind because I had no way to do this. The software chokes if I try to import a weighting file with !LogInterpolation or LOGINTERP. Another example of 401 users left in the mud.

Has anyone got a file that provides reasonable inverse pink nose weighting file so I can show my client a straight line?