Author Topic: Statevariable filter? no clue here  (Read 8663 times)

0 Members and 1 Guest are viewing this topic.

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Statevariable filter? no clue here
« on: July 09, 2015, 11:08:34 pm »
I'm trying to hack together a relatively basic filter for my synthproject. For now I need a filter for some "proof of concept" so all the "bells ,whistles and fizzbangs" of the great sounding filters out there are less important.

The filter is supposed to be a voltage controlled state variable filter. The controlvoltages will be generated by a MCU. So I started the hunt for some existing designs.
Looking at obvious places like DIY-synth pages i found Mutable instruments Dual SVF http://mutable-instruments.net/static/schematics/Shruthi-Analog-SVF-v03.pdf. More or less the same concept that I'm planning and its based on controlvoltages in the 0-5V range. BUT it uses the v2164-chip (clone of the obsolete SSM2164). Paying ~$3.5 each+shipping and some weeks of waiting, thanks but no thanks(not for a prototype, maybe later on)

Next stop: MFOS http://www.musicfromouterspace.com/index.php?MAINTAB=SYNTHDIY&PROJARG=STATEVARVCFFEB2006/STATEVARVCFFEB2006.html&VPW=1670&VPH=797
Sweet, easy to get components (have the most of them), but I have no clue whats going on in that circuit. Its obviously not a "real" SVF-topology. So trying to adapt it to 0-5V ranges (and keep partcount down) seems to be a bit to much work (and math)

So.. I started to realize that i more or less had to build something from scratch. so after some googling I found this: http://www.electronics-tutorials.ws/filter/state-variable-filter.html
OK. Nice, right of the bat i had a SVF That did what it was supposed to do. Well for 1kHz that is, still no voltagecontrol of Cutoff and resonance.

Trying to puzzle together bits and pieces of information i realized that the integrators in the MFOS looked like a "OTA-C Lp Cell" (http://pdp7.org/synthwiki/OtaCLpCell.html) on the other hand the circuit from  electronics-tutorials.ws looked something like a  "OTA-Integrator LP cell" (http://pdp7.org/synthwiki/OtaIntegratorLpCell.html)

When i tried to simulate the 2 "OTA-cells" i got some..  ehm.. interesting results.

So. Can someone give me some advice how to proceed?
What i Need is a basic SVF where i can sweep the cutooff-frequency in the 20-20khz spectrum (15-25k is ok ;)) A resonance (Q) control that has a range from no resonance to.. a lot(?) (self oscillating with pure sine is one of those "bells ,whistles and fizzbangs")

Note: This is not a "please design my circuit for me because im too lazy"-thread, I'ts rather "OK I've tried to do the maths and followed the guides but my simulations says I'm wrong"

 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2124
Re: Statevariable filter? no clue here
« Reply #1 on: July 09, 2015, 11:35:14 pm »
Try the datasheet for the LM13700. I don't know if the device is obtainable but the datasheet gives a design for a state variable filter plus some of the theory behind it. There should be sufficient information in it for you to adapt it to your own designs.
 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #2 on: July 09, 2015, 11:51:05 pm »
I forgot to mention that. The circuit for statevariable in the data sheet lacks some formulas AND is based on using the built in Darlington-buffers (which, due to information I found,  has some disadvantages (like "does not work") Mutable instruments thought of it to reduce components for one of his filters but opted for OP-amps)

otherwise it would have been a clear choice, just whack in a 13700,  a 074 and some resistors and caps.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Statevariable filter? no clue here
« Reply #3 on: July 10, 2015, 01:24:02 am »
There's some weird stuff in that schematic, I wouldn't suggest using it.

Like the suicide biased PNP.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #4 on: July 10, 2015, 03:17:23 pm »
There's some weird stuff in that schematic

witch of them? The MFOS one?  There seems to be a lot of "compensating" going on all over the place.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Statevariable filter? no clue here
« Reply #5 on: July 10, 2015, 05:24:03 pm »
What's wrong with the LM13700 reference schematics?  That they don't provide enough documentation, and other people think they stink? 

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #6 on: July 10, 2015, 07:05:02 pm »
Well. They DO work, but there must be some good reason that designers of synthfilters in many cases has opted for ta OTA-opamp config instead of just using the built-in darlingtons

