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

📄 transmitter.m

📁 OFDM信道估计和均衡的仿真程序
💻 M
字号:
%+----------------------------------------------------------------+
%|                                                                |
%|  Name: transmitter.m                                           |
%|  Author: Mathew Liu, James Shen                                |
%|  Description: Takes in a bit stream and makes it into an OFDM  |    
%|  signal ready to transmit. Only does it for one symbol.        |
%|  Transmits based on the FFT.                                   |
%|                                                                |
%+----------------------------------------------------------------+
function[trans_signal, input_symbols] = transmitter(input, FFTLen, CPLen, M);
% We assume that with are using 64 length FFT with 64 subcarriers all carrying
% data. So there are no carriers specifically assigned to pilot.

%=============== Some standard Hyperlan Params ==================
T = 50e-9; % System sampling period 
fs = 1/T; % System sampling freq = 20MHz 
Tcp = 16*T; % CP period
Tu = 64*T; % Useful symbol period
Ts = Tu+Tcp; % OFDM Symbol period 80 samples
delta_f = 0.3125e6; % Frequency spacing

%============== Our params based on Hyperlan/2 =================

%+----------------------------------------------------------------+
%|                    OFDM   TRANSMITTER                          |
%+----------------------------------------------------------------+
%======== Serial To Block (FFTLen, M) ============================
input_para = reshape(input,FFTLen,M);

%======== Baseband Modulation ===========================
input_symbols = qammod(input_para,FFTLen, M);

%================= IFFT =================================
%input_time_para = FFTLen*ifft(input_symbols);
input_time_para = ifft(input_symbols);
% Need to multiply by FFTLen since the IFFT scales it by (1/N)

%================ Parallel to Serial ==========================
input_time_serial = reshape(input_time_para,1,FFTLen); % Time domain signal

%=============  Gaurd Interval Insertion (GII) ===================
input_ext = [input_time_serial((FFTLen-CPLen+1):FFTLen),input_time_serial];

%==================== Return output ==========================
trans_signal = input_ext;
input_symbols = input_symbols;

%=====================  END FILE ===================================

⌨️ 快捷键说明

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