In [21]:

```
# To find the maximum time
# Modern Electronic Instrumentation And Measurement Techniques
# By Albert D. Helfrick, William D. Cooper
# First Edition Second Impression, 2009
# Dorling Kindersly Pvt. Ltd. India
# Example 6-3 in Page 144
# Given data
R = 100*(10**3) # Value of resistance in ohm
C = 0.1*(10**-6) # The value of integrating capacitor in F
V_ref = 2 # The reference voltage in V
V_out = 10 # The maximum limit of the output in V
#Calculations
T = R*C
print "The integrator time constant = ",T," s"
V_s = V_ref/T #Unit is V/s
V = 1/V_s
print "Therefore the integrator output = ",V," s/V \nTherefore to integrate 10V "
T_max = V*V_out #The max time the ref voltage can be integrated
print "The time required = ",T_max," s"
#Result
# The integrator time constant = 0.010 s
# Therefore the integrator output = 0.005 s/V
# Therefore to integrate 10V
# The time required = 0.0500 s
```

In [22]:

```
# To find the distributed capacitance
# Modern Electronic Instrumentation And Measurement Techniques
# By Albert D. Helfrick, William D. Cooper
# First Edition Second Impression, 2009
# Dorling Kindersly Pvt. Ltd. India
# Example 6-4 in Page 162
# Given data
# Frequency measurements in Hz
f_1 = 2*10**6
f_2 = 4*10**6
# Value of tuning capacitor in F
C_1 = 460*10**-12
C_2 = 100*10**-12
#Calculations
C_d = (C_1-(4*C_2))/3
print "C_d = ",round(C_d,13)," F\n"
print "i.e The value of the distributed capacitance = ",round(C_d*10**12,1)," pF"
#Result
# C_d = 2E-011 F
# i.e The value of the distributed capacitance = 20 pF
```

In [14]:

```
# To find the self capacitance
# Modern Electronic Instrumentation And Measurement Techniques
# By Albert D. Helfrick, William D. Cooper
# First Edition Second Impression, 2009
# Dorling Kindersly Pvt. Ltd. India
# Example 6-5 in Page 162
# Given data
# Values of frequencies in Hz
f_1 = 2*10**6
f_2 = 5*10**6
# Values of the tuning capacitors in F
C_1 = 450*10**-12
C_2 = 60*10**-12
#Calculations
#Using the equation f = 1/(2*%pi*sqrt(L*(C_2+C_d)))
#Since f_2 = 2.5*f_1
#Equating & reducing the equations
# 1/(C_2 +C_d) = 6.25/(C_1 +C_d)
C_d = (C_1 -6.25*C_2)/5.25
print "C_d = ",round(C_d,13)," F\n"
print "i.e The value of the distributed capacitance = ",round(C_d*10**12,1)," pF"
#Result
# C_d = 1.43E-011 F
# i.e The value of the distributed capacitance = 14.3 pF
```

In [11]:

```
# To find percentage error
# Modern Electronic Instrumentation And Measurement Techniques
# By Albert D. Helfrick, William D. Cooper
# First Edition Second Impression, 2009
# Dorling Kindersly Pvt. Ltd. India
# Example 6-6 in Page 163
# Given data
R = 10 #Resistance of the coil in ohm
f = 1*10**6 #The oscillator frequency in Hz
C = 65*10**-12 #The value of resonating capacitor in F
R_i = 0.02 #The value of the insertion resistor in ohm
#Calculations
w = 2*math.pi*f
Q_e = 1/(w*C*R)
print "The effective Q of the coil = ",round(Q_e,1),"\n"
Q_i = 1/(w*C*(R+R_i))
print "The indicated Q of the coil = ",round(Q_i,1),"\n"
percenterror = (Q_e - Q_i)/Q_e*100
print "The percentage error is = ",round(percenterror,1)," %"
#Result
# The effective Q of the coil = 244.9
# The indicated Q of the coil = 244.4
# The percentage error is = 0.2 %
```

In [1]:

```
# To find percentage error
# Modern Electronic Instrumentation And Measurement Techniques
# By Albert D. Helfrick, William D. Cooper
# First Edition Second Impression, 2009
# Dorling Kindersly Pvt. Ltd. India
# Example 6-7 in Page 163
# Given data
R = 0.1 #Resistance of the coil in ohm
f = 40*10**6 #The frequency at resonance in Hz
C = 135*10**-12 #The value of tuning capacitor in F
R_i = 0.02 #The value of the insertion resistor in ohm
#Calculations
w = 2*math.pi*f
Q_e = 1/(w*C*R)
print "The effective Q of the coil = ",ceil(Q_e),"\n"
Q_i = 1/(w*C*(R+R_i))
print "The indicated Q of the coil = ",ceil(Q_i),"\n"
percenterror = (Q_e - Q_i)/Q_e*100
print "The percentage error is = ",ceil(percenterror)," %"
#Result
# The effective Q of the coil = 295
# The indicated Q of the coil = 246
# The percentage error is = 17 %
```