LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Who can help me modify nonlinear vi?

According to altenbach's nonlinear vi I made the nonlinear vi on the basis of xufit.vi,but it sometimes can't work out right results and sometimes can't calculate at all!! When the sine wave's amplitude is added to 5000, even higher, it doesn't work.
I don't know the reason. The simulate data is so close to my experiment data,Who can help me??
Thanks very much!!

E= (the amplitude of sine wave)/ d
0 Kudos
Message 1 of 7
(3,164 Views)
Hi Xuelang,

I apologize, but it is hard to do any type of troubleshooting on such a large application that you posted (especially being in a different language). If you have any specific questions, I (and I'm sure others) would be more than happy to help you further.

Thanks,
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 2 of 7
(3,134 Views)
There are some discriptions written by Chinese, but it doesn't matter.
My specific questions are:
1) how to correct xufit_0525buchufudu.vi to calculate the right result
2) how to deal with the situation that sine wave's amplitude add up to 5000V,even higher
0 Kudos
Message 3 of 7
(3,126 Views)
One possible reason is that your initial conditions are not appropriate : you used zero values as initial guess for all your coefficients. When these initial values are too far from the solution, the convergence is not guaranted.

CC
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 7
(3,118 Views)
Hi Xuelang,

OK, I had a little bit more time to look into this.

First of all, I don't like it if you modify my subVIs and repost them without comments with my name on them. If you change something (e.g. the increment step for the numeric partial derivatives), you should indicate it in the diagram, possibly with your name.

If you would simply change the increment back to 1e-6, the fit actually works with your default parameters!


However, there are several issues:

  • If you put a probe on the partial derivative, you'll notice that the partial derivative for B is always zero. Obviously, your parameters are not well balanced. B cannot be determined!

  • What is the story with your model functions? You test if one of the numbers is less than zero and then use a huge case structure where one of the wires is multiplied by -1 while the rest of the code is duplicated in the other case. You could just replace the "multiply by -1" with an "absolute value" and remove the case structure entirely. You can now even remove the entire FOR loop! 🙂

  • You should put the E and dE/dt display graph terminals inside event 1, else they get cleared by any other event.

  • As discussed before, you're surfing dangerously close to the numeric resolution. Your partial derivative for the various parameters differ by 20 orders of magnitude. As discussed before, you e.g. take the forth power of 1e6, then multiply it with 8e-12, etc. My suggestion is still to scale E and dE/dt to the range 0..1, fit it, then adjust the result AFTER the fit according to the scaling factors used. You have a full example implementation of this that I made for you long ago. It IS rock stable and there are no problems with it! 🙂

    Message Edited by altenbach on 05-28-2005 03:52 PM

  • Message 5 of 7
    (3,120 Views)
    Mr altenbach,Thanks very much for your advice!!
    First allow me apologizing for my careless mistake.Because I am not used to reading English explaination ,I remove some unnessary parts and change it into Chinese edtion without your permission in my work, I feel so sorry for that !! I'll correct it in my later work.
    "If you put a probe on the partial derivative, you'll notice that the partial derivative for B is always zero. Obviously, your parameters are not well balanced. B cannot be determined!"---------------
    Can you tell me "the partial derivative for B " in detail? Where is it?
    I've modified the vi according to your second and third advice.Now what I should do is to research the first and fourth advice.
    Thanks
    0 Kudos
    Message 6 of 7
    (3,102 Views)
    Another question:
    Does the nonlinear Lev-Mar vi have SVD (Singular Value Decompositon) part?
    Can you tell me?
    0 Kudos
    Message 7 of 7
    (3,088 Views)