Thursday, June 18, 2009

Error Analysis

I recently had a need to do some error analysis. I had forgotten the some rules, or so I decided to brush up. Really the two main ones I did remember were that PERCENTWISE when you multiply(divide) two numbers the percent error adds, and when you add(subtract) the percents stay the same. On the bright side these basic non-calculus rules can be quite helpful most of the time.

I don't do a lot of analog circuits, or statistics any more. Typical problems involve selecting circuit components to guarantee the parameters which are desired for a circuit. As you start getting into capacitors, inductors, and transistors, the linearity goes away. Also if there's some sort of statiscical distribution your function things can also be quite complicated. In these situations you must use calulus which starts to get VERY complicated once you start getting to deal with statistical distrubutions. Error anlysis can also be extended to computational algorithms, estimation functions, and a whole lot of different concepts. See wikipedia for some complex examples. Still even you can get pretty far doing simple integrals.

The additive property seems quite obvious. The multplicative (or really any rule) is pretty clear if you approach it like a circuit problem (or at least when I do) and think of the biggest variety doing a sweep in (the old days when I used to do) simulations. Fortunately On the bright side quite often you can reasonably simplify a problem to a set of linear equations. For example, despite the complexity of the circuitry inside the op-amps which were the cornerstone of the instrumentation amplifier I was investigating you can see from wikipedia the it's just the basic math operations because of the confiuration used. so extracting the net error is simple following the basic rules above. If you wanted a more exact number you might consider nonlinearity in your opamps, but using basic design rules you learn in EE 101 the high gain of an omp amp can be used to idealize a non linear circuit to something linear.

This is often what you want for something like an instrumentation amp where you're trying to amplify a signal. Still these concepts can be applied to more complicated scenarios. Quite often for analog circuits that have a transfer function and are applied to AC signals you can use a fourier (continuous signals) or laplace transfor (unit step or other functions with instantanous changes) to put them into a linear set of equations.

Error anlysis is pretty pervasive. A good open course from Columbia is a good refresher. Enjoy.

Tuesday, June 16, 2009

Iran Uprising!

I know it's been a while since I've written. It's been a tough month for me, but the action in Iran to me is amazing and very impressive.

First I want to comment on Barrack Obamas words, and Senator John McCains words. I know we have pretty much never tolerated external meddling in internal affairs so I think Obamas comments saying the people of iran need to pick their ruler was the smart, and conscienscious move. He has made me proud once again. I think what McCain said was not only political but naive and counterproductive. The reality is it appears the Iranian people have the issue covered.

Clearly the people have undetaken some risky protests. This is a brave act of civil defiance, and it appears Iranian politicians and those in power are reacting appropriately:

1) The people are rising up and peacefully (in most cases) asserting the rights which is a powerful uplifting message.
2) It appears that the supreme council of religious authorities are meeting to investigate the issue
3) Reports indicate that the secret police are refusing to assualt or shoot innocents for no reason. I think this is an amazing re-affirmation of the power of civil disobediance as we saw with Martin Luther King, and countless times throughout history. It's also a beautiful re-afirmation of the fact that most people, really, are good in their hearts. Even much vilified (and probably not perfect) Iranian Secret Police.

Iran IS a democracy. Perhaps after their own fashion, but it's for real. And i think we should all recognize the rights of different people to work through issues in their own way. I think it's a source of pride for America that we are what we are. I also believe that we have a lot to learn from different societities out there, and this is a good opportunity.

(6/18/09) A recent update from the Economist. I think clearly if the will was there, the protests would have been over in a day because few people will stand up to a tank (a la tank man). But the reality is that jouralists have been expelled. And to quote their article:

"Its men have beaten up protesters and fired on the crowd. Reformers, intellectuals, civil leaders and human-rights activists have been arrested or have gone missing, not only in Tehran but also in Tabriz, in the north-west, and across the country. Since the Ministry of Guidance has expelled foreign journalists, the course of the repression will be hard to follow. And the outcome of this clash is impossible to predict."

So it's not all perfect. Still I think it's clear that the people have a will that will not be suppressed, and I still think it's a good sign.