
A Software-Defined Radio for the Masses, Part 1 This series describes a complete PC-based, software-defined radio that uses a sound card and an innovative detector circuit. Mathematics is minimized in the explanation. Come see how it’s done. By Gerald Youngblood, AC5OG certain convergence occurs speedy modems brought about the can completely change its functional- when multiple technologies Internet convergence. Suddenly, it all ity. This allows easy upgrade to new A align in time to make possible came together so that the Internet and modes and improved performance those things that once were only the worldwide Web joined the every- without the need to replace hardware. dreamed. The explosive growth of the day lexicon of our society. SDRs can also be easily modified to Internet starting in 1994 was one of A similar convergence is occurring accommodate the operating needs of those events. While the Internet had in radio communications through digi- individual applications. There is a dis- existed for many years in government tal signal processing (DSP) software to tinct difference between a radio that and education prior to that, its popu- perform most radio functions at per- internally uses software for some of its larity had never crossed over into the formance levels previously considered functions and a radio that can be com- general populace because of its slow unattainable. DSP has now been pletely redefined in the field through speed and arcane interface. The devel- incorporated into much of the ama- modification of software. The latter is opment of the Web browser, the teur radio gear on the market to de- a software-defined radio. rapidly accelerating power and avail- liver improved noise-reduction and This SDR convergence is occurring ability of the PC, and the availability digital-filtering performance. More because of advances in software and of inexpensive and increasingly recently, there has been a lot of discus- silicon that allow digital processing of sion about the emergence of so-called radio-frequency signals. Many of software-defined radios (SDRs). these designs incorporate mathemati- 8900 Marybank Dr A software-defined radio is charac- cal functions into hardware to perform Austin, TX 78750 terized by its flexibility: Simply modi- all of the digitization, frequency selec- [email protected] fying or replacing software programs tion, and down-conversion to base- Jul/Aug 2002 13 band. Such systems can be quite com- seven functions) and let’s get started. does. It uses a sampling clock to mea- plex and somewhat out of reach to But first, let’s set forth the objectives sure discrete samples of an incoming most amateurs. of the complete SDR design: analog signal at precise times, and it One problem has been that unless • Keep the math simple produces a digital representation of you are a math wizard and proficient • Use a sound-card equipped PC to pro- the input sample voltage. in programming C++ or assembly lan- vide all signal-processing functions In 1933, Harry Nyquist discovered guage, you are out of luck. Each can be • Program the user interface and all that to accurately recover all the com- somewhat daunting to the amateur as signal-processing algorithms in ponents of a periodic waveform, it is well as to many professionals. Two Visual Basic for easy development necessary to use a sampling frequency years ago, I set out to attack this chal- and maintenance of at least twice the bandwidth of the lenge armed with a fascination for • Utilize the Intel Signal Processing signal being measured. That mini- technology and a 25-year-old, virtu- Library for core DSP routines to mum sampling frequency is called the ally unused electrical engineering de- minimize the technical knowledge Nyquist criterion. This may be ex- gree. I had studied most of the math in requirement and development time, pressed as: college and even some of the signal and to maximize performance ≥ (Eq 1) processing theory, but 25 years is a • Integrate a direct conversion (D-C) 2 ff bws long time. I found that it really was a receiver for hardware design sim- where fs is the sampling rate and fbw is challenge to learn many of the disci- plicity and wide dynamic range the bandwidth. See? The math isn’t so plines required because much of the • Incorporate direct digital synthesis bad, is it? literature was written from a math- (DDS) to allow flexible frequency Now as an example of the Nyquist ematician’s perspective. control criterion, let’s consider human hear- Now that I am beginning to grasp • Include transmit capabilities using ing, which typically ranges from 20 Hz many of the concepts involved in soft- similar techniques as those used in to 20 kHz. To recreate this frequency ware radios, I want to share with the the D-C receiver. response, a CD player must sample at Amateur Radio community what I a frequency of at least 40 kHz. As we have learned without using much Analog and Digital Signals in the Time Domain will soon learn, the maximum fre- more than simple mathematical con- quency component must be limited to cepts. Further, a software radio To understand DSP we first need to 20 kHz through low-pass filtering to should have as little hardware as pos- understand the relationship between prevent distortion caused by false im- sible. If you have a PC with a sound digital signals and their analog coun- ages of the signal. To ease filter re- card, you already have most of the terparts. If we look at a 1-V (pk) sine quirements, therefore, CD players use required hardware. With as few as wave on an analog oscilloscope, we see a standard sampling rate of 44,100 Hz. three integrated circuits you can be up that the signal makes a perfectly All modern PC sound cards support and running with a Tayloe detector— smooth curve on the scope, no matter that sampling rate. an innovative, yet simple, direct-con- how fast the sweep frequency. In fact, What happens if the sampled band- version receiver. With less than a if it were possible to build a scope with width is greater than half the sampling dozen chips, you can build a trans- an infinitely fast horizontal sweep, it rate and is not limited by a low-pass ceiver that will outperform much of would still display a perfectly smooth filter? An alias of the signal is produced the commercial gear on the market. curve (really a straight line at that that appears in the output along with point). As such, it is often called a con- Approach the Theory the original signal. Aliases can cause tinuous-time signal since it is continu- distortion, beat notes and unwanted In this article series, I have chosen to ous in time. In other words, there are spurious images. Fortunately, alias focus on practical implementation an infinite number of different volt- frequencies can be precisely predicted rather than on detailed theory. There ages along the curve, as can be seen on and prevented with proper low-pass or are basic facts that must be understood the analog oscilloscope trace. band-pass filters, which are often re- to build a software radio. However, On the other hand, if we were to ferred to as anti-aliasing filters, as much like working with integrated cir- measure the same sine wave with a shown in Fig 1. There are even cases cuits, you don’t have to know how to digital voltmeter at a sampling rate of where the alias frequency can be used create the IC in order to use it in a de- four times the frequency of the sine to advantage; that will be discussed sign. The convention I have chosen is to wave, starting at time equals zero, we later in the article. describe practical applications fol- would read: 0 V at 0°, 1 V at 90°, 0 V at This is the point where most texts lowed by references where appropriate 180° and –1 V at 270° over one com- on DSP go into great detail about what for more detailed study. One of the plete cycle. The signal could continue sampled signals look like above the easier to comprehend references I have perpetually, and we would still read Nyquist frequency. Since the goal of found is The Scientist and Engineer’s those same four voltages over and this article is practical implementa- Guide to Digital Signal Processing by again, forever. We have measured the tion, I refer you to Chapter 3 of the Steven W. Smith. It is free for download voltage of the signal at discrete mo- DSP Guide for a more in-depth discus- over the Internet at www.DSPGuide. ments in time. The resulting voltage- sion of sampling, aliases, A-to-D and com. I consider it required reading for measurement sequence is therefore those who want to dig deeper into called a discrete-time signal. implementation as well as theory. I will If we save each discrete-time signal refer to it as the “DSP Guide” many voltage in a computer memory and we times in this article series for further know the frequency at which we study. sampled the signal, we have a discrete- So get out your four-function calcu- time sampled signal. This is what an Fig 1—A/D conversion with antialiasing lator (okay, maybe you need six or analog-to-digital converter (ADC) low-pass filter. 14 Jul/Aug 2002 D-to-A conversion. Also refer to Doug Smith’s article, “Sig- We can mix the signal with an oscillator tuned to the RF nals, Samples, and Stuff: A DSP Tutorial.”1 carrier frequency to translate the bandwidth-limited sig- What you need to know for now is that if we adhere to the nal to a 0-Hz IF as shown in Fig 2.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-