edit:
I tried to simulate the reference circuit and it didn't behave well at all. I start to believe that the spice model for LM13700 is kind of... broken.

edit2:
No just me being stupid had a "small mistake". It actually  work, and with that i mean: it is a LP/BP filter.
To get a HP-out I need an extra OP-amp in front of it + move the HP/LP feedbacks to the input of it (correct me if I'm wrong)
« Last Edit: July 10, 2015, 08:58:48 pm by rhdf »
 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #7 on: July 11, 2015, 12:31:56 am »
What I've managed to piece together today

"slightly" modified version of the datasheet-circuit and a plot of it. obviously it needs some adjustments
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3436
  • Country: us
Re: Statevariable filter? no clue here
« Reply #8 on: July 11, 2015, 01:38:28 am »
Well. They DO work, but there must be some good reason that designers of synthfilters in many cases has opted for ta OTA-opamp config instead of just using the built-in darlingtons
I think this page covers it pretty well:
https://www.muffwiggler.com/forum/viewtopic.php?p=1182125

Quote

I tried to simulate the reference circuit and it didn't behave well at all. I start to believe that the spice model for LM13700 is kind of... broken.
Don Sauer, one of the designers of the IC, has a better model linked here:
http://www.idea2ic.com/LM13600/LM13700.html
 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #9 on: July 11, 2015, 02:14:45 am »
I think this page covers it pretty well:
https://www.muffwiggler.com/forum/viewtopic.php?p=1182125
yepp and thats why I want to "replace" them with opamps. But my simulations tells me I'm  doing something terribly wrong (even when I try to copy others work)
 

Offline LvW

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: de
Re: Statevariable filter? no clue here
« Reply #10 on: July 11, 2015, 08:31:17 am »
As far as I understand your problem - you want to realize a second-order filter (lowpass, bandpass?) which is tunable.
For my opinion, a state-variable topolgy is not the best choice - unless, you need low-, band- and highpass outputs at the same time.
There are only some filter topologies which allow tuning the pole frequency with a single and grounded element (voltage controled FET resistor).
Why not using such a type?
 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #11 on: July 11, 2015, 09:23:00 am »
Well, since i DO need HP, BP and LP at the same time a state variable  is the obvious choice here. 8)

 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #12 on: July 12, 2015, 12:27:10 am »
Some brute hacking later. Now i jst have to fine tune everything  ::)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Statevariable filter? no clue here
« Reply #13 on: July 12, 2015, 01:38:29 am »
If all you're using the op-amps for is followers, you can use the internal darlingtons, at small cost to the leakage current on the respective filter capacitor (which just means it won't go to as low a frequency range, probably still below 20Hz).

