IEEE.org

IEEE Xplore Digital Library

IEEE Standards

IEEE Spectrum

More Sites
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Joshua Gay
IEEE P1765 Recommended Practice for EVM Measurement and Uncertainty Evaluation
Commits
90098b26
Commit
90098b26
authored
Jun 29, 2021
by
Martin Hudlicka
Browse files
Deleted
parent
fa921b9c
Changes
1
Hide whitespace changes
Inline
Sidebyside
03 P1765 Baseline EVM Algorithms/Single_Carrier/IEEE_P1765_Baseline_EVM_Algorithm.m
deleted
100644 → 0
View file @
fa921b9c
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% IEEE P1765 baseline EVM receiver/calculation code (user distributable)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This code is implementing the IEEE P1765 Baseline EVM Algorithm as
% defined in Section 5.2 and Figure 5 of the P1765 document.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Authors:
% Christopher P. Silva  Original code Version 04.30.2021
% Paritosh Manurkar, Christopher P. Silva, Kate Remley  Modularization of
% the code into a main program and subroutines Version 06.08.2021
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% > Define global structure (instead of global variables) and initialize extra output variables
% > Create a structure to save all the basic communication parameters
% > Define the root raised cosine (RRC) filter transfer function in frequency domain
% > Use the correct waveforms generated using the frequency domain RRC filter
% > Downconversion from RF to baseband is not a part of the P1765 Baseline EVM Algorithm
% > A function to perform downconversion has been supplied for preprocessing
% > Downsampling an oversampled signal is not a part of the P1765 Baseline EVM Algorithm
% > A function to perform downsampling has been supplied for preprocessing
% > Regenerate ideal reference constellation (Single Carrier)
% > Read in baseband ASCII timedomain waveform file
% > Timedomain waveform alignment and normalization
% > Symbol sampling and constellation normalization
% > EVM RMS/peak (in %) calculation
% > Automated plotting of ideal/processed signal constellation and saving plot graphic
% > Save the official and extra outputs and their descriptions in a text file:
% OFFICIAL OUTPUTS
% > RMS EVM (in %)
% > Optimal delay tau0 (ns)
% > Optimal complex gain/ normalization factor for symbol samples G_OPT
% >> G_OPTamp: abs(G_OPT)
% >> G_OPTphase: angle(G_OPT) in degrees
% EXTRA OUTPUTS
% > Received signal average value
% > Absolute tolerance determined for iterative delay calculation convergence (ns)
% > Number of iterations for optimal delay loop convergence (= 10000 if convergence fails)
% > Optimal complex gain G_0 to be applied before symbol sampling/EVM calculation
% >> G_0amp: abs(G_0)
% >> G_0phase: angle(G_0) in degrees
% > Peak EVM (in %)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
;
close
all
;
clc
;
%% Define Global Structure and Initialize Variables
global
structGlobal
structGlobal
.
rxSigAve
=
0
;
% Received signal average value
structGlobal
.
optTolerance
=
0
;
% Absolute tolerance (ns)
structGlobal
.
iterindx
=
0
;
% Number of iterations for optimal delay loop convergence
structGlobal
.
G_0amp
=
0
;
% Amplitude of optimal complex gain
structGlobal
.
G_0phase
=
0
;
% Phase of optimal complex gain
structGlobal
.
EVMpeak_pct
=
0
;
% Peak EVM (in %)
structGlobal
.
evm_results_folder
=
'placeholder'
;
% Folder in which results will be saved
structGlobal
.
filename
=
'placeholder'
;
% Base filename for saving results
%% User Inputs for Folder and Filename
[
structGlobal
.
evm_results_folder
,
structGlobal
.
filename
,
file
]
=
F_UserInputs
();
%% Define Basic Communication Parameters and save in structure params
params
=
F_Basic_Communication_Parameters
();
%% Load the Reference Constellation Supplied with this Package
refConst
=
transpose
(
dlmread
(
fullfile
(
pwd
,
'Constellation _ Pulse Shaping Files'
,
'RefSymbolsConst.txt'
)));
%% Create TimeDomain Waveform from Ideal Constellation
refSig
=
zeros
(
1
,
params
.
numSamp
);
refSig
(
1
:
params
.
numSampSym
:
params
.
numSamp
)
=
refConst
(
1
:
params
.
numSym
);
refSigFreq
=
fft
(
refSig
);
%% Read in ASCII Baseband Reference Waveform File
distSig
=
transpose
(
dlmread
(
file
));
sigSize
=
length
(
distSig
);
distSigFreq
=
fft
(
distSig
);
bw_mod
=
(
1
+
params
.
rolloff
)
*
params
.
fsym
;
% Modulation bandwidth (GHz)
%% Apply Ideal Matched Filtering to Baseband Reference Waveform
rxSigFreq
=
F_Apply_RX_Filter
(
distSigFreq
,
params
);
%% Optimal Time Delay and Normalization Algorithm for Waveform Samples (Official)
% Shift zerofrequency component to center of spectrum for baseband signals
XIn
=
fftshift
(
refSigFreq
);
XOut
=
fftshift
(
rxSigFreq
);
Ts
=
params
.
tinterval
;
[
tau0
,
XOutopt
]
=
F_calculateOptimal
(
XIn
,
XOut
,
Ts
);
rxSig
=
ifft
(
XOutopt
);
% Optimal timeshifting and complex waveform normalization of rxSig
%% Perform Symbol Sampling, Complex Gain Normalization and Calculate EVM
[
EVMrms_pct
,
G_OPT
]
=
F_Sample_Normalize_EVM
(
refSig
,
rxSig
,
params
);
%% Save Both Official and Extra Results in a Single File
F_Save_Results
(
EVMrms_pct
,
tau0
,
G_OPT
);
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment