Site hosted by Angelfire.com: Build your free website today!
< previous page page_92 next page >

Page 92
Determination of Characteristic Measuring Parameters
In the practice of measurement, you often have to match your data to prescribed models; in some cases, you can find the right fit by using known formulations like polynomials or trig functions.
Usually, given pairs of measured values (xi,yi), you interpret yi as the actual measured value at the instant xi, with the index i running from 1 to the final value of n. Also, you can assume that the model equation y=f(a,x) is given. The parameter a might consist of several individual components. Your goal is to find an a such that the sum
0092-01.GIF
turns out to be as small as possible. This is the classic least-squares approach.
In practice, we often solve this problem by using the Levenberg-Marquardt method (Press et al. 1993), which also works with nonlinear functions. LabVIEW's Advanced Analysis library offers the Levenberg-Marquardt method, but you have to fix the functional model f(a,x) while you're programming.
You'll get more degrees of freedom if you use the G Math Toolkit. The benefits in this case are the free input of the model equation in the form of symbols on the front panel and the ability to use all the functions known by the parser. The distinction between model parameters and independent variables is performed by appropriate components of a cluster.
Figure 6.9 shows how to handle a fitting problem. To make things easier to understand, the initial data wasn't generated by a measurement process. Rather, it came from another G Math Toolkit feature: the ability to generate arbitrary function values for a prescribed equation. In this case, you can use random terms in the definition, thus giving rise to a true fitting problem. If the originally specified function and the model equation have an identical or at least a very similar structure, you can easily check whether the expected parameters and the actual ones really correspond. In the diagram you see the use of two VIs from the toolkitone to evaluate the formula and the other to do the fit.
Gyroscopic Motion in 3-D Space
Now let's briefly look at G Math's capabilities in solving differential equations. The toolkit gives you access to methods according to Euler, Runge-

 
< previous page page_92 next page >