0% found this document useful (0 votes)
59 views13 pages

Switching Angle Characteristics

The document describes numerical techniques to calculate switching angles for various multi-level voltage source inverters (VSI) to eliminate low order harmonics. It provides the set of equations to be solved, program code including function definitions and results for: 1) three-phase two-level VSI with two switching angles, 2) three-phase three-level VSI with two switching angles, 3) single-phase five-level VSI with two switching angles, and 4) three-phase seven-level VSI with three switching angles. The Newton-Raphson method is applied to solve the nonlinear equations using initial guesses for the switching angles.

Uploaded by

Neha Rajput
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views13 pages

Switching Angle Characteristics

The document describes numerical techniques to calculate switching angles for various multi-level voltage source inverters (VSI) to eliminate low order harmonics. It provides the set of equations to be solved, program code including function definitions and results for: 1) three-phase two-level VSI with two switching angles, 2) three-phase three-level VSI with two switching angles, 3) single-phase five-level VSI with two switching angles, and 4) three-phase seven-level VSI with three switching angles. The Newton-Raphson method is applied to solve the nonlinear equations using initial guesses for the switching angles.

Uploaded by

Neha Rajput
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

ASSIGNMENT - 02

APPLY A NUMERICAL TECHNIQUE FOR CALCULATING SWITCHING ANGLES FOR

1. THREE-PHASE TWO-LEVEL TWO-SWITCHING ANGLE VSI

Set of Equations to be solved:

𝑉1 = 1 − 2𝑐𝑜𝑠𝛼1 + 2𝑐𝑜𝑠𝛼2 = 0.6 𝑝. 𝑢


𝑉5 = 1 − 2𝑐𝑜𝑠5𝛼1 + 2𝑐𝑜𝑠5𝛼2 = 0 𝑝. 𝑢
𝑉7 = 1 − 2𝑐𝑜𝑠7𝛼1 + 2𝑐𝑜𝑠7𝛼2 = 0 𝑝. 𝑢

PROGRAM CODE:

%Function for determining the intersection point where Fundamental


voltage is
%0.6 p.u. and Fifth harmonic is eliminated

function [a,iter] = newtonm(a0,f,J) %Function common to all questions

N = 500; % define max. number of iterations


epsilon = 1e-3; % define tolerance
maxval = 10.0; % define value for divergence
aa = a0; % load initial guess
while (N>0)
JJ = feval(J,aa);
if abs(det(JJ))==0
disp('newtonm - Jacobian is singular - try new x0');
break;
end

an = aa - inv(JJ)*feval(f,aa);

if abs(feval(f,an))<epsilon
a=an;
iter = 500-N;
return;
end

if abs(feval(f,aa))>maxval
iter = 500-N;
disp(['iterations = ',num2str(iter)]);
disp('Solution diverges');
break;
end
N = N - 1;
aa = an;
end
end
Function Definitions:

%Equations relating switching angles and voltages


%f1= Fundamental voltage equation
%f2= Fifth harmonic voltage equation

function [f] = f2(a)


f1 = (0.4-(2*cosd(a(1)))+(2*cosd(a(2))));
f2 = (1-(2*cosd(5*(a(1))))+(2*cosd(5*(a(2)))));
f = [f1;f2];
end

%Determination of Jacobian Matrix

function [J] = Jacobian2x2(a)


J(1,1)= 2*sind(a(1)); J(1,2)=-2*sind(a(2));
J(2,1)= 10*sind(5*(a(1))); J(2,2)=-10*sind(5*(a(2)));
end

%Function to determine whether 5th & 7th harmonics are eliminated with
%fundamental voltage =0.6 p.u.

function [f_7] = f7(a)

f7=(1-(2*cosd(7*(a(1))))+(2*cosd(7*(a(2)))));
f_7=f7;
if f_7==0
disp('Solution Coverges');
else
disp('Soluion Diverges');
end
end
Results:

First initial guess:

a0=[45;55]

a0 =

45
55

>> f2(a0)

ans =

0.1329
2.5885

>> Jacobian2x2(a0)

ans =

1.4142 -1.6383
-7.0711 9.9619

>> [a,iter]=newtonm(a0, 'f2','Jacobian2x2')

a =

21.6368
43.1499

iter =

444

>> f7(a)
Solution Diverges

