Inverse problem, Overdetermined, Nonlinear
조회 수: 27 (최근 30일)
이전 댓글 표시
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
John D'Errico
2025년 12월 18일
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?
답변 (1개)
Matt J
2025년 12월 18일
편집: Matt J
2025년 12월 18일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!