Find two unknowns in equation from 38301 dataset - Page 1
Forum section: electronics / beginners

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: August 02, 2020, 05:51:58 am
content: I am using a thermopile whose dataset is available around 38301 values. This is purely mathematical query. Need to find two unknowns in below equation:Vtp = K( Tobj^(4-n) - Ta^(4-n) )Company says K & n are empirically determined value & this they wont tell.Vtp is in voltsTobj & Ta are in kelvinsHere is 38301 dataset:https://drive.google.com/file/d/1Kzok_MVeLRNiUz59HZl6xHrpkh5dg3mg/view?usp=sharingAgain this is purely mathematical query, just to see if it can be find out.

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: August 02, 2020, 05:57:24 am
content: From these 38301 dataset values, we need to find best fit values of K & n, so that in final calculations when Tobj is to be calculated from known values of Vtp,Ta,K & n, this has minimum error.

author: magic
author_rank: Super Contributor
timestamp: August 02, 2020, 09:16:07 am
content: I believe the theoretical, "ideal" formula has n=0, but that doesn't work very well for this dataset.It's a nonlinear problem so I'm not sure if there is any simple general solution, but we can try some back of the napkin brute force.First step, convert to CSV, load into Octave and split the columns.Code:x=csvread("values_thermopile.csv")v=x(:,1)to=x(:,2)ta=x(:,3)Then simply guess the value of n and plot the resulting K for every data point. Since the data are sorted by object temperature in the original file, we can label the X axis with to values for convenience.Code:n=.74plot(to, v ./ (to.^(4-n) - ta.^(4-n)))So we gather that K is roughly 7e11 for n=.74, but it's not a perfect fit. With different values of n the curve changes its slope but still isn't straight, here at least the average slope is about flat.And the truth is that you probably want to calculate to from v rather than v from to, so you should simulate how this calculation is affected by the parameters and minimize the error there.

author: ledtester
author_rank: Super Contributor
timestamp: August 02, 2020, 11:33:55 am
content: A video on non-linear curve fitting with Python:https://youtu.be/4vryPwLtjIY

author: floobydust
author_rank: Super Contributor
timestamp: August 02, 2020, 11:34:55 pm
content: OP, can you please stop cross-posting every question you have. Threads get abandoned, some have the schematic and details, you don't follow up or answer the questions and are generally wasting everyone's time and energy. Examples:https://forum.allaboutcircuits.com/threads/find-two-unknowns-in-equation-from-38301-dataset.171764/https://forum.allaboutcircuits.com/threads/making-thick-and-thin-tracks-wires-in-schematic-multisim.171704/https://www.eevblog.com/forum/beginners/making-thick-and-thin-tracks-wires-in-schematicmultisim/https://forum.allaboutcircuits.com/threads/curve-fit-for-sensor-equation.171176/https://www.eevblog.com/forum/beginners/curve-fit-for-sensor-equation/msg3125414/https://www.eevblog.com/forum/beginners/adc-reading-falling-overtime-when-measured/msg3118706/https://forum.allaboutcircuits.com/threads/adc-reading-falling-overtime-when-measured.171086/

author: calzap
author_rank: Frequent Contributor
timestamp: August 02, 2020, 11:38:10 pm
content: Try the solver in Excel. Click on the Data tab; then on Solver under Data Analysis. I've used it a lot for nonlinear regression.Mike in California