频率确认

原理

代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%% ref: 多频外差原理相位解包裹方法的改进
% 确定3频参数,解决跳变问题
clc;clear;close all
p1=20;
hPixcel=1024;
error=pi/30;

out=[];
while 1
if p1 < 5
break;
end
p3Max=floor((pi-error)*p1/error);

for p3=p3Max:-1:1
p2=ceil(p3*error/(pi-error))-1;
while 1
p2=p2+1;
if p2>= p3
break;
end
if p2<=p1
continue;
end
p12=p1*p2/(p2-p1);
if p12>=p3 || p12/(p3-p12) >= (pi-error)/(3*error)
continue;
end
p123=p12*p3/(p3-p12);
xMin=ceil(3*error/(2*pi/p12-2*pi/p3));
xMax=floor(p123-hPixcel)/2;
if xMin >= xMax
continue;
end
out=[out;p1,p2,p3, p123]
end

end
p1=p1-1;
end
out

相位展开

实验结果