ImpTran is a little script I wrote a few months ago for impedance transforms. What the heck is an impedance transform you ask? Let me attempt to explain in a completely non-technical way:
Say you are standing outside of a large croud of people and you want to get inside the crowd for whatever reason. It’s a lot easier to move around outside the crowd than inside the crowd simply because there are more people inside the crowd. In the first attempt to get into the crowd, you run at it only to be bounced back, left still outside the circle and frustrated. What could you do to make it easier to get into the crowd? Well you could request that people near the edges leave, making the gradient into the crowd softer. This however would require people leaving, which is no fun at all. You could, however, require that people shuffle around and allow people into the crowd at a specified rate, this way people entering the crowd would face no resistance in the transition in.
Now, there are a lot of inconsistencies in that anology, but the general picture is there. Often an analogue electronics you want to reduce reflections between certain circuit elements (the crowd and the not crowd), and you want to do this by dissipating as little power as possible (ie. not asking people to leave). So what you can do is, instead of using resistors, which burn power, you can use special configurations of capacitors and inductors to “match” the impedance (resistance with an imaginary component) between different elements.
Now normally, figuring out how to construct these capacitor and inductor circuits required the use of a Smith Chart. A Smith Chart allows you to do a lot of complex math (and by complex I mean imaginary, not necessarily hard) by just tracing some arcs. It will tell you, for example, when to add an inductor in series and a capacitor in parallel. Trouble is, when doing actual impedance matching in lab, things never work. You measure the impedance of an antenna input to be 25 - 20iΩ, and you trace some lines and solder some capacitors and inductors, remeasure the impedance of the match and invariably it has destroyed some other match somewhere else in the circuit. Next you iteratively, match back and forth countless matches until you magically arrive on one that works and doesn’t disturb the other matches.
In the world of perfect models, you wouldn’t see such unpredictable changes, but the world isn’t perfect and so me, again being lazy, decided to write a script to do the Smith Chart stuff automatically given an impedance. It took me a few hours, and in the end there is some serious code reduplication (thanks to matlab’s insistence on making a file for each function, which I refuse to do), but it works. One future feature would be to make the script perform a match with only a single part, because often that’s all you have room for and/or really need.
At any rate, the syntax looks as follows for the above 25 - 20iΩ impedance:
EDU>> imptran(25,-20)
ans =
First add inductor in series of 2.864789e-07H,
then add capacitor in parallel of 1.273240e-10F
OR
First add inductor in series of -3.183099e-08H,
then add inductor in parallel of 3.183099e-07H
You can find the code here.