IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Commit 57a6f2d1 authored by Martin Hudlicka's avatar Martin Hudlicka
Browse files

Deleted

parent c73da25c
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)
%
% It also saves the extra outputs in the same file for users
% rxSigAve: Received signal average value
% optTolerance: Absolute tolerance determined for iterative delay calculation convergence (ns)
% iterindx: Number of iterations for optimal delay loop convergence (= 10000 if convergence fails)
% G_0: Optimal complex gain to be applied before symbol sampling/EVM calculation saved as
% G_0amp: abs(G_0)
% G_0phase: angle(G_0) in degrees
% EVMpeak_pct: Peak EVM (in %)
global structGlobal
G_OPTamp = abs(G_OPT);
G_OPTphase = angle(G_OPT)*180/pi; % degrees
fname = strcat(structGlobal.filename,'.txt');
fid = fopen(fullfile(structGlobal.evm_results_folder,fname),'w');
fprintf(fid,'\n\n');
fprintf(fid,'%s\n','OFFICIAL RESULTS');
Official_Quantity = [{'EVM_rms%', 'Optimal Delay (ns)','G_OPT Amp', 'G_OPT Phase (deg)'}];
Official_Value = [EVMrms_pct; tau0; G_OPTamp; G_OPTphase];
fprintf(fid,'%s\n','------------------------------------------------');
fprintf(fid, '%s \t %s\r\n', 'Official Quantity', 'Value');
fprintf(fid,'%s\n','------------------------------------------------');
for n =1:length(Official_Value)
fprintf(fid, '%-23s %1.15g\r\n', Official_Quantity{n}, Official_Value(n));
end
fprintf(fid,'\n\n');
fprintf(fid,'%s\n','Official Quantity Definition:');
fprintf(fid,'%s\n','-----------------------------');
fprintf(fid,'%s\n','> EVM_rms% = RMS EVM as a percentage');
fprintf(fid,'%s\n','> Optimal Delay (ns) = Optimal time delay to be applied in the phase of XOut before symbol sampling/EVM calculation');
fprintf(fid,'%s\n',' where XOut is fftshifted match filtered baseband version of reference signal in frequency domain');
fprintf(fid,'%s\n','> G_OPT Amp = Symbol Norm Amp = abs(G_OPT), where G_OPT is optimal complex gain/normalization factor for symbol samples');
fprintf(fid,'%s\n','> G_OPT Phase = Symbol Norm Phase = angle(G_OPT) in degrees');
fprintf(fid,'\n\n');
Extra_Quantity = [{'DC Value', 'Delay Tolerance (ns)', 'Delay Iterations', 'Wvfrm Gain Amp', 'Wvfrm Gain Phase (deg)','EVM_peak%'}];
Extra_Value = [structGlobal.rxSigAve; structGlobal.optTolerance; structGlobal.iterindx; structGlobal.G_0amp; structGlobal.G_0phase; structGlobal.EVMpeak_pct];
fprintf(fid,'%s\n','------------------------------------------------');
fprintf(fid, '%s \t\t %s\r\n', 'Extra Quantity', 'Value');
fprintf(fid,'%s\n','------------------------------------------------');
for n =1:length(Extra_Value)
fprintf(fid, '%-23s %1.15g\r\n', Extra_Quantity{n}, Extra_Value(n));
end
fprintf(fid,'\n\n');
fprintf(fid,'%s\n','Extra Quantity Definition:');
fprintf(fid,'%s\n','--------------------------');
fprintf(fid,'%s\n','> DC Value = Received signal average value');
fprintf(fid,'%s\n','> Delay Tolerance (ns) = Absolute tolerance determined for iterative delay calculation convergence');
fprintf(fid,'%s\n','> Delay Iterations = Number of iterations for optimal delay loop convergence (= 10000 if convergence fails');
fprintf(fid,'%s\n','> Wvfrm Gain Amp = abs(G_0), where G_0 = Optimal complex gain is applied to XOut before symbol sampling/EVM calculation');
fprintf(fid,'%s\n',' where XOut = fft shifted version of match-filtered reference signal spectrum');
fprintf(fid,'%s\n','> Wvfrm Gain Phase = angle(G_0) in degrees');
fprintf(fid,'%s\n','> EVM_peak% = Peak EVM as a percentage');
fclose(fid);
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment