minor change to channel amp phase est .m script

add plot grid
This commit is contained in:
2023-03-28 00:22:57 +08:00
parent 26fa3e9e50
commit b000e2702e
@@ -1,20 +1,20 @@
%% File Header/文件说明
%
% Beamforming with phased array derives signal characteristics from phase
% differences between sensors. Therefore the amplitude-phase consistence is
% vital to phased systems.
%
% The script analyzes the amp-phase relations of ILA captured data, the format
% of which is square-shaped pseudorandorm bit sequence. Each channel is
% processed seperately with different frequency shifts and different optimum
% sampling points. The estimation of amplitude and phase are based on
% Beamforming with phased array derives signal characteristics from phase
% differences between sensors. Therefore the amplitude-phase consistence is
% vital to phased systems.
%
% The script analyzes the amp-phase relations of ILA captured data, the format
% of which is square-shaped pseudorandorm bit sequence. Each channel is
% processed seperately with different frequency shifts and different optimum
% sampling points. The estimation of amplitude and phase are based on
% acculumated correlation peaks.
%
clc; clear;
%% initial parameters/初始参数
interp = 8; % interpolation factor
channelNum = 4;
dataLen = 1024*8;
dataLen = 131072;
fs = 48e6;
dataFile = "iladata_ant_3-1.csv";
@@ -80,13 +80,15 @@ if dataFile.contains("loop")
plot(ampEstSym(:,[1,4]));
legend({"ch1","ch4"});
title("Amplitude Estimation");
ylim([min(ampEstSym(:,[1,4]),[],'all')-0.1,max(ampEstSym(:,[1,4]),[],'all')+0.1])
ylim([min(ampEstSym(:,[1,4]),[],'all')-0.1,max(ampEstSym(:,[1,4]),[],'all')+0.1]);
grid on; grid minor;
subplot(122);
plot(angleEstSym(:,[1,4]));
legend({"ch1","ch4"});
title("Angle Estimation");
ylim([min(angleEstSym(:,[1,4]),[],'all')-10,max(angleEstSym(:,[1,4]),[],'all')+10])
ylim([min(angleEstSym(:,[1,4]),[],'all')-1,max(angleEstSym(:,[1,4]),[],'all')+1]);
grid on; grid minor;
else
@@ -94,12 +96,14 @@ else
plot(ampEstSym);
legend({"ch1","ch2","ch3","ch4"});
title("Amplitude Estimation");
ylim([min(ampEstSym,[],'all')-0.2,max(ampEstSym,[],'all')+0.2])
ylim([min(ampEstSym,[],'all')-0.2,max(ampEstSym,[],'all')+0.2]);
grid on; grid minor;
subplot(122);
plot(angleEstSym);
legend({"ch1","ch2","ch3","ch4"});
title("Angle Estimation");
ylim([min(angleEstSym,[],'all')-10,max(angleEstSym,[],'all')+10])
ylim([min(angleEstSym,[],'all')-10,max(angleEstSym,[],'all')+10]);
grid on; grid minor;
end