blob: 138970588c77bf6d9058f23445aad26932f0b606 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
clc
disp("Problem 11.16")
printf("\n")
printf("Given")
disp("Vg=100V(rms)")
disp("Zg=1+i Z1=2")
Vg=100;
disp("a)")
Zg=1+%i;
Z1=2
Z=Z1+Zg
Zmag=sqrt(real(Z)^2+imag(Z)^2)
I=Vg/Zmag
PZ1=real(Z1)*(I^2)
Pg=real(Zg)*(I^2)
PT=PZ1+Pg
printf("PZ=%dW\n Pg=%dW\n PT=%dW\n",PZ1,Pg,PT);
disp("b)")
//If Z2=a+i*b
//Zg*=1-i
//Given that
//(Z1*Z2)/(Z1+Z2)=1-i
//As Z1=2 and solving for Z2
disp(-%i,"Z2=")
disp("c)")
//If Z2 is taken the value as calculated in b) then Z=1-i
Zg=1+%i;
Z1=2;
Z=1-%i;
Zt=Z+Zg
Zmag=sqrt(real(Zt)^2+imag(Zt)^2)
I=Vg/Zmag
PZ=real(Z)*(I^2)
Pg=real(Zg)*(I^2)
//To calculate PZ1 and PZ2 we need to first calculate IZ1 nad IZ2
VZ=I*(1-%i)
IZ1=VZ/Z1
IZ1mag=sqrt(real(IZ1)^2+imag(IZ1)^2)
PZ1=real(Z1)*(IZ1mag^2)
PZ2=PZ-PZ1
PT=PZ1+PZ2+Pg
printf("PZ=%dW\n Pg=%dW\n PT=%dW\n",PZ,Pg,PT);
|