How do I solve this set of equations? - an overdetermined non-linear system -
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am wondering what my best approach is in the following scenario. I have 8 unknowns, however a virtually unlimited number of observations (Catime(x), Mgtime(x) and Srtime(x)) which makes the system over-determined.
unknowns:
U M V N J S W N
equations:
U*M + V * Catime1 – V*M – Mgtime1 = 0
J*M + W * Catime1 – W*M – Srtime1 = 0
U*N + V * Catime2 – V*N – Mgtime2 = 0
J*N + W * Catime2 – W*N – Srtime2 = 0
U*S + V * Catime3 – V*S - Mgtime3 = 0
J*S + W * Catime3 – W*S - Srtime3 = 0
U*T + V * Catime4 – W*S - Mgtime4 = 0
J*T + W * Catime4 – W*S - Srtime4 = 0
How do I approach this?
0 comentarios
Respuestas (1)
Roger Stafford
el 13 de Jun. de 2013
You should probably seek the set of unknowns that yields the least sum of squares of your expressions on the left sides of the equations. For this purpose if you have the Optimization Toolbox, I suggest one of the three functions, 'lsqnonlin', 'fminunc', or 'fminsearch'.
With 'lsqnonlin' you will need to write an objective function of your eight variables which expresses the value of all the terms of the equations' left sides. (I assume the vectors Catime, Mgtime, and Mgtime are column vectors and have the same number of elements, this being a multiple of 4.) Your function would look like this:
F = [U*M+V*Catime(1:4:end)–V*M–Mgtime(1:4:end);
J*M+W*Catime(1:4:end)–W*M–Srtime(1:4:end);
U*N+V*Catime(2:4:end)–V*N–Mgtime(2:4:end);
(eight of these altogether)];
With 'fminunc' and 'fminsearch' it is necessary to compute the sum of squares yourself as the objective function. It would look like this
F = sum((U*M+V*Catime(1:4:end)–V*M–Mgtime(1:4:end)).^2)+...
sum((J*M+W*Catime(1:4:end)–W*M–Srtime(1:4:end)).^2)+...
sum((U*N+V*Catime(2:4:end)–V*N–Mgtime(2:4:end)).^2)+...
(eight of these);
In my opinion the main difficulty you will face is devising initial estimates for these optimization functions in such a way as to obtain the true minimum rather than possibly some local one. That may not be an easy task.
I have two questions about your description. Your list of unknowns does not include T and has N twice. I assume this is an oversight. Secondly the last two equations do not seem to follow the pattern established in the first six. I would have expected them to be:
U*T + V*Catime4 – V*T - Mgtime4 = 0
J*T + W*Catime4 – W*T - Srtime4 = 0
Is that also an oversight?
3 comentarios
Roger Stafford
el 13 de Jun. de 2013
If T is not an unknown, what are your "8 unknowns"? I count only seven.
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!