ans =

3.8182

Second initial guess:

>> a0=[72;84]

a0 =

72
84
>> f2(a0)

ans =

-0.0090
-0.0000

>> Jacobian2x2(a0)

ans =

1.9021 -1.9890
0 -8.6603

>> [a,iter]=newtonm(a0,'f2','Jacobian2x2')

a =

72.2434
84.0030

iter =

124

>> f7(a)
Solution Diverges

ans =

1.3146
2. THREE-PHASE THREE-LEVEL TWO-SWITCHING ANGLE VSI

Set of Equations to be solved:

𝑉1 = 1 − 𝑐𝑜𝑠𝛼1 + 𝑐𝑜𝑠𝛼2 = 0.6 𝑝. 𝑢


𝑉5 = 1 − 𝑐𝑜𝑠5𝛼1 + 𝑐𝑜𝑠5𝛼2 = 0 𝑝. 𝑢
𝑉7 = 1 − 𝑐𝑜𝑠7𝛼1 + 𝑐𝑜𝑠7𝛼2 = 0 𝑝. 𝑢

PROGRAM CODE:

Function definitions:

%Equations relating switching angles and voltages


%f1= Fundamental voltage equation
%f2=Fifth harmonic voltage equation

function [f] = f2(a)


f1 = 0.4-cosd(a(1))+cosd(a(2));
f2 = 1-cosd(5*(a(1)))+2*cosd(5*(a(2)));
f = [f1;f2];
end

%Determination of Jacobian Matrix

function [J] = Jacobian2x2(a)


J(1,1)= sind(a(1)); J(1,2)= -sind(a(2));
J(2,1)= 5*sind(5*(a(1))); J(2,2)= -5*sind(5*(a(2)));
end

%Function to determine whether 5th & 7th harmonics are eliminated with
%fundamental voltage =0.6 p.u.

function [f_7] = f7(a)

f7=1-cosd(7*(a(1)))+cosd(7*(a(2))));
f_7=f7;
if f_7==0
disp('Solution Coverges');
else
disp('Solution Diverges');
end
end
Results:

First initial guess:

>> a0=[10;45]

a0 =

10
45

>> f2(a0)

ans =

0.1223
-1.0570

>> Jacobian2x2(a0)

ans =

0.1736 -0.7071
3.8302 3.5355

>> [a1,iter]=newtonm(a0,'f2','Jacobian2x2')

a1 =

5.2159
53.4220

iter =

435

>> f7(a1)
Solution Diverges

ans =

1.1667

Second Initial Guess:

>> a1=[20;40]

a1 =
20
40

>> f2(a1)

ans =

0.2264
-0.7057

>> Jacobian2x2(a1)

ans =

0.3420 -0.6428
4.9240 1.7101

>> [a,iter]=newtonm(a1,'f2','Jacobian2x2')

a =

5.2149
53.4223

iter =

475

>> f7(a)
Solution Diverges

ans =

1.1667
3. SINGLE-PHASE FIVE-LEVEL TWO-SWITCHING ANGLE VSI

Set of Equations to be solved:

𝑉1 = 𝑐𝑜𝑠𝛼1 + 𝑐𝑜𝑠𝛼2 = 0.6 𝑝. 𝑢


𝑉5 = 𝑐𝑜𝑠5𝛼1 + 𝑐𝑜𝑠5𝛼2 = 0 𝑝. 𝑢
𝑉7 = 𝑐𝑜𝑠7𝛼1 + 𝑐𝑜𝑠7𝛼2 = 0 𝑝. 𝑢

PROGRAM CODE:

Function definitions:

%Equations relating switching angles and voltages


%f1= Fundamental voltage equation
%f2=Fifth harmonic voltage equation

function [f] = f2(a)


f1 = cosd(a(1))+cosd(a(2))-0.6;
f2 = cosd(5*a(1))+cosd(5*a(2));
f = [f1;f2];
end

%Determination of Jacobian Matrix

function [J] = Jacobian2x2(a)


J(1,1)=-sind(a(1)); J(1,2)=-sind(a(2));
J(2,1)=-5*sind(5*(a(1))); J(2,2)=-5*sind(5*(a(2)));
end

%Function to determine whether 5th & 7th harmonics are eliminated with
%fundamental voltage =0.6 p.u.

