Chapter 4 - Frequency Meters and Phase Meters

Example 1 - pg 4_22

In [1]:
#Chapter-4,Example4_1,pg 4-22
#calculate the value of E1 vs EAB
import math
import numpy
from matplotlib import pyplot
import warnings
warnings.filterwarnings('ignore')
%matplotlib inline
#given
E1mag=numpy.array([0, 3, 5, 7, 9, 12, 15, 18, 21])
Erms=5#given
#results
E1rms=E1mag/math.sqrt(2)
Einrms=(((E1rms)**2)+((Erms)**2))**(1./2.)
Eab=(2*math.sqrt(2)*Einrms)/math.pi
#results
pyplot.xlabel('E1(Volts)')
pyplot.ylabel('Eab(Volts)')
pyplot.title('Phase Meter')
print"E1 mag    E1 rms    Ein Rms    Eab output"
k=numpy.matrix([[0,    0,    5,    4.501],
   [3,    2.121,    5.431,    4.889],
   [5,    3.53,   6.123,    5.513],
   [7,    4.949,    7.035,    6.334],
   [9,    6.363,    8.093,    7.286],
   [12,    8.485,    9.848,    8.867],
   [15,    10.606,    11.726,    10.557],
   [18,    12.727,    13.674,    12.311],
   [21,    14.849,    15.668,    14.106  ]])
print (k)
pyplot.plot(E1mag,Eab)
print 'There is a slight error in textbook'
E1 mag    E1 rms    Ein Rms    Eab output
[[  0.      0.      5.      4.501]
 [  3.      2.121   5.431   4.889]
 [  5.      3.53    6.123   5.513]
 [  7.      4.949   7.035   6.334]
 [  9.      6.363   8.093   7.286]
 [ 12.      8.485   9.848   8.867]
 [ 15.     10.606  11.726  10.557]
 [ 18.     12.727  13.674  12.311]
 [ 21.     14.849  15.668  14.106]]
There is a slight error in textbook

Example 2 - pg 4_24

In [1]:
#Chapter-4,Example4_2,pg 4-24
#calculate the output voltage
import math
from math import sqrt
E1rms=10.
E2rms=15.
#calculations
E1m=E1rms*sqrt(2)
E2m=E2rms*sqrt(2)
#voltage across AB is proportional to E1+E2 in positive half cycle
Ep=(1/(2*math.pi))*(2*E1m+E2m)#output in positive half cycle
#voltage across AB is proportional to E1-E2 in negative half cycle
En=(1/(2*math.pi))*(2*E1m-E2m)#output in negative half cycle
Eab=Ep-En
#results
print"output voltage (V) = ",round(Eab,3)
output voltage (V) =  6.752