LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

curve fitting problem

G2S,

 

Can you include some typical data you would see from your DAQ device as well? There are some conditions that the Levenberg–Marquardt algorithm requires that may not be met by your data.

0 Kudos
Message 11 of 16
(996 Views)

Hi Brian,

 

I can try to get that for you, can you suggest a method for this ?

 

Will i put in something after the trigger and gate VI to save the output data and remove the curve fitting VI temporarily ?

 

G2S

0 Kudos
Message 12 of 16
(993 Views)

This is the data from the trigger and gate output

 

Time 10:22:18.8397081833532467982
Y_Unit_Label Volts
X_Dimension Time
X0 2.6590000000000000E+1
Delta_X 0.010000
***End_of_Header***
X_Value Voltage (Trigger) Comment
26.590000 23.415680
26.600000 23.804309
26.610000 23.905907
26.620000 24.308195
26.630000 24.636186
26.640000 24.738372
26.650000 25.053964
26.660000 25.254815
26.670000 25.414166
26.680000 25.803644
26.690000 26.111180
26.700000 26.167764
26.710000 26.349279
26.720000 26.684343
26.730000 26.832552
26.740000 26.985666
26.750000 27.147083
26.760000 27.420739
26.770000 27.754659
26.780000 27.766738
26.790000 27.839283
26.800000 28.088654
26.810000 28.179268
26.820000 28.269522
26.830000 28.364536
26.840000 28.495742
26.850000 28.719116
26.860000 28.789935
26.870000 28.821872
26.880000 28.888774
26.890000 29.036347
26.900000 29.253483
26.910000 29.323737
26.920000 29.359496
26.930000 29.287576
26.940000 29.325424
26.950000 29.576036
26.960000 29.594368
26.970000 29.685524
26.980000 29.783409
26.990000 29.740298
27.000000 29.836438
27.010000 29.986899
27.020000 30.104536
27.030000 30.096271
27.040000 30.118125
27.050000 30.137426
27.060000 30.160602
27.070000 30.279201
27.080000 30.333575
27.090000 30.387034
27.100000 30.464642
27.110000 30.491789
27.120000 30.364242
27.130000 30.400540
27.140000 30.587577
27.150000 30.600607
27.160000 30.588432
27.170000 30.488641
27.180000 30.540558
27.190000 30.785805
27.200000 30.831586
27.210000 30.769267
27.220000 30.864202
27.230000 30.838798
27.240000 30.734742
27.250000 30.840839
27.260000 30.838053
27.270000 30.961584
27.280000 31.094552
27.290000 31.011069
27.300000 30.993266
27.310000 30.978780
27.320000 30.994749
27.330000 31.042527
27.340000 31.158770
27.350000 31.054619
27.360000 30.871946
27.370000 31.069139
27.380000 31.209209
27.390000 31.156809
27.400000 31.189913
27.410000 31.235382
27.420000 31.157665
27.430000 31.150762
27.440000 31.242200
27.450000 31.326237
27.460000 31.314182
27.470000 31.156768
27.480000 31.209519
27.490000 31.386929
27.500000 31.378846
27.510000 31.141649
27.520000 31.196563
27.530000 31.490336
27.540000 31.216376
27.550000 31.255087
27.560000 31.563830
27.570000 31.454308
27.580000 31.620791
27.590000 31.721171
27.600000 31.593216
27.610000 31.545794
27.620000 31.564408
27.630000 31.542622
27.640000 31.572134
27.650000 31.702184
27.660000 31.552037
27.670000 31.546662
27.680000 31.616869
27.690000 31.595208
27.700000 31.686277
27.710000 31.585892
27.720000 31.607073
27.730000 31.717015
27.740000 31.660869
27.750000 31.650649
27.760000 31.569983
27.770000 31.497564
27.780000 31.615688
27.790000 31.757975
27.800000 31.818345
27.810000 31.753031
27.820000 31.514915
27.830000 31.564089
27.840000 31.777367
27.850000 31.571429
27.860000 31.694830
27.870000 31.877134
27.880000 31.709660
27.890000 31.781362
27.900000 31.694978
27.910000 31.754970
27.920000 31.893024

0 Kudos
Message 13 of 16
(987 Views)

G2S,

 

I received the error: No optimum found, and this is likely because your data does not follow an exponential curve, it looks closer to a logarithmic curve or a polynomial. I recommend using a polynomial model for this data and increasing the order until you get the fit you would like.

0 Kudos
Message 14 of 16
(969 Views)

Now I get an error that says the input sequences must be the same size ? ? ? 

0 Kudos
Message 15 of 16
(962 Views)

G2S,

 

I was able to recreate this error. This error occurs because the size of the input to your Signals input of the Curve Fitting Express VI is different from the size of the array that is created using the for loop in your code. Make sure the number of samples you are taking is equal to the size of the loop created in the for loop.

 

Jordan G.

 

LabVIEW Product Marketing Engineer
National Instruments
0 Kudos
Message 16 of 16
(934 Views)