Inverse problem, Overdetermined, Nonlinear

29 Ansichten (letzte 30 Tage)
Abdolrazzagh
Abdolrazzagh am 18 Dez. 2025 um 19:06
Kommentiert: Matt J am 18 Dez. 2025 um 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 Kommentar
John D'Errico
John D'Errico vor etwa 5 Stunden
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?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Matt J
Matt J vor etwa 5 Stunden
Bearbeitet: Matt J vor etwa 5 Stunden
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 Kommentare
Torsten
Torsten vor etwa 3 Stunden
You would recommend "fsolve" for overdetermined nonlinear problems without constraints ? It might be applicable, but it's not the first choice I would think of.
Matt J
Matt J vor etwa 3 Stunden
@Torsten yes, if there were constraints, fsolve would not be applicable. You would have to use lsqnonlin.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Systems of Nonlinear Equations finden Sie in Help Center und File Exchange

Produkte


Version

R2025a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by