function [f_7] = f7(a)

f7=cosd(7*(a(1)))+cosd(7*(a(2)));
f_7=f7;
if f_7==0
disp('Solution Coverges');
else
disp('Solution Diverges');
end
end
Results:

First initial guess:

>> a0=[10;50]

a0 =

10
50

>> f2(a0)

ans =

1.0276
0.3008

>> Jacobian2x2(a0)

ans =

-0.1736 -0.7660
-3.8302 4.6985

>> [a,iter]=newtonm(a0,'f2','Jacobian2x2')

a =

5.2544
113.2537

iter =

392

>> f7(a)
Solution Diverges

ans =

1.0970

Second Initial Guess:

>> a1=[50;70]

a1 =

50
70

>> f2(a1)

ans =

0.3848
0.6428

>> Jacobian2x2(a1)

ans =

-0.7660 -0.9397
4.6985 0.8682

>> [a,iter]=newtonm(a1,'f2','Jacobian2x2')

a =

53.5996
89.5882

iter =

365

>> f7(a)
Solution Diverges

ans =

0.9147
4. THREE-PHASE SEVEN-LEVEL THREE-SWITCHING ANGLE VSI

Set of Equations to be solved:

𝑉1 = 𝑐𝑜𝑠𝛼1 + 𝑐𝑜𝑠𝛼2 + 𝑐𝑜𝑠𝛼3 = 0.6 𝑝. 𝑢


𝑉5 = 𝑐𝑜𝑠5𝛼1 + 𝑐𝑜𝑠5𝛼2 + 𝑐𝑜𝑠5𝛼3 = 0 𝑝. 𝑢
𝑉7 = 𝑐𝑜𝑠7𝛼1 + 𝑐𝑜𝑠7𝛼2 + 𝑐𝑜𝑠7𝛼3 = 0 𝑝. 𝑢

PROGRAM CODE:

Function definitions:

%Equations relating switching angles and voltages


%f1= Fundamental voltage equation
%f2=Fifth harmonic voltage equation

function [f] = f2(a)


f(1) = cosd(a(1))+cosd(a(2))+cosd(a(3))-0.6;
f(2) = cosd(5*(a(1)))+cosd(5*(a(2)))+cosd(5*(a(3)));
f(3) = cosd(7*(a(1)))+cosd(7*(a(2)))+cosd(7*(a(3)));
f=transpose(f);
return;

end

%Determination of Jacobian Matrix

function [J] = Jacobian3x3(a)


J(1,1)=-sind(a(1)); J(1,2)=-sind(a(2)); J(1,3)=-sind(a(3));
J(2,1)=-5*sind(5*(a(1))); J(2,2)=-5*sind(5*(a(2))); J(2,3)=-
5*sind(5*(a(3)));
J(3,1)=-7*sind(7*(a(1))); J(3,2)=-7*sind(7*(a(2))); J(3,3)=-
7*sind(7*(a(3)));
return ;
end

MAIN FUNCTION:

function [a,iter] = newtonm(a0)

N = 500; % define max. number of iterations


epsilon = 1e-3; % define tolerance
maxval = 1000.0; % define value for divergence
aa = a0; % load initial guess
while (N>0)
JJ = Jacobian3x3(aa);
if abs(det(JJ))==0
disp('newtonm - Jacobian is singular - try new x0');
break;
end
f=f2(aa);
an = aa- inv(JJ)*f;

if abs(f)<epsilon
a=an;
iter = 500-N;

return;

end

if abs(f)>maxval
iter = 500-N;
disp(['iterations = ',num2str(iter)]);
disp('Solution diverges');
break;
end
N = N - 1;
aa = an;

end
end

RESULTS:

First Initial Guess:

a0=[15;30;60]

a0 =

15
30
60

>> [a,iter]=newtonm(a0)

a =

59.1896
131.2711
41.6118

iter =

489

>> f2(a)

ans =
1.0e-03 *

0.2374
-0.9695
0.0252

Second Initial Guess:

>> a0=[20;100;50]

a0 =

20
100
50

>> [a,iter]=newtonm(a0)

a =

41.5618
59.1659
131.3297

iter =

429

>> f2(a)

ans =

1.0e-03 *

0.4030
-0.2943
-0.9817

You might also like