Dealing with a nonlinear system of equations.

In summary, the conversation is about trying to solve a non-linear 11x11 system in order to eliminate harmonics in a power inverter. The individual has tried using Excel's Solver and fsolve, but both have been unsuccessful. They have also provided the code used in Scilab. There is a discussion about the possibility of using papers published by IEEE on this topic, but the individual only has formulas given by their professor. Another person suggests using a different type of inverter for more flexibility in suppressing harmonics. There is also a suggestion to solve the equation for cos(a) using software like Mathcad or Maple. The conversation ends with a discussion on the best approach for finding the solution, with the suggestion of trying all possible
  • #1
1f5
12
1

Homework Statement



Hello everyone.

I'm trying to solve a non linear 11x11 system. (for eliminate harmonics in a power inversor)
I used Excel's Solver but it didn't work. (Solver couldn't solve the system). Then I found fsolve (a scilab function) but again it didn't work
I will attach the code used.

Homework Equations




The system is:

cos(na)-cos(nb)+cos(nc)-cos(nd)+cos(ne)-cos(nf)+cos(ng)-cos(nh)+cos(ni)-cos(nj)+cos(nk)=0
The letters are the unknown angles which are desired.
n represent the number of the harmonic because harmonics 3rd, 5th, 7th, 9th,11th, 13th, 15th, 17th, 19th, 21st, 23rd must be eliminated. They are 11 angles so there are 11 simultaneous equations to solve to find the angles which can eliminate those harmonics.

Who knows another method to solve the system?


The Attempt at a Solution



When i change the initial value in the script i got different solutions, when i substitute I found out that solution is actually false.

code used in Scilab:




clear
function t1 = system (a)
fa(1)= cosd(3*a(1)) - cosd(3*a(2)) + cosd(3*a(3))- cosd(3*a(4))+ cosd(3*a(5))-cosd(3*a(6))+ cosd(3*a(7))-cosd(3*a(8))+cosd(3*a(9))- cosd(3*a(10))+cosd(3*a(11));
fa(2)= cosd(5*a(1)) - cosd(5*a(2)) + cosd(5*a(3))- cosd(5*a(4))+ cosd(5*a(5))-cosd(5*a(6))+ cosd(5*a(7))-cosd(5*a(8))+cosd(5*a(9))- cosd(5*a(10))+cosd(5*a(11));
fa(3)= cosd(7*a(1)) - cosd(7*a(2)) + cosd(7*a(3))- cosd(7*a(4))+ cosd(7*a(5))-cosd(7*a(6))+ cosd(7*a(7))-cosd(7*a(8))+cosd(7*a(9))- cosd(7*a(10))+cosd(7*a(11));
fa(4)= cosd(9*a(1)) - cosd(9*a(2)) + cosd(9*a(3))- cosd(9*a(4))+ cosd(9*a(5))-cosd(9*a(6))+ cosd(9*a(7))-cosd(9*a(8))+cosd(9*a(9))- cosd(9*a(10))+cosd(9*a(11));
fa(5)= cosd(11*a(1)) - cosd(11*a(2)) + cosd(11*a(3))- cosd(11*a(4))+ cosd(11*a(5))-cosd(11*a(6))+ cosd(11*a(7))-cosd(11*a(8))+cosd(11*a(9))- cosd(11*a(10))+cosd(11*a(11));
fa(6)= cosd(13*a(1)) - cosd(13*a(2)) + cosd(13*a(3))- cosd(13*a(4))+ cosd(13*a(5))-cosd(13*a(6))+ cosd(13*a(7))-cosd(13*a(8))+cosd(13*a(9))- cosd(13*a(10))+cosd(13*a(11));
fa(7)= cosd(15*a(1)) - cosd(15*a(2)) + cosd(15*a(3))- cosd(15*a(4))+ cosd(15*a(5))-cosd(15*a(6))+ cosd(15*a(7))-cosd(15*a(8))+cosd(15*a(9))- cosd(15*a(10))+cosd(15*a(11));
fa(8)= cosd(17*a(1)) - cosd(17*a(2)) + cosd(17*a(3))- cosd(17*a(4))+ cosd(17*a(5))-cosd(17*a(6))+ cosd(17*a(7))-cosd(17*a(8))+cosd(17*a(9))- cosd(17*a(10))+cosd(17*a(11));
fa(9)= cosd(19*a(1)) - cosd(19*a(2)) + cosd(19*a(3))- cosd(19*a(4))+ cosd(19*a(5))-cosd(19*a(6))+ cosd(19*a(7))-cosd(19*a(8))+cosd(19*a(9))- cosd(19*a(10))+cosd(19*a(11));
fa(10)= cosd(21*a(1)) - cosd(21*a(2)) + cosd(21*a(3))- cosd(21*a(4))+ cosd(21*a(5))-cosd(21*a(6))+ cosd(21*a(7))-cosd(21*a(8))+cosd(21*a(9))- cosd(21*a(10))+cosd(21*a(11));
fa(11)= cosd(23*a(1)) - cosd(23*a(2)) + cosd(23*a(3))- cosd(23*a(4))+ cosd(23*a(5))-cosd(23*a(6))+ cosd(23*a(7))-cosd(23*a(8))+cosd(23*a(9))- cosd(23*a(10))+cosd(23*a(11));
endfunction

a0 = [0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1];
[ar, v, info] = fsolve(a0, system);
disp(ar)
disp(info)
 

Attachments

  • aswereqw.JPG
    aswereqw.JPG
    8.4 KB · Views: 495
Last edited:
Physics news on Phys.org
  • #2
Are you familiar with the papers on this topic that have been published by the IEEE? If so, which papers do you have? I may be able to steer you to some others.
 
  • #3
No, my professor gave me only the Fourier coefficients formulas, with these formulas i obtained those equations from the previous post. I solved a previous exercise with Excel (there were only 3 equations, instead of 11).

Thanks in advance.
 
  • #4
Varied considerations, I just couldn't resist...

Here you've chosen a single-ended inverter, sadly for you. An H bridge would give you three voltages +V, 0, -V with more flexibility, like the 1/3 2/3 waveform that suppresses harmonics 3 9 15 21. A three-phase output would do the same for free. Needs fewer transitions per period. A multi-phase inverter, like those feeding a Cpu, does essentially the same to reduce the ripple with one transition per period on each output.

Solving the equation for c=cos(a) would make it a set of polynomial equations, which I believe to remember is solved by Mathcad or Maple. That is, cos(3a) comprises cos(a) and cos3(a) and so on for higher powers, which you find through cos(a)=[exp(j*a)+exp(-j*a)]/2. Reinjecting the lower-power equations in the higher ones would then simplify them, possibly to contain only the highest power.

You can perfectly write a dumb software that tries all possible angles. a1 to a11 are between 0° and 90° and are in strict increasing order, so if you try all even degree angles between 2° and 88° you have 3411/11! combinations or 2 billions. Precompute 11 tables of 44 angles for cos(n*a), avoid repeated computations in nested loops, and a single Cpu takes 50 cycles per trial or 30s at 3GHz, without SSE nor multicore. Take the RMS power as a fast figure of merit.

Then, refine your solution within the (2°)11 hypervolume.

More subtle, you could keep a few near-best solutions that aren't local to an other, in case the best one is technologically bad, say if the transitions are too close to an other. Or if the 2° sampling let's you miss the true best solution.

Good luck, I had spent a few thought at this dream when I was a student.
 
  • #5




I understand the frustration of dealing with a nonlinear system of equations. These types of systems can be difficult to solve and often require advanced mathematical techniques. In this case, it seems that you have tried using Excel's Solver and a Scilab function, but have not been successful in finding a solution.

One possible approach to solving this system could be to use an iterative method, such as Newton's method or the secant method. These methods involve making an initial guess for the unknown variables and then using a series of calculations to refine the solutions until they converge to a desired accuracy.

Another option could be to use a numerical optimization algorithm, such as the Nelder-Mead algorithm or the genetic algorithm. These algorithms are designed to find the optimal solution to a given problem, and could potentially be applied to your system of equations.

It is also worth considering whether there may be any simplifications or approximations that could be made to the system in order to make it easier to solve. This could involve reducing the number of unknown variables, or using trigonometric identities to simplify the equations.

Overall, solving a nonlinear system of equations can be a challenging task, but with perseverance and a thorough understanding of the problem, a solution can be found. I would recommend consulting with a mathematics expert or seeking out additional resources to assist with finding a solution to your specific system.
 

FAQ: Dealing with a nonlinear system of equations.

What is a nonlinear system of equations?

A nonlinear system of equations is a set of equations that cannot be expressed in the form of y = mx + b, where x and y are variables and m and b are constants. In other words, the equations do not form a straight line on a graph.

Why is dealing with a nonlinear system of equations difficult?

Unlike linear systems of equations, nonlinear systems do not have a simple and straightforward solution method. They often involve complex mathematical operations, such as finding roots or solving simultaneous equations, which can be challenging to solve.

What are some real-life applications of nonlinear systems of equations?

Nonlinear systems of equations are commonly used in physics, engineering, and economics to model complex systems that cannot be accurately represented by linear equations. Examples include predicting the trajectory of a rocket, analyzing the stability of a bridge, or optimizing production processes in a factory.

Can a nonlinear system of equations have multiple solutions?

Yes, a nonlinear system of equations can have multiple solutions. In fact, many real-life problems have multiple solutions that can represent different scenarios or outcomes. It is important to carefully analyze the equations and their solutions to determine which one is the most appropriate for a given situation.

What are some strategies for dealing with a nonlinear system of equations?

One strategy for solving nonlinear systems is to use numerical methods, such as iteration or approximation, to find an approximate solution. Another approach is to use technology, such as graphing calculators or computer programs, to visualize and analyze the equations. Additionally, it can be helpful to simplify the equations or manipulate them algebraically to make them easier to solve.

Similar threads

Replies
7
Views
3K
Replies
5
Views
8K
Replies
8
Views
2K
Replies
10
Views
2K
Replies
12
Views
1K
Replies
2
Views
1K
Replies
5
Views
2K
Replies
14
Views
1K
Replies
24
Views
2K
Replies
7
Views
3K
Back
Top