Hi Alex:

On Sat, 2020-06-27 at 19:42 -0500, Alex Roberts wrote:
> Andy,
> 
> I’m not sure how integrate the correlation sync block with gmsk.

The correlate_and_sync block is an old block that was specific to RRC
filtered PSK.  You must mean the corr_est block.

>  It expects modulated symbols and I’m not sure how to generate a
> modulated vector of gmsk symbols.  There doesn’t seem to be a gmsk
> class that can be used by the modulate vector block.

You can create a modulated GMSK preamble with the modulate vector block
in GNURadio.  However, I do not recommend it.  It provides little
insight or control over the exact correlation filter taps, so trimming
off start and end transients becomes a hassle.

Instead, generate your correlation filter taps in MatLab or Octave. 
Then you can also use Matlab or Octave to assess the performance of
your correlation filter taps against real or simulated data.

See the attached script for an example of generating GMSK correlation
filter taps.  Note that this script generates the conjugated and time
reversed filter taps.  You'll have to check what the corr_est block is
expecting, as it may be performing a conjugation and time reversal for
you, under the assumption that you didn't do it.

Regards,
Andy


> Thanks,
> Alex 
> 
> On Thursday, June 25, 2020, Andy Walls <a...@silverblocksystems.net>
> wrote:
> > Recommend reading
> >  
> > https://www.gnuradio.org/grcon/grcon17/presentations/symbol_clock_recovery_and_improved_symbol_synchronization_blocks/Andy-Walls-Samples-to-Digital-Symbols.pdf
> > 
> > Yeah, the MSK TED selections for the symbol sync block expect the
> > constant envelope FSK waveform on the input.  Demodulation from FSK
> > to baseband pulses should happen after the symbol sync block.
> 
> 
pkg load signal;  % Octave needs this

% One of the possible encodings of the AIS preamble symbols
h_bits = [-1,-1, 1, 1, ...
          -1,-1, 1, 1, ...
          -1,-1, 1, 1, ...
          -1,-1, 1, 1, ...
          -1,-1, 1, 1, ...
          -1,-1, 1, 1, ...
          -1,-1,-1,-1,-1,-1,-1, 1].';

% AIS specific GMSK parameters
Rb = 9600;
BT = 0.4;
L = 3;
modulation_index = 1/2;

% Working sample rate
sps = 5;
Fs = Rb * sps;

% Build Gaussian pulse filter
Ls = round(L*sps);
alpha = sqrt(2/log(2)) * pi * BT;
k = [(-Ls/2+1):1:(Ls/2-1)];
taps = (erf(alpha*(k/sps + 0.5)) - erf(alpha*(k/sps - 0.5)))*0.5/sps;
K = length(taps);
if (mod(K,2) == 0)
   delay = K/2;
else
   delay = (K-1)/2;
end

% Upsample and pulse shape the correlation sequence
x = sps*[upsample(h_bits,sps); zeros(delay, size(h_bits)(2))];
h_ibaseband = filter(taps, [1], x);
% Trim the pulse shaped correlation sequence
h_baseband = h_ibaseband((delay):(end-(sps-1)),:);

% modulate the correlation sequence
fm_gain = pi/(Fs/2) * Rb/2 * modulation_index;
x = h_baseband * fm_gain;
phase = cumsum(x); % phase is integral of frequency
h_iq = exp(1i*mod(phase, 2*pi));

% create the correlation filter
h = conj(h_iq(end:-1:1,:));

figure(1);
t1 = [1:size(h_ibaseband)(1)];
plot(t1, h_ibaseband(:,1), 'x-');
title('Premable Baseband Gaussian Pulses');

figure(2);
t2 = [1:size(h_baseband)(1)];
plot(t2, h_baseband(:,1), 'x-');
title('Trimmed Premable Baseband Gaussian Pulses');

figure(3);
t3 = [1:size(h)(1)];
plot(t3, real(h(:,1)), 'x-', t3, imag(h(:,1)), 'x-');
title('Correlation Filter Taps');
h(:,1)

Reply via email to