Hi guys,
my current goal is to build a state variable filter using an LM13700. I saw several schematics on the internet. Although, I got one working on breadboard, I really want to know whats going on and therefore I want to document a little bit in here what I have done today.
So since I find it quite nasty to always look up the pinout of the chips, I thought I simulate it! Therefore, I created a minimal schematic in KiCad, linked OpAmp and LM13700 spice models I found from TI and this was the result!
This schematic image doesnât show the power supply section.
I am interested in the impact of I_abc current changes and cap size changes (of Cap C3) on the cutoff frequency. First, I used the builtin ngspice simulator in KiCad, but I was not happy with the capabilities: An AC analysis delivers a nice bode plot, but only for one parameter set. In the transient analysis, if you put in white noise at the audio input, you can observe a higher correlation of the output noise, when I_abc rises â lowering the low pass cutoff frequency. But I wanted to see a family of bode plots in one plot to get a better feeling of the variation in cutoff frequency.
Software used
This is why I automated the simulation using python! I use:
- Linux Mint
- Conda for virtual environments
- ngspice version 34 (compiled from source, tried newer versions but it didnât work)
- python 3.13.4
- several python libraries, essentially numpy, matplotlib & pyspice
So, how does the workflow look like?
- Design schematic in KiCad with spice models linked in symbols
- Export netlist
- Then execute my Python script, that
- â Loads the netlist
- â For-Loop: 1. Changes parameter 2. does AC-Analysis 3. Then plots
- â Show the plot
What did I get?
Plot 1: Capacitor C3 varied, I_abc const. at 0.5uA
Plot 2: I_abc varied, Capacitor C3 const. at 10pF
Conclusion
I must say that I am not that impressed - I hoped to get a bigger variation in cutoff-frequency. I would love to see the cutoff frequency varying between like 50Hz and 15kHz, so maybe 3 decades. But currently, its more or less 1 decade when varying I_abc (that is limited to 0-8uA I guess).
Side note: You can see in Plot 2, that the magnitude is weird for I_abc=0.01uA, since the pass band is amplified more than at the other graphs. I do not have an explanation, but if one loweres the I_abc current even more, ngspice crashes.
Questions
Is something wrong with the simulation? You people built filters using the LM13700, so I guess the freq. response is realistically not that âbadâ in terms of cutoff freq. variation.
Or do you think, the bode plots seem somehow realistic? What are your experiences with values like the capacitor size?
Thanks for reading and a good night from Germany xD








