# Nonlinear least squares fit to determine Constants in given Formula

• Nov 27th 2011, 07:57 AM
tantile
Nonlinear least squares fit to determine Constants in given Formula
So I have the following two equations:

(1) \$\displaystyle F = F_0 (C_t - C_b) + F_b C_b\$
(2) \$\displaystyle Kx^2 - x(KD +KC_t +1) + KD C_t = 0\$

Here x = \$\displaystyle C_b\$

I have a set of data points that is \$\displaystyle (F_i, D_i) \$

I know \$\displaystyle C_t\$ as it is a constant.

My question is how do I use a nonlinear least squares method to get values for \$\displaystyle F_0 , F_b , \$ and \$\displaystyle K \$.

What I've tried so far is solving for x in equation (2) using the quadratic formula and likewise solving for \$\displaystyle C_b \$ in equation (1). From there, I equated the two resulting equations since x = \$\displaystyle C_b\$ and then solved for F, so I get some equation that is F = \$\displaystyle f(K, C_t, F_0 , F_b) \$.

Is this even going in the right direction? I am trying to create a MATLab program that will help in solving for these parameters, as it's something I'm going to have to solve for many data sets \$\displaystyle (F_i, D_i) \$.

Additionally, does anyone have any recommendations for textbooks I can reference in solving a problem like this as I'm at a bit of a loss in trying to solve this?
• Nov 27th 2011, 10:21 PM
CaptainBlack
Re: Nonlinear least squares fit to determine Constants in given Formula
Quote:

Originally Posted by tantile
So I have the following two equations:

(1) \$\displaystyle F = F_0 (C_t - C_b) + F_b C_b\$
(2) \$\displaystyle Kx^2 - x(KD +KC_t +1) + KD C_t \$

Here x = \$\displaystyle C_b\$

I have a set of data points that is \$\displaystyle (F_i, D_i) \$

I know \$\displaystyle C_t\$ as it is a constant.

My question is how do I use a nonlinear least squares method to get values for \$\displaystyle F_0 , F_b , \$ and \$\displaystyle K \$.

What I've tried so far is solving for x in equation (2) using the quadratic formula and likewise solving for \$\displaystyle C_b \$ in equation (1). From there, I equated the two resulting equations since x = \$\displaystyle C_b\$ and then solved for F, so I get some equation that is F = \$\displaystyle f(K, C_t, F_0 , F_b) \$.

Is this even going in the right direction? I am trying to create a MATLab program that will help in solving for these parameters, as it's something I'm going to have to solve for many data sets \$\displaystyle (F_i, D_i) \$.

Additionally, does anyone have any recommendations for textbooks I can reference in solving a problem like this as I'm at a bit of a loss in trying to solve this?

Please correct/complete (2) as it is it is just an expression.

CB
• Nov 27th 2011, 11:46 PM
tantile
Re: Nonlinear least squares fit to determine Constants in given Formula
Quote:

Originally Posted by CaptainBlack
Please correct/complete (2) as it is it is just an expression.

CB

Sorry about that! Fixed, it should be equal to 0