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

📄 examp_ofdm.m

📁 linear time-frequency toolbox
💻 M
字号:
%EXAMP_OFDM  Example of Gabor systems used for OFDM%%   This example shows how to use a Gabor Riesz basis for OFDM.%   The example is simple, and assumes that all the whole spectrum%   is available for transmission.%%   Some further simplifications used to make this example simple:%%     - The window and its dual have full length support. This is not%       practical, because all data would have to be processed at once.%       Instead, a filter bank approach should be used, with both the%       window and its dual having a short length. %%     - The window is periodic. The data at the very end interferes with%       the data at the very beginning. A simple way to solve this is to%       transmit zeros at the beginning and at the end, to flush the system%       properly.%%     - The channel should be modelled by a pseudo-differential operator%       that causes time and frequency shifts / dispersion in the signal.%       This example just uses white noise.%%%   FIGURE 1 Received coefficients.%%     This figure shows the distribution in the complex plane of the %     received coefficients.%disp('Type "help examp_ofdm" to see a description of how this example works.');% ----------- setup ------------------------% Number of channels to useM=8;% Time-distance between succesive transmission. This must be% larger than M, otherwise the symbols will interfere.a=10;% Order of QAMqamorder=4;% Noiselevel for the channel.noiselevel=0.1;% Choose a long transmission to even out statistical fluctuations.L=4000;% We choose an orthonomal window.g=cantight(a,M,L);% ------------ preparation of input data -------------------% Create a random stream of bits.inputdata=round(rand(L*log2(qamorder),1));% QAM modulate ittransmitdata=qam(inputdata,qamorder);% Create the signal to be tranmittedf=idgt(reshape(transmitdata,M,[]),g,a);% --- transmission of signal - influence of the channel ----------% add white noise.f=f+noiselevel*((randn(size(f))-.5)+i*(randn(size(f))-.5));% --- reconsruction of received signal.receivedcoefficients = dgt(f,g,a,M);% Plot the coefficients in the complex plane.figure(1);if isoctave  plot(receivedcoefficients(:),'.;;');else  plot(receivedcoefficients(:),'.');end;receivedbits=iqam(receivedcoefficients(:),qamorder);% Test for errors.disp('');disp('Number of faulty bits:');disp(sum(abs(receivedbits-inputdata)))

⌨️ 快捷键说明

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