Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I'm using MathCAD 15.
I'm trying to solve this six-equations-six-variables system of equations. But no matter which initial guesses I use, I have not been able to solve it. Also, I'm using unitless values.
The error that is displayed is in the screenshot. Clicking "Trace Error" only leads it to saying that the problem is in α1 being undefined (which does not make sense). Randomly, it even points to some cosine or even a "2".
How do I fix this? I believe there's something very basic that I'm not paying attention to.
Thank you for your attention.
The file is attached.
Solved! Go to Solution.
Misleading/wrong error messages unfortunately are common in solve blocks.
Are you sure that a solution to your system actually exists?
If I evaluate the "find" expression symbolically (which is independent from the guesses) I get the error message "no solution found", which may make sense.
If I omit (any) one of the equations (five equations but solving for six variables) I get solutions with numerical evaluation.
I therefore wonder whether your system with the six equations can be solved at all.
I also wonder why the equations are stated in such an unnecessarily complicated way.
In the first equation, pi can be omitted and the equation divided by 2, leaving only the trigonometric functions on the left and a 2 on the right.
In all of the other five equations, the factor 2/(pi*n) can be omitted on the left.
Of course, the system still has no solution after these simplifications. However, if you change the 2 in the first equation to something like 0.5, for example, a solution emerges.
So it is obviously due to the system of equations, which probably does not actually have a solution in its original form.
You could use "minerr" instead of "find" to get a 'best' overall approximation, but the check show that the results are way off:
Misleading/wrong error messages unfortunately are common in solve blocks.
Are you sure that a solution to your system actually exists?
If I evaluate the "find" expression symbolically (which is independent from the guesses) I get the error message "no solution found", which may make sense.
If I omit (any) one of the equations (five equations but solving for six variables) I get solutions with numerical evaluation.
I therefore wonder whether your system with the six equations can be solved at all.
I also wonder why the equations are stated in such an unnecessarily complicated way.
In the first equation, pi can be omitted and the equation divided by 2, leaving only the trigonometric functions on the left and a 2 on the right.
In all of the other five equations, the factor 2/(pi*n) can be omitted on the left.
Of course, the system still has no solution after these simplifications. However, if you change the 2 in the first equation to something like 0.5, for example, a solution emerges.
So it is obviously due to the system of equations, which probably does not actually have a solution in its original form.
You could use "minerr" instead of "find" to get a 'best' overall approximation, but the check show that the results are way off:
Thank you!
In fact, my problem was the system itself.
Context, with long story short: It's a selective harmonic elimination. A wrong interpretation of the effective modulation index made me type "=2", instead of "=π/4". THAT has a solution.
wrong interpretation of the effective modulation index made me type "=2", instead of "=π/4". THAT has a solution.
?? Actually you had typed 4/pi on the right and side of the first equation
and I simplified it to
Anyway, glad you found a solution which works for you.