Graduation Photo Gallery - now with better display
Click on a picture to see it larger. Use left and right arrows to move forward and back in the gallery.
Things I learn while living life as per usual
Click on a picture to see it larger. Use left and right arrows to move forward and back in the gallery.
I’m all graduated.
Here’s proof:
Moved to a new post with better display.
Let me preface this by saying that this may well be the best idea I’ve ever had.
The idea is simple, a machine that continually outputs pizza. It starts with dough at one end in a large receptacle. The dough is extruded onto a conveyor belt. Then it is flattened out. Sauce is spread on it, toppings are added, and then the conveyor goes through the oven. On the other side, pizza is cut and continues to move slowly. From here, people can grab their pizza.
Note that the speed that the pizza comes out can be changed by modifying the temperature and the movement speed of the conveyor. A sensor that checks how much pizza is currently ready to be taken can control the cooking speed.
I’m infatuated with this idea. Thoughts?
Hi all. Haven’t posted anything for a while. Here’s a quick update on life:
Fall Semester: Went to school.
Winter Break: Didn’t.
Spring Semester: Now back at school.
I’ve been playing lots and lots of DotA these days. Rocks hard. How much you ask? This semester I’m currently at about 3 and a half hours a day. The goal is to spend more time on DotA than on all my classes combined. o.O
On an entirely unrelated note - analog filters seems like a /sweet/ class. Somewhat related to that second note - I’m in 5 classes with a sum total of 28 people. Tee-hee.
I had two really weird dreams last night.
In the first one, I stuffed someone’s shot in basketball. The weird part? I was playing a sport. Haha j/k. The weird part is that I’m almost positive that I actually swung my real-world arm and hit my bed.
This was followed by a dream where I dropped something acidic on three spots of my hand. My brain insists that it was “about as acidic as capsaicin.” I have no clue how acidic capsaicin is. Also, pure capsaicin doesn’t look like the oil in my dream. Anyhow. The weird part was that I felt it on my real-world hand for what seems like a couple of hours. I was asleep so maybe my time-perception was off, but it lasted through several unrelated dreams…
I think those are the two weirdest dreams I’ve had and remembered since the one with the cartoon fish that ate my older brother or the ridiculous one with the Scooby-Doo meets Paper Mario styled monsters that were trying to find me, my friends and my family in some weird mansiony thing. Those dreams are like 6 years old or something though… dreams are weird.
So I was looking at my schedule for this coming semester and some of the times lined up all pretty for me to schedule a nap…
So I’m doing biphasic again. I’m also going to be working out and doing something aerobic - a combination that I haven’t done for something like 4 years. The first time I did biphasic I was hitting 4.5 hours every day. And I would get tired/bored when people weren’t around (eg 04:30). So I’m going to try to avoid some of that this time around.
My schedule works somewhat better for it this year. Instead of staying awake and bored until 5, I’ll be in bed at 2 or 03:30. This should help with boredom at night and it gives me a nice chunk of time at 06:30 when the Babson gym opens.
Sadly, the schedule is a bit less straightforward. I wake up every day at 06:30, but there’s two different times I go to bed. On Wednesdays, SCOPE steals a nap. At the end of the day I’ll average just under 5 hours a day of sleep. I will, however, be adding in a bunch of physical activity so I might find myself needing more rest - we’ll see.
There’s two ways to go about a new sleep schedule. Gradual transition and habit forming or sleep deprivation. The second one is what I’ll be trying this time around. The abrupt change from summer sleep hours and the addition of running or swimming should make sure my body is begging for whatever sleep I decide it can take. That’s the quick, if plausibly painful, way to go about it. At least I’m not doing an uberman schedule where I don’t sleep at all for the first three days or anything that extreme…
Still haven’t figured out why I like toying with my sleep so much… I’m sure I’ll babble about how it goes in my blog
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.
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.
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.
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.
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.
OK. I’m going to go through two examples. The first one is a first-order low pass Gm-C filter. I’ll just show the circuit and then we can analyze and note that it works. Then I’ll show you the cooler part - design.
We’ll write a transfer function that we want to implement. Then map that to differential equations and go from the ODEs to circuits. I think I’ll finish out 1 way of implementing the transfer function and leave the other one at the diffEQ step in case someone actually wants to try their hand at a little bit of circuit fun. I’ll put up a link to the solution too.
OK. So here’s what a 1st order Gm-C low pass filter looks like. Why is it called a Gm-C filter? Well, you know how in an R-C filter, the R and C determine the time constant (tau)? Gm is a conductance (the inverse of resistance) so it similarly sets tau.
The Gm comes from the OTA. Recall that an OTA outputs a current proportional to its differential input voltage? In math: Iout=Gm(V+-V-). Now we note that Vout=V- and Vin=V+ in our circuit. We also note that all of the output current has to go into the cap and that the cap follows Iout=CV’out. We combine our equations and get CV’out=Gm(Vin-Vout). Let’s use τ=Gm/C. S’more rearranging gets us τV’out+Vout=Vin.
Unless you’ve taken a class that teaches it, you’ll have to trust me that you can effectively call a derivative s and all the normal rules of multiplication etc apply (a friend of mine would tell you it’s because Liebniz’s notation is a strong notation). So we go ahead and do that and get Vin/Vout=1/(τs+1) which is the canonical form of the transfer function for a first-order low pass. Nice.
Hmmm… this is being longer than I thought it would be so I’ll be splitting it up. Next time we’ll look at a second-order filter that selects for a frequency: Vin/Vout=s/(τs+1)2.

