Help understanding state variable filter working principle and phase relations

Thread Starter

jacopo1919

Joined Apr 12, 2020
113
Hello!
I'm looking to the state variable filter proposed from ESP in Project 153 that is a state variable filter that splits the signal in 3 bands and sums them back together.
this should give a flat response all over the spectrum when the bands are summed back together.
I simulated the circuit with LTspice and the response looks flat as expected.

Schermata 2024-03-27 alle 16.51.05.png
R5/R6/C1/C2 cutoff frequency is set at 2200Hz
R20/R21/C5/C6 cutoff frequency is set at 170Hz

However, if i run a triangle wave of 1Khz inside of the circuit i get this
1k trinagle.png

and this if the frequency of the triangle is 400Hz

400 trinagle.png

In fact, at the beginning i was expecting to see the same sharp triangle at the output but It looks like each one of the 3 bands have a different phase shift and when summed together at the end they won't recreate the original shape of the triangle.
This is a visible distorsion but the text (of the related project 148) says "couldn't measure the distortion as it's below my measurement threshold, and it sat resolutely at 0.02%".
Also, the amplitude of Vout is lower then Vin but in the AC analysis graph i read that Vout has almost 0dB change from 20Hz to 20Khz.

This doesn't happen if repeat simulation with a sinewave instead of a triangle. this, though, is an analog audio circuit and there aren't be pure sine waves in audio signals that will pass through the circuit.
With the sine wave, i get only phase shifting, starting with 0° at 600 Hz.

sine 600.png
What i see from the simulation is probably going to sound bad or at least far from similar to the original input signal.
What am i missing?

Thanks for your help
 

Attachments

Papabravo

Joined Feb 24, 2006
21,258
You seem to have a fundamental misunderstanding of the frequency spectrum of various signals. You should do an FFT of a triangle wave at some frequency of interest – perhaps 440 Hz. Take a look at the harmonic content due to the discontinuity of the derivative at the peaks and valleys. When you run a triangle through a lowpass or bandpass filter that harmonic content will be attenuated. That attenuation will result in waveform distortion or lack of fidelity. Not sure why you would be surprised by this,
 

crutschow

Joined Mar 14, 2008
34,679
This doesn't happen if repeat simulation with a sinewave instead of a triangle. this, though, is an analog audio circuit and there aren't be pure sine waves in audio signals that will pass through the circuit.
True, but a normal audio signal can be broken into it's Fourier sine-wave components which go from about 20Hz to 20kHz..
A triangle-wave is never seen in an normal audio signal (so why would you use one for audio testing?), and has Fourier components well above 20Khz due the sharp breaks at the peaks of the waveform, thus you can't expect the triangle-wave to go through your filter without rounding of the peaks.

You need to understand what the Fourier components of your signal are.
 

Thread Starter

jacopo1919

Joined Apr 12, 2020
113
You seem to have a fundamental misunderstanding of the frequency spectrum of various signals. You should do an FFT of a triangle wave at some frequency of interest – perhaps 440 Hz. Take a look at the harmonic content due to the discontinuity of the derivative at the peaks and valleys. When you run a triangle through a lowpass or bandpass filter that harmonic content will be attenuated. That attenuation will result in waveform distortion or lack of fidelity. Not sure why you would be surprised by this,
I understand that for each filter sections, some harmonic content (or fundamental) will be attenuated with Linkwitz-Riley response.
And If i consider each filter separately, i wouldn't be surprise that the waveform differs from the original.

But here the output of each filter is summed back together. and for this reason i expect that the signals of two contiguous bands (low/mid and mid/high) at same frequency get also summed back together, resulting in a "0dB change" and ideally bringing back the harmonic content.
And i thought so since the AC analysis was showing 0db change until 20Khz

True, but a normal audio signal can be broken into it's Fourier sine-wave components which go from about 20Hz to 20kHz..
A triangle-wave is never seen in an normal audio signal (so why would you use one for audio testing?), and has Fourier components well above 20Khz due the sharp breaks at the peaks of the waveform, thus you can't expect the triangle-wave to go through your filter without rounding of the peaks.

You need to understand what the Fourier components of your signal are.
I'm sending the triangle to analyse and trying to understand what is going on here (that is the reason of the post itself)
But isn't the High Pass band keep sharp edges/high frequency harmonic content? the circuit sums all bands at the end and i expect them to be present in the final sum.
Why that high frequency content is not present in the sum?
 

Papabravo

Joined Feb 24, 2006
21,258
I understand that for each filter sections, some harmonic content (or fundamental) will be attenuated with Linkwitz-Riley response.
And If i consider each filter separately, i wouldn't be surprise that the waveform differs from the original.

But here the output of each filter is summed back together. and for this reason i expect that the signals of two contiguous bands (low/mid and mid/high) at same frequency get also summed back together, resulting in a "0dB change" and ideally bringing back the harmonic content.
And i thought so since the AC analysis was showing 0db change until 20Khz


I'm sending the triangle to analyse and trying to understand what is going on here (that is the reason of the post itself)
But isn't the High Pass band keep sharp edges/high frequency harmonic content? the circuit sums all bands at the end and i expect them to be present in the final sum.
Why that high frequency content is not present in the sum?
The problem is that once you lose the information due to attenuation AND phase shift, the supposed reconstruction by summation is unable to reproduce the original input by undoing the attenuation but adding additional phase shift.

ETA: since you did not show us your schematic, we have no idea what opamps you used. That choice might have a dramatic effect on the results.
 

Thread Starter

jacopo1919

Joined Apr 12, 2020
113
The problem is that once you lose the information due to attenuation AND phase shift, the supposed reconstruction by summation is unable to reproduce the original input by undoing the attenuation but adding additional phase shift.

ETA: since you did not show us your schematic, we have no idea what opamps you used. That choice might have a dramatic effect on the results.
the original schematic from ESP is linked in the first post.
My simulation is also attached in the first post (a bit hidden from the other images.
Here again:
schem.pngi naively used some TL072 powered with +- 12V.
 

Thread Starter

jacopo1919

Joined Apr 12, 2020
113
based on @Papabravo said, the the supposed reconstruction wouldn't work because there would be additional extra phase shift. So, maybe is there a way to rotate again the phase of each band of the same amount in the opposite direction in order to correct this?
or is there another approach that can mitigate it?
I can only think of all pass filters but if I'm not wrong, they are operating equally over all the frequency
 

Thread Starter

jacopo1919

Joined Apr 12, 2020
113
The project requires to split the signal in 3 bands, been able to attenuate them separately at wish (artistical expression of Dj or musicians), then sum them back together and send them to an audio amplifier.
3 pots are used to attenuate of each band (in my schematic I use R11/R12,R13/R14,R15/R16 as simple voltage dividers to mimic the potentiometers) and when they are kept in the middle position they sum the 3 signals recreating the original audio signal with 0dB change over all the audible spectrum (in the LTspice simulation i have used 2 5k6 in order to mimic the middle point of a ~10k potentiometer).
So i look for the least distortion at the end of the circuit.
The core of this circuit is a 3-way Linkwitz-Riley electronic crossover
 
Top