大家好!
Y 曲线是其他三条曲线的总和。
具体公式为:Y=Max+mid+min+10
如果只知道Y,我需要恢复“Max”、“mid”和“min”这三个曲线。
我查了一下,看起来我可以用傅里叶变换来做到这一点。
请问是否有JMP对应的模块可以实现这种恢复。

另外三条曲线的excel公式为:
min=ROUND(2*SIN(80*RADIANS(:x)+RADIANS(7)),10)+2
mid=ROUND(3*SIN(21*RADIANS(:x)+RADIANS(8)),10)+3
max=ROUND(4*SIN(5*RADIANS(:x)+RADIANS(64)),10)+4
谢谢!
根据Craige FFT分析,真实的曲线应该被分成更多的曲线。
我不知道如何用FIT模型调整参数。
谢谢!

我刚刚开始学习这个领域。切换到真实数据就没那么简单了:
我尝试了FFT、FIT模型和时间序列。

我没有开启正确的方法,
麻烦专家继续指导我。
感谢专家!
您可以将参数模型定义为列公式。 本例中的模型是三个正弦函数和一个常数的总和。 您可以在公式编辑器中定义参数以及起始值。 (请注意,起始值很重要,尤其是在三角函数的情况下。)它看起来像这样:

非线性平台中的解决方案如下所示:

我附上了修改后的 JMP 数据表,其中包含从角度到弧度的转换、模型公式以及用于启动非线性的表脚本。
谢谢马克贝利!
我搜索脚本并尝试操作。但我仍然不知道该怎么做。请给我一个例子来学习。
感谢您的帮助!
您还可以使用非线性平台来拟合作为三个三角函数之和的自定义模型。
感谢克雷格的具体指导和马克贝利的帮助。
让我对如何完成这个项目有一个完整的了解。也证明了JMP可以完成这个分解。
我想继续问克雷奇:
如果现实中存在一系列数据Y,也不知道其具体组成为几条曲线。
但我只想把这个Y分解成三四个原始曲线,
如何最大限度地恢复每条曲线的各种参数。当然,你也知道DC是无法恢复的。
非常感谢!
看看能否恢复原来的三条曲线和四条曲线。
我想知道将数据视为函数是否有任何好处,并且功能原理组件可用于识别您想要的信息。
看频域DE帮助。
你希望恢复什么?
- 频率/幅度
- 阶段
- 直流偏置
使用 FFT 函数可以轻松恢复三个频率和幅度分量(80、21、5 和 2、3、4),但现实世界的数据会增加复杂性。 看FFT 和 DTMF举个老例子。 恢复灵态似乎很难。 如果缓冲区长度完全匹配波形的周期,我下面的实验将恢复(7,8,64),否则我认为相位信息可能会丢失。 (我不是这方面的专家。)恢复各个直流偏移是不可能的,因为它们都是加在一起的。
在使用此 JSL 之前,需要进行更多测试!
RADIANS = Function( {x}, 2 * Pi() * x / 360 );
NSAMPLES = 360; // 360 makes the answer look perfect. Real-world data will change everything for the worse...
time = NSAMPLES/360; // number of seconds the table holds
dt = New Table( "Untitled 4",
Add Rows( NSAMPLES ),// generate perfect, non-real world data
New Column( "x", formula( Row()-1 ) ), // time axis, in degrees
// not sure why you would round this to 10 places, but it was part of the question...
// adding 7 degrees is a phase adjustment, multiplying by 2 is an amplitude adjustment
// adding 2+3+4 at the end is the DC level of 9. You'll never get those individual values back, just the 9.
New Column( "min", formula( Round( 2 * Sin( 80/*Hz*/ * RADIANS( :x ) + RADIANS( 7/*degrees*/ ) ), 10 ) + 2 ) ),
New Column( "mid", formula( Round( 3 * Sin( 21/*Hz*/ * RADIANS( :x ) + RADIANS( 8/*degrees*/ ) ), 10 ) + 3 ) ),
New Column( "max", formula( Round( 4 * Sin( 5/*Hz*/ * RADIANS( :x ) + RADIANS( 64/*degrees*/ ) ), 10 ) + 4 ) ),
New Column( "combine", formula( min + mid + max ) )
);
dt << Graph Builder( Size( 1275, 240 ), Show Control Panel( 0 ), Variables( X( :x ), Y( :combine ) ), Elements( Line( X, Y, Legend( 11 ) ) ),
SendToReport( Dispatch( {}, "graph title", TextEditBox, {Set Text( "Original Data" )} ) ) );
// there are NSAMPLES and there will be NSAMPLES bins in the FFT result.
// the first half of the bins are interesting, 1..(NSAMPLES/2), the 2nd half mirror them.
// the lowest bin, 1, will represent the DC offset
// The bins 1-(NSAMPLES/2) are equal width in frequency; the maximum frequency is
// NSAMPLES/2 full cycles in a buffer (or (NSAMPLES/2) radians per buffer)
// (you know how much time a buffer represents, so you can get back to Hz)
freq = (((1 :: (NSAMPLES / 2)) - 1) / time)`; // cycles per second for each bin
{real, complex} = FFT( {dt[0, "combine"]} );
amplitude = Sqrt( real ^ 2 + complex ^ 2 );
dt2 = As Table( freq || (amplitude[1 :: (NSAMPLES / 2)]) );
dt2 << Graph Builder(
Size( 1456, 289 ),
Show Control Panel( 0 ),
Variables( X( :Col1 ), Y( :Col2 ) ),
Elements( Points( X, Y, Legend( 7 ) ) ),
SendToReport(
Dispatch( {}, "graph title", TextEditBox, {Set Text( "Recovered Data" )} ),
Dispatch( {}, "X title", TextEditBox, {Set Text( "Hz" )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "Relative Amplitude" )} )
)
);
// At this point the min/mid/max are recovered. Do you need the phase too?
//
// ** I'm not confident this produces a useful answer. The answer appears
// correct for the simulated data with the perfect match to the sample
// buffer, BUT if the buffer is slightly bigger or smaller, the phases
// do not seem related to the original phases. **
//
// I *think* it is necessary to add 90 degrees below because you are using sin
// and fft uses cos. You should study that a bit more.
// I *think* the amplitude*2 vs amplitude*1 is because half of the non-DC
// samples are thrown away. You should study that a bit more too.
For( i = 1, i <= N Rows( freq ), i += 1,
amp = Round( If( i == 1, 1, 2 ) * amplitude[i] / NSAMPLES, 3 );
If( amp > .7, // this will need tweaking
Write( "\!n", freq[i], " Hz \!tAmplitude=", amp, " units \!tphase=",
90 + Round( 360 * ATan( complex[i], real[i] ) / (2 * Pi()), 3 ), " degrees"
)
);
);
Open Log( 1 );
Two graphs and some output in the log.Two graphs and some output in the log.两个图表和日志中的一些输出。
FFT 中的零频率区间(JSL 中的元素 1)称为 DC,因为 DC 表示直流电(与交流电 AC 相对)。 所有空调都在其他垃圾箱中。 交流信号通过直流电平从零偏移。 在上面的日志中,0 Hz DC bin 声称相位角为 90 度。 这没有任何意义。
一个更典型的结果:
When the wave form's period does not match the buffer length the results are spread across many bins and the phase is probably lost.When the wave form's period does not match the buffer length the results are spread across many bins and the phase is probably lost.当波形的周期与缓冲区长度不匹配时,结果会分布在许多箱中,并且相位可能会丢失。