So far I’ve talked about reconfigurable hardware in general and then the specific set-up of the FPAA. Now I’ll start talking about what’s actually inside the CABs (computaional analog blocks).
First there are simple transistors. There’s both nMOS and pMOS varieties and you have access to their gate, source and drain - fairly straightforward. There are capacitors where you have access to both leads. There are some current mirrors which make it simple to replicate a current without having to go through the process of mirroring the current yourself at the transistor level. Then there are a couple of more complex parts. These are the Gilbert multipliers and the OTAs.
Gilbert multipliers are probably the first use of the translinear principle (TLP). In short, this concept allows you to multiply and divide currents by using logarithms and then addition and subtraction and then exponentiating the result again. I’d explain it further, but I actually made a wiki page for my OSS (Olin Self-Study) that I really like. There’s actually a two-quadrant multiplier at the end that should give you a good idea of how these things could work. If some parts of the wiki seem difficult to understand due to the writer, please let me know and I can hopefully fix it up. Or feel free to fix it up yourself if you’re familiar with TLP. Gilbert multipliers are great because they allow you to directly multiply two signals at substantially faster-than-digital speeds with much less power usage and with orders of magnitude fewer transistors. The catch you ask? Well you can only really trust about 6 bits of a signal and then multipliers love to overflow. So your input signals can only be about 3 bits if you want to guarantee that you don’t get overflow… There are workarounds to maintain precision and speed, but they involve adding parts and complexity. This of course makes you use more power, but you still get orders of magnitude more efficiency than a digital multiplier.
This leaves just one part. The OTA (operational transconductance amplifier). These are actually fairly simple and extremely powerful. They have a differential voltage input and output a current that’s proportional to the difference in the input voltages. As a simple example, let’s do a voltage follower. Put your signal on the positive input. Now tie the negative input to the output. The output will now source or sink current until the output equals the input. This is somewhat similar to an op-amp, but different because the output is a current instead of a voltage.
OTAs are actually quite powerful and provide a fairly straight-forward way to go from a transfer function or differential equation to a circuit. I’ll show you that in my next post…
All right. Now that you’ve taken a quick view of reconfigurable hardware, we can look at the FPAA in particular. How is it different from an FPGA? Well the main difference is how information is encoded.
Instead of passing information as digital ones and zeroes, analog processing allows you to take advantage of the full available voltage range and even curents to carry information. This means you can do great things like carry 5-9 bits of information on a single wire. So what’s the catch? Well analog signals aren’t as pretty as digital signals. If you only have to differentiate between 0 and 1, you’re going to have a much easier time at it than if you have to be able to differentiate 2.4 and 2.5. And in some cases it gets much worse than that - if you’re using a voltage as to control a transistor’s gate, minute changes are vastly amplified. This means that you’re accutely vulnerable to many things that digital systems barely have to consider.
Are your lines near each other? They’ll have parasitic capacitances that’ll couple them. Did you route it using a global line instead of 2 nearest-neighbor lines? You can expect different performance and in some cases even complete loss of functionality since the parasitic capacitance from routing is extremely significant. Are you in place that has a temperature? If so, you’ll get thermal noise that’ll mean that all of your signals have some randomness associated with them. These problems, especially the last one, are not easy to solve.
So why bother? Well, like I mentioned, you can carry more data on a single wire. Why does this matter? Well you can do things like run two relevant signals into a multiplier that uses only a handful of transistors and get out a direct answer. This is far faster and less power-hungry than the digital method of splitting your signal up to 1 bit per wire, running it into a many-stage multiplier that is far slower and takes hundreds of times more transistors and eats through way more power. Sound awesome? That’s because analog is awesome - just difficult.
So how does an FPAA work? Let me start by describing the structure. There are two main parts to the structure, the routing grid and the CABs (Computational Analog Blocks). If we look at a single column, there are lines that run the length of the chip (global verticals), lines that run from one CABto a neighboring CAB (nearest neighbor lines), and lines that only run within a CAB (local lines). Each horizontal line is attached to something in the CAB. Thus, to connect components, you just have to attach two horizontal lines to the same vertical line. This is done by turning on switches. Additionally, there are horizontal lines that can handle inter-column connections in a similar manner.
The actual switches used in the FPAA are (who’d guess it) analog switches. They are actually capable of being partly on. This allows the connections to take part in calculations if you’re clever enough to work them into your design. The way these switches work is by using floating gate transistors. Transistors can pass an amount of current that’s controlled by their gate voltage - building up charge on a floating gate allows you to set a voltage and then simply leave it alone without having to constantly source the appropriate bias voltage.
So what’s in the CABs? Well this actually varies. Some of the common things in CABs are nMOS and pMOS transistors, capacitors, OTAs (Operational Transconductance Amplifiers), Gilbert Multipliers and current mirrors. What are all of these? I’ll give some explanation in my next post.
Powered by WordPress