Ceaseless Student

Things I learn while living life as per usual

Monday, July 28, 2008

OTA fun - continued

OK. So in my last post I showed a first order Gm-C low pass filter. Now I’ll show you how to design your own filter. Let’s say we want a filter with the transfer function Vin/Vout=s/(τs+1)2. This is a second order filter that selects for a specific frequency and attenuates everything else - the farther away from the selected frequency you are, the more attenuation there is. If you’re familiar with Bode plots, it just looks like a triangle with the peak at the selected frequency.

Step 1: Write down transfer function

This is probably the hardest step in the end. Figure out what you want and write down the correct transfer function for that goal. Won’t really go into this here - there’s a bunch of classes where you learn such things and a blog post won’t scratch the surface.

Step 2: Write down Differential equations for transfer function

To make this easier on myself, I’m going to define a couple of things. The output voltage is Y and the input voltage is X. Additionally, since the system is second-order, we know there are two devices with state (capacitors in a Gm-C filter). One of the caps can be on the output as we saw in the first-order low-pass, but the other state element can’t be on the input because the input value has to be instantaneously correct. This means we need an intermediate value that we’ll call U.

If we multiply our transfer function out we get Y(τs+1)2=Xs
Now we change the s to a derivative and drop constants (we only care about the form) to get Y”+Y’+Y=X’.
We rearrange to get Y”=X’-Y’-Y. No we need to split this up into first-order diffeqs. We pretty much start by writing Y’=____ and filling in the rest so that the original equation holds. One way to do this would be to use Y’=X-Y+U where U’=-Y. Another way to do it would be to use Y’=-Y+U where U’=X’-Y. Note that if we take the derivative of Y’ in either of these, we get our second-order diffeq back.

We’ll use Y’=X-Y+U and U’=-Y.

Step 3: Make the circuit

OK. Now we know that there’s a capacitor on Y and a capacitor on U. So let’s start there:

Now we consider the capacitor equation I=CV’. This means that the voltage is, without constants, the antiderivative of the current. So the current going into the capacitor at U must be U’. And we know U’ is -Y so we attach an OTA to implement that. We then do the same thing for Y by noting that the current into that capacitor must be Y’=X-Y+U. We hook that up with another 2 OTAs and we’re done.

Step 4: Check

If you run through the analysis, you’ll find that the you get aY”+bY’+aY=X’ where a and b are constants you can set by tweaking your choices of C and Gm. So it can’t exactly match our original, but it’ll function almost the same.

If you think this sounds cool, try your hand at making the circuit for the other set of diffeqs we generated (Y’=-Y+U and U’=X’-Y). You get a hint: there are actually three capacitors in this design, but it’s much easier if you only consider two of them to hold state. The third one is used to get a signal you need by taking a derivative or an integral depending on how you look at things. I’ll post the answer later and link to it in a comment.

posted by boris at 12:35 pm  

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress

bdieseldorff