summaryrefslogtreecommitdiff
path: root/728/CH3/EX3.4/Ex3_4.txt
blob: 1b320a4bbc51673dcdd0294644873c881f08cafd (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
//Caption:Calculate (a)-Current drawn from generator. (b)-Magnitune & phase of load current. (c)-Power delivered to load.
//Exa: 3.4
clc;
clear;
close;
f=37.5*10^6;//frequency(in hertz)
wl=(3*10^8)/f;//wavelength (in meters)
Z_l=100;//in ohms
Z_o=200;//in ohms
l=5*wl/4;//length of line (in meters)
b=2*%pi/wl;
//At generator end,
Z_i=Z_o*(Z_l+%i*Z_o*tan(b*l))/(Z_o+%i*Z_l*tan(b*l));
V_s=200*Z_i/(200+Z_i);
I_s=200/(200+Z_i);
disp(real(I_s),"Current drawn from generator(in amps) =");
//for a lossless line , P(avg)*I_input=P(avg)*I_load
P_avg=V_s*I_s;//in watts
disp(real(P_avg),"Power delivered to load (in watts) =)");
//Real(Vs*Is)=Real(Vs*I_load)
I_load=(P_avg/Z_l)^0.5;//in amps
disp(real(I_load),"Current flowing in load (in amps) =)");