LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slope of non linear curve

Solved!
Go to solution

Hi Christian,

 

Does the diode equation shown below suffice.?

diode.jpg 

Regards

Deepu Jacob

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 11 of 24
(1,938 Views)

@djac91 wrote:

 

Does the diode equation shown below suffice.?

 


This has no resemblance to the default pre-8.0 nonlinear model you were using. (there is only one linear model, but an infinite amount of different nonlinear models, but only one is appropriate!)

 

So yes, once you define what the dependent and indepdendent variable is and what the fitting parameter and constants are, you would implement it as a model for nonlinear fit. Then fit the data to it after providing reasonable estimates for the fitting parameters (correct sign, ~correct order of magnitude, etc). See how far you get.

 

 

0 Kudos
Message 12 of 24
(1,930 Views)
Solution
Accepted by topic author aidasaufi

Hi aida,

 

I got a set for data corresponding to IN4007 diode from a website. Based on that i did some analysis and found that a simple exponential fit is sufficient for the data.

The same method seems to be suitable for the diode you are using.

 

I have made a vi to demonstrate this as shown below. VI has been attached(unzip the file).

 

VI Chara- IN4007.jpg

 

 

Run the Vi and move the cursors. you can see the dynamic resistance value for the selected point. 

 

Note: As christian earlier suggested, this method might me little overdoing of things, but seems to work.

 

Christian, what do you think?

 

Best Regards

Deepu Jacob

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 13 of 24
(1,921 Views)

djac91 wrote: 

Christian, what do you think?

 


  • It annoys me if small VIs have the front panel and diagram maximised to the screen, especially when using a big monitor.
  • The theoretical model given earlier is an exponential with offset, you fit it to an exponential without offset (look at the default for the "parameter bounds" input). I would recommend the nonliear fit with the correct model.
  • The y and dy/dx can easily be calculated from the best fit parameters for any x without any need for all these approximate numerical methods.
  • The timeout event can be deleted.
  • You don't need to wire the indices of Index array if the desired elements are in sequence starting with index 0.
0 Kudos
Message 14 of 24
(1,901 Views)
Solution
Accepted by topic author aidasaufi

Here's what I have in mind using the nonlinear model. See if it works for you. 😄

(quick draft, please check for bugs).

 

(I am doing a simple numerical derivative with a delta of 1e-6, you can easily program an analytical version, of course)

 

 

0 Kudos
Message 15 of 24
(1,892 Views)

Yes, this seems work. May i know what this "?" function ; calc dR , apparently I do not have this function

0 Kudos
Message 16 of 24
(1,875 Views)

Sorry I accidentally click as solution. But it almost to solution Smiley Happy

0 Kudos
Message 17 of 24
(1,870 Views)

Hi Christian,

Thank you,

 I understand the flow on how to get the slope from your vi but when I calculated it manually, I select point 749.73mV and draw the tangent line, the value of slope is different thus affect the dynamic resistance value. The calculation is on the image. 

0 Kudos
Message 18 of 24
(1,858 Views)

@aidasaufi wrote:

 

 I understand the flow on how to get the slope from your vi but when I calculated it manually, I select point 749.73mV and draw the tangent line, the value of slope is different thus affect the dynamic resistance value. The calculation is on the image. 


Of course the values will be slightly different, because my solution is much more precise.

Still, 637mOhm is very close to 0.667Ohm (= 667mOhm or within 5%!), so I would say they agree, more or less, but my value is much more accurate, of course. Note that I format with SI units. You can change the formatting of the indicator if you don't like it.

Message 19 of 24
(1,833 Views)

Hi Christian,

 

That's a great example. Thank you for sharing.

 

However, after looking at the diode fitting model vi,i found that a '-1' is missing from the equation. Did you omitted that by mistake or is it purposeful for some reason?

 

DiodeEquationModel.vi_Block_Diagram.jpg

 

The results are slightly different if  '-1' is included.

 

I assume that the model vi was sketched out of some standard template. If yes, what is the purpose for the 'output control'(unused in this case).

I'm looking forward to using this fitting technique (with a model vi) wherever suitable.Smiley Wink

 

Best Regards

Deepu Jacob

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 20 of 24
(1,798 Views)