Author Topic: State Variable Active Filter  (Read 3001 times)

0 Members and 1 Guest are viewing this topic.

Online mawyattTopic starter

  • Super Contributor
  • ***
  • Posts: 6174
  • Country: us
State Variable Active Filter
« on: May 24, 2025, 08:18:47 pm »
The State Variable Active Filter (SVAF) is an active filter you don't see mentioned much today, however it's been a valuable asset for us old analog types in the past. This became especially true when cheap dual and quad op-amps became common place, as one can "roll their own" SVAF with just 1 IC package and still have an op-amp left over for other tasks!

The unique features of this filter are having Low-Pass, High-Pass and Band-Pass Filter results simultaneously available, with low component sensitivity, and independent filter "Q" while creating a Quadratic 2nd Order Filter function with 40dB/Dec slope factors, with the draw back of requiring 3 op-amps and a few more resistors than other active filters.

The SVAF employs dual series connected and scaled op-amp integrators with dual independent feedback paths which creates a highly flexible filter architecture with the mentioned "extra" components as the down side.

With the 3 available LP, HP and BP outputs this filter seemed like a nice candidate for the DSO Bode function, and especially so for the Siglent implementation which can plot 3 independent channels, so one can achieve a single Bode plot with 3 independent variable plots.

With this in mind we set out to create a SVAF with a couple LM358 Duals (didn't have any DIP type quad op-amps directly available, which reminds we need to order some soon!!), a couple 0.01uF Mylar Caps and a few 10K and 1K resistors.

The natural frequency corner is simply 1/RC as shown in the notebook image as ~1.59KHz. The filter "Q" was set by changing R4 and R5 and produced plots of Q of 1, 2 and 4 as shown.

The Bode function was setup with CH1 as the Input, CH2 as the HP, CH3 as the LP and CH4 as BP, we included the Phase of CH4 BP as well. Including all the channel Phase responses is possible but clutters up the display too much, so just showing the BP Phase. The frequency was swept with 33pts/dec from 10Hz to 100KHz using a 1Vpp input stimulus from a LAN enabled AWG. Note how the 3 responses all cross at ~1.59KHz, and the BP Phase Response crosses zero degrees here.

Anyway, thought some folks might find this active filter type interesting, as it doesn't seem to be discussed much.

Edit: Added simulation results, see post directly below.

Best
« Last Edit: May 24, 2025, 10:25:32 pm by mawyatt »
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 
The following users thanked this post: tggzzz, Geoff-AU

Online mawyattTopic starter

  • Super Contributor
  • ***
  • Posts: 6174
  • Country: us
Re: State Variable Active Filter
« Reply #1 on: May 24, 2025, 10:09:13 pm »
Added another Bode Plot (from SDS824HD) with a "Q" set to 7, note the BP narrow peak and quicker Phase Transition, indicative of a higher filter "Q".

Also, created an LTSpice model with results shown, judge for yourself the comparisons!

Best
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline coppercone2

  • Super Contributor
  • ***
  • Posts: 13719
  • Country: us
  • √Y√... 📎
Re: State Variable Active Filter
« Reply #2 on: May 24, 2025, 10:24:07 pm »
the is a TI app note for this some where m


I like how high order filter s look like a mosasaur front when you simulate alot of them (monte carlo). I got scared once. If I saw that on a sonar I would think "oh shit1!!!!!!!!!!!"

Interestingly its where they are the most interesting (ultrasonic)

https://preview.redd.it/mosasaurus-hoffmani-front-view-by-me-v0-ltftzrf8rpfd1.jpeg?auto=webp&s=36b61b194258bd4bcb9bdf5b9ca85099db6e2ebe
« Last Edit: May 24, 2025, 10:29:58 pm by coppercone2 »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 19228
  • Country: us
  • DavidH
Re: State Variable Active Filter
« Reply #3 on: May 24, 2025, 11:17:02 pm »
Other advantages come from operating the operational amplifiers in inverting mode, where common mode distortion is reduced, and a voltage controlled resistor can be single ended.
 

Online mawyattTopic starter

  • Super Contributor
  • ***
  • Posts: 6174
  • Country: us
Re: State Variable Active Filter
« Reply #4 on: May 25, 2025, 12:24:26 am »
We extended the frequency sweep out to 1MHz, well beyond where one would consider utilizing an LM358. The Simulation and Measurements agree well even at this range, and note how the simulation depicts the LP output resonance ~100KHz and the BP Phase response.

Honestly surprised that the simulation agrees this well considering the filter was crudely assembled on Protoboard as shown earlier. This is likely due to the inverting configuration since our experience has shown inverting structures tend to behave better wrt to breadboard and prototyping with all the unknown parasitics at play!!

Best 
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Online temperance

  • Super Contributor
  • ***
  • Posts: 1640
  • Country: 00
Re: State Variable Active Filter
« Reply #5 on: June 07, 2025, 12:41:43 pm »
Quote
Anyway, thought some folks might find this active filter type interesting, as it doesn't seem to be discussed much.

This type of filter was very popular when audio processing was done in the analog domain. BSS, Mydas,... all used this type of filter for parametric EQ's. But some used gyrators instead.
As teenager I build my own parametric EQ's just for fun with this type of filter because those 19" boxes were extremely expensive. Those pretty expensive boxes like the BSS DPR901 could be made to oscillate in the audio band. The reason is/was the printed circuit board layout. 50 or something TL074's on a double sided board without ground plane with no decoupling. You could tame the behavior by improving the decoupling.

Today's audio processing is all digital. All very boring. You don't repair those. You update software, apply some patches here and there... That's why I moved away from pro audio long ago. Only the rack synthesizer crowd is still into this type of analog processing.
 

Offline Conrad Hoffman

  • Super Contributor
  • ***
  • Posts: 2303
  • Country: us
    • The Messy Basement
Re: State Variable Active Filter
« Reply #6 on: June 07, 2025, 01:23:53 pm »
I didn't know they weren't popular, but then, little analog is. Another application is a bit of reworking to make extremely low THD oscillators. See what Bob Cordell did for his THD analyzer oscillator. It's one of the best oscillator circuits I've used, not to mention the rest of the filter system.  https://www.cordellaudio.com/papers/build_a_thd_analyzer.shtml

Long live analog!
 
The following users thanked this post: temperance

Online mawyattTopic starter

  • Super Contributor
  • ***
  • Posts: 6174
  • Country: us
Re: State Variable Active Filter
« Reply #7 on: June 25, 2025, 03:11:52 pm »
If one has a Quad Op-Amp like the old LM324 laying around it's simple to create an active filter with a LP, HP, BP and BR (Notch) with only 1 IC package. We don't have any LM324 around (remind, need to order some), so a couple LM358 will have to suffice for now.

If you followed the threads above adding the "extra" op-amp that simply sums the LP and HP to create a Band-Reject or Notch Filter as shown below in two different "Q" values.

Best
« Last Edit: June 25, 2025, 08:44:37 pm by mawyatt »
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Online mawyattTopic starter

  • Super Contributor
  • ***
  • Posts: 6174
  • Country: us
Re: State Variable Active Filter
« Reply #8 on: June 26, 2025, 04:56:33 pm »
Even more fun with the SVAF creating a 3rd Order Butterworth Filter Function.

The normalized 3rd Order Butterworth denominator is:

 s^3 + 2s^2 + 2s + 1

which factors into:

(s+1)(s^2 + s + 1)

If we post (or precede) the SVAF with a s+1 function while setting the SVAF to s^2 + s + 1 denominator,  then a 3rd order Butterworth Filter Function is created. Using standard quadratic nomenclature this  represents a "Q" of 1 (damping 1/2), then altering the SVAF resistors to create a "Q" of one should produce the normalized 2nd Order function. With R5 R4 set to 10K and R5 to 5K and all other resistors 10K creates the desired 2nd Order denominator function with a "Q" of 1. By using a simple post low pass filter of 10K and 0.01uF creates the necessary normalized 1/(s+1) function which results is an overall normalized Butterworth Low Pass Transfer Function of:

T(f) = {1/(s+1)} * {1/(s^2 + s + 1)} or  1/(s^3 + 2s^2 + 2s + 1)

The 1st plot shows the normalization to ~1.6KHz {1/(10K*0.01uf)} 2nd order 1/(s^2 + s + 1) low pass effect and the 3rd order 1/(s^3 + 2s^2 + 2s + 1) Butterworth response using a post RC LPF. Note the rolloff slope between the 2nd order and 3rd order functions, the 3rd order has a slope of -60dB/dec, while the 2nd Order is -40dB/dec.

A 3rd Order Butterworth High Pass Filter can be implemented in a similar fashion, however the pre filter {s/(s+1)} is the simplest as only a capacitor (0.01uF) is required working with the input resistor Ri (10K) as shown in the second plot. Note the steep rise at 60dB/dec of the 3rd Order Butterworth Filter Function. Added the third plot which uses a post HPF and shows both the 2nd order (Q=1) and 3rd Order HPF responses.

Added another plot which shows both Butterworth 3rd Order Low Pass and High Pass responses created with post RC LP and HP respectively.

Anyway, more fun fool'n around with these SVAFs :-+

Best
« Last Edit: June 26, 2025, 06:26:08 pm by mawyatt »
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline rpschultz13

  • Regular Contributor
  • *
  • Posts: 59
  • Country: us
  • Just here to learn...
Re: State Variable Active Filter
« Reply #9 on: August 28, 2025, 12:02:38 pm »
Couple years ago I began building my own acoustic guitar preamp. It has a lot of EQ options but the mid control (gain, Q, freq) and HPF/Notch sections are SVF that I learned from ESP Sound.
https://sound-au.com/articles/state-variable.htm

The HPF/Notch have a switch to select which output of the SVF, either HPF or Notch. When in Notch it has a Q pot, but HPF has a fixed Q.
The High and Low are simpler shelving EQ circuits.

It is powered with 9v, but uses a DC-DC converter to apply +/- 15v across the 4 op amps. 3 TL072's are for filter sections, and the NE5532 is for the initial gain stage.

Yes very flexible stuff. I have tested the below prototype, bode plots of all the knobs. I am pleasantly surprised it works as designed. The scope bode plots match what I designed in LT Spice.
« Last Edit: August 28, 2025, 12:05:06 pm by rpschultz13 »
 
The following users thanked this post: mawyatt


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->