Dan's STS3000 DSP Course

### When I started at Credence my old boss from GenRad, Paul Emmett convinced me that Mixed Signal and testers like the Axiom AT100 were the wave of the future. Never one to ignore Paul I said "sign me up" and took on the job of learning to teach Credence's newly acquired mixed signal tester, now rebadged as the STS3000. Problem was, the last instructor of the class had quit and I had no one to train me. My new boss solved that problem by bringing in the previous instructor who was now living in a Buddhist commune in Nova Scotia.

### "Bob" was a nice guy but did a less than acceptable job teaching me and two customers. For example, during a lecture he asked for a value for "number of samples" for a sampling example and I offered the value of 1000. Bob took that value and used it in his calculations when he should have corrected me. At the time the Array Processor only allowed powers of two for number of samples. He could have taken that opportunity to mention the restriction as in "Dan, the Array Processor won't allow that value because it's not a power of two. How's about 1024?". He missed a teaching opportunity and left me frustrated in my lab exercise when I couldn't get a value of 1000 to work in my program. He knew full well that 1000 wouldn't work but let me flail rather than correct me.

### While I found the subject matter pretty simple otherwise, the course material was sparse, simplistic and not really very helpful, especially in the area of mixed signal theory. In fact, there was only one page of DSP theory and all it had was a "review" page showing the sampling formula Ft/Fs=M/N. Pretty basic, but he excused it by saying he wasn't a test engineer. I had heard that before, at GenRad many of the applications trainers used that excuse to rebuff questions about the tester that they should have known, or at least been able to get an answer for. I vowed to learn as much about DSP as I could and fix the training course as fast as possible.

### That was easier said than done. First of all, I was based in Santa Clara, but the Mixed Signal product was produced and staffed from Billerica Massachusetts. The West Coast had only one applications engineer, and though he was brilliant, he was more used to pure analog and knew very little DSP. When I took a trip to Billerica I found a strange hostility greeting me as I introduced myself around. I wasn't going to get any help from the factory either. In addition, my boss was not going to give me a computer to do course development on, despite the fact that nearly every single person in the company had a Macintosh on their desk. It was a tough assignment, but I persevered.

### I read Matt Mahoney's book on DSP theory, much of it made sense, but not all of it. But I had another resource, the tester. I was good at programming in Pascal, so I would try experiments to see what would happen if I added two tones together, or did an FFT on signal with noise, or corrupted the waveform with harmonics. I also spent a lot of time in front of a chalkboard like those venerable professors in all those old movies and TV shows, doing mathematical experiments on the "big screen" as it were and finally began to grasp the basics of sampling and Fourier transforms. In addition I did actually have to teach classes both in the US and overseas. Every time I taught a class I learned from the students who worked in the real world what *they* needed to know, which of course was what *I* needed to know to teach the next class. I still didn't get a Mac on my desk, even after I got a new boss, but I borrowed time on co-worker's Macs, marching around the plant with a floppy in my pocket pestering this person, then that person. Even on my trips to Billerica I would do the same thing spending the day teaching, then waiting for people to go home at the end of the day, then taking over their Mac to create training material for the next day's class well into the night.

### Eventually I was given a Sun workstation with Framemaker (which I had never used) but gradually picked it up and became very proficient. I worked my tail off and took the four day DSP portion of the course from a one page "review" to 150 pages covering Sampling Theory, Fast Fourier Transforms, Windowing, Telecom specific DSP operations and many, many example programs. One example program was a full blown 24 tone filter test to characterize the behavior of the Telecom Filter used for signal conditioning before the sampling voltmeter.

### Here are just a few pages of that training class.

### The schedule

### A DSP based Mixed Signal tester block diagram.

### A sampling example, one of about 8 pages showing how samples fall with a small number of samples

### A series of examples showing an intentionally distorted waveform and its spectrum. Now we can follow the series and watch as the second and third harmonics move up in the spectrum as M increases. These pages were meant to be worksheets that we worked on together during the lecture. I strongly warned the students to bring a calculator to class on the first day, those who didn't regretted it very much because all the students would end up competing to see who could get the answers first. It was great fun to be leading a class full of engineers trying to out-calculate each other (and their instructor) using a skill I had taught them only a few minutes before. Put your mouse over the picture to see how I would mark up the page with a transparency marker while the students tried furiously to out-calculate each other.

### M moves up to 51, a very nice spectrum by any measure. Put your mouse over the picture to check your answers (you do have a calculator, right?)

### With an M of 85 the third harmonic is at 3*85 or 255, the last viable bin in this spectrum. What will happen if M is increased? Again, mouseover if you want to see the answers.

### With an M of 87 the third harmonic ends up in 3*87 or bin 261, but bin 261 is not visible, only bins 0-256. What we are seeing is not the third harmonic, but the alias of the third harmonic. But what bin is it in?

### And here is where I show how aliasing occurs and the rules I devised all by myself to calculate where the aliases would fall. This had been a major bone of contention in my mind as no one I spoke with could tell me how to calculate where the aliases would show up in the spectrum, not even the Analog Devices guys in Limerick Ireland. I and my little newbie brain worked this out all by myself and I lay claim to it. I call it Dan's Rules for Aliasing.

### My favorite sampling example. With N at 512 and M at 255 the fundamental is on the verge of aliasing, the second harmonic has aliased once and the third harmonic has aliased twice. Plus we are at the infamous two samples per cycle which gives us this pretty Discus Fish shape in the Time Domain. I always loved getting to this point in the class. You could see their eyes get wide and then suddenly *Flash! They get it!*

### How to apply a window and what effect it has on the spectrum. Note that at this point I had not discovered one flaw in my windowing technique. To get the best results any DC offset *must* be removed before applying the window. You can see very clearly how the window smears the DC bin into adjacent (and otherwise valid) frequency bins. In a UCLA Extension class in DSP that I took the visiting professor from Glasgow didn't know this either, so I don't feel so bad about not knowing back in 1994.

### Every day had at least one lab exercise. In this lab the students ran a test program that allowed them to try any value of M and duplicate the previous FFT graphs in real time. It reinforced the knowledge they just learned in the lecture and turned out to be very powerful.

### Plots from TCF Test. It starts out with an 24 tone waveform generated in Frequency Domain, uncalibrated.

### Now the captured, uncalibrated waveform in Time Domain.

### Now the captured, uncalibrated waveform in Frequency Domain.

### Now the captured, uncalibrated waveform in Frequency Domain, but decimated by 21 so as to remove all detail other than the peak amplitudes of the test tones. The roll-off is caused by a filter on the AWG and was intentional to show how effective the calibration can be at overcoming a non-linear frequency response.

### We calibrate by taking the reciprocal of all the of the captured test tone amplitudes, regenerate the waveform using these calibration factors to amplify the tones that are attenuated by the AWG filter. You can see that we have achieved a perfectly flat response. Now we are ready to test the Telecom Filter.

### The captured spectrum with the Telecom Filter (TCF) set to Low Pass at 10KHz.

### The captured spectrum with the Telecom Filter (TCF) set to Low Pass at 10KHz, decimated by 21 to remove all detail but the test tones.

### The captured spectrum with the Telecom Filter (TCF) set to Band Pass with LP at 10KHz and HP at 5KHz.

### The captured spectrum with the Telecom Filter (TCF) set Band Pass with LP at 10KHz and HP at 5KHz, decimated.

If you are interested in getting the source code for the TCFTest program please Email me