IEEE.org
|
IEEE Xplore Digital Library
|
IEEE Standards
|
IEEE Spectrum
|
More Sites
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
c78e4353
Commit
c78e4353
authored
Aug 02, 2021
by
Martin Hudlicka
Browse files
license text added
parent
6d7fcb35
Changes
35
Show whitespace changes
Inline
Side-by-side
03 P1765 Baseline EVM Algorithms/OFDM/F_Basic_Communication_Parameters.m
View file @
c78e4353
function
params
=
F_Basic_Communication_Parameters
()
% This function defines the basic communication parameters for the P1765
% Baseline EVM Algorithm code for OFDM
%
% Copyright 2021 IEEE P1765 Authors
%
% * Redistribution and use in source and binary forms, with or without modification,
% are permitted provided that the following conditions are met:
%
% * Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.
%
% * Redistributions in binary form must reproduce the above copyright notice,
% this list of conditions and the following disclaimer in the documentation
% and/or other materials provided with the distribution.
%
% * Neither the name of the copyright holder nor the names of its contributors
% may be used to endorse or promote products derived from this software without
% specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
% USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% SPDX-License-Identifier: BSD-3-Clause
%
% See the LICENSE file distributed with this work for copyright and licensing
% information, the AUTHORS file for a list of copyright holders, and the
% CONTRIBUTORS file for the list of contributors.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function defines the basic communication parameters for the P1765
% Baseline EVM Algorithm code for OFDM
global
structGlobal
...
...
03 P1765 Baseline EVM Algorithms/OFDM/F_EVM_Computation_on_Symbols.m
View file @
c78e4353
function
[
G_OPT
,
EVM
]
=
F_EVM_Computation_on_Symbols
(
params
,
Symb
,
Sideal
)
% This function performs EVM computation on symbols according to Section
% 5.2.1.5 of the IEEE P1765 Baseline EVM Algorithm for OFDM:
% Determine the EVM of the User-Lab and Reference-Lab Measured Waveforms
%
% Inputs:
% Symb or r(nT): Recovered OFDM symbols
% Sideal: Ideal OFDM symbols from ideal signal
% params: structure containing the basic communication paramters
%
% Outputs:
% G_OPT: Optimum gain on symbols for EVM computation
% EVM or Baseline signal EVM: Baseline rms EVM in percent
%
% Copyright 2021 IEEE P1765 Authors
%
% * Redistribution and use in source and binary forms, with or without modification,
% are permitted provided that the following conditions are met:
%
% * Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.
%
% * Redistributions in binary form must reproduce the above copyright notice,
% this list of conditions and the following disclaimer in the documentation
% and/or other materials provided with the distribution.
%
% * Neither the name of the copyright holder nor the names of its contributors
% may be used to endorse or promote products derived from this software without
% specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
% USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% SPDX-License-Identifier: BSD-3-Clause
%
% See the LICENSE file distributed with this work for copyright and licensing
% information, the AUTHORS file for a list of copyright holders, and the
% CONTRIBUTORS file for the list of contributors.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function performs EVM computation on symbols
% Refer to Section: Determine the EVM of the User-Lab and Reference-Lab
% Measured Waveforms in the IEEE P1765 Document.
%
% Inputs:
% Symb or r(nT): Recovered OFDM symbols
% Sideal: Ideal OFDM symbols from ideal signal
% params: structure containing the basic communication paramters
%
% Outputs:
% G_OPT: Optimum gain on symbols for EVM computation
% EVM or Baseline signal EVM: Baseline rms EVM in percent
global
structGlobal
...
...
@@ -28,7 +63,7 @@ function [G_OPT,EVM] = F_EVM_Computation_on_Symbols(params,Symb,Sideal)
G_OPT
=
CC
/
AC
;
% Gsymb = CC / ACideal;
fprintf
(
'Optimum gain on symbols for EVM computation\n'
);
fprintf
(
' amplitude = %8.6f phase = %8.2f
°
\n'
,
...
fprintf
(
' amplitude = %8.6f phase = %8.2f °\n'
,
...
abs
(
G_OPT
),
angle
(
G_OPT
)
*
180
/
pi
);
% EVM Calculation same as the single-carrier case Section 5.1.2.5
...
...
@@ -42,7 +77,7 @@ function [G_OPT,EVM] = F_EVM_Computation_on_Symbols(params,Symb,Sideal)
% cos2 = real(CC*conj(CC) / AC / ACideal);
% if structGlobal.printdebug
% fprintf('Angle between measured symbols and reference symbols\n');
% fprintf(' cos2 = %8.6f angle = %10.6f
°
\n',cos2,acosd(sqrt(cos2)));
% fprintf(' cos2 = %8.6f angle = %10.6f °\n',cos2,acosd(sqrt(cos2)));
% end
% EVM = sqrt(1/cos2-1); % = tangent of angle
...
...
03 P1765 Baseline EVM Algorithms/OFDM/F_OFDM_Symbols_Recovery.m
View file @
c78e4353
function
Symb
=
F_OFDM_Symbols_Recovery
(
params
,
xF
)
% This function performs the OFDM symbols recovery according to Section
% 5.2.1.4 of the IEEE P1765 Baseline EVM Algorithm for OFDM.
%
% Inputs:
% xF: Time domain signal corrected for optimal time delay and
% after normalization of signal average power
% params: structure containing the basic communication paramters
%
% Output:
% Symb or r(nT): Recovered OFDM symbols
%
% When applied to ideal signal, this function recovers ideal symbols.
%
% Copyright 2021 IEEE P1765 Authors
%
% * Redistribution and use in source and binary forms, with or without modification,
% are permitted provided that the following conditions are met:
%
% * Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.
%
% * Redistributions in binary form must reproduce the above copyright notice,
% this list of conditions and the following disclaimer in the documentation
% and/or other materials provided with the distribution.
%
% * Neither the name of the copyright holder nor the names of its contributors
% may be used to endorse or promote products derived from this software without
% specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
% USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% SPDX-License-Identifier: BSD-3-Clause
%
% See the LICENSE file distributed with this work for copyright and licensing
% information, the AUTHORS file for a list of copyright holders, and the
% CONTRIBUTORS file for the list of contributors.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function performs the OFDM symbols recovery.
% Refer to Section: Determination of Symbol Values
% in the IEEE P1765 document.
%
% Inputs:
% xF: Time domain signal corrected for optimal time delay and
% after normalization of signal average power
% params: structure containing the basic communication paramters
%
% Output:
% Symb or r(nT): Recovered OFDM symbols
%
% When applied to ideal signal, this function recovers ideal symbols.
global
structGlobal
...
...
03 P1765 Baseline EVM Algorithms/OFDM/F_P1765_OFDM_Baseline_EVM_Algorithm.m
View file @
c78e4353
function
[
delay
,
Gsymb
,
EVM
]
=
F_P1765_OFDM_Baseline_EVM_Algorithm
(
params
,
xFideal
,
xF
)
% This function applies the four steps of the P1765 OFDM Baseline EVM
% Algorithm, namely, coarse and fine time alignment, OFDM symbol
% recovery and EVM calculation on symbols.
% Refer to Section 5.2 of the IEEE P1765 document.
%
% Copyright 2021 IEEE P1765 Authors
%
% * Redistribution and use in source and binary forms, with or without modification,
% are permitted provided that the following conditions are met:
%
% * Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.
%
% * Redistributions in binary form must reproduce the above copyright notice,
% this list of conditions and the following disclaimer in the documentation
% and/or other materials provided with the distribution.
%
% * Neither the name of the copyright holder nor the names of its contributors
% may be used to endorse or promote products derived from this software without
% specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
% USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% SPDX-License-Identifier: BSD-3-Clause
%
% See the LICENSE file distributed with this work for copyright and licensing
% information, the AUTHORS file for a list of copyright holders, and the
% CONTRIBUTORS file for the list of contributors.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function applies the four steps of the P1765 OFDM Baseline EVM
% Algorithm, namely, coarse and fine time alignment, OFDM symbol
% recovery and EVM calculation on symbols.
% Refer to Section: The P1765 Baseline EVM Algorithm for Multi-Carrier OFDM
% Transmission Formats in the IEEE P1765 document.
global
structGlobal
...
...
@@ -15,7 +51,8 @@ function [delay,Gsymb,EVM] = F_P1765_OFDM_Baseline_EVM_Algorithm(params,xFideal,
fxF
=
F_fft_direct
(
params
,
xF
);
%% Time alignment (Step1:Coarse, Step2:Fine, Section 5.2.1.2)
%% Time alignment (Step1:Coarse, Step2:Fine)
% Refer to Section: Optimal Time Alignment of Waveform 2 to Waveform 1
[
delay
,
fxF
]
=
F_calculateOptimal
(
params
,
fxFideal
,
fxF
);
...
...
@@ -32,7 +69,8 @@ function [delay,Gsymb,EVM] = F_P1765_OFDM_Baseline_EVM_Algorithm(params,xFideal,
end
%% OFDM Symbols Recovery (Step3, Section 5.2.1.4)
%% OFDM Symbols Recovery (Step3)
% Refer to Section: Determination of Symbol Values
Symb
=
F_OFDM_Symbols_Recovery
(
params
,
xF
);
...
...
@@ -40,7 +78,9 @@ function [delay,Gsymb,EVM] = F_P1765_OFDM_Baseline_EVM_Algorithm(params,xFideal,
Sideal
=
F_OFDM_Symbols_Recovery
(
params
,
xFideal
);
%% EVM Computation on symbols (Step4, Section 5.2.1.5)
%% EVM Computation on symbols (Step4)
% % Refer to Section: Determine the EVM of the User-Lab and Reference-Lab
% Measured Waveforms in the IEEE P1765 Document.
[
Gsymb
,
EVM
]
=
F_EVM_Computation_on_Symbols
(
params
,
Symb
,
Sideal
);
...
...
03 P1765 Baseline EVM Algorithms/OFDM/F_Plot_Constellation_Diagram_OFDM.m
View file @
c78e4353
function
F_Plot_Constellation_Diagram_OFDM
(
Sideal
,
Symb
,
params
)
% This function plots the reference and received signal constellation
% diagrams and saves it in the evm_results_folder which was taken as
% input from the user in F_UserInputs_Rx().
% The constellation diagram is saved with the filename which was taken as
% input from the user in F_UserInputs_Rx().
% This version has been tested on several monitors and resolutions to
% ensure that it plots reliable constellation diagrams without any adjustment.
%
% Inputs:
% Sideal: Ideal OFDM symbols from ideal signal
% Symb: Recovered OFDM Symbols
% params: Structure containing all the basic communication parameters
%
% Copyright 2021 IEEE P1765 Authors
%
% * Redistribution and use in source and binary forms, with or without modification,
% are permitted provided that the following conditions are met:
%
% * Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.
%
% * Redistributions in binary form must reproduce the above copyright notice,
% this list of conditions and the following disclaimer in the documentation
% and/or other materials provided with the distribution.
%
% * Neither the name of the copyright holder nor the names of its contributors
% may be used to endorse or promote products derived from this software without
% specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
% USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% SPDX-License-Identifier: BSD-3-Clause
%
% See the LICENSE file distributed with this work for copyright and licensing
% information, the AUTHORS file for a list of copyright holders, and the
% CONTRIBUTORS file for the list of contributors.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function plots the reference and received signal constellation
% diagrams and saves it in the evm_results_folder which was taken as
% input from the user in F_UserInputs_Rx().
% The constellation diagram is saved with the filename which was taken as
% input from the user in F_UserInputs_Rx().
% This version has been tested on several monitors and resolutions to
% ensure that it plots reliable constellation diagrams without any adjustment.
%
% Inputs:
% Sideal: Ideal OFDM symbols from ideal signal
% Symb: Recovered OFDM Symbols
% params: Structure containing all the basic communication parameters
global
structGlobal
...
...
@@ -48,7 +83,7 @@ function F_Plot_Constellation_Diagram_OFDM(Sideal,Symb,params)
% Create legend
legend1
=
legend
(
axes1
,
'show'
);
% Placement of plot legend in MATLAB plot window
set
(
legend1
,
'Position'
,[
0.6
0
0.0
3
0.35
0.08
],
'FontSize'
,
14
);
set
(
legend1
,
'Position'
,[
0.6
5
0.0
1
0.35
0.08
],
'FontSize'
,
14
);
% Set the remaining axes/figure properties
axis
square
...
...
@@ -57,21 +92,21 @@ function F_Plot_Constellation_Diagram_OFDM(Sideal,Symb,params)
set
(
axes1
,
'xtick'
,(
-
params
.
N
/
2
:
1
:
params
.
N
/
2
));
set
(
axes1
,
'YLim'
,[
-
params
.
N
/
2
params
.
N
/
2
]);
set
(
axes1
,
'ytick'
,(
-
params
.
N
/
2
:
1
:
params
.
N
/
2
));
set
(
axes1
,
'FontSize'
,
24
,
'Grid
Alpha'
,
1
,
'XGrid'
,
'on'
,
'YGrid'
,
'on'
);
set
(
axes1
,
'FontSize'
,
24
,
'Grid
LineStyle'
,
'-'
,
'XGrid'
,
'on'
,
'YGrid'
,
'on'
);
% Move the plot box up to accomodate the legend
current_position
=
get
(
gca
,
'Position'
);
set
(
gca
,
'Position'
,
current_position
+
[
0
,
+
0.0
2
,
0
,
+
0.0
2
]);
set
(
gca
,
'Position'
,
current_position
+
[
0
,
+
0.0
1
,
0
,
+
0.0
1
]);
% Set the actual height and width of the box
width
=
5
;
height
=
5
;
width
=
6
;
height
=
6
;
set
(
gcf
,
'Units'
,
'Inches'
,
'Position'
,
[
1
,
1
,
width
+
1
,
height
+
1
],
'PaperUnits'
,
'Inches'
,
'PaperSize'
,
[
width
,
height
])
set
(
gca
,
'Fontsize'
,
14
);
% Saving figure as graphic file in current directory (plot must still be present in MATLAB plot window)
stri_fig
=
fullfile
(
structGlobal
.
evm_results_folder
,
strcat
(
structGlobal
.
filename_constellation
,
'.jpg'
));
set
(
figure1
,
'PaperPositionMode'
,
'auto'
);
print
(
figure1
,
stri_fig
,
'-djpeg'
,
'-r
3
00'
);
print
(
figure1
,
stri_fig
,
'-djpeg'
,
'-r
6
00'
);
end
\ No newline at end of file
03 P1765 Baseline EVM Algorithms/OFDM/F_Save_Results.m
View file @
c78e4353
function
F_Save_Results
(
EVMrms_pct
,
tau0
,
G_OPT
)
% This function saves the IEEE P1765 Baseline EVM Algorithm's official outputs
% EVMrms_pct: Baseline rms EVM in percent
% tau0: Optimal time delay before same sampling/calculation
% G_OPT: Optimal complex gain / normalization factor for symbol samples
% (saved as absolute and phase parts)
%
% Copyright 2021 IEEE P1765 Authors
%
% * Redistribution and use in source and binary forms, with or without modification,
% are permitted provided that the following conditions are met:
%
% * Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.
%
% * Redistributions in binary form must reproduce the above copyright notice,
% this list of conditions and the following disclaimer in the documentation
% and/or other materials provided with the distribution.
%
% * Neither the name of the copyright holder nor the names of its contributors
% may be used to endorse or promote products derived from this software without
% specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
% USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% SPDX-License-Identifier: BSD-3-Clause
%
% See the LICENSE file distributed with this work for copyright and licensing
% information, the AUTHORS file for a list of copyright holders, and the
% CONTRIBUTORS file for the list of contributors.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function saves the IEEE P1765 Baseline EVM Algorithm's official outputs
% EVMrms_pct: Baseline rms EVM in percent
% tau0: Optimal time delay before same sampling/calculation
% G_OPT: Optimal complex gain / normalization factor for symbol samples
% (saved as absolute and phase parts)
global
structGlobal
...
...
03 P1765 Baseline EVM Algorithms/OFDM/F_UserInputs_Rx.m
View file @
c78e4353
function
F_UserInputs_Rx
()
%
% Copyright 2021 IEEE P1765 Authors
%
% * Redistribution and use in source and binary forms, with or without modification,
% are permitted provided that the following conditions are met:
%
% * Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.
%
% * Redistributions in binary form must reproduce the above copyright notice,
% this list of conditions and the following disclaimer in the documentation
% and/or other materials provided with the distribution.
%
% * Neither the name of the copyright holder nor the names of its contributors
% may be used to endorse or promote products derived from this software without
% specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
% USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% SPDX-License-Identifier: BSD-3-Clause
%
% See the LICENSE file distributed with this work for copyright and licensing
% information, the AUTHORS file for a list of copyright holders, and the
% CONTRIBUTORS file for the list of contributors.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
global
structGlobal
...
...
@@ -16,7 +51,8 @@ function F_UserInputs_Rx()
% Read in ASCII Baseband Reference Waveform file
disp
(
'__________________________________________________________________'
);
disp
(
'The user’s selection will be based on the P1765 Signal Impairment Sets'
);
disp
(
'defined in Section 6.1 and Annex A of IEEE P1765'
);
disp
(
'defined in Section: Reference waveform file generation and '
);
disp
(
'Annex: The Reference Waveforms (normative)'
);
disp
(
'Read in ASCII Baseband Reference Waveform file'
);
disp
(
'__________________________________________________________________'
);
...
...
03 P1765 Baseline EVM Algorithms/OFDM/F_calculateOptimal.m
View file @
c78e4353
function
[
delay
,
fxF
]
=
F_calculateOptimal
(
params
,
fxFideal
,
fxF
)
% Function to calculate optimal coarse and fine time delay. The coarse time
% alignment is performed in time domain while the fine time alignment is
% performed in the frequency domain.
% See Section 5.2.1.2 of IEEE P1765 document:
% Optimal Time Alignment of Waveform 2 to Waveform 1
%
% Inputs:
% fxFideal or X(omega): Spectrum of the ideal OFDM signal
% fxF or Y(omega): Spectrum of the impaired OFDM signal
% params: structure containing the basic communication paramters
%
% Outputs:
% delay or tau0: Optimal time delay applied on the measured spectrum
% fxF or U(omega): Corrected measured spectrum after application of the optimal time delay
%
% Copyright 2021 IEEE P1765 Authors
%
% * Redistribution and use in source and binary forms, with or without modification,
% are permitted provided that the following conditions are met:
%
% * Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.
%
% * Redistributions in binary form must reproduce the above copyright notice,
% this list of conditions and the following disclaimer in the documentation
% and/or other materials provided with the distribution.
%
% * Neither the name of the copyright holder nor the names of its contributors
% may be used to endorse or promote products derived from this software without
% specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
% USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% SPDX-License-Identifier: BSD-3-Clause
%
% See the LICENSE file distributed with this work for copyright and licensing
% information, the AUTHORS file for a list of copyright holders, and the
% CONTRIBUTORS file for the list of contributors.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Function to calculate optimal coarse and fine time delay. The coarse time
% alignment is performed in time domain while the fine time alignment is
% performed in the frequency domain.
% See Section: Optimal Time Alignment of Waveform 2 to Waveform 1
% in the IEEE P1765 document:
%
%
% Inputs:
% fxFideal or X(omega): Spectrum of the ideal OFDM signal
% fxF or Y(omega): Spectrum of the impaired OFDM signal
% params: structure containing the basic communication paramters
%
% Outputs:
% delay or tau0: Optimal time delay applied on the measured spectrum
% fxF or U(omega): Corrected measured spectrum after application of the optimal time delay
global
structGlobal
...
...
03 P1765 Baseline EVM Algorithms/OFDM/F_fft_direct.m
View file @
c78e4353
function
fxF
=
fft_direct
(
params
,
xF
)
% this function computes the centered spectrum of an oversampled signal
function
fxF
=
F_fft_direct
(
params
,
xF
)
%
% Copyright 2021 IEEE P1765 Authors
%
% * Redistribution and use in source and binary forms, with or without modification,
% are permitted provided that the following conditions are met:
%
% * Redistributions of source code must retain the above copyright notice,
% this list of conditions and the following disclaimer.
%
% * Redistributions in binary form must reproduce the above copyright notice,
% this list of conditions and the following disclaimer in the documentation
% and/or other materials provided with the distribution.
%
% * Neither the name of the copyright holder nor the names of its contributors
% may be used to endorse or promote products derived from this software without
% specific prior written permission.
%
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
% THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
% DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
% SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
% OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
% USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%
% SPDX-License-Identifier: BSD-3-Clause
%
% See the LICENSE file distributed with this work for copyright and licensing
% information, the AUTHORS file for a list of copyright holders, and the
% CONTRIBUTORS file for the list of contributors.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This function computes the centered spectrum of an oversampled signal
fxF
=
fftshift
(
fft
(
xF
));
...
...
03 P1765 Baseline EVM Algorithms/OFDM/F_fft_inverse.m
View file @
c78e4353
function
xF
=
fft_inverse
(
params
,
fxF
)