Você está na página 1de 10

Software radio simplified

Pekka Ritamaki, OH3GDO oh3gdo@sral.fi

Figure 1. The SDR has a simple hardware. Here is a Softrock40 transceiver for 80/40m

Question 1

What SDR mean?

Answer1
SDR abbreviation means Software Definened Radio. In software radio RF frequency is converted to
audio range using sampling mixer and a digital program processes signal. Previously digital
processor programs used only the auxiliary equipment of the radio like frequency divers. The actual
signal path of the radio was working with traditional analog circuits.
In SDR technology, the radio signals are processed through a program. In general the software
filters, demodulates, modulates, codes and decodes the signals. In standard SDR radio software
radio signal is displayed in the form of spectrum or in form of waterfall on the screen. In full
software radios has only one hardware analogue-to-digital converter after antenna. Everything else
is software. Such a radio is, however, for radio amateurs still too expensive. By moving the RF-
frequency audio range by sampling mixer is optimal solution for the characteristics and price.
Figure 2 Rocky is a popular SDR radio program

Question 2
All of the ham radios have had something like a processor already twenty years? What is strange is
this? I have built direct conversion radio kit Juma1 [2] and it has a processor inside.

Answer2
In Juma 1 radio the software does frequency selection, but software do not change information path
at all. Juma 1 is direct conversion radio, but without the SDR-based features. It does not have the
frequency spectrum or waterfall display or continuous bandwidth adjustment. Similarly, the CW or
PSK31-interpretation of the data is missing. Juma 1, however, is a great achievement for amateurs.

SDR is based on the digital signal processing or DSP. In DSP technology, analog signals are
generated or modified by the program. The original or the result signals or both are analog signals.
DSP and the SDR mean different things, even if the SDR could hardly exists without the
mathematics of DSP. Previously, the SDR-based radios were expensive black boxes. Now, the
SDR-based radio needs only a cheap RF-down converter and the PC program. The price of the
program is amateur net (= silent thank you).
The wonder of SDR is that using a low-cost RF-section and free DSP program, the average amateur
can own a radio, which has features of the top rigs. A typical PC has a sound card, which is an
essential part of the SDR-based radio. The sound card will digitize the audio signals to digital form.
The PC deals with DSP calculations reasonably at low computational level. SDR is combination of
cheap RF-part, a sound card and digital program. It rivals with finest competition radios currently
available. Fine resolution spectrum display belonged only to the radios with high price tags. The
narrow, visual and continuously adjustable filter on PC's screen is the thing what most amateurs
have never believed to own. The digital mode decoding is achieved with the same price: the
amateur net.
The wonder of the SDR is a good and diverse radio with low price.

Question 3
How SDR actually works? Although 7 MHz SDR-based radio is taking samples isn’t the signal still
the same, for example 7 MHz after sampling?
How does the RF-signal from the sound card is shifted to the audio range?

Answer 3
The digital switch operates similar than ring diode matrix, which was used in old radios. Any
analog switch can take samples of the signals like famous CMOS switches CD4051 or CD4053.
The speed of switch must have faster rise time than the signal of the interest.

Normally SDR uses ICs like FST2325 or SN74CB2353. These analog switches can work at 2 ns or
around 500 MHz.

Figure 3 FST2325 is two sets of four analog switches

The analog switch shown in the figure 3 is used as a mixer in the SDR-based radio. The input
signal and the local oscillator mix with each other. The mixing makes two new signals. One is the
sum of the incoming and the local oscillator frequencies. The other signal is difference of these two
signals.
The sampling acts as a normal down converter, like in every direct conversion radios (Juma1).
SDR-based radio mixing does help also the mathematics of the DSP in PC. We come to this later.
Figure 4. A Softrock40 receiver, a schematic diagram.

The SDR-radio needs two signals, which has 90 degrees difference from each other. By using the
input transformer, which has two secondary windings, they have 180 degrees of phase shift. Using
the local oscillator, which has four times frequency of the measured signal and Johnson counter 4:1
with analog switches the, 90 degrees phase shift is achieved. The analog switches take samples
according the counter and mix antenna signal with the local oscillator. This clever circuit is
designed by genius Tony Parks, KB9YIG. This is basis of hardware part of the Softrcok40 SDR.
The mixing principle is called the Tayloe-detector.

SDR radion hardware part


C1 PC

0 LP R1
- I

LP
+ Soundcard DSP
C2 software
180 R1
LP
4*f -
+ Q
2:1 2:1

Figure 5 SRD radio simplified block diagram


After the switches there is 1MHz low pass filters, which removes the unwanted sum signals. If the
local oscillator is 28.096MHz and input signal is 7.00 MHz, the sum signal is 35.096MHz, which is
easily removed by the low pass filter.
The difference signal is formed to the audio range 0-96kHz. The I and Q audio signals are
connected to the line input of your PC's sound card.

Sound Card basics


Your PC's sound card bandwidth can be 20, 48, 96 or196 kHz. It depends the quality of the sound
card. The sound card takes samples at 44.1 kHz, 96 kHz or 196kHz. The analog to digital
conversion is done in two channels, left and right, simultaneously.
The soundcard has a low frequency limit about 10Hz. The input impedance of the line input is 10
kilo-ohms. The standard input voltage level is 0dB or 0.707 V. The maximum level is about 2-3
volts before clipping.
The accuracy of the sound card is expressed in digits. If it is, for example, 16 bits, then the signal to
noise ratio is 100 dB. If the sound card takes f 96000 samples per second and uses 24-bits precision,
it means three bytes per channel, the data should be handled 2 * 9600 * 3 = 576000 or half a
megabytes per second.
The bandwidth of the soundcard determines bandwidth of the SDR receiver. If local oscillator is
operating at 28384 Hz, the sound card digitize 96kbits per second, the frequency range of the radio
is 7.00 - 7.096MHz.
Hm…what does Mr. Nyquist think on this? Does the samples should be taken twice the speed?
Harry Nyquist does not need to turn in his grave; we have two signals, Q and I. These signals go to
the right and the left channels in the sound card.
SDR radio is actually two direct conversion receivers in a single package. SDR-based radio.
However, it is much more than direct conversion receiver.

Question 4
What those I and Q mean? After all, we amateurs do not receive stereo music? Do not tell any
mathematical formulas, but give a simple answer.

Answer4

The question is easy, but the understanding the answer requires a lot of focus. Some readers may
jump over this part. It may not be immediately interesting.
The software radio is a very different from the hardware radio. The RF-signal has amplitude and the
phase, which varies over time constantly and it must be processed in real time. The final signal can
be presented in many ways. The real signal like a temperature is only one dimension like point –2.3
in Figure 4. The complex number has magnitude and phase similar to the component, which has
real and reactive part. The phase and amplitude include the modulation and carrier in RF-signals.
Without one or other the signal is not complete.
imaminäryaxle
Complex number
c=3.0+j2.3
2.3
s c=

φ real axle
3.0

real number2.3

-6 -5 -4 -3 -1 0 1 2 3 4 5 6 7

Complex and real numbers dispalyed

Figure 6 The presentation of the complex and real time signals


The amplitude and phase can represented in many different ways.

1.Using magnitude S and phase angle φ


C=S∠φ

The phase angle is trigonometric function of triangle b and a.

φ = tan-1(b/a)

2. Using a trigonometric form c = M [cos (a) + jsin (b)]

3. Using a polar mode c = MejΦ.


This was invented by Euler in 1700.

4.Using a rectangle representation the form c = a + jb, where real part is a and imaginary part
is b.

This last method is far the fastest and least resource-intensive way using of a digital computer to
calculate the real time complex signals.
The label j in formula is defined as follows: j * j = -1. It is a bit difficult to explain since the square
root of minus one does not mean anything. However, by using j-operator in complex calculations,
the mathematics works as many of us can remember from impedance calculations. Using only real
part, the calculations do not take account the phase, which is an essential part of the complex
signals. The signal, which has an imaginary part and real part is called complex signal. In SDR-
based radio, complex signal will be completed isolated in I (real) and Q (imaginary) parts trough
main calculations.

Sound Card
I
R ADC
Buffer
16-bit Q
44.1kHz
FFT
Q
L ADC
16-bit Buffer
I
44.1kHz Converting Cartesian
coordinates to
polar coordinates

Sound card
IFFT
AGC DAC

Figure 7 SDR radio software block diagram


The most important things in SDR are done in frequency plane. Our HF-part and final audio
signal are using time planes. The time plane is fancy name of real continuous signal like in
antenna input or on speaker output. The frequency plane is little difficult to think first time. It
can be described as a row of bins where the different frequencies of the original signal are
filtered with many narrow band filters in parallel.
The conversion from time to frequency plane and back is done in certain discrete slices like in
quantum mechanics. It can’t be continuous, however we need continuous signals. To get better
conversion, the start and end of continuous signals are smoothed using different formulas named
after their respective inventors like Hamming, Hunning or Blackman.
The mathematics has found how conversion to frequency plane or parallel filtering is done
elegantly using Discrete Fourier transform (DFT)-method. Using Fast Fourier transform (FFT)-
method the operation is much faster, removing unnecessary repetitive calculation. This method
needs two arrays of the real signal. Other is real part array and the other is imaginary part array
as explained above

Digitized signals, our I and Q-signals, are already pre-treated for FFT conversion in SDR-
hardware part of the SDR receivers.
DirectX8
The signals come out of the sound card using the buffer of the DirectX8. DirectX8 is the Holy
Grail of the Windows world. Only few people have ever heard of it. It is the hardware and
software concept behind the device drivers in the Windows operating system. It works because
users do not to have to work on hardware and software integration during installing e.g. a new
USB-sound card. This is not so easy in other operating systems. The sound data is digitized and
recorded to buffer of the Directx8 fully automatic after setup.
The digitized right and left data is in the rotating buffer in sequence right, left, right, left etc.
They are separated by a simple program loop.

The SDR has got almost without any effort two buffers filled by complex signals, Q and I,
which are ready for FFT conversion. This is secret for building I-and Q- signals in hardware
part. Using sine/cos-floating point mathematics from real signal to calculate I- and Q-part for
FFT from one audio signal require quite more processing power than PC has available. The PC
does not have dedicated 68-bits DSP-drum register and DSP-instructions like in every real DSP-
processor have.
Using ready digitized integer numbers from DirectX8 buffer, all the mathematics is quite
simple. Well,“quite simple”, must understand right in this context.
Fc Fadc
Fadc carrier samplefrequency
samplefrequency

Basket N-1 Basket0


Basket N/2 Basket N/2-1
LSB USB
Negative Positive
frequncies frequencies

Figure 8 FFT-filters the signal to small bins which has the frequency of their
own
Figure 8 explains the results of FFT conversion. The figure shows time plane is converted to
4096 (12-bits) discrete frequency bins. If the samples had been taken 44100 times per second.
Each bin has as frequency range 44100Hz/4096 or about 10Hz bandwidth. The first bin has sum
of each frequencies between 0 and 10Hz, the second bin has sum of frequency components
between 10 and 20Hz etc.
In FFT-conversion frequency of the local oscillator Fc is moved to middle bin. The positive
frequencies of the USB-band (upper side band) are in low-end bins, which move from middle to
right and LSB (lower sideband) moves left from the middle.
At this stage, only one sideband is necessary for further processing. Sideband selection is same
as swapping right and left audio channels in the hardware.
FFT-results are still in two arrays, I and Q-bins.
DSP's first task is to transfer the received band back to base frequency. It is done moving the
original band 0.25 * bandwidth downwards. In mathematics, this will be done using FIR filter.
It means multiplying the arrays with the array of constants. It means moving frequency plane
sideways. A large number of multiplication and associated sums and the transfer of memory-
intensive computations need a high-speed computer. Using integer numbers this is however
possible without dedicated processor as told before.

PC is not a DSP computer and, therefore, mathematics needs to be done thriftily.


When transfer of the right-radio spectrum band has been carried out, the odd measurements may
be removes as unnecessary data. Selecting different signal (stations in RF) is done again with
FIR-filters. Now they are not constant, but arrays which has the same length than the original
signal. FIR filter is calculated based on convolution principle. Using software impulse trough
the wanted filter signal array in real time, the FIR coefficient can obtain.
After bandwidth filtering, a possible noise filtering is done. The simplest form of the noise
filtering is averaging the received signals.
When every thing is done in frequency plane, the conversion to time plane in done with reverse
FFT-conversion. The normalizing the data buffer means same as ALC, an automatic level
control. The maximum value is first found and then the data array is multiplied by a constant
number.

The end result is a signal, which can be transferred to the sound card to the digital to analog
converter and further to speakers or signal can be interpreted in digital form. CW and PSK-type
modulations can be displayed on your PC's screen. Actually the software does not use DAC of
the sound card, but writes data to the buffer for DirectX8. DirectX8 then uses the sound card of
this PC in certain way and moves data possible to USB-bus at right sample rate. Again good
things in the Windows work for us and get so little from us.
If you think all calculations above you find that software power in the most crucial thing in SDR
–concept.
When I and Q signals are formed in advanced at hardware level, the mathematics is easier, but
again only in relative way.
There are still a large number of small print directions in the PC's DirectX8-software like
spectrum display, FFT-and-IFFT calculations. The decoding digital signals and generating
transmitter signals has many details also.

Summary
The questions about the SDR-based radios are easy, but with clear and simple answers are not
easy. The radio operator of the SDR-based radio does not need to know anything about DSP
math. I do not think Kimi Raikkönen doesn’t program algorithms for Ferrari’s DSP processors,
but he is a good driver for Formula 1.
A suitable low-cost SDR radio kit is SOFROCK40 v6.2[4]. It works at 80/40 meter bands, the
receiver and transmitter 1W. The members if the amateur club in Tampere, Finland has built
about 30 transceivers during winter 2007 and 2008.
Readers are invited to find more information about the SDR-based radio via the Internet at
http://websdr.ewi.utwente.nl:8901/

References:
[1] oh3ne softrcok40 site: http://oh3ne.ham.fi/wiki/index.php/SOFTROCK40
[2] Juma radio http://www.nikkemedia.fi/juma/
[3] Software http://www.dxatlas.com/Rocky/
[4] Softrock40 This is already obsolete, now the latest version is 8.3 and more versions
coming continuously.

Pictures
Figure 1 is Softrock40 SDR 80/40m
Figure 2 Rocky is a popular SDR radio program
Figure 3 FST2325 is analog switch, which makes a mixture of the SDR-based radio
Figure 4 Softrock40 receiver, the schematic diagram
Figure 5 SRD radio simplified block diagram
Figure 6 Complex and real numbers
Figure 7 SDR radio software block diagram
Figure 8 FFT a derivative of baskets and their frequency

Você também pode gostar