transmitfilter.m

来自「simulation module for visual wireless se」· M 代码 · 共 43 行

M
43
字号
% ------------------------------------------------------------------------------------------------------%
% TransmitFilter(..) - Transmit (Pulse Shaping) Filter in DigiComm.
% -------------------------------------------------------------------
%     This the transmit (pulse shaping) filter that is used to generate the baseband waveform used for
% (baseband) simulation of digital communication systems. Once the transmitfilter is specified, this
% routine will first upsample the symbol stream by converting it into an impluse train and then pass 
% the symbol stream via the specified transmit filter to obtain the baseband waveform. This is done 
% for both the I and Q channels.
%     One way to obtain the transmit filter coefficients is to use the SqRCFilter(..) design routine
% to generate the transmit filter that yeilds zero ISI on a bandlimited channel.
%
% Inputs : 
% ---------
% I_Symbols, Q_Symbols - The Input (I and Q) Symbol Streams.
% hTransmitFilter - The transmit filter.
% numSamplesPerSymbol - the Number of samples by which a symbol is represented. (The transmit waveform
% will be upsampled to this number of samples per symbol.
% Outputs :
% ---------
% I_TxWaveform, Q_TxWaveform - The output I and Q baseband waveforms.
%
% Uses : 
% -------
% SymbolToWaveform(..) to convert the symbol stream into an impulse stream given the number of
% samples per symbol.
%
% Note : In digicomm systems, the I waveform will be multiplied by a cos(2*pi*fc*t) carrier and the Q
% Waveform will be multiplied by a sin(2*pi*fc*t) (Quadrature) carrier and both of them will be added 
% together to get the resultant transmitted waveform over the radio channel.
% ------------------------------------------------------------------------------------------------------%

function [I_TxWaveform, Q_TxWaveform] = TransmitFilter(I_Symbols,Q_Symbols,hTransmitFilter,numSamplesPerSymbol)

% The first step is to convert the symbol stream into a digital signal so that it can
% be filtered.
I_Waveform = SymbolToWaveform(I_Symbols,numSamplesPerSymbol);
Q_Waveform = SymbolToWaveform(Q_Symbols,numSamplesPerSymbol);

% The next step is to filter the signal to obtain the transmit waveforms.
I_TxWaveform = conv(I_Waveform,hTransmitFilter);
Q_TxWaveform = conv(Q_Waveform,hTransmitFilter);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?