plot between optimized switching angles and Modulation Index using Newton Raphson Method
Rohit Baranwal is right. If the simulation does not converge. Use the initial values from several steps before as Rohit showed in his comment.
In addition to my above comment, certain initial seed values can cause the program to give garbage results after a some value of Modulation index, say you start to get garbage angles once m>0.6. In that case, a suitable solution is to use the seed values till m<0.6. After that, use the solution from previous few steps as initial value for solving the problem. Something like this:
alpha1 = alpha11(ii-10)*pi/180;
alpha2 = alpha22(ii-10)*pi/180;
alpha3 = alpha33(ii-10)*pi/180;
alpha4 = alpha44(ii-10)*pi/180;
alpha5 = alpha55(ii-10)*pi/180;
The file works fine. However, there is one caveat. If the initial values are a bit too close to the actual seed values (say actual values are alpha1 = 0, alpha2 = 60 and alpha3 = 90 and you give these exact values), the Jacobian becomes singular and MATLAB can't solve for its inverse. Give the initial values slightly off from actual values and it works just fine.
hi. this was useful to understand SHE but i didn't understand on dalpha range. i tried to work out for other initial angles but graph was not proper as ans exceeds the limit,pls suggest how to work out for other initial and where the variation to be done.
spelling mistake edited