Archived
minor change to channel amp phase est .m script
add plot grid
This commit is contained in:
+17
-13
@@ -1,20 +1,20 @@
|
|||||||
%% File Header/文件说明
|
%% File Header/文件说明
|
||||||
%
|
%
|
||||||
% Beamforming with phased array derives signal characteristics from phase
|
% Beamforming with phased array derives signal characteristics from phase
|
||||||
% differences between sensors. Therefore the amplitude-phase consistence is
|
% differences between sensors. Therefore the amplitude-phase consistence is
|
||||||
% vital to phased systems.
|
% vital to phased systems.
|
||||||
%
|
%
|
||||||
% The script analyzes the amp-phase relations of ILA captured data, the format
|
% The script analyzes the amp-phase relations of ILA captured data, the format
|
||||||
% of which is square-shaped pseudorandorm bit sequence. Each channel is
|
% of which is square-shaped pseudorandorm bit sequence. Each channel is
|
||||||
% processed seperately with different frequency shifts and different optimum
|
% processed seperately with different frequency shifts and different optimum
|
||||||
% sampling points. The estimation of amplitude and phase are based on
|
% sampling points. The estimation of amplitude and phase are based on
|
||||||
% acculumated correlation peaks.
|
% acculumated correlation peaks.
|
||||||
%
|
%
|
||||||
clc; clear;
|
clc; clear;
|
||||||
%% initial parameters/初始参数
|
%% initial parameters/初始参数
|
||||||
interp = 8; % interpolation factor
|
interp = 8; % interpolation factor
|
||||||
channelNum = 4;
|
channelNum = 4;
|
||||||
dataLen = 1024*8;
|
dataLen = 131072;
|
||||||
fs = 48e6;
|
fs = 48e6;
|
||||||
dataFile = "iladata_ant_3-1.csv";
|
dataFile = "iladata_ant_3-1.csv";
|
||||||
|
|
||||||
@@ -80,13 +80,15 @@ if dataFile.contains("loop")
|
|||||||
plot(ampEstSym(:,[1,4]));
|
plot(ampEstSym(:,[1,4]));
|
||||||
legend({"ch1","ch4"});
|
legend({"ch1","ch4"});
|
||||||
title("Amplitude Estimation");
|
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);
|
subplot(122);
|
||||||
plot(angleEstSym(:,[1,4]));
|
plot(angleEstSym(:,[1,4]));
|
||||||
legend({"ch1","ch4"});
|
legend({"ch1","ch4"});
|
||||||
title("Angle Estimation");
|
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
|
else
|
||||||
|
|
||||||
@@ -94,12 +96,14 @@ else
|
|||||||
plot(ampEstSym);
|
plot(ampEstSym);
|
||||||
legend({"ch1","ch2","ch3","ch4"});
|
legend({"ch1","ch2","ch3","ch4"});
|
||||||
title("Amplitude Estimation");
|
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);
|
subplot(122);
|
||||||
plot(angleEstSym);
|
plot(angleEstSym);
|
||||||
legend({"ch1","ch2","ch3","ch4"});
|
legend({"ch1","ch2","ch3","ch4"});
|
||||||
title("Angle Estimation");
|
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
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user