Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

IMPLEMENTATION OF GMSK

MODULATION SCHEME WITH


CHANNEL EQUALIZATION

References

MX589 GMSK MODEM Application

Modem Techniques in Satellite Communication

Practical GMSK Data Transmission

GMSK MODEM Application

A Real Time DSP GMSK Modem with all Digital Symbol


Synchronization by Richard Paul Lambert

MATLAB CODE:

clear all;
close all;
%*********************************
%
Variable Definition
%*********************************
DRate = 1;
% data rate or 1 bit in one second
M = 18;
% no. of sample per bit
N = 36;
% no. of bits for simulation [-18:18]
BT = 0.5;
% Bandwidth*Period (cannot change )
T = 1/DRate; % data period , i.e 1 bit in one second
Ts = T/M;
k=[-18:18];
% Chen's values. More than needed;
% only introduces a little more delay
%******************************************************************
**********************
% CONSTRUCTION OF GAUSSIAN FILTER FOLLOWED BY SHAPING OF
DATA BITS USING GAUSSIAN FILTER %
%******************************************************************
**********************
alpha = sqrt(log(2))/(2*pi*BT); % alpha calculated for the gaussian filter
response

h = exp(-(k*Ts).^2/(2*alpha^2*T^2))/(sqrt(2*pi)*alpha*T); % Gaussian
Filter Response in time domain
figure;
plot(h,'*r')
title('Response of Gaussian Filter');
xlabel( 'Sample at Ts');
ylabel( 'Normalized Magnitude');
grid;
bits = [zeros(1,36) 1 zeros(1,36) 1 zeros(1,36) -1 zeros(1,36) -1 zeros(1,36) 1
zeros(1,36) 1 zeros(1,36) 1 zeros(1,36)];
% here the data is randomly selected to be transmitted and , here 1
indicates 1 and -1 indicates
% zero
%**************
% MODULATION %
%**************
m = filter(h,1,bits);% bits are passed through the all pole filter described by
h, i.e bits are
% shaped by gaussian filter
t0=.35;
% signal duration
ts=0.00135;
% sampling interval
fc=200;
% carrier frequency
kf=100;
% Modulation index
fs=1/ts;
% sampling frequency
t=[0:ts:t0];
% time vector
df=0.25;
% required frequency resolution
int_m(1)=0;
for i=1:length(t)-1
% Integral of m
int_m(i+1)=int_m(i)+m(i)*ts;
end
tx_signal=cos(2*pi*fc*t+2*pi*kf*int_m);
% Frequency Modulation (FM) is a form of angle modulation in which the
instantaneous frequency
% of the carrier signal is varied linearly with the baseband message signal
m(t),

x = cos(2*pi*fc*t);
y = sin(2*pi*fc*t);
figure;
subplot(2,1,1)
stem(bits(1:250))
title('RANDOM DATA BITS,+1 FOR ONE AND -1 FOR ZERO ');
grid;
subplot(2,1,2)
plot(m(1:250),'r')
title('GAUSSIAN SHAPED TRAIN');
xlim([0 260]);
figure;
plot(tx_signal)
title('MODULATED SIGNAL');
xlim([0 225]);
% Channel Equalization
% First, a channel simulator is designed to introduce effects common to
wireless signals such as
% Doppler shifts, Rayleigh fading, phase offsets, and multipath
interference. These channel
% conditions are used to test the performance of the system in a simulated
mobile radio environment.
% Second, AWGN is added in the signal. The variance of the Gaussian noise
may be changed to test
% the performance for different signal to noise ratios, while signal
amplitude is held constant.
% load 'C:\CASE\Digital_Communication\project\channel.mat'
load 'channel.mat'
h = channel;
N1 = 700;
x1 = randn(N1,1);
d = filter(h,1,x1);
Ord = 256;
Lambda = 0.98;
delta = 0.001;

P = delta*eye(Ord);% Create output pulse: rectangular pulse convolved with


