Getting Started with Software Defined Radio: Analog Signal Transmission Using PlutoSDR and MATLAB

Getting Started with Software Defined Radio: Analog Signal Transmission Using PlutoSDR and MATLAB

A beginner-friendly introduction to Software Defined Radio (SDR) using PlutoSDR and MATLAB. Explore analog signal transmission with sine, square, triangle, and sawtooth waves — and analyze channel effects on signal integrity.

Introduction to Software Defined Radio (SDR)

Software Defined Radio (SDR) is a radio communication system where components traditionally implemented in hardware (mixers, filters, amplifiers, modulators/demodulators, detectors) are instead implemented by software on a general-purpose hardware platform.

Two key concepts define SDR: "general-purpose hardware platform" and "software". The hardware platform can implement various communication functions rather than being locked to a single purpose. This experiment uses the PlutoSDR as the general-purpose hardware platform. Software implementation offers faster development cycles, lower costs, easier debugging, and flexible updates compared to traditional hardware-only designs.



Analog Communication System Model

Communication systems are generally classified as either analog or digital based on the type of signal transmitted. This experiment focuses on analog signal transmission and reception.

The analog communication system model consists of:

Analog Source → Modulator → Channel → Demodulator → Destination

Since radio communication requires transmission through free space, baseband transmission alone is insufficient. Instead, the signal must be modulated before transmission via antenna and demodulated upon reception.

PlutoSDR Analog Signal Transmission Experiments

To investigate channel effects on transmitted signals, multiple basic waveforms were tested: sine wave, sawtooth wave, triangle wave, and square wave.

Experiment Configuration

  • Center frequency: 2.5 GHz
  • Baseband sample rate: 1 MHz
  • Receiver gain: 40 dB (manual), Transmitter gain: 0 dB
  • Samples per frame: Configured based on transmitted data points
Note: An automatic gain control (AGC) process may occur. The first few frames are discarded before capturing analysis data.

1. Sine Wave Transmission

 

Unify the parameters of the Pluto Radio transmitter and receiver:

  1. Center frequency is 2.5GHz.

  2. Baseband sampling rate is 1MHz.

  3. Set the receiver center frequency gain source to manual, and set the receiver gain to 40dB, and the transmitter gain to 0dB.

  4. Set the number of samples received by the receiver each time based on the number of transmitted data points.

During the data reception process, you may notice an automatic gain control process. Therefore, you may choose to receive and discard the first few frames of data first, and then receive one frame of data for analysis.
The above is one frame of data from the receiving end. It can be seen that it has received several cycles of information, and the overall amplitude has changed, meaning the average power is not balanced. However, the basic waveform does not show significant distortion.
Using a similar method, conduct experiments with sawtooth waves, triangle waves, and square waves.
Observation: The received signal shows multiple periods and overall amplitude changes (power imbalance), but the basic waveform shows no significant distortion.

2. Sawtooth Wave Transmission

Observation: Significant distortion appears at the start of each period, along with non‑smooth transitions along the ramp.

3. Triangle Wave Transmission

Observation: Minimal distortion at the turning points due to fewer high‑frequency harmonic components.

4. Square Wave Transmission

The square wave contains infinite harmonic components. High‑frequency components are filtered out during sampling, while remaining high‑frequency components manifest as overshoot (Gibbs phenomenon).

Summary & Analysis

This experiment successfully demonstrates a simple analog communication system using PlutoSDR and MATLAB. The results show that:

  • Sinusoidal signals (bandwidth‑limited) experience minimal distortion
  • Signals with sharp transitions or rich harmonic content (square waves, sawtooth waves) are more susceptible to distortion due to limited baseband sampling rates
  • Channel effects include amplitude variation and power imbalance, which may require compensation techniques in practical systems

MATLAB Transmitter Code

%------------------- Initialization --------------------------
clc; clear; close all
sps = 8;  % Sampling rate (samples/symbol)
N = 0;    % Figure counter

%%
% Analog signal generator
Num = 100;      % Signal length
dt = 1/Num;
t = dt : dt : 1;

% Select waveform (uncomment desired waveform)
s = sin(2*pi*t);                    % Sine wave
% s = t;                             % Sawtooth wave
% s = [(dt:dt:0.5), (0.5:-dt:dt)];  % Triangle wave
% s = square(10*pi*t, 50);          % Square wave

redun = zeros(1,10) + 1i*zeros(1,10);  % Tail redundancy
Tdata = complex([s]);

% Plot transmitted signal
N = N+1; figure(N); hold on; grid on;
plot((dt:dt:dt*length(Tdata)), Tdata);
xlabel("Time"); ylabel("Amplitude");
title("Signal from Transmitting Terminal")

%%
% Pluto transmitter configuration
tx = sdrtx('Pluto', 'CenterFrequency', 2.5e+09, ...
    'BasebandSampleRate', 1e6, ...
    'Gain', 0);

% Pluto receiver configuration
rx = sdrrx('Pluto', 'CenterFrequency', 2.5e+09, ...
    'OutputDataType', 'double', ...
    'BasebandSampleRate', 1e6, ...
    'SamplesPerFrame', 5000, ...
    'GainSource', 'Manual', ...
    'Gain', 40);

%%
% Signal transmission and reception
tx.transmitRepeat(Tdata');
for k = 1:3
    rx();   % Discard initial frames for AGC settling
end
Rx_Sig = rx();
release(tx);  % Release Pluto resources

%%
% Plot received signal
N = N+1; figure(N); hold on; grid on;
plot((dt:dt:dt*length(Rx_Sig(end-500:end))), Rx_Sig(end-500:end));
xlabel("Time"); ylabel("Amplitude");
title("Signal from Receiving Terminal")
Next steps: Extend this experiment to digital modulations (QPSK, QAM), implement real‑time audio transmission, or explore channel equalization techniques to compensate for amplitude and phase distortions.

Hardware Support

This experiment uses the PlutoSDR platform. For a ready‑to‑use PlutoSDR with full frequency support (70MHz–6GHz) and Gigabit Ethernet:



Previous post Next post

Комментировать