Tuesday, March 10, 2009

Why I find SDR so Freakin Interesting

When they let me loose in college I don't think they quite knew what they created. I started in Engineering school at Purdue and they had very specific plans for me. There was not much flexibility. It was pretty much a conveyor belt education. Purdue for me was out of state and it really taxed my family to send me there so I transferred back to the University in my town Southern Illinois University. For all that Purdue had been as a conveyor belt SIU was nothing but possibilities. I did everything from classic literature, to mathematics, to chemistry, to engineering, to neurophysiology. I could take graduate classes right along with undergrad classes and so my education became very eclectic and I totally immersed myself in that study. Purdue made damn good engineers and over time they had evolved a system and the system worked and since the system worked so well it became pretty inflexible as to its choices. Purdue was kind of like roofing filter legacy radios. SIU on the other hand was very plastic in its approach to education. This is not to pass judgment on Purdue. I very much value my time at Purdue. It is a large part of my experience and I wouldn't trade it for anything, but neither would I trade SIU. I later went to medical school at Loyola University and got the good Jesuit education that was an amalgum of both approaches. I had basic courses in a wide number of subjects, but everybody was exposed to that wide nature of coursework, so it was at once vaired and regimented. I think it made me a better physician because of the way the training went down, so there are goods to each system. For my extra curricular at med school instead engaging a million different courses of study, I persevered with the program they laid out for me and I made friends with the neurophysiologist and he gave me access to his workshop where I built HAM RADIO AMPLIFIERS in my spare time. While discussing neurophsysiology.

Bear with me this will get to the point eventually.

It was amazing how there were unifying themes that crossed all these disciplines I involved myself in. In Neurophysiology my research ventured into brain waves. It turns out the brain is an AC wave generator. It puts out basically SSB signals. BUT it turns out it also in an entirely different way puts out FM. Brian cells are basically little batteries, and every so often the battery shorts out and sends an impulse called an action potential down the cell antenna called the axon. If you allpy a receiver and listen you can hear that impulse and record it. If you record the aggregate of those signals its called the EEG. However since the brain is also a bunch of batteries and there is all this charging and discharging going on, it turns out you can also measure an integrated voltage of the brain and what you get instead of an Amplitude waveform is a slow varying frequency of aggregate potential change, and that my friend is frequency modulation, or more precisely phase modulation. So here I was in a physiology lab doing ham radio. My research was about strokes. At that time there was not a really good way to look at how strokes progress. CAT scan was still ten years off. The MRI is a derivation of a chemistry tool called the NMR. Nuclear Magnetic Resonance device, and the application of that technology to strokes was at least 20 years off. With my device I could detect strokes and the progression of strokes. If you generated a stroke in an animal the brain would respond in a characteristic injury pattern that would show up on my recording device as I demodulated the FM waveform of the brain. it turns out strokes don't happen all at once they evolve over days and my machine would mark the evolution of a stroke with the discrete events that comprised that evolution. It was facinating, and what it meant is that if you can measure it, then you can do manipulations, such as drug manipulations to see if you can effect the evolution and therefore lesson the damage. Alas there is politics in funding such science, and during that period the funding was going to the study of amplitude modulation and not phase modulation. Even though it looked promising, since I couldn't get funded I decided to hell with this and went to do something else.

During this time I got my first computer. It was a Timex that had a Z-80 in it. I had grown up with the IBM big Iron and FORTRAN etc. My office mate in grad school who was into astronomy wrote his thesis program that basically displayed cosmological systems, and we set about to turn it into a game of star trek. Your ship would enter a cosmological star system and the program would place all the stars in the correct orbit etc. THEN a Romulan would show up and start blasting everything in sight. You had to navigate your star system to get away from that viscious little dude. Of course as you navigated various characteristics of the system were recorded.

I couldn't do that with the Z-80. I decided to get a real job and I moved from SIU and was in Champaign Ill. I was teaching electronics at the Community college and working in broadcast engineering as well, and doing communications consulting. That was the time of robot radio, where radio stations turned loose their talent for tape systems. What you heard on radio was all on tape, and the local commercials would be cued to play at various points during the taped program. The machines I was working on used RTL logic (the predessor of TTL). It was horrible stuff. Buggy as heck. The problem was when the chip stopped acting as a logic chip and became linear in its behavior, the system would loose its mind. With my Z-80 I set about to redo the control system. You could do with a computer far better than what you could do with RTL logic. RTL was fixed in stone. The logic was NOT changeable without redoing the entire system. A computer on the other had was very plastic and you could integrate all kinds of stuff into what it would control. For example it could control the robot radio tape decks AND it could monitor if there was a signal on the air and call somebody if the signal went off the air. The point again is the plasticity and versatility of the system contained in software instead of hardware. It was an interesting project. For memory I used a cassette tape recorder that the computer controlled. Today you could do twice as much with a PIC chip.

