How to scale QAM signal for computing the EVM
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I was trying to compute the EVM from a received QAM signal, but I have some problems... I made this code, but I am not sure if it is correct.
I have two files which contents the signals: Transmitter (Tx) and Receiver (Rx). Tx is the original and the values are fine, for example for 16QAM (1+j, 1-j, 1+3j, 1-3j, -1+j, -1-j, -1+3j, -1-3j, 3+j, 3+3j, 3-j, 3-3j, -3+j, -3+3j, -3-j, -3-3j). Rx is the constellation after the channel which symbol amplitude is totally different (for example, 1+j is now 4+4j) and sometimes is rotated (but this is not my problem now). The Tx and Rx vector are sorted, I mean it Tx(1) correspond to Rx(1) and so on. As I know the Tx constellation, I would have to scale the Rx signal to compute the EVM. I attach a picture which show that Rx is bigger than Tx.
I also attach the Tx and Rx files.
Thank you
%% TX
Ref_1 = load('Tx_16QAM.txt'); % transmitted data
Tx = Ref_1;
Tx = Tx(:,1)+i*Tx(:,2);
Tx_Energy = var(Tx,1);
Tx_mean = mean(Tx);
Tx_mean_correct = Tx - Tx_mean;
Tx_Energy_mean_correct = var(Tx_mean_correct,1);
Tx_corrected = (Tx_mean_correct*sqrt(Tx_Energy))./sqrt(Tx_Energy_mean_correct);
Tx_Energy_corrected = var(Tx_corrected,1);
%% RX
Noisy_Data_1 = load('Rx_1dBm.txt'); % received data
Rx = Noisy_Data_1;
Rx = Rx(:,1)+i*Rx(:,2);
Rx_mean = mean(Rx);
Rx_mean_correct = Rx - Rx_mean;
Rx_Energy = var(Rx,1);
Rx_corrected = (Rx_mean_correct*sqrt(Tx_Energy))./sqrt(Rx_Energy);
Rx_Energy_corrected = var(Rx_corrected,1);
%% EVM calculation
% evm = comm.EVM;
% rmsEVM1 = evm(Ref,Noisy_Data);
%%
evm = comm.EVM('MaximumEVMOutputPort',true,...
'XPercentileEVMOutputPort',true, 'XPercentileValue',90,...
'SymbolCountOutputPort',true);
[rmsEVM,maxEVM,pctEVM,numSym] = evm(Tx_corrected,Rx_corrected);
disp(rmsEVM);
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu QAM finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!