gpt4 book ai didi

algorithm - 信号关系和转换 : Transforming one Signal into another?

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:56:56 25 4
gpt4 key购买 nike

我正在尝试将近岸潮汐信号(A 点)与长模型边界上的 3 个点(B C D 点)相关联。我想在 B C D 之间建立关系,我们可以将 A 预测转换为 B CD。目前,我正在进行单相移、零以上电平的振幅比、零以下电平的振幅比和平均电平偏移。

这会在退潮高峰和涨潮高峰期的潮汐信号中产生扭结,并导致模型过度预测涨潮。我想知道是否有人知道这种转换有更复杂的关系?

我想捕捉的一件事是高水位和低水位之间的相移差异(例如,不同点的正周期与负周期的比率可能不同)。

当前进程的示例算法。

A = vector (size n x 1 ) units meters

time_A = vector (size n x 1 )

ph_B = phase shift for AvsB.

pos_amp_B = positive amplitude ration.
neg_amp_B = negative amplitude ration.

B_mean = long term mean of B.

A_mean = long term mean of A.

for i = 1:n
a = A(i) - A_mean
if a > 0
B(i) = a*pos_amp_B
else
B(i) = a*neg_amp_B
end
time_B(i) = time_A(i) = ph_B
B(i) = B(i) + B_mean
end

顺便说一句:该关系基于大约 6 个月的数据。

编辑 1:好吧,首先只考虑两个正弦信号(即振幅、相移),但不是规律的,例如周期为 12.5 小时,但正半部分和负半部分的斜率和周期并不完全相同。您不需要任何上下文知识。我只是在寻找一种转换算法。

编辑 2:

这是时间序列和 fft 比较的图片(fft 专注于高能量的频率(12.5 小时(半日)),只是为了说明并非所有频率的缩放比例都很好)。黑色是零线中的 A. 绿色。

Water Level [m] timeseries (top) and fft analysis (bottom)

最佳答案

如果对您的领域没有更详细的了解,就很难为您提供明确的答案。我将在这里假设您的潮汐行为是 linear time invariant (LTI) 系统。从您在问题中显示的数据来看,这看起来是一个合理的假设。

现在您可以通过简单地对信号 A 应用幅度和相位调整来创建 B、C 和 D 信号。有几种方法可以做到这一点;下面我通过将 A 乘以一个复数来完成。调整复数的幅度和相位以获得您需要的结果。这是一个用 Matlab 代码编写的示例:

% Create an example signal at location 'A'
t = 0:0.1:10;
A = 0.35.*sin(2.*pi.*0.5.*t) + 1.*sin(2.*pi.*0.5175.*t) + 0.3.*sin(0.5255.*t);

% We want a complex version of A, so let's apply a Hilbert transform to it
A = hilbert(A);

% Now we can create the other signals by transforming the amplitude and
% phase. Exactly what amplitude and phase to apply needs to be determined.
B = 0.9*exp(j*0.1).*A;
C = 0.8*exp(j*0.4).*A;
D = 0.7*exp(j*0.6).*A;

% Plot what these signals look like
figure(1); hold on;
plot(t,real(A),'k');
plot(t,real(B),'r');
plot(t,real(C),'g');
plot(t,real(D),'b');
xlabel('Time');
ylabel('Amplitude');
legend('A','B','C','D');

这将产生一个外观与您在问题中发布的图片非常相似的图。如果您的潮汐行为无法通过 LTI 系统进行近似,那么您可能必须执行一些更复杂的非线性建模。

希望对您有所帮助!

关于algorithm - 信号关系和转换 : Transforming one Signal into another?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20647780/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com