1

I'm going to try and keep this question broad, so I apologise if it's poorly written.

I have a series of functions;

$$ \Psi_{j} = \sum_{n = 1}^{N} A_{n} \sinh{2 \pi n S_{j}} \cos{2 \pi n X_{j}} + A_{N + 1}S_{j} $$

In which $S_{j}$'s and $X_{j}$'s are known, and initial estimates of the $A_{n}$'s are provided. However, these $A_{n}$ values, when correct, should result in each $\Psi_{j}$ = 1.

My question is, is a non-linear least squares fitting method (in particular the Levenberg-Marquadt method) the correct way to go about correcting these $A_{n}$ values, such that the correct $\Psi$ results can be obtained.

My methodology to date (which seems incorrect) is to calculate the merit function as follows;

$$\chi^{2} = \sum_{j=0}^{N-1} [ \frac{\Psi_{j} - 1}{\sigma_{j}} ]^{2} $$

Where 1 is the target value for $\Psi$.

The problem itself is relating to stream-function theory. Again, I apologise if the question is too broad/specific to be of any use.

pokl90
  • 27

1 Answers1

1

You really have a matrix multiplication here. If we define a matrix $B$, with $B_{nj}= \sinh{2 \pi n S_{j}} \cos{2 \pi n X_{j}},B_{N+1,j}=S$ as a matrix equation you have $\Psi=AB$. If $B$ is square, you can invert it. If not, you are over or under constrained. In the overconstrained case, you can do least squares directly by solving the normal equations. Minimizing the sum of the squared errors works, too, but can lead to inaccuracy because you are squaring the errors and they can get very small.

Although the $B_{nj}$ are nonlinear functions of $n,j, \Psi_j$ depends linearly on the $A_i$. This makes it a linear least squares problem in the overconstrained case. Levenberg-Marquadt is usually used in non-linear cases, but it will work in linear cases as well.

Ross Millikan
  • 374,822
  • This method would then render the initial $A_{n}$ values irrelevant, yes? – pokl90 Apr 01 '16 at 13:24
  • That is correct. A linear problem will have just one solution up to floating point errors. You can use the estimates to see if anything went badly wrong. – Ross Millikan Apr 01 '16 at 13:45
  • OK. In the paper I'm trying to emulate, these $A_{n}$ values are obtained through the Gram-Schmidt process (an orthogonalisation technique, not dissimilar to what you have suggested) and then corrected using the above conditions.

    Is it correct to say the dependence upon the $A_{n}$'s is linear, as don't necessarily exhibit a linear relationship with each other? Feel free to blow me out of it here if it's a lack of comprehension of the basic principles on my part.

    – pokl90 Apr 01 '16 at 14:14
  • Yes, it is correct to say the dependence on the $A_n$ is linear because $\Psi$ is expressed as a linear combination of them. That is the point of the second paragraph. I like the discussion in chapter 15 of Numerical Recipes, free online for obsolete versions – Ross Millikan Apr 01 '16 at 14:34