The key insight is that the average capacitor voltage is a free variable, not proportional to the input voltage but defined by feedback alone.  Thus, any additional offset (such as the 2Vbe in the follower) can be disregarded.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2124
Re: Statevariable filter? no clue here
« Reply #14 on: July 12, 2015, 02:51:17 pm »
Thus, any additional offset (such as the 2Vbe in the follower) can be disregarded.
I agree, however, in this design 2V represents 60% of the available supply voltage! I am intrigued by the design philosophy (and it occurs on many threads - not just this one) that says "the datasheet is a bit complicated and we don't understand it - so we'll just plug stuff into spice and ignore reality".
I'd be surprised if the TL072s will get out of bed with only 3.3v across their rails - if they do wake up they are unlikely to function properly.
« Last Edit: July 12, 2015, 05:21:52 pm by Andy Watson »
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Statevariable filter? no clue here
« Reply #15 on: July 12, 2015, 04:25:28 pm »
Huh? In the screenshots here I only see +-15 V rails.
,
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2124
Re: Statevariable filter? no clue here
« Reply #16 on: July 12, 2015, 05:03:12 pm »
May be I mis-read it :( But Tim's point about using the darlingtons (or not) is still valid, as is the design via spice rather than understanding.

Edit: You're right! I don't know what circuit I was looking at - may be time for some new glasses.
« Last Edit: July 12, 2015, 05:23:05 pm by Andy Watson »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Statevariable filter? no clue here
« Reply #17 on: July 12, 2015, 08:08:38 pm »
I am intrigued by the design philosophy (and it occurs on many threads - not just this one) that says "the datasheet is a bit complicated and we don't understand it - so we'll just plug stuff into spice and ignore reality".

It's not like it's a complicated circuit; it's three mirrors and a diff, for chrissakes!

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #18 on: July 14, 2015, 01:22:07 pm »
Any ideas how the transfer-function for "my" circuit might look like. I mostly find examples where the cap is in the feedback-loop of the opamp, and as far as I can see there isn't one provided in the datasheet.
One suggestion  I've stumbled upon is f0=(Rs/Rb)*(19,2Iabc/C)
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2124
Re: Statevariable filter? no clue here
« Reply #19 on: July 14, 2015, 02:19:59 pm »
I mostly find examples where the cap is in the feedback-loop of the opamp, and as far as I can see there isn't one provided in the datasheet.
The op-amp with capacitor feedback is behaving as an integrator - this function is replaced by 800pf capacitors (? I haven't got the datasheet to hand) with one end grounded. If you examine  the op-amp examples I think you will find that the op-amp input is a virtual ground. So you have the same value of C in either the op-amp circuit or the OTA circuit (there may be a phase inversion to take care of). The value of R, which drives the input to the op-amp version, is replaced by the OTA - I believe the formula for defining R is given by the previous application example on the 13700 datasheet.

I find Don Lancaster's  "Active Filter Cookbook" is useful desktop reference. It gives a few practical circuits for filters but more importantly it shows how to derive appropriate component values. It even has an example of a state variable filter, albeit with CA3080s and 741s.
 

Offline LvW

  • Frequent Contributor
  • **
  • Posts: 282
  • Country: de
Re: Statevariable filter? no clue here
« Reply #20 on: July 14, 2015, 02:45:11 pm »
Any ideas how the transfer-function for "my" circuit might look like. I mostly find examples where the cap is in the feedback-loop of the opamp, and as far as I can see there isn't one provided in the datasheet.
One suggestion  I've stumbled upon is f0=(Rs/Rb)*(19,2Iabc/C)

rhdf - you are asking us for a transfer function of YOUR circuit? This confuses me a bit.
Therefore: May I ask you - in case you are interested - to summarize the present problems you have?
Do you need integrator circuits? Inverting/non-inverting? Opamp based or OTA based?
 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #21 on: July 14, 2015, 04:15:29 pm »
rhdf - you are asking us for a transfer function of YOUR circuit? This confuses me a bit.
Therefore: May I ask you - in case you are interested - to summarize the present problems you have?
Do you need integrator circuits? Inverting/non-inverting? Opamp based or OTA based?

Well "my" circuit that is, since I really cant take any credit for what others done before ;) (the circuit in question is found on previous page)
The filter works as intended, but i need to verify that i use the correct transfer-function. Then I can figure out the correct values for Iabc to be able to sweep the filter from ~20Hz to ~20kHz (and also a "correct" value for C)

I Found a copy of "Active Filter Cookbook" today, haven't had the time to read all of it (yet).

 
 

Offline rhdfTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Statevariable filter? no clue here
« Reply #22 on: July 18, 2015, 01:03:49 am »
Wohoo
My calculations and simulations starts to match.. Now i just have to re-scale things a bit.. I have a clue of the Iabc-values.
Since I started off with a CV-scaling circuit built for +/-5V, With +/-12V I ended up with a resistor of 792K in the expo-converter-part...
The concept can be found here http://mutable-instruments.net/static/documentation/smr4mkII_analysis.pdf (except I'm not building a 4-pole LPF and will use  DAC instead of PWM)


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf