OFDM modulation how to apply in real application

조회 수: 1 (최근 30일)
Kaitlyn Morgan
Kaitlyn Morgan 2019년 3월 29일
댓글: Kaitlyn Morgan 2019년 3월 29일
I am looking to generate and QAM-16 OFDM signal and apply it to a LED to control the amplitude.
When I create the OFDM modulated signal as follows, it outputs complex numbers in modData. Can I simply take the real portion of this complex value to convert to a voltage to amplitude modulate the diode? Or is there some other way to convert the modulated data into a summation of sinusoids?
On the receiving end, I have a detector attached to a scope which will change the sampling rate. Can I use the corresponding demodulator with this signal or will I have to adjust the sampling rate, assuming I can find the correct start of the signal or will it fail because I don't have a complex input?
FFTlen = 256;
Guard = [28;28];
DC = false;
pilotIdx = [-88,-63,-38,-13,13,38,63,88]';
pilotIdx = pilotIdx+129;
CP = FFTlen * 0.25;
nSymb = 30;
%QAM
M = 16;
%PILOT
p1 = [0 1 0 1 1 1 0 0];
p2 = [1 0 1 0 0 0 1 1];
pilot1 = pskmod(p1,2)';
pilot2 = pskmod(p2,2)';
%OFDM MOD
ofdmMOD = comm.OFDMModulator('FFTLength',FFTlen,'NumGuardBandCarriers',Guard, ...
'InsertDCNull',DC, 'CyclicPrefixLength', CP, ...
'PilotInputPort', true, 'PilotCarrierIndices', pilotIdx,...
'NumSymbols',nSymb);
modDim = info(ofdmMOD);
%DATA
inSig = randi([0 M-1],modDim.DataInputSize(1),modDim.DataInputSize(2));
dataIn = qammod(inSig,M,'UnitAveragePower',true);
pilotIn = [repmat(pilot1,1,8), repmat(pilot2,1,9), ...
repmat(pilot1,1,2), repmat(pilot2,1,7), ...
repmat(pilot1,1,4)];
modData = step(ofdmMOD,dataIn,pilotIn);
  댓글 수: 2
Akira Agata
Akira Agata 2019년 3월 29일
Before jumping into a solution, I would recommend learning a basics on IQ modulator, such like the following page.
Regards,
Akira
Kaitlyn Morgan
Kaitlyn Morgan 2019년 3월 29일
Thank you, I do understand IQ modulation, the summation of orthogonal frequencies was throwing me off. So if I use the same code as above, but set only one bit of the input data to one, I get a constant sinusoid over one OFDM symbol only.
I am currently trying to verify the sinusoidal frequencies using the fourier-transform method, I don't seem to be getting the correct frequencies. Is my definition of f below incorrect?
%% CONVERT TO OPTICAL SIGNAL and verify
RHO = abs(modData);
PHI = angle(modData);
Fc = 1.1e9; % center frequency at 1.1 GHz
dt = 1/Fc;
t = (0:dt:dt*length(PHI)-dt)';
% OPTICAL SIGNAL
OPT_sig = RHO .* cos(2*pi*Fc*t + PHI);
%%Time specifications:
N = size(t,1);
%%Fourier Transform:
X = fftshift(fft(OPT_sig));
%%Frequency specifications:
dF = Fc/N; % hertz
f = -Fc/2:dF:Fc/2-dF; % hertz
%%Plot the spectrum:
figure(1)
hold on
plot(f/1e9,abs(X)/N);
xlabel('Frequency (GHz)');
title('Magnitude Response');
hold off

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 PHY Components에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by