Chapter4-Alternating voltage and current

Ex1-pg70

In [1]:
##Ex:4.1
import math
V_m=20.;##in volts
f=50.;##in Hz
t1=2.5*10**-3;
t2=15.*10**-3;
V1=V_m*math.sin(2.*math.pi*f*t1);
V2=V_m*math.sin(2.*math.pi*f*t2);
print'%s %.2f %s'%("Voltage at 2.5ms = ",V1," V");
print'%s %.2f %s'%("\n Voltage at 15ms = ",V2," V");
Voltage at 2.5ms =  14.14  V

 Voltage at 15ms =  -20.00  V

Ex2-pg70

In [2]:
##Ex:4.2
import math
f=400.;##in Hz
T=1./f;
print'%s %.2f %s %.4f %s '%("Time period of ",f," Hz" and " waveform = ",T," sec");
Time period of  400.00  waveform =  0.0025  sec 

Ex3-pg71

In [3]:
##Ex:4.3
import math
T=40.*10**-3;##in Hz
f=1./T;
print'%s %.2f %s'%("Frequency of 40 ms waveform = ",f," Hz");
Frequency of 40 ms waveform =  25.00  Hz

Ex4-pg71

In [4]:
##Ex:4.4
import math
V_rms=240.;##in Volts
V_pk=1.414*V_rms;
print'%s %.2f %s %.2f %s' %("Peak voltage of ",V_rms," V RMS" and " voltage = ",V_pk," V");
Peak voltage of  240.00  voltage =  339.36  V

Ex5-pg71

In [5]:
##Ex:4.5
import math
I_pk=50.*10**-3;##in Amps
I_rms=0.353*I_pk;
print'%s %.2f %s'%("RMS current of 50mA peak current = ",I_rms," A");
RMS current of 50mA peak current =  0.02  A

Ex6-pg72

In [6]:
##Ex:4.6
import math
V=10.;##pk-pk voltage
r=1000.;##ohms
I_pk=V/r;##in Amps
I_rms=0.353*I_pk*1000.;##milliamps
print'%s %.2f %s'%("RMS current of 10V peak-peak voltage = ",I_rms," mA");
RMS current of 10V peak-peak voltage =  3.53  mA

Ex7-pg73

In [7]:
##Ex:4.7
import math
c=1.*10**-6;
f1=100.;
f2=10000.;
X_c1=1./(2.*math.pi*f1*c);
X_c2=1./(2.*math.pi*f2*c);
print'%s %.2f %s'%("Reactance at 100Hz = ",X_c1," mA");
print'%s %.2f %s'%("\n Reactance at 10kHz = ",X_c2," mA");
Reactance at 100Hz =  1591.55  mA

 Reactance at 10kHz =  15.92  mA

Ex8-pg73

In [8]:
##Ex:4.8
import math
V=240.;
c=100.*10**-9;
f=50.;
X_c=1./(2.*math.pi*f*c);
I_c=V/X_c;
print'%s %.2f %s'%("Current flow = ",I_c," A");
Current flow =  0.01  A

Ex9-pg74

In [9]:
##Ex:4.9
import math
L=1.*10**-3;
f1=100.;
f2=10000.;
X_L1=(2.*math.pi*f1*L);
X_L2=(2.*math.pi*f2*L);
print'%s %.2f %s'%("Reactance at 100Hz = ",X_L1," ohm");
print'%s %.2f %s'%("\nReactance at 10kHz = ",X_L2," ohm");
Reactance at 100Hz =  0.63  ohm

Reactance at 10kHz =  62.83  ohm

Ex10-pg74

In [10]:
##Ex:4.10
import math
L=1.*10**-3;
f1=100.;
f2=10000.;
X_L1=(2.*math.pi*f1*L);
X_L2=(2.*math.pi*f2*L);
print'%s %.2f %s'%("Reactance at 100Hz = ",X_L1," ohm");
print'%s %.2f %s'%("\nReactance at 10kHz = ",X_L2," ohm");
Reactance at 100Hz =  0.63  ohm

Reactance at 10kHz =  62.83  ohm

Ex11-pg74

In [11]:
##Ex:4.11
import math
C=2.*10**-6;
f=400.;
V=115.;
X_C=1./(2.*math.pi*f*C);
r=199.;
z=math.sqrt(r**2+X_C**2);
I_s=V/z;
print'%s %.2f %s'%("Reactance = ",X_C," ohm");
print'%s %.2f %s'%("\n Current = ",I_s," A");
Reactance =  198.94  ohm

 Current =  0.41  A

Ex12-pg75

In [12]:
##Ex:4.12
import math
L=150.*10**-3;
f=400.;
V=115.;
X_L=(2.*math.pi*f*L);
r=250.;
z=math.sqrt(r**2+X_L**2);
I_s=V/z;
print'%s %.2f %s'%("Reactance = ",X_L," ohm");
print'%s %.2f %s'%("\n Current = ",I_s," A")
Reactance =  376.99  ohm

 Current =  0.25  A

Ex13-pg78

In [13]:
##Ex:4.13
import math
L=100.*10**-3;
f=400.;
C=(1./(4.*math.pi*math.pi*f*f*L))*10**6;
print'%s %.2f %s'%("Capacitance required = ",C," uF");
Capacitance required =  1.58  uF

Ex14-pg78

In [14]:
##Ex:4.14
import math
L=20.*10**-3;
f=2000.;
V=1.5;
r=100.;
C=10.*10**-9;
X_L=(2.*math.pi*f*L);
X_C=1./(2.*math.pi*f*C);
z=math.sqrt(r**2+(X_L-X_C)**2);
i=V/z;
v=i*r;
print'%s %.4f %s'%("Current supplied = ",i," mA");
print'%s %.2f %s'%("\nVoltage developed = ",v," V");
Current supplied =  0.0002  mA

Voltage developed =  0.02  V

Ex15-pg81

In [15]:
##Ex:4.15
import math
N_s=120.;
V_p=220.;
N_p=2000.;
V_s=N_s*V_p/N_p;
print'%s %.2f %s'%("Secondry voltage = ",V_s," V");
Secondry voltage =  13.20  V

Ex16-pg81

In [16]:
##Ex:4.16
import math
V_p=200.;
V_s=10.;
N_p=1200.;
N_s=N_p*V_s/V_p;
i_s=2.5;
i_p=N_s*i_s/N_p;
print'%s %.2f %s'%("Secondry turns =  ",N_s,"");
print'%s %.2f %s'%("\nprimary current = ",i_p,"A");
Secondry turns =   60.00 

primary current =  0.12 A