필터 지우기
필터 지우기

Why does the pulse shape generated by gaussdesign differ from that used in the comm.GMSKModulator object?

조회 수: 15 (최근 30일)
If I generate a pulse using gaussdesign as:
bt = 0.5; % 3-dB bandwidth-symbol time
L = 12; % samples per symbol
N = 4; % filter spans 4 symbols
h = gaussdesign(bt,N,L);
And also create a GMSK modulator as:
H = comm.GMSKModulator;
H.BandwidthTimeProduct = 0.5;
H.PulseLength = 4;
H.SamplesPerSymbol = 12;
The pulse used for pulse shaping in the GMSKModulator object is different from the gaussdesign
I see that they are generated in different ways (by looking at gaussdesign.m & cpmmodparams.m), but which one is correct? gaussdesign uses Wireless Communications:Principles and Practice 2nd Ed. by Rappaport as a reference and GMSKModulator uses Digital Phase Modulation by Anderson, Aulin, and Sundberg.

채택된 답변

Ryan Johnson
Ryan Johnson 2015년 6월 5일
I was able to eventually figure this out. I happened to have both books by Rappaport and Anderson, Aulin, and Sundberg so I was able to see the derivations for both pulse shapes. The answer for how they are linked came from stumbling across a key section in Marvin Simon's Bandwidth-Efficient Digital Modulation with Application to Deep-Space Communications paper for JPL.
The definition in Anderson, et al. is:
While the definition in Rappaport is:
The key difference as noted by Simon (2.8.2.1) is that g(t) is the generating frequency pulse while h(t) is the filter impulse response resulting from an NRZ data stream "i.e., the frequency pulse stream that would ordinarily be inputted to the FM modulator in MSK".
The frequency pulses with proper scaling are:
Which the cumulative-sum shows both end at 1/2, which is the definition for phase functions in CPM:
So the question of which one to use depends on how the source data is formatted. If the source is a impulse train (i.e. bit stream), then use comm.GMSKModulator. If you have a NRZ stream at the Ts rate then use gaussdesign. Here is an example comparing them all:
bt = 0.5; % 3-dB bandwidth-symbol time
L = 12; % samples per symbol
N = 4; % filter spans 4 symbols
h = gaussdesign(bt,N,L);
h = h/2;
% g was obtained from cpmmodparams.m
H = comm.GMSKModulator;
H.BandwidthTimeProduct = 0.5;
H.PulseLength = 4;
H.SamplesPerSymbol = 12;
H.BitInput = false; % impulses of +1/-1
data = 2*randi([0 1],10*L,1)-1; % generate the NRZ data stream
data2 = zoh(data,L); % zero-order hold at Ts
x = filter(h,1,data2)/L; % filter with the Rappaport pulse
y = upfirdn(data,g,L,1); % upsample the impulses with the Anderson pulse
modSignal = step(H, data); % modulate using comm.GMSKModulator
z = cpfsk_demod(modSignal)/pi; % demod to get the frequency signal
subplot(3,1,1); plot(x(1:1000)); title('Rappaport w/ NRZ data');
subplot(3,1,2); plot(y(1:1000)); title('Anderson w/ impulse stream');
subplot(3,1,3); plot(z(1:1000)); title('comm.GMSKModulator');
  댓글 수: 2
Jose
Jose 2015년 7월 1일
Hi, thanks for your answer, it is clearly for me.
Now I was trying to reproduce your plots using g(t) and h(t) but they are different, here my code:
clc; close all; clear all;
%%Comparison between pulses generated using h(t) and g(t)for Gaussian filter
%%Parameters for filter
sps=10; %samples per symbol
BT=0.3;
PulseLength=1;
L = PulseLength; %Number of bit times per symbol
Rb = 1e6; %Bit rate
T = 1/Rb;
fsD = Rb*sps;
t = -T*L/2:1/fsD:T*L/2;
B = BT/T;
%%Data generation
N=100; %Number of input bits
data=2*randi([0 1],N,1)-1; %Generating a uniformly distributed random 1s and -1s
data_rect=rectpulse(data,sps)*(1/T);
%%Filter definition using h(t) gaussdesign function
%Using equations used in gaussdesign function
sigma=sqrt(log(2))/(sqrt(2)*(BT/T));
h_filter= (sqrt(pi)/sigma)*exp(-((t.*pi./sigma).^2));
h_filter= ((h_filter)./(sum(h_filter)));
plot(h_filter);
gauss_pulses=filter(h_filter,1,data_rect);
figure
plot(gauss_pulses);
axis ([0 1000 -5e6 5e6]);
%%Filter definition using g(t)
sigma = sqrt(log(2))/(2*pi*BT);
Qn = erfc( (t-T/2)/(sqrt(2)*sigma*T) ) / 2;
Qp = erfc( (t+T/2)/(sqrt(2)*sigma*T) ) / 2;
g = (Qn-Qp)/(2*T);
Q = cumsum(g)*1/fsD;
g = g/Q(end);
X=upsample(data,sps);
X=filter(g,1,X);
figure
plot(X)
axis ([0 1000 -5e6 5e6]);
I think that a normalization parameter is requiered for h(t), but I´m not sure.
In your code g is obtained from cpmmodparams.m, how do you do it?
Thanks in advance.
Ryan Johnson
Ryan Johnson 2015년 7월 8일
I think your only real issue is with truncating your pulses to span one symbol. If you increase the length of your filter parameter PulseLength your two implementations will be equivalent. Generally with GMSK with a BT of 0.3 the pulse length is truncated to span 3 symbols.
To get the filter g from cpmmodparams.m I just put a breakpoint in that file where it created the filter and after running the modulator I copied the values into a hardcoded array.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jose
Jose 2015년 5월 12일
편집: Jose 2015년 5월 12일
Hi, I have the same question, did you find the answer ??

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by