first-order
% low-pass filter impulse response.
w = zeros(Ord,1);
% adaptive equalization technique is used to cancel the effects of channel
% induced effects, underneath is the code for the technique
for n = Ord:N1
u = x1(n:-1:n-Ord+1);
pi = P*u;
k = Lambda + u'*pi;
K = pi/k;
e(n) = d(n) - w'*u;
w = w + K *e(n);
PPrime = K*pi';
P = (P-PPrime)/Lambda;
w_err(n) = norm(h-w);
end
figure;
subplot(2,1,1);
plot(h,'g');
title('CHANNEL RESPONSE');
subplot(2,1,2);
plot(w,'r');
title('ADAPTIVE CHANNEL RESPONSE');
% now the channel effects are added to our transmitted signal
rcvd_signal = conv(h,tx_signal);
figure;
plot(rcvd_signal);
title('RECEIVED SIGNAL, AFTER INDUCING CHANNEL EFFECTS');
axis([50 400 -0.8 0.8])
eq_signal = conv(1/w,rcvd_signal);
figure;
%subplot(3,1,1);
plot(eq_signal,'r');

axis([150 550 -2.5 2.5])


title('RECEIVED SIGNAL AFTER CANCELLING EFFECTS OF CHANNEL
(EQUALIZATION DONE)');
figure;
subplot(2,1,1);
plot(eq_signal,'g');
title('RECEIVED SIGNAL AFTER CANCELLING EFFECTS OF CHANNEL
(AXIS CORRECTED)');
axis([208 500 -2 2]);% here the scale for the received signal is corrected
subplot(2,1,2);
plot(tx_signal,'r');
title('MODULATED SIGNAL');
%The following is the source code for a Matlab function that does one-bit
diffren%tial detection. This detection function also simulates synchronization using
Gardner's
%timing recovery algorithm for the case of over-sampling.It was creating
%the problem thats why it has been left
% num = 1;
% time = 2*N+1;
% T =N;
% mu = 0.02;
% error(1) = 0;
% shift = 0;
% timing_error =0;
% totsteps = 0;.44
%B = fir1(32,0.18);
% Demodulation
eq_signal2 = eq_signal(215:460-1);
eq_signal1 = eq_signal(200:460-1);
EQ_SIG=awgn(eq_signal2,20);
% here directly matlab function is made use of for the demodulation of the
% received signal
z_dir=demod(EQ_SIG,fc,fs,'fm',1);

%figure;plot(z_dir);title('SIGNAL OBTAINED FREQUENCY


DEMODULATION)');
In = x.*eq_signal1;
Qn = y.*eq_signal1;
noiseI = awgn(In,20);
noiseQ = awgn(Qn,20);
I = In + noiseI;
Q = Qn + noiseQ;
LP = fir1(32,0.18);
yI = filter(LP,1,I);
yQ = filter(LP,1,Q);
figure;
subplot(2,1,1);
plot(yI);
title('INPHASE COMPONENT');
xlim([0 256]);
subplot(2,1,2);
plot(yQ,'r');
title('QUADRATURE COMPONENT');
xlim([0 256]);
Z = yI + yQ*j;

% OQPSK (Offset QPSK) is used to detect the signal. Giving an offset


makes the phase shift of 90
% instead of 180. Therefore signal transition ( at every Tb sec) does not
pass through a zero and
% so no phase change occurs.

demod(1:N) = imag(Z(1:N));
demod(N+1:length(Z)) = imag(Z(N+1:length(Z)).*conj(Z(1:length(Z)-N)));
xt = -10*demod(1:N/2:length(demod));
xd = xt(4:2:length(xt));
figure;
stem(xd)

title('DEMODULATED SIGNAL USING OQPSK');


%m2 = conv(1/h,z_dir);figure;plot(m2)% here signal is convolved back with
the inverse gaussian filter
% to recover the bits
figure;
subplot(2,1,1);stem(z_dir,'r');title('RECOVERED SIGNAL AFTER
FREQUENCY DEMODULATION');
subplot(2,1,2);stem(bits(1:250));title('BITS WHICH WERE
TRANSMITTED');
%figure;
%plot(demod);
% while(time <=length(Z)-T)
% num = num+1;
% samples(num) = (demod(time) >0)*2-1
% error(num) = (sign(demod(fix(time)))-sign(demod(fix(timeT))))*(demod(time-T/2));
% shift = error(num)*N*mu;
% steps = fix(shift);
% time = time + T-steps;
% end

Results:

figure 1

figure 2

figure 3

figure 4

figure 5

figure 6

fig 7

fig 8

fig 9

fig 10

IMPLEMENTATION OF GMSK RADIO MODULATION


Gaussian Minimum Shift Keying (GMSK) is a digital modulation scheme
commonly used in wireless, mobile communications. Advantages of using
GMSK are its relatively narrow BW, constant envelope modulation, and its
suitability for both coherent and non-coherent detection. GMSK is derived
from MSK. MSK is a continuous phase modulation scheme where the
modulated carrier contains no phase discontinuities and frequency changes
occur at the carrier zero crossings. The fundamental problem with MSK is
its side lobes extending well above the data rate as shown in the figure.

To reduce the transmission BW required input data may be prefiltered prior to modulation using a specific form of low pass filtering. The
pre-modulation low pass filter must have a narrow BW with a sharp cutoff
frequency and very little offshoot in its impulse response which is
characterized by a classical Gaussian distribution.

The amount of ISI introduced depends on the BW-time product, BT,


of the Gaussian transmit filter. The premodulation Gaussian filtering
introduces ISI in the transmitted signal, but it can be shown that the
degradation is not severe if the 3 dB-bandwidth-bit duration product (BT)
of the filter is greater than 0.5.
The GMSK premodulation filter has an impulse response given by
hG (t ) =

exp 2 t 2

Where the value of alpha is calculated using the equation

ln 2 0.5887
=
B
2B

The premodulation Gaussian filtering introduces ISI in the


transmitted signal, but it can be shown that the degradation is not severe if
the 3 dB-bandwidth-bit duration product (BT) of the filter is greater than
0.5.

Gaussian Filtering:
The GMSK modulation is done with the help of Gaussian shaped filter.
The signal is made by convolving the bit sequence with the Gaussian Filter.
The message signal is integrated to get the phase of it. Then this phase is
modulated which results ultimately in a FM signal. The single output is the
GMSK signal.

Impulse Input

"Gaussian"

Gaussian

Shaped
Lowpass Filter

Output

Frequency Modulation
Frequency Modulation (FM) is a form of angle modulation in which the
instantaneous frequency of the carrier signal is varied linearly with the
baseband message signal m(t),
t

s FM = Ac cos[2fct + (t )] = Ac cos[2f c t + 2k f m( )d ]

Where kf is the frequency deviation constant (measured in units of Hz/V)

The Channel:
First, a channel simulator is designed to introduce effects common to
wireless signals such as Doppler shifts, Rayleigh fading, phase offsets, and
multipath interference. These channel conditions are used to test the
performance of the system in a simulated mobile radio environment. Second,
AWGN is added in the signal. The variance of the Gaussian noise may be
changed to test the performance for different signal to noise ratios, while
signal amplitude is held constant.

Demodulation: is done by multiplying the signal with the carrier. After


filtering out the carrier signal with a pair of low pass filters, only the
baseband I and Q components remain.

Detection:
OQPSK (Offset QPSK) is used to detect the signal. Giving an offset makes
the phase shift of 90 instead of 180. Therefore signal transition ( at
every Tb sec) does not pass through a zero and so no phase change occurs.

Channel Equalization
Channel Equalization is to cancel the effect of the channel distortion.
It removes Inter symbol interference and assist in the decision of detecting
the bits.

Several advanced techniques are used in the equalization of channel


and most of the methods are adaptive e.g:

Minimum Mean Square Method


Least Square Method
Recursive Least Square
Least Mean Square

Basic Idea

All the equalization filters are basically adaptive transversal filter, they are
basically based on minimum mean square error i.e.

J = E(e2)

This is basically cost function for over scenario and we have to minimize it
with respect to our weights of transversal filter which are basically adapting
with the help of error.

J = E[(y d)2]
J = E[ue]
And finally we get
The desired Weinner Hopf equation
W = R-1r
All the algorithms are basically are the version of this equation.

You might also like