- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在尝试将近岸潮汐信号(A 点)与长模型边界上的 3 个点(B C D 点)相关联。我想在 B C D 之间建立关系,我们可以将 A 预测转换为 B C 和 D。目前,我正在进行单相移、零以上电平的振幅比、零以下电平的振幅比和平均电平偏移。
这会在退潮高峰和涨潮高峰期的潮汐信号中产生扭结,并导致模型过度预测涨潮。我想知道是否有人知道这种转换有更复杂的关系?
我想捕捉的一件事是高水位和低水位之间的相移差异(例如,不同点的正周期与负周期的比率可能不同)。
当前进程的示例算法。
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. 绿色。
最佳答案
如果对您的领域没有更详细的了解,就很难为您提供明确的答案。我将在这里假设您的潮汐行为是 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/
我正在尝试将一个字符串逐个字符地复制到另一个字符串中。目的不是复制整个字符串,而是复制其中的一部分(我稍后会为此做一些条件......) 但我不知道如何使用迭代器。 你能帮帮我吗? std::stri
我想将 void 指针转换为结构引用。 结构的最小示例: #include "Interface.h" class Foo { public: Foo() : mAddress((uint
这有点烦人:我有一个 div,它从窗口的左上角开始过渡,即使它位于文档的其他任何位置。我试过 usign -webkit-transform-origin 但没有成功,也许我用错了。有人可以帮助我吗?
假设,如果将 CSS3 转换/转换/动画分配给 DOM 元素,我是否可以检测到该过程的状态? 我想这样做的原因是因为我正在寻找类似过渡链的东西,例如,在前一个过渡之后运行一个过渡。 最佳答案 我在 h
最近我遇到了“不稳定”屏幕,这很可能是由 CSS 转换引起的。事实上,它只发生在 Chrome 浏览器 上(可能还有 Safari,因为一些人也报告了它)。知道如何让它看起来光滑吗?此外,您可能会注意
我正在开发一个简单的 slider ,它使用 CSS 过渡来为幻灯片设置动画。我用一些基本样式和一些 javascript 创建了一支笔 here .注意:由于 Codepen 使用 Prefixfr
我正在使用以下代码返回 IList: public IList FindCodesByCountry(string country) { var query =
如何设计像这样的操作: 计算 转化 翻译 例如:从“EUR”转换为“CNY”金额“100”。 这是 /convert?from=EUR&to=CNY&amount=100 RESTful 吗? 最佳答
我使用 jquery 组合了一个图像滚动器,如下所示 function rotateImages(whichHolder, start) { var images = $('#' +which
如何使用 CSS (-moz-transform) 更改一个如下所示的 div: 最佳答案 你可以看看Mozilla Developer Center .甚至还有例子。 但是,在我看来,您的具体示例不
我需要帮助我正在尝试在选中和未选中的汉堡菜单上实现动画。我能够为菜单设置动画,但我不知道如何在转换为 0 时为左菜单动画设置动画 &__menu { transform: translateX(
我正在为字典格式之间的转换而苦苦挣扎:我正在尝试将下面的项目数组转换为下面的结果数组。本质上是通过在项目第一个元素中查找重复项,然后仅在第一个参数不同时才将文件添加到结果集中。 var items:[
如果我有两个定义相同的结构,那么在它们之间进行转换的最佳方式是什么? struct A { int i; float f; }; struct B { int i; float f; }; void
我编写了一个 javascript 代码,可以将视口(viewport)从一个链接滑动到另一个链接。基本上一切正常,你怎么能在那里看到http://jsfiddle.net/DruwJ/8/ 我现在的
我需要将文件上传到 meteor ,对其进行一些图像处理(必要时进行图像转换,从图像生成缩略图),然后将其存储在外部图像存储服务器(s3)中。这应该尽可能快。 您对 nodejs 图像处理库有什么建议
刚开始接触KDB+,有一些问题很难从Q for Mortals中得到。 说,这里 http://code.kx.com/wiki/JB:QforMortals2/casting_and_enumera
我在这里的一个项目中使用 JSF 1.2 和 IceFaces 1.8。 我有一个页面,它基本上是一大堆浮点数字段的大编辑网格。这是通过 inputText 实现的页面上的字段指向具有原始值的值对象
ScnMatrix4 是一个 4x4 矩阵。我的问题是什么矩阵行对应于位置(ScnVector3),旋转(ScnVector4),比例(ScnVector3)。第 4 行是空的吗? 编辑: 我玩弄了
恐怕我是 Scala 新手: 我正在尝试根据一些简单的逻辑将 Map 转换为新 Map: val postVals = Map("test" -> "testing1", "test2" -> "te
输入: This is sample 1 This is sample 2 输出: ~COLOR~[Green]This is sample 1~COLOR~[Red]This is sam
我是一名优秀的程序员,十分优秀!