I've modeled an electrical machine by means of a magnetic equivalent circuit. I've reached to a system of equations like this $ [f(F_N)]_{N\times1}^q=[P_N]_{N\times N}^q*[F_N]_{N\times1}^q-[\phi_N]_{N\times1}^q=[0]_{N\times1}$ in which $N$ is the number of equations in my model and q is the number of iterations. $F_N$ is incognito vector while $[\phi_N]$ is known and elements of matrix $[P_N]$ are nonlinear functions of $[F_N]$ elements. if I write the first element of $[f(F_N)]_{N\times1}^{q=1}$ for example $$f(1,1)^1=\frac{1272928885778945*F1}{2361183241434822606848} -\frac{6373057529168227*F2}{18889465931478580854784} - \frac{7814242646321287}{36893488147419103232}$$
in which the $F_1$ and $F_2$ are symbolic characters at this stage
so I've taken iterative method to find them.
for $n=1,q=1$ initial guess is : $$[B]_{1\times N}^{q=1}=0$$ use$[B]$ to find $\mu$ by $$g(B)=\sum_{k=1}^K\alpha_k|B|+\delta_kln(\epsilon_k+\zeta_ke^{-\beta_k|B|})$$
$$r(B)=\frac{\mu_r}{\mu_r-1}+g(B)$$ $$\mu(B)_{n=1}^{q=1}=\mu_0\frac{r(B)}{r(B)-1}$$
here I have a loop to calculate all $[\mu(B)]_{N\times N}$ elements
$\epsilon_k,\beta_k,\delta_k,\alpha_k,\zeta_k$ constants from a given table rows with columns given by k=1,2,3,...K and
$l_a,A_a,\mu_r,\mu_0$ are static constants then
$$P(B)=\frac{A_a\mu(B)}{l_a}$$
here I have a loop to calculate all $[P(B)]_{N\times N}$ elements after this I solve $ [f(F_N)]_{N\times1}=[P_N]*[F_N]-[\phi_N]=[0]$ to obtain new $[F_N]$ vector and then obtain new $[B]$ by
$$B_i=P_i\times(F_{i-1}-F_i)$$
and place it as the new guess into the first place and loop continues until convergence to a specific value or maximum iteration number$$(e=|F_1^{new}-F_1^{old}|-K_r|F_1^{new}+F_1^{old}|-K_a\lt0)\cup (iterations=max)$$
but it doesn't converge except for points around zero and where Bshould be 0.04 it returns B=0.03 with e=317.67! what should I do ? how can I solve it right?
plot(F1),
MATLAB codes.
please anyone has any idea?
2025-01-13 09:05:08.1736759108
nonlinear system of equations solved by iteration method does not converge
282 Views Asked by Scrat68 https://math.techqa.club/user/scrat68/detail At
1
As some of the other comments, mentioned, it's hard to tell what you are doing. Here is my advice. If you are using MATLAB, you should use
fsolve
instead of whatever scheme you have come up with.fsolve
has some very sophisticated algorithms for solving nonlinear equations (Newton-Krylov, trust region methods, etc.) that have human decades of work put into them and they work. Spend some time reformulating your problem into solving $$ f(x) = 0 $$ and use the tools available to you.