2
$\begingroup$

I'm building a Mode S and ADS-B receiver for TDOA calculation. I am planning to use an SDR with Zero IF to receive the downlink 1090MHz replies from aviation transponders. Currently, I am modeling the work on Matlab and I would appreciate any suggestion or advice.

Let's start with how a transponder works. The attached link has given most of the answers: https://aviation.stackexchange.com/questions/42545/how-does-the-modulation-of-the-transponder-work

Manchester code using for OOK modulation of Mode - S replies

The sine wave in the above picture is 1090MHz. I have modeled it on Matlab using a sample rate of 1090*2 = 2180MSPS, . Each "bit" ('0' or '1') in the modulated signal has a pulse cycle of 0.5us, then there would be 0.5us/(1/fs) = 0.5us/(1/2180MSPS) = 1090 samples for each "bit". Below is my simulation of the signal. Simulation of modulated 1090MHz Signal

According to the book "The 1090 Megahertz Riddle" at https://mode-s.org/decode/ on page 26, the author says that

Given that a Mode S bit consists of a pulse cycle of 0.5 µs (see Figure 1.3), the minimum SDR sampling rate required for Mode S is 2 MSPS.

So after downconverting to the baseband, will the bandwidth of the signal be 1MHz? How to downconvert the signal to baseband in Matlab? How can I effectively model the whole process in Matlab? Should I use the way that I am using to simulate the RF 1090MHz signal? Attached is my matlab code. My final purpose is the bitstream "0101000101000..." of the signal to decode the Mode-S or ADS-B signal from a received I-Q of an SDR.

<code>
clear
clc

preamble = [0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0]; %preamble + DF 5 Surveillance, identity reply
DF = [0 1 0 1 1 0 0 1 1 0]; % 5'd5 or 5'b00101, modulated by Manchester code equivalent to [01 01 10 01 10]
bitStream = [preamble DF];
fc = 1090e6;
bitLivetime = 0.5e-6;

fs = 2*fc;
delta_t = 1/fs;
samplesPerbit = bitLivetime/delta_t;

t=0:2*pi/(samplesPerbit-1):2*pi;
cp=[];
mod=[];
bit=[];
for n=1:length(bitStream);
if bitStream(n)==0;
    modulated_signal=zeros(1,samplesPerbit);   %Modulated
    bit_stream=zeros(1,samplesPerbit);    %Bitstream in time
else bitStream(n)==1;
    modulated_signal=ones(1,samplesPerbit);    %Modulated
    bit_stream=ones(1,samplesPerbit);     %Bitstream in time
end
c=sin(fc*t);
cp=[cp modulated_signal];
mod=[mod c];
bit=[bit bit_stream]; % appending in bitstream
end
ook=cp.*mod;
noised_ook = awgn(ook,10);
total_time = 0:delta_t:bitLivetime*length(bitStream)-delta_t;
subplot(2,1,1);plot(bit,'LineWidth',1.5);grid on;
title('Binary Signal in time domain');
axis([0 samplesPerbit*length(bitStream) -2.5 2.5]);

subplot(2,1,2);
plot(total_time,ook)
title('1090MHz carrier in time domain');
axis([0 bitLivetime*length(bitStream)-delta_t -2.5 2.5]);
</code> 
$\endgroup$

1 Answer 1

2
$\begingroup$

Answering your first question: In baseband, the signal is a train of square pulses with rate of 2 Mpulses per second. How to sample it depends on what you want to do:

  • If you want to "recreate" the train of pulses, you'll need a very high sampling rate, since the square pulses have very large bandwidth. I'd recommend no less than 10 Msamples per sec.
  • If all you want is to recover the bits, you can sample each pulse "in the center", so you need only 2 Msamples per sec. This assumes that you know where the center of each pulse occurs, and in general this requires a symbol timing synchronizer.

The rest of your questions have already been asked (in multiple forms) on this website. I'd recommend spending some time searching for answers here. Post specific questions if you still need help after that.

In conclusion, it seems like you need to strengthen your SDR and modeling skills. I recommend reading the following two (free) books:

$\endgroup$
4
  • 1
    $\begingroup$ Oooh. Rick and Bill's book! :-) $\endgroup$
    – Peter K.
    Commented Jan 1 at 17:08
  • 1
    $\begingroup$ It's a great book... there's a second edition that is even better, but the 1st is available for free. $\endgroup$
    – MBaz
    Commented Jan 1 at 18:03
  • $\begingroup$ I am very appreciate your answer. I just have one small question. To get the train of square pulses, should I use an LO frequency of exactly 1090 MHz to downmix the signal to the baseband, or should I use a slightly different frequency to create a tone at the baseband? $\endgroup$ Commented Jan 2 at 1:08
  • $\begingroup$ @TuấnNguyễnAnh Yes -- In simulation, you can downconvert the signal using the 1090 MHz carrier followed by a low-pass filter. Note that multiplying by the carrier will also generate a 2180 MHz signal, which means your sampling frequency has to be at least double that. (In a real system, it's a bit more complicated since the receiver does not have the exact carrier.) $\endgroup$
    – MBaz
    Commented Jan 2 at 2:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.