Statevariable filter? no clue here - Page 1
Forum section: electronics / projects

author: rhdf
author_rank: Contributor
timestamp: July 09, 2015, 11:08:34 pm
content: 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 SVFhttp://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: MFOShttp://www.musicfromouterspace.com/index.php?MAINTAB=SYNTHDIY&PROJARG=STATEVARVCFFEB2006/STATEVARVCFFEB2006.html&VPW=1670&VPH=797Sweet, 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.htmlOK. 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"

author: Andy Watson
author_rank: Super Contributor
timestamp: July 09, 2015, 11:35:14 pm
content: 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.

author: rhdf
author_rank: Contributor
timestamp: July 09, 2015, 11:51:05 pm
content: 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 10, 2015, 01:24:02 am
content: There's some weird stuff in that schematic, I wouldn't suggest using it.Like the suicide biased PNP.Tim

author: rhdf
author_rank: Contributor
timestamp: July 10, 2015, 03:17:23 pm
content: Quote from: T3sl4co1l on July 10, 2015, 01:24:02 amwitch of them? The MFOS one? There seems to be a lot of "compensating" going on all over the place.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 10, 2015, 05:24:03 pm
content: What's wrong with the LM13700 reference schematics? That they don't provide enough documentation, and other people think they stink?Tim

author: rhdf
author_rank: Contributor
timestamp: July 10, 2015, 07:05:02 pm
content: 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 darlingtonsedit: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)

author: rhdf
author_rank: Contributor
timestamp: July 11, 2015, 12:31:56 am
content: 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

author: edavid
author_rank: Super Contributor
timestamp: July 11, 2015, 01:38:28 am
content: Quote from: rhdf on July 10, 2015, 07:05:02 pmI think this page covers it pretty well:https://www.muffwiggler.com/forum/viewtopic.php?p=1182125QuoteDon Sauer, one of the designers of the IC, has a better model linked here:http://www.idea2ic.com/LM13600/LM13700.html

author: rhdf
author_rank: Contributor
timestamp: July 11, 2015, 02:14:45 am
content: Quote from: edavid on July 11, 2015, 01:38:28 amyepp 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)

author: LvW
author_rank: Frequent Contributor
timestamp: July 11, 2015, 08:31:17 am
content: 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 asingleandgroundedelement (voltage controled FET resistor).Why not using such a type?

author: rhdf
author_rank: Contributor
timestamp: July 11, 2015, 09:23:00 am
content: Well, since i DO need HP, BP and LP at the same time a state variable is the obvious choice here.

author: rhdf
author_rank: Contributor
timestamp: July 12, 2015, 12:27:10 am
content: Some brute hacking later. Now i jst have to fine tune everything

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 12, 2015, 01:38:29 am
content: 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

author: Andy Watson
author_rank: Super Contributor
timestamp: July 12, 2015, 02:51:17 pm
content: Quote from: T3sl4co1l on July 12, 2015, 01:38:29 amI 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.

author: dom0
author_rank: Super Contributor
timestamp: July 12, 2015, 04:25:28 pm
content: Huh? In the screenshots here I only see +-15 V rails.

author: Andy Watson
author_rank: Super Contributor
timestamp: July 12, 2015, 05:03:12 pm
content: May be I mis-read itBut 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 12, 2015, 08:08:38 pm
content: Quote from: Andy Watson on July 12, 2015, 02:51:17 pmIt's not like it's a complicated circuit; it's three mirrors and a diff, for chrissakes!Tim

author: rhdf
author_rank: Contributor
timestamp: July 14, 2015, 01:22:07 pm
content: 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)

author: Andy Watson
author_rank: Super Contributor
timestamp: July 14, 2015, 02:19:59 pm
content: Quote from: rhdf on July 14, 2015, 01:22:07 pmThe 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.

author: LvW
author_rank: Frequent Contributor
timestamp: July 14, 2015, 02:45:11 pm
content: Quote from: rhdf on July 14, 2015, 01:22:07 pmrhdf - 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?

author: rhdf
author_rank: Contributor
timestamp: July 14, 2015, 04:15:29 pm
content: Quote from: LvW on July 14, 2015, 02:45:11 pmWell "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).

author: rhdf
author_rank: Contributor
timestamp: July 18, 2015, 01:03:49 am
content: WohooMy 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 herehttp://mutable-instruments.net/static/documentation/smr4mkII_analysis.pdf(except I'm not building a 4-pole LPF and will use DAC instead of PWM)