blob: 815685ca8d2ea55eb8d2bc0c7648fd737e56cea0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//Ex11_4
clc
//according to the given eqution for output current, we have:
I1 = 5.0
I2 = 0.9
I3 = 0.6
I4 = 0.3
I5 = 0.01
D2 = I2/I1// second harmonic distortion
D3 = I3/I1//third harmonic distortion
D4 = I4/I1//fourth harmonic distortion
D5 = I5/I1//fifth harmonic distortion
disp("I1 = "+string(I1)+"A")
disp("I2 = "+string(I2)+"A")
disp("I3 = "+string(I3)+"A")
disp("I4 = "+string(I4)+"A")
disp("I5 = "+string(I5)+"A")
disp("D2 = I2/I1 = "+string(D2))
disp("D3 = I3/I1 = "+string(D3))
disp("D4 = I4/I1 = "+string(D4))
disp("D5 = I5/I1 = "+string(D5))
D = [(D2^2)+(D3^2)+(D4^2)+(D5^2)]^(1/2)//total harmonic distortion
disp("D = [(D2^2)+(D3^2)+(D4^2)+(D5^2)]^(1/2) = "+string(D*100)+"%")
|