Datasheet Plot - Curve fitting program......  - Page 1
Forum section: electronics / projects

author: Smokey
author_rank: Super Contributor
timestamp: January 19, 2016, 05:28:02 pm
content: At some point I remember stumbling across someone's project where you could take the image of a plot from a data sheet and it would figure out where the points are and make a best fit curve and return the equation. Now that I need that I can't seem to find it. I know one of you guys knows exactly what I'm talking about. Help!

author: daqq
author_rank: Super Contributor
timestamp: January 19, 2016, 06:37:09 pm
content: I generally do this with math tools - see:https://www.gnu.org/software/octave/doc/interpreter/Polynomial-Interpolation.htmlAlso, MS Excel (and probably other similar tools) has a polynome and other fitting tools:http://stackoverflow.com/questions/10857252/quadratic-and-cubic-regression-in-excelhttp://web.cecs.pdx.edu/~eas199/A/notes/14/polynomial_curve_fit_notes.pdf

author: Smokey
author_rank: Super Contributor
timestamp: January 19, 2016, 07:29:08 pm
content: Good links. Sorry I should have been more specific.The cool feature of the program I'm thinking of is that you can input a picture of a plot from a datasheet and it figures out the data points for you (with a little help) so you don't have to start from a hand entered spreadsheet of values.

author: Giaime
author_rank: Regular Contributor
timestamp: January 19, 2016, 07:37:56 pm
content: http://digitizer.sourceforge.net/

author: electr_peter
author_rank: Unknown
timestamp: January 19, 2016, 08:37:16 pm
content: Google for "extract data from plot" or "plot digitize". I have rarely used such programs (I prefer to have data in tabular formats, not images), so I cannot recommend anything specific.

author: penfold
author_rank: Frequent Contributor
timestamp: January 19, 2016, 08:57:39 pm
content: As nice as it is to always have the tabular data, it doesn't half dig you out of a hole when you need it!

author: electr_peter
author_rank: Unknown
timestamp: January 19, 2016, 09:39:41 pm
content: Quote from: penfold on January 19, 2016, 08:57:39 pmI agree. I just not see many practical applications of such technique in my experience with data analytics and electronics.I think it is more important to know that if you need really need it you could extract data from plots somewhat accurately and quickly.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: January 19, 2016, 10:10:30 pm
content: I have used Engauge 4.1 for this. Works fairly well. I have also used graphics programs to find pixel coordinates of axes and curves and then written simple software to convert to the actual graph units.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: January 19, 2016, 10:18:41 pm
content: There is a great deal of data in older handbooks and manuals that is only available in printed graphical form. Think of transimpedance curves for vacuum tubes, or measured data for strengths of wood, or any number of other things which can be very useful. Some of the best are the simple models for all sorts of things like water flow in a pipe, or heat transfer etc. Todays world has so much computing capability (and a desire in academia to advance the frontiers of knowledge) that often only extremely complex answers are presented for many problems. These answers may be a percent or two more accurate than the older approaches, but require knowledge that is difficult to obtain, both in data about the problem, and in knowledge of how to apply these complex models. If you don't need the accuracy the older approaches are fine. Your smartphone and one of these programs brings this data into todays world where it can be used and manipulated.

author: calzap
author_rank: Frequent Contributor
timestamp: January 19, 2016, 10:22:15 pm
content: You are talking about two distinct processes: 1. digitizing points from an image of a plot, and 2. fitting an equation to the digitized data. #1 is the most straightforward, and someone has posted a link to a software package. #2 is more complex. The best type of equation to fit is one that models the physical mechanisms of the system under investigation. For example, a single exponential for a capacitor discharge curve, a simple example to be sure. There are packages which can fit complex equations, including differential equations, to data. These programs require some knowledge and skill to use and have lots of traps for beginners. It's not necessarily the programs themselves that have traps, but the numerical analysis processes used for nonlinear regression have many pitfalls. Big statistical packages, like SAS, SigmaStat and SPSS, have a nonlinear curve fitting feature. The Solver add-in for Excel can also be used for nonlinear regression.If you just want an equation to describe the data without relevance to physical mechanisms, then usually a polynomial is used because they are easy to fit. Polynomials can be fitted to data with a spreadsheet. In Excel, either the multiple regression (Analysis ToolPak add-in) or the Solver can be used. Usually, you have to decide what degree of polynomial to use; however, there are programs that will try to determine the lowest degree of polynomial that will give an adequate fit. Usually, they start with first degree (straight line) and go up in degree in stepwise fashion until the error is below a specified level.Mike in California

author: CatalinaWOW
author_rank: Super Contributor
timestamp: January 19, 2016, 10:37:14 pm
content: Quote from: calzap on January 19, 2016, 10:22:15 pmMike's point cannot be overemphasized. It is quite easy to get a perfect fit to 5 data points with a fifth order polynominal. But the polynomial is unlikely to provide meaningful results at any points other than those initially presented. This is only the most obvious of the traps he mentions.

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: January 19, 2016, 10:44:08 pm
content: It seems to me that you are referring to datathiefhttp://www.datathief.org/which seems to still be available for various platforms.

author: TimFox
author_rank: Super Contributor
timestamp: January 20, 2016, 12:08:34 am
content: Also note that a polynomial fit that works well to interpolate between actual data points will almost certainly screw up badly outside the range of the data used to generate the fit.