- #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
Last edited: