?? baseband2symbols.m
字號:
%This function generates the symbols after matching input signal
%with the RRC filter and then detecting the symbols
%Input Parameters:-
%Sig_I : Demodulated Inphase Signal
%Sig_Q : Demodulated Quadrature Signal
%RRC_Filter_Coeff: Coefficients of the RRC filter
%Zi_R_RRC_I: Initial Conditions for the Inphase RRC Filter
%Zi_R_RRC_Q: Initial Conditions for the Quadrature RRC Filter
%InitialDelayReceivedSignal: Initial Delay to sample received signal
%Output Parameters:-
%SymbolsRecovered: Symbols Detected
%Zf_R_RRC_I: Final Conditions for the Inphase RRC Filter
%Zf_R_RRC_Q: Final Conditions for the Quadrature RRC Filter
function [SymbolsRecovered, Zf_R_RRC_I, Zf_R_RRC_Q] = BaseBandToSymbols(Sig_I, Sig_Q, RRC_Filter_Coeff, Zi_R_RRC_I, Zi_R_RRC_Q, InitialDelayReceivedSignal)
%Paramters Initialization
Parameter;
Initialconstellation;
SymbolsRecovered = [];
%%%%%%%%%%%%%%%%%
%RRC filtering (Matched Filtering)
[Sig_Inphase_Recovered, Zf_R_RRC_I] = filter(RRC_Filter_Coeff, 1, Sig_I, Zi_R_RRC_I);
[Sig_Quad_Recovered, Zf_R_RRC_Q] = filter(RRC_Filter_Coeff, 1, Sig_Q, Zi_R_RRC_Q);
Sig_Inphase_Recovered = Sig_Inphase_Recovered(1+InitialDelayReceivedSignal:length(Sig_Inphase_Recovered));
Sig_Quad_Recovered = Sig_Quad_Recovered(1+InitialDelayReceivedSignal:length(Sig_Quad_Recovered));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SymbolPos = [1:length(Sig_Inphase_Recovered)/SamplesPerSymbol];
%Sampling the signal at the multiples of Symbol time
Sig_Inphase_Recovered = Sig_Inphase_Recovered(ceil((SymbolPos-1) * SamplesPerSymbol + 1));
Sig_Quad_Recovered = Sig_Quad_Recovered(ceil((SymbolPos-1) * SamplesPerSymbol + 1));
%estimate the place to which the symbol belongs and generate Symbols
for iSymb=1:length(Sig_Inphase_Recovered)
sig1=Sig_Inphase_Recovered(iSymb)+Sig_Quad_Recovered(iSymb)*j;
sig2=abs(Constellation_Table-sig1);
[MinValue,MinPlace]=min(sig2);
CurSymbol=real(Constellation_Table(MinPlace))+j*imag(Constellation_Table(MinPlace));
SymbolsRecovered = [SymbolsRecovered, CurSymbol];
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -