One of our forthcoming products has some analogue filtering in it (shhh, supposed to be a big secret) and naturally I’ve been on the hook for topologies, algorithms, equations and all that good stuff. Like with all of our programmable devices, the functionality is accessible through virtual ‘components’ you drag onto a schematic canvas in our “PSoC Creator” tool. So I work with our awesome component development teams to try to get my hard-won analogue expertise into these two-dimensional sprites that dance around on our circuit diagrams.
Quality control time. I delivered my “how-to” in the form of a Frankenstein cobble-up of spreadsheets and BASIC programs, which showed end-to-end the development of the target types of filters, from humble beginnings as a frequency response requirement, through the smooth infinitude of the s-plane, crashing into the rolled-up cardboard tube that is the sampled-domain representation, and finally into a set of capacitor values wrapped around a fast little amplifier and some chattering switches. (Ed. – that might be too much of a clue about what type of filter this is).
All of this expertise is then patiently turned into something of production quality by the component team, who very kindly delivered me some code to try out. In one previous exercise, I’d been delighted that the rather extreme filter we’d dialed in came out with exactly the same capacitor values as offered by my own methodology. So far, so good.
I’d done a bunch of test cases in my spreadsheet, so I started to use the new software to generate transfer functions and capacitor values, to check against what I’d pre-calculated and simulated. And the very first example I tried produced sets of values that weren’t the same. Not massively different, or slightly different, but moderately different.
So I did some eyeball-rolling and old analogue-guy harrumphing and put the numbers into a simulator and – they looked OK, at least on a little graph. But this cannot be, I thought. I have an explicit, closed-form solution for the dissipation factor and pole frequency of the section that implements that response with those constraints. And that solution generates a different set of numbers, and I know for certain that those numbers work.
Click on the calendar – time for a meeting with the component team. Can I eyeball your C# code, you may have implemented my equations slightly incorrectly?
“Uh, we didn’t use your equations, we used the ones from a memo one of us wrote a while back, we did send you a copy…”