大家好!
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.當波形的周期與緩衝區長度不匹配時,結果會分佈在許多箱中,並且相位可能會丟失。