0
$\begingroup$

I am attempting to write a FFSK (differentially encoded MSK) modulator. I have found and implemented a demodulator that works with sample data taken from a radio of a FFSK signal. The demodulator uses a FM Discriminator to transform the IQ data to a FFSK signal that can be decoded. I am using the method described in the article "Minimum Shift Keying: A Spectrally Efficient Modulation" by Subbarayan Pasupathy to modulate a FFSK signal. When a FM Discriminator is applied to the output of the modulator a square wave alternating between +/- 4.5 deg is produced.

Below is a snippet of my matlab code used for modulation:

% differentially encode to produce a 1-to-1 mapping between input bits and output frequency for FFSK
diffBits = [bits(1) zeros(1, length(bits) - 1)];
for i=2:length(diffBits)
    diffBits(i) = xor(diffBits(i - 1), bits(i));
end
iBits = diffBits(1:2:end);
qBits = diffBits(2:2:end);

% rectangular pulses of duration 2*T w/ Q delayed from I by T
iPulses = [kron(iBits * 2 - 1, ones(1, 2 * SYMBOL_SAMPLES)) zeros(1, SYMBOL_SAMPLES)];
qPulses = [zeros(1, SYMBOL_SAMPLES) kron(qBits * 2 - 1, ones(1,2 * SYMBOL_SAMPLES))];
t = -T:SAMPLE_PERIOD:(MESSAGE_DURATION - SAMPLE_PERIOD);
plotTime = t/T;

% baseband symbols (Parallel generation of Type I MSK, see Couch Figure 5-36)
iSymbols = iPulses .* cos(pi * t / (2 * T));
qSymbols = qPulses .* sin(pi * t / (2 * T));

Here is a graph of the output of the FM discriminator from the sample data: Sample data - FM discriminator

Here is a graph of the output of the FM discriminator from the modulator data: enter image description here

My question is what is different between the real data and my modulator that could produce this different output? I am looking for a way to make my modulator produce data similar to the sample data.

If this helps, here is the FFT of the baseband of the sample data (derotated and resampled down):

% samples are complex int16 values read in from a file
num_samples_fft = 4096*2;
Fs = 781250;
freqOffset = -25200
shifted_samples = samples .* exp(2*j*pi*freqOffset/Fs*(0:length(samples)-1));
resampled_samples = resample(shifted_samples, 96, 3125);
resampled_samples_fft = fft(resampled_samples,num_samples_fft);
resampled_samples_fft = resampled_samples_fft([num_samples_fft/2+1:end 1:num_samples_fft/2]);
figure;
plot(f,2*abs(resampled_samples_fft(1:num_samples_fft)));
title('Sample Data FFT');

enter image description here

Whereas if I do the same process to data that I modulate this is the resulting FFT graph:

enter image description here

$\endgroup$
  • $\begingroup$ Do you have a question? $\endgroup$ – John Oct 1 '14 at 18:52
0
$\begingroup$

It is possible that the sample data has a pulse-shaping filter before the frequency modulator. That would explain the first plot.

Look at the power spectrum of the sample data and check the sidelobe levels as compared to textbook MSK and your modulator. A pulse shaping filter will reduce the sidelobe levels.

Square waves are expected in the second plot, because the data entering the modulator has no pulse shaping on it. The spectrum should be textbook MSK.

$\endgroup$
  • $\begingroup$ I've tried adding both a filter based on a sinc function and a raised cosine filter and still no luck. At most I'm getting a distorted square wave on the output. $\endgroup$ – tylerjw Oct 2 '14 at 20:21
  • $\begingroup$ Did you try a Gaussian filter (aka GMSK)? $\endgroup$ – John Oct 2 '14 at 20:30
  • $\begingroup$ The Gaussian filter did not help. The signal I'm trying to reproduce is the modulation used with MPT1327 which is FFSK (differentially encoded MSK). $\endgroup$ – tylerjw Oct 3 '14 at 15:28
  • $\begingroup$ That is a blast from the past. I used to build MPT1327 modems long ago. Your spectrum doesn't look right to me. $\endgroup$ – John Oct 3 '14 at 16:25
  • $\begingroup$ Cool, that spectrum is from sample data I took with a USRP parked next to a MPT1327 base station (specifically a Tait communications one) I then derotated it and resampled it down to 24kHz and applied the FFT. I'll post the code for that under the graph. $\endgroup$ – tylerjw Oct 3 '14 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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