summaryrefslogtreecommitdiff
path: root/3311/CH9/EX9.10/Ex9_10.sce
blob: 38fce5069ff5b4c71f9fb6e825e06d05615bbe78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// chapter 9
// example 9.10
// Determine fundamental output voltage and first five dominant harmonics
// page-574
clear;
clc;
// given
Edc=280; // in V (battery voltage)
M=0.8; // modulation index
Mf=24; // carrier ratio
// calculate
E0_fund=M*Edc/sqrt(2); // calculation of Fundamental output voltage
printf("\nThe Fundamental output voltage is \t E0_rms=%.2f V",E0_fund);
printf("\n\nThe first five dominant harmonics are \t n= ")
for n=2:2:6
    N1=n*Mf-1;
    N2=n*Mf+1;
    printf("%.f, %.f, ",N1,N2);
end
printf(" ... etc");
// Note: The answer varies slightly due to precise calculation