⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 baseband2symbols.m

📁 APSK仿真程序
💻 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 + -