Anda di halaman 1dari 5

January 2015 RadCom

Getting started in... Mike Richards, G4WNC e-mail: mike@photobyte.org

Getting started in
Software Dened Radio
How can SDR enhance your radio reception?

STARTING OUT IN SDR.    "


! 

$ | ! |!  +=[$" "  

B
I output
"   ~   " $ $ 
  " "   
$  $
 
  ?
  $ []  
$ "
   [%     "  
Analogue Local
  %$ ?   $_ %   $  
RF input oscillator      $  [
  
 
|! $
$
  SG ]%  $" 
  
   -90   $ 

=

  "[ $ [=
 ~  ;=
 
WHAT IS SDR? ] 
 Q output ~   
$ 
  |!      ~  
 "   
  []$
  
%***$  |! FIGURE 1: Generating I/Q signals %  
  
!  $   using a pair of identical mixers. $  ?$    

 
     $    
$  ^[#  

=Figure 1[]
  "$    |!    

  %  [
$    ^ "  
$  $   $
 %  
         $   " 
^ |!$
" 
   "[|!"  |![    $
 $ 

          $
   
"    I/Q SIGNALS. %" _   [$ $  $ 
R
   
 "   |!
^$     "
    
    _    
    $_
 $"  
[] 
    [
     _|![        
 $ 
 "     ~          
   " ~  |!
I    $   "    
 $
  [$
  
 Q     
_ $  %   
  "    []   $   [   $%
$  ]  
  $     ^  $ $ 
%   " 
 []  
$~
   

Sampled        [ $


Sampling waveform
_ $"  $ 
points      
 [
]    
% $   " 
    $  
   " [

ANALOGUE TO DIGITAL CONVERSION.


]     "   
 $ 
  ?
[}
V1 V2 V3 V4 V5 V7 V8 V9 V10 V11 V12  
 $  
Stream of     " |}
sampled FIGURE 2: Sampling an analogue signal     "     
measurements by taking regular measurements.      
 
     []
30
January 2015 RadCom
Getting started in... Mike Richards, G4WNC e-mail: mike@photobyte.org

know that computers can ADCs comprises a string of binary numbers


Analogue
input
Serial data output only handle numbers but thats passed over a very high speed serial
its more prescriptive than connection, see Figure 3.
that as the numbers need
to be in binary format. Lets FAST FOURIER TRANSFORMS. Dont
ADC 10100101001010100101001 
_  
 panic, Im not going to start delving into
numbering as its really very complex maths, but an overview of Fast
straightforward. In binary Fourier Transforms (FFTs) will help you
FIGURE 3: Using an analogue to digital converter to produce numbering there are only two better understand SDRs. Lets start by
a stream of data from an analogue signal. possible digits, ie 1 or 0. The assuming we have a signal thats been
reason this works well for digitised. In that case, the output from
computers is that all the data the ADC will comprise a stream of binary
technique for achieving this is simply to lines have just two possible states, either numbers, as in Figure 3. How can we
take voltage measurements of the incoming on or off, which represent binary 1 or 0. $ ~      
signal at regular intervals, see Figure 2. Looking at Table 1, within that data stream? This is where

B
This measurement technique is called you can see that larger numbers are made FFTs come to the rescue. The Fourier
sampling because we are taking samples simply by adding more digits, with each series is a mathematical solution that
of the signal as it arrives. Im sure you can added digit having a different weighting. allows any waveform to be decoded into
see that, if we want to record an accurate   ] +  a combination of sine waves of different
representation of the signal, we will need to   +=$ ?$ frequencies. As you can imagine, Fourier
take regular samples at frequent intervals. the number of 2s and the next the number analysis is a complex process that takes
]~ $~ ] " of 4s, etc. Ive populated the table with
SG a lot of computing power. However, the
work on sample rates comes from a paper a few examples so you can see how 8 Fast Fourier Transform (FFT), as the name
published in 1928 and known as the binary digits can be used to represent any suggests, is a quick way to carry out Fourier
Nyquist-Shannon Sampling Theorem and number from 0 to 255. At this point, I analysis with minimal processing power.
more commonly called the Nyquist theorem. need to introduce a couple more computing ##] 
   _   
This shows that the sampling rate of a signal terms. Each digit in a binary number is or block of the incoming digital data. The
needs to be more than twice the highest called a bit, which is a simple shortening FFT then creates a number of bins (data
frequency contained within the signal. Lets of BInary digiT. Most computing systems stores), each of which is used to measure
look at a common example. If we wanted also work with multiples of 8 bits and you the power of a narrow frequency band from
to digitise an audio signal containing will no doubt have seen computing systems the incoming data segment, see Figure 4.
frequencies up to 20kHz we would have    +;< As the data stream is processed, the bins
to sample at a rate of more than 40,000   
;[%     are populated with the appropriate energy
samples per second or 40ksps. In practical of 8 bits is called a byte. level for their narrow band. In an audio
systems, rates of 44.4ksps or 48ksps are Getting back to our sampling, you can system with a sample rate of 44.4ksps and
usually used. see that if we use a sampling system ##]=; $ ? 
Now we need to consider the $ $$ "<; see audio frequencies from 0Hz to 22kHz.
measurement resolution of each sample. We measurement steps available, ranging from In this example each FFT bin would have
R
0 to 255. However, if we increase the  $[<<====;[
 +;$ "   Once the incoming data stream is split
TABLE 1: Binary numbering.  ;;[% into sub-bands or bins we can use that
Decimal weight 128 64 32 16 8 4 2 1 we convert those steps to dB, then 8 information to drive a spectrum analyser
0 0 0 0 0 0 0 0 0
17 0 0 0 1 0 0 0 1 bits gives a range of 48dB from the display. Alternatively, we could use a similar
29 0 0 0 1 1 1 0 1 weakest to the strongest signal whilst principle to pass only signals from a range of
230 1 1 1 0 0 1 1 0
255 1 1 1 1 1 1 1 1
+;"        "
 [
; [] One of the problems with using FFTs
occurs at the beginning and end of
each data segment. For the FFT to work
accurately all the signals in the sampled

Sampled signal segment 0-22kHz segment have to be periodic, ie contain an


01101110101010111100001010101010101000101101000101110110100 exact number of complete cycles. That is
obviously not practical in a real system as
some signals will have been abruptly cut
off at the start and end of the segment, see
FFT code Figure 5. The result is rather like a key-
click, with spurious readings being shown
in the FFT bins. The spurious readings
are called spectral leakage and spoil the
accuracy of the FFT. The simple solution
   
   
4096
zero at the beginning and end of each data
bins segment. This process is called windowing
Frequency bins as its rather like shaping the segment
5.37Hz
  $ $[ 

bands there are a number of different windowing
FIGURE 4: Illustration of the use of FFTs to analyse the frequency content of a digital signal.   $$   
and drawbacks. One popular window is
32
January 2015 RadCom
Mike Richards, G4WNC e-mail: mike@photobyte.org
Getting started in...

+[;  systems. With a direct conversion SDR


  ]   "    !# 
receiving that data      ? 
needs to be fast are fed from a common local oscillator at
enough to carry out  ~
[]   
a number of FFT   ?

calculations whilst also 
= % 
managing the user Figure 7[]?
Raw sampled Sampled Segment controls, display, etc.  %   
segment after window This is way beyond left and right channels of the host PC. The
the capabilities of    % 
FIGURE 5: Comparison of a raw signal (left) and after a window the home PC. The "  %  
is applied (right). solution is to use a can be demodulated and processed by the
Field Programmable |!$ [ 
  
Gate Array (FPGA) SDR receivers is the spectral display of a

B
the Hanning function, which is particularly chip. These devices contain large numbers band segment along with the facility to click
effective for measuring continuous signals. of logic and digital signal processing (DSP) the mouse to tune to a signal. The tuning
An alternative for dealing with transient 
       span available from a direct conversion
signals is the rectangular window.  $ [%    "
  SDR depends on the sample rate used by
FPGAs can also run many tasks in parallel   [
 


WHERE TO DIGITISE? Now that weve and its this combination of high speed and 
  _;_
covered some of the key technologies,
SG parallel processing that makes them ideal which provided a tuning range of just under
lets start by looking at practical SDR   |!
[] ;_ "
[%
^" 

[  ~   role of the FPGA in most SDR systems paying attention, you may just be wondering
be: where do we digitise the signal? There ?      _ how you can have a tuning spectrum
are essentially two main options that are of spectrum from the incoming data and thats the same as the sample rate: surely
driven by cost. The ideal is to digitise as  } %  _    

close as possible to the antenna as that puts    $ []  <_ $| ^$
 
all the processing under software control is called decimation and is the digital common point of confusion for those new
"?
[] ~"      ?%#  to SDR. The answer comes from some nifty
usually called Direct Digital Sampling (DDS). combination in an analogue radio, as shown    |!$ [%

$" ? " in Figure 6. Although the block diagram of  _ _?

$ 
option, so lets see why. Lets assume we  |||! "
_~   ?    
$    ~ 
+;=; simple, the development of specialist FPGA   ~ []|!
SDR system with digitisation of the full software (and the ADC and FPGA chips $  % 
spectrum soon after the antenna. From the " "
? "    $ ~ [

~%    higher cost of this type of SDR receiver. $  =<_ 
ADC needs to sample at more than twice =<_$  _  _
R
~
  [%  A SIMPLER WAY? The simplest and total. One of the common drawbacks of
? ~
<  $
? |! %#|!
    
$    +=    " %#^ 
[ the display that occurs at the changeover
^ ++=[] ?  * 
?     between the two bands. There are two
choice is the resolution of each sample. For #?!  ! _ []   
[%  " 
~ 
 $   ~"
     <_ 
+; []$ 
 the popular FUNcube Dongle series are <_    
With these design parameters, the ADC will based on a direct conversion design. The  "  
  $ 
    +;    low cost of these systems is made possible =  |}$ 
++=   [] $_  _~ 
   %        [% 
    +;======= that are found in most modern computing practice this is not achievable and the result

1st Mixer Bandpass 30MHz


filter 10.7MHz

RF in 10.7MHz RF in 1MHz wide


1-30MHz IF out 1-30MHz IQ out
FPGA
ADC
Decimator

1MHz

Local
Oscillator
11.7-41.7MHz &%|<}~*   $   
! #      
   Z

33
January 2015 RadCom
Getting started in... Mike Richards, G4WNC e-mail: mike@photobyte.org

Direct conversion Zero IF Computer


receiver Mixer

I output
Bandpass
Soundcard
filters

Local Digital IQ
oscillator to SDR
software
-90

B
RF
amplifier
Q output

SG
FIGURE 7: Illustration of a direct conversion SDR receiver.

is the response spur you see at the central


crossing point. Most current SDR software
systems include very effective techniques
to automatically reduce the central spur.
SDR TRANSMITTERS. The generation
of an SDR transmit signal is surprisingly
straightforward, as shown in Figure 8[%  
top-end direct digital synthesis system, the
      
 "
 "  
 
  #*;===
and ANAN series of SDR rigs to produce
extremely clean transmit signals.
$ "  ~ 
Another option for dealing with the spur is
to include a dedicated soundcard chip in the         earlier, there is a simpler way to generate
SDR hardware. Using this technique, the to shape the audio. This signal is then up-   []! _|!
     _ sampled to the required transmit frequency   
    
#        #    signal in software on the computer and
|}[]     digital to analogue converter (DAC). This    % 
#  # |   !#      audio signals on the left and right computer
includes a high quality audio chip that can     "    soundcard. These signals are then applied
  +_"   techniques. One of the newer features to a quadrature mixer which is effectively
R
<==_|!   [%
 "  ^   
 the same as our two mixers with a 90 lag
an SDR receiver that uses your computers  [*  $ applied to one of the local oscillator sources,
  "
$ 
   suffer from a variety of amplitude and phase as shown in Figure 9. The result is the
cheap USB soundcard dongles. Many of     $ [%      
 
these devices only provide a mono input so a pre-distortion system, the digital transmit      [

   |![] $ " $ "
"
   ~ 
      $   PRACTICAL SDR. By far the cheapest
soundcard that has stereo inputs. the effect of reducing the unwanted output. entry into SDR is to use one of the DVB-T
 ] [] 
  $_
 ! _!]<<
Transmit " [] !]<< 

signal USB to       


generation Microprocessor PC  % " [ 
   " % 
  |!$ 
Ref. clock
produce a receiver with a tuning range of
 ;   +==[
Analogue
Low pass Digital to The simplest software to use with one of
FPGA to digital
filter analogue these dongles is SDR Sharp (SDR#). The
converter
converter Mic team at Adafruit in the US have put together
To PA ADC an excellent tutorial on how to use a dongle
DAC and install the SDR Sharp software, which
  [~
#
Analogue
SDR SOFTWARE INTRODUCTION. For
Analogue Digital   %^SDR Sharp as it is very
at final FIGURE 8: A direct sampled      [%^"
frequency SDR transmitter. shown a screen shot of SDR Sharp in Figure
10. Lets start at the top left where youll
34
January 2015 RadCom
Mike Richards, G4WNC e-mail: mike@photobyte.org
Getting started in...

Digital Analogue   


   
[]
   
" }  
  
$ 
Mic
RF to  
SDR Soundcard filters 
 $  [
software I L I Quadrature & PA   
Q R Q modulator $  
 
   [%
$ 
    $
   

 
Local   $  

FIGURE 9: A direct conversion SDR transmitter. Oscillator      

B
    _
  []
       
Start Hardware setup !   
 
  
    [
SG Spectrum % $   $  
Choose
radio 
 "
 
    
Display      $   [
controls %
  _ 
  
~

[
]      
    ?    
 $ $  
Select Tuning  
[    
soundcard/radio ribbon  "  $
 "
  $ []
 $   +=
   
  
Waterfall    ?    
 
[$  
 _?} % $
        " 
R
FIGURE 10: SDR Sharp user interface.
 $  $ % $  
 % "[
     [] ]     "    ] " 

$    
$ "            

$          $    
 " $ [
   

[ ~
[%   
 ]%    $

?
        $ "  
  "     
 "[%   " |! $ [$"
  
      " 
  "   _   
  # | [
$ 
$  _       [% ]   %^ " 
    
[]  $  
  !   [] "



 |! $   __
     $   $
 
          ##]|
  [   " 
 
$
  $        _[ 
^"    

   "[}      ;;[          

$  
$  _
  
 !   "
  
$_[
 $ $
" 
[%    ] _ " |! " 
[# 
 $$ " "  "$  %   %  " 
~

[%   "    
  _  $  $ 
    ~
   [
"
  !#    



   ~
 "  
$  $ [#   
~ _
[
  
  $ 
~
  ^ 
     
"

   " 
  "  [
 " "     [
  $
  _    
 " 

[ 
 $    [%  SUMMARY. %    |!
 _  ~
   $  
    %
 "  
 _ ~
 "
 
[ ~
"     
   
  "
%"         
   SDR Sharp  
^ "  _   
[   []"

 " [
35

Anda mungkin juga menyukai