0

I implement a GMSK modulation scheme presented here (p 64 in pdf and copied below)

GMSK modulation format

GMSK mod format part 2

As gaussian density function I use the standard Maltab function gaussfir and convolve the rect-function with it.

My rect function:

a = randi([0,1],N,1);                       % Random data,  N x 1
ak = 2*a-1;                                 % NRZ data: +/- 1, N 
ak_1 =  kron(ones(length(ak), 1), 0);  
ak_1(1) = ak(end);
for i = 1: length(ak)-1
    ak_1(i+1) = ak(i);
end

for i = 1 : length(ak) akp = (-1)^i .* ak.ak_1; % (-1)^k d_k * d_{k-1} end ak_rect = kron(akp,ones(M,1)); % M*N x 1

I have a doubt in the realisation the following equation:

enter image description here

My attempt:

nrz_ov_f = conv(H,ak_rect,'full');
nrz_ov_f = nrz_ov_f/max(abs(nrz_ov_f));
%integrate to get phase information
phi = filter(1,[1,-1],nrz_ov_f*Ts);  % Ts = Tb/M; M = 4- oversampling
phi = phi *0.5*pi/2;  % Tb = 2

In the equation there is a product with a_k. Does it mean I have to implement phi as follow:

phi  = phi *ak
% phi = ak * pi/2 * cumsum(phi)

?

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
FrimHart64
  • 377
  • 1
  • 7

1 Answers1

2

The phase function is simply the Gaussian shape accumulated, and using the filter function as the OP has done is a reasonable approach to making an accumulator (digital integrator). The scaling should be such that the waveform transitions from $0$ to $\pi/2$ radians over the duration of one symbol period.

Below shows the expected waveforms of the frequency vs time (normalized Gaussian function) and phase vs time (in radians over one symbol duration) for one GMSK symbol.

GMSK freq and phase vs time

The above was oversampled with 100 samples per symbol to show the underlying function. If we were to sample at 8 samples per symbol the results would appear as in the plot below:

8 samples per symbol

The MATLAB code for this was:

Ts= 1; 
B = 1; 
sigma = sqrt(log(2))/(2*pi*B*Ts);
fs = 8;  % samples per symbol
t = [-1:1/fs:1-1/fs];
rect = ones(1,fs);
h = 1/(sqrt(2*pi)*sigma*Ts) .* exp(-t.^2./(2*sigma^2*Ts^2)); 
g = conv(rect/fs, h);
ph = (pi/2*Ts) cumsum(g)/fs;

As to further details into the significance that the phase transition over $\pi/2$ radians over one symbol period (either in the positive or negative direction), please refer to this post.

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
  • do you assume that the equation ( precoded data, rect) has an error? I have seen more than one reseach papers where the same equition with rect pulse was used – FrimHart64 Apr 26 '22 at 05:28
  • @FrHart64 Yes, I see - I think that was a bad assumption on my part; I do see that it is consistently everywhere shown as the NRZ pulses themselves that are passed through the Gaussian filter. I'll remove that comment about it being an error. – Dan Boschen Apr 26 '22 at 05:40
  • how to implement correctly the phase-equation given in the pdf? Did i do it correctly? – FrimHart64 Apr 26 '22 at 05:52
  • @FrHart64 I gave my code for how I did the phase-equation and the verification plots; importantly you want to confirm that one symbol will transition in phase from 0 to pi/2 as I showed. Does yours match what I showed? – Dan Boschen Apr 26 '22 at 05:59
  • @FrHart64 I also redid the plots (and the code) to show the result with the rect. – Dan Boschen Apr 26 '22 at 06:34
  • Please correct me if I am wrong: phi in my code is a full realisation of the phase-equation given in pdf ( or represented in the question I posted). If I use your code, your ph, I will have to take a product with the input signal( in my code ak) and $\frac{\pi}{2}$ – FrimHart64 Apr 26 '22 at 07:10
  • @FrHart64 please create the plots as I did using just one data symbol (that’s what I would do to confirm but I’m not near my computer)— plot those as I did and see if the phase is transitioning from 0 to pi/2 – Dan Boschen Apr 26 '22 at 12:32
  • I compare laurent GMSK( lineare approx.) with nonlinear GMSK ( from the question): phase of the baseband signals. I assume I should have a constant phase deviation (difference between phase of the signal 1 and phase of the signal 2). my assumption is true for case BT =0.5, it is not true for case BT = 0.3 or 0.25. Should laurent GMSK be different for BT = 0.3 or 0.25? ( I know the about difference c0, c1, c2 for each cases, is there smth else?) – FrimHart64 Apr 28 '22 at 05:39
  • The phases should match-- if there was a linearly increasing offset that would be just a delay but a constant offset across all frequencies is strange (but you can simply subtract it). What you should have is a small residual error based on how many terms of the decomposition you didn't include. The Laurent Decomposition is different for each BT and should match GMSK. – Dan Boschen Apr 28 '22 at 12:22
  • I thought the phases should match, But [here] (https://sci-hub.hkvisa.net/https://ieeexplore.ieee.org/document/5396178) it is written the phase of linearized is slightly more than the nonlinear – FrimHart64 Apr 28 '22 at 13:40
  • different decomposition; do you mean L ( 2^(L-1) - number of PAM)? – FrimHart64 Apr 28 '22 at 13:42
  • @FrHart64 Look at Figure 2 in your linked paper, this would be the error I had in mind. With the Laurent decomposition and if we select only a subset of the complete set of PAM waveforms, the idea is that we can sufficiently approximate the actual GMSK waveform (meaning small error). As you increase the number of PAM components the error gets progressively smaller but I think in most cases the first 4 components would be more than sufficient. So when I say different decomposition, each of the PAM terms would themselves be different if you change BT. – Dan Boschen Apr 28 '22 at 13:47
  • As far as this question posted, did I sufficiently answer your question on how to compute the phase and scale it properly? – Dan Boschen Apr 28 '22 at 13:48
  • you replied to one of my question, that gaussian filter is [-inf ;+ inf], but we work with truncated gaussian low pass filter. In that case.we need to know the truncated length, right? Has the truncated kength an equation for computation? – FrimHart64 May 05 '22 at 11:33
  • It is typically L as 1/(BT). Truncation causes the spectral side lobes to increase somewhat so you can monitor that and see the effects of making it longer and/or tapering the coefficients with an additional window. – Dan Boschen May 05 '22 at 13:57