When I was in college I worked in the lab of Conrad Hinkley. I was into physical and inorganic chemistry and Dr Hinkley was the most cited man in chemistry. Physical chemistry had this beauty about it. I had friends who were pure math types and they saw pure beauty in their equations. I saw the beauty in being able to write the equations that described the behavior of the bubbles in my beer glass. Hinkley was most cited because he discovered something called NMR shift reagents. NMR as you recall was the chemistry tool that turned into the MRI that has done so much for diagnostic medicine. The NMR works by placing a complex molecule into a strong uniform magnetic field and then running a strong RF wave across the molecule that varies in frequency. As you hit various resonances in the molecule it absorbs energy due to the change in spin states of electrons in the electron cloud of the various atoms in a molecule, and you can measure at what frequency that absorption occurs. The resonant frequency is affected by the local molecular environment. HEY this is just ham radio on a molecular level!!! Amplifiers and fields and dipole resonances and dipoles lining up to interfere with each other both constructively and destructively: why that's just beam antennas!! Organic and biochemical molecules have a ton of hydrogen and carbon in them, so all the resonances tend to happen at the same frequency. What Dr Hinkley discovered is if you hook the bio molecule to a large inoganic cat ion like Europium or something and the resonance all changes and spread out over a band width of frequencies. It gave dimensionality to the system just like the PowerSDR panadapter gives dimensionality to a receiver. By knowing the where the resonances occur and where the inorganic cat ion is attached, you can calculate the 3 dimensional character of very complex molecules that are largely just hydrogen and carbon. This also is why you see a lot of 3cx1500's available as "medical pulls" These are from the final amplifiers of the MRI which is just the NMR in a different form. After all we are mostly jut hydrogen and oxygen and carbon Its all ham radio!!

While I was in Champaign I enrolled at the U of I to do some grad studies. I wanted to learn something more about physiology. I took some courses in comparative anatomy and physiology which looked at all the different species from amoeba to humans and compared their systems. You learned things like how some artic fish make their own antifreeze in their blood. The antifreeze changes the physical chemistry properties enough that the fish don't turn to frozen fish. One of the assignments was to pretend you were God and you were going to make a system that would allow hibernation. Now my classmates set about designing different things. I was kind of an outsider in this class. I was pushing 30 and everyone else was about 24. I was this engineer hard science joker among the "life scientists". I didn't know the lingo that well, BUT when I wrote the paper I realized this is just a problem using a differential amplifier, and that is just a problem of differential equations. So I wrote a system of equations that amplified a single signal change as the control variable. I changed the signal from + to - If you wanted hibernation you just sent the equation a - input and the system went to sleep but continued to process at some low level. If you sent it a + input the system woke up and roared back to full blow output. It turns out biochemical enzymatic systems actually behave just like this. They behave according to higher order dynamics which means things happen "to the power of" instead of linearly. In ham radio terms things happen in terms of dB's. The system was very elegant in the way it exercised control over the physiology. It blew the professor's mind. While everyone else was poking outputs from neurons, I had written a biochemical system described in terms of its mathematical dynamics. You see things are really all just ham radio. My system was all about mathematical dynamic range and ordered amplification (dB) with feed back loops (AGC).

When I had my FT-1000D it was a firmware radio. To change the firmware I had to order new EPROMS and disassemble the radio and stick them in. It wasn't much better than the RTL logic of robot radio. Then came Orion. You could download new firmware, but you were still totally at the mercy of the mother ship. It was like Purdue. You came out a good competent engineer, but there wasn't a whole lot of variability except in the margins. Then came Flex. Flex was like SIU and Conrad Hinkley's invention. It was all over the place in its possibilities. It was fertile and ripe for invention. It was about processes described mathematically and then having those processes converge into the physical world through physical means like my physical biochemical approach to the problem of hibernation, or the F5K which is the hardware behind PowerSDR. It was about thinking about the modulation in the brain in terms of FM while everybody else was thinking AM.

This radio continues to evolve and it is so interesting. The way the radio worked last week, you needed to calibrate it to a point in the band for image rejection. You stored a value in the EPROM of the radio and when you needed that value you recalled it from the EPROM to use in the equation. The calibration was done "automatically" in the sense that you could call up some calibration routines and ask the radio to calibrate itself. This in itself is a big deviation from normal radio, where you would need a room full of test equipment to calibrate a radio. This radio could calibrate itself using computer routines. You would call up the calibration routine and go get a cup of coffee and by the time you got back your radio was calibrated. This was amazing in itself!!!

Then last week happened and all that went out the window. The new image rejection technique calibrates the radio in an ongoing process. Every time you use the radio it is calibrating itself. You don't even need the EPROM anymore. You don't even need the "calibration routine". You'll have to figure out another reason to go get your coffee, because the time needed to calibrate is now distributed across the time spent operating, AND that calibration is done AT the frequency you are operating, so your calibration is always tip top optimized!!! To me this is just too much fun!! The concept is so clean and it works!!! In some respects it does become" if you can think it you can do it" , and I find that extremely appealing.

The other thing I find so appealing is the way the testing of this system goes down. For the image rejection algorithm N4HY sat down and wrote 20 lines of code. Then about a dozen of us started interacting to test the system. Each gave his feedback and the system iterates into a better system. None of us live near each other. We are scattered all over the country. In fact most of us have never met each other. We know each other through emails and postings etc. Its almost like being in a hive, and your input matters, but there is enough parallel activity in the hive that if life gets in the way you can opt out for a while and do what you need to do, like have a job, and development continues. It also means an individuals given point of view from the testing my lead the development down a different better path. So I get to participate in the development of a new radio AND I get to live out the fruits of that development while I enjoy my hobby working weak signal low band CW DX. The means of testing is interesting also. In a separate thread, you still had the radio of last week on your desk top so you could directly compare the improvement. You just pounded down the new radio and started up the old radio. You didn't have to dissemble the radio or re-flash the eprom or nothin'. Flame on, Flame off. That simple. You could have a dozen different iterations of the radio on your desktop and compare them at a moment's notice. TOO MUCH FUN!

Also it means you can split off into different sub groups. The main development thread continues while this side thread is happening as well. Its rich with variety and eventually when all the bugs are squished and the product honed to perfection both threads will merge once again and a better radio will result, in fact a better radio has resulted.

Ham radio on this side of the tracks is so interesting and life is good.