📄 pr2_49.m
字号:
%Problem 2.49
%Experimental study of Gain-bandwidth trade-off for orthogonal signaling;
clear all; close all;
m=10; %number of transmitted bits;
Ns=512; %oversampling parameter Ns*m/(2^m) should be integer;
Bt=ones(1,Ns); %oversampled one bit pulse;
for l=1:2^8 S(l,:)=bitget(l-1,1:m); end; %2^m*m matrix of all binary m-bit messages;
S=kron(-2*S+1,Bt); %conversion of all messages to BPSK signals;
Sp=fft(S'); SP1=mean(abs(Sp').^2); %power spectrum, uncoded;
[f,n]=find(SP1/max(SP1)<eps); F1=min(n); %first zero bandwidth, uncoded;
H=hadamard(2^m); S=kron(H,ones(1,Ns*m/(2^m))); %2^m orthogonal signals, oversampled to equalize dimension with uncoded transmission;
Sp=fft(S'); SP2=mean(abs(Sp').^2); %power spectrum, orthogonal signaling;
[f,n]=find(SP2/max(SP2)<eps); F2=min(n); %first zero bandwidth, orthogonal;
BEex=F2/F1; BEth=(2^m)/m; %experimental and theoretical estimation of bandwidth extension;
disp('Numb of bits BEex BEth');
disp([m,BEex,BEth]);
SP=[SP1(1,1:Ns*m/4)/max(SP1);SP2(1,1:Ns*m/4)/max(SP2)];
plot(SP'); grid; xlabel('f'); ylabel('Normalized spectra'); ylim([0,1.2]); xlim([0,Ns*m/4])%plotting spectra;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -