LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use a complex model with levenberd-marquardt vi

I am trying to use the Levenberg-Marquardt vi. My problem is that I have a model that predicts a complex valued impedance spectrogram. The model requires for input the 3 parameters as well as a collected complex valued data vector also as input to produce a prediction for a complex valued impedance spectrogram vector. I want to use the LM vi to curve fit the 3 parameters against a seperately collected experimental impedance spectrogram. Can this be done or is this a limitation to LabView V6.02 at the present. I have looked all over the website and found no reference to using a complex valued model in conjunction with either of the 2 LM vi's supplied.

Thanks many,
jim
0 Kudos
Message 1 of 2
(2,519 Views)
Jim,

I looked into the Levenberg-Marquardt VI and it does not appear to support complex numbers. The X and Y arrays are doubles, not complex numbers; therefore you will not be able to use the VIs as they are.

The code is all open source so you could attempt to modify it so it would support the complex numbers. Another idea I had was to try to break the complex number up into either real and imaginary, or r and theta, and feed those arrays into the algorithm, however it only accepts 1-D arrays as inputs, so again you would have to modify the code to handle 2-D arrays as inputs.

I am not sure if there is any way to do it , but if you could convert the complex data set into a single dimension number and modify the model to handle the change in the data you coul
d use the VIs as is. Like I said I am not sure if this is a possible solution but it is an idea.

Happy Coding

Evan
0 Kudos
Message 2 of 2
(2,519 Views)