Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

curve fitting - Matlab cftool giving a terrible fit for a simple graph

I'm trying to do a fit on cftool for the movement of an oscillator in steady state. I've entered start points as accurately as I can, but Matlab keeps giving a terrible fit (R2 is negative.) This, though it's clear even visually that a better fit can be had.
By changing the upper and lower bounds, I can force the graph into a better fit. But it's still not 100%, Matlab keeps giving a negative R2, and when I take off the bounds, it returns to a worse fit. Current fit: image of fit

Data added upon request:

t1_w10_a5_ss:

8
8.05000000000000
8.10000000000000
8.15000000000000
8.20000000000000
8.25000000000000
8.30000000000000
8.35000000000000
8.40000000000000
8.45000000000000
8.50000000000000
8.55000000000000
8.60000000000000
8.65000000000000
8.70000000000000
8.75000000000000
8.80000000000000
8.85000000000000
8.90000000000000
8.95000000000000
9
9.05000000000000
9.10000000000000
9.15000000000000
9.20000000000000
9.25000000000000
9.30000000000000
9.35000000000000
9.40000000000000
9.45000000000000
9.50000000000000
9.55000000000000
9.60000000000000
9.65000000000000
9.70000000000000
9.75000000000000
9.80000000000000
9.85000000000000
9.90000000000000
9.95000000000000
10
10.0500000000000
10.1000000000000
10.1500000000000
10.2000000000000
10.2500000000000
10.3000000000000
10.3500000000000
10.4000000000000
10.4500000000000
10.5000000000000
10.5500000000000
10.6000000000000
10.6500000000000
10.7000000000000
10.7500000000000
10.8000000000000
10.8500000000000
10.9000000000000

x1_w10_a5_ss:
0.191254400000000
0.192137400000000
0.190920000000000
0.190923800000000
0.190562700000000
0.191785800000000
0.191260200000000
0.191621400000000
0.190396400000000
0.191092000000000
0.191080500000000
0.192133600000000
0.191264000000000
0.191273600000000
0.190388800000000
0.191780000000000
0.191776200000000
0.192137400000000
0.190916200000000
0.191269700000000
0.190736600000000
0.191785800000000
0.191260200000000
0.191617600000000
0.190742300000000
0.191269700000000
0.190738500000000
0.191615700000000
0.190914300000000
0.191443700000000
0.190736600000000
0.191785800000000
0.191260200000000
0.191617600000000
0.190738500000000
0.191611800000000
0.191256300000000
0.191961600000000
0.191088200000000
0.191443700000000
0.190740400000000
0.191441700000000
0.190912400000000
0.191615700000000
0.190914300000000
0.191443700000000
0.190742300000000
0.191271700000000
0.190568400000000
0.191269700000000
0.190740400000000
0.191443700000000
0.190742300000000
0.191271700000000
0.190566500000000
0.191439800000000
0.191084400000000
0.191789600000000
0.190916200000000
question from:https://stackoverflow.com/questions/65836518/matlab-cftool-giving-a-terrible-fit-for-a-simple-graph

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I don't think that it is a problem of software. I observed a similar difficulty with another software and different method of fitting.

At first glance this look like white noice :

enter image description here

But there is another possible (and more physical) explanation. If the sampling frequency is too low compare to the oscillating frequency this is typically the kind of data that is commonly observed.

I suppose that you can roughly evaluate the frequency of oscillation at steady state by direct measurement (not from your data). What is the order of magnitude of the frequency of oscillation ? This is a very important piece of information to explain what is really the problem and to suggest what to do.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...