Inverse problem, Overdetermined, Nonlinear
31 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Abdolrazzagh
el 18 de Dic. de 2025 a las 19:06
Comentada: Matt J
el 18 de Dic. de 2025 a las 22:22
consider we have this five equations
A(i) = SA/((Kf(i) - L) * phi + (Ka - N));
B(i) = SB/((Kf(i) - L) * phi + (Ka - N));
C(i) = SC/((Kf(i) - L) * phi + (Ka - N));
F(i) = SF/((Kf(i) - L) * phi + (Ka - N));
D(i) = SD/((Kf(i) - L) * phi + (Ka - N));
phi,Ka are known, single value and constant.
SA, SB, SC, SF,SD, L, N are our 7 unknowns, they are scalar and single value, across the equations they all are constant and the do not change with varing Kf
if we vary Kf from 1:3,3 we have
3 values for each A, B, C, F, D
15 equations and 7 unkowns:
A(Kf = 1) = S_A/((Kf(1) - L) * phi + (Ka - N));.
A(Kf = 2) = S_A/((Kf(2) - L) * phi + (Ka - N));
A(Kf = 3) = S_A/((Kf(3) - L) * phi + (Ka - N));
.
.
.
D(Kf = 3) = S_D/((Kf(3) - L) * phi + (Ka - N));
if we vary Kf from 1:5,5 we have
5 values for each A, B, C, F, D
25 equations and 7 unkowns
...
if we vary Kf from 1:20,20 we have
20 values for each A, B, C, F, D
100 equations and 7 unkowns
...
and we have A_measured, B_measured, C_measured, F_measured, D_measured
which they are inputs
I want to calculate these 7 unkowns with many equations that I have, which works for all equations
I want in final
coditions:
measured - predicted = 10^-12
1 comentario
John D'Errico
el 18 de Dic. de 2025 a las 20:04
Do you KNOW a solution exists ith the desired accuracty? Or do you just want that? Given that you have measured data, asking for a tight tolerance is likely to be a waste of effort. Is your data measured that accurately?
Respuestas (1)
Matt J
el 18 de Dic. de 2025 a las 19:52
Editada: Matt J
el 18 de Dic. de 2025 a las 20:10
You would use fsolve or, if you want specific constraints on the unknowns, e.g., bounds, you would use lsqnonlin.
You could also set the problem up using eqnproblem, and let the problem-based optimization engine choose the best solver for you.
SA = optimvar('SA');
SB = optimvar('SB');
SC = optimvar('SC');
SD = optimvar('SD');
SF = optimvar('SF');
L = optimvar('L');
N = optimvar('N');
prob = eqnproblem;
for i=1:nnumEquations
prob.Equations.eqA(i) = A(i) == SA/((Kf(i) - L) * phi + (Ka - N));
prob.Equations.eqB(i) = B(i) == SB/((Kf(i) - L) * phi + (Ka - N));
prob.Equations.eqC(i) = C(i) == SC/((Kf(i) - L) * phi + (Ka - N));
prob.Equations.eqF(i) = F(i) == SF/((Kf(i) - L) * phi + (Ka - N));
prob.Equations.eqD(i) = D(i) == SD/((Kf(i) - L) * phi + (Ka - N));
end
sol=solve(prob, initialGuess);
I want in final coditions: measured - predicted = 10^-12
That cannot be guaranteed. Because it is an overdetermined system, the solution will have to be a least squares solution. The minimized least squared error will be whatever the minimization problem permits. You have no control over it.
2 comentarios
Ver también
Categorías
Más información sobre Systems of Nonlinear Equations 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!