From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-28-2020 01:18 AM
@Vindhyachal.Takniki wrote:
Sorry PFA the VI.
You change the order of columns. Now the last column is z so you need to rewire the columns coming out of the index array so they are correct. The last column now seems to be Z..
06-28-2020 01:34 AM
After wiring correctly, I get the following for the max deviation:
Polynomial Order. dev=x
06-28-2020 02:14 AM
Sir,
It simple multiplications of variables only which isnot giving right results.
Labview gives almost zero error +-0.02 which is very good
I am saying is that there could be error in selection which degree of plunomoial like x or y or x2y to multiplied with which coefficient. It could be error.
Its not even c code, its simple mathematical equation which is giving error.
So must be mismatch
06-28-2020 02:20 AM
Oh didnt read your last two replies.
Yes i had changed the columns of data, didnt changed any wiring though, since I changed the columns only.
Its not even a c code, its simple math equation.
What I suspect we are multiplying wrong coefficent orders with wrong poly factor.
void get_value(float32_t x , float32_t y)
{
float32_t x2 = x * x;
float32_t x3 = x2 * x;
float32_t y2 = y * y;
float32_t y3 = y2 * y;
float32_t xy = x * y;
float32_t x2y = xy * x;
float32_t xy2 = xy * y;
float32_t z;
z = (-0.856405103370700971000000f)
+(1.063190618820774920000000f * x)
+(14.209914285379092300000000f * y)
+(-0.001525431973314523430000f * x2)
+(-0.110425437452562752000000f * xy)
+(-0.561650715977711323000000f * y2)
+(0.000112007671458926302000f * x3)
+(0.000361024027398679400000f * x2y)
+(0.002619887991367739200000f * xy2)
+(-0.009204815618802958400000f * y3);
}
06-28-2020 09:43 AM
I don't understand why you keep attaching the same files. Once is enough. If you attach a new and different file, give it a new name. Also please exclusively use zip archives. Not everybody has tools that can open rar files.
@Vindhyachal.Takniki wrote:Yes i had changed the columns of data, didnt changed any wiring though, since I changed the columns only.
Well, if you reassign the columns, you also need to change the wiring.
@Vindhyachal.Takniki wrote:
z = (-0.856405103370700971000000f)
+(1.063190618820774920000000f * x)
+(14.209914285379092300000000f * y)
+(-0.001525431973314523430000f * x2)
+(-0.110425437452562752000000f * xy)
+(-0.561650715977711323000000f * y2)
+(0.000112007671458926302000f * x3)
+(0.000361024027398679400000f * x2y)
+(0.002619887991367739200000f * xy2)
+(-0.009204815618802958400000f * y3);
These numbers have no resemblance to the best fit. Where do they come from? I think a handful of significant digits is probably sufficient.
06-30-2020 08:02 AM
Thanks @altenbach,
A) Able to sort out the issue. Now I got the equation which is +-0.1 error. This is acceptable
Able to make equation for around 1500 data set and they work best for me
B) Now I want to extend it to further entire range of sensor data roughly 38000 data-set.
1st column is "z". Second column is "x" . Third column is "y"
Z = Fun(x,y)
x is temperature measured
y is voltage measured
C) PFA two files:
1. test RI_2Dpolynomial.vi
2. test RI_2Dpolynomial-set2.vi
Only diff is dataset representation. Dataset is same though
1. First file have dataset arranged in increasing order of temperature("x") i.e 0 to 50 and then again 0 to 50 and so on
2. Second have dataset in which "x" is kept same for 751 readings and then "x" is incremented by 1 and so on
Both datasets are same.
Reason is I think since not good fit model comes out, it seems like need to break data into multiple set points and make equation for each dataset.
07-01-2020 01:09 AM
Hi @altenbach,
Can u tell?
How to do it?
I have tried to break data into three parts and see equation, but still its very large error fit.
07-01-2020 08:34 AM
You still have xyz wired incorrectly.
07-01-2020 11:22 AM
Once you wire xyz correctly, both arrangement of the dataset give 100% identical results!
You really need to try to understand how all this works. This has been going on for over a week now !:
07-02-2020 12:58 AM
Hi @altenbach
Thanks for reply.
I think we are taking correct wiring. I think there is some confusion, due to me in first two replies, as i had confused VI.
PFA the data set, this is dataset we want to fit.
Column 1 is Z
Column 2 is x
Column 3 is y
We want to make equation with Z=Fun(x,y).