# Chapter 6 , A.C. Fundamentals¶

## Example 6.1 , Page Number 94¶

In [1]:
import math

#Variables

t = 1.0          #time (in milliseconds)
n = 10.0         #number of cycles

#Calculation

T = t/n          #Time period (in milliseconds)

#Result

print "Time period by one cycle is ",T," ms."

Time period by one cycle is  0.1  ms.


## Example 6.2 , Page Number 94¶

In [2]:
import math

#Variables

t = 0.01          #Time period of positive half cycle (in seconds)

#Calculation

t1 = 0.01         #Time period of negative half cycle (in seconds)
T = t + t1        #Time period of one complete cycle (in seconds)

#Result

print " Time period of rectified input is ",T," s."

 Time period of rectified input is  0.02  s.


## Example 6.3 , Page Number 95¶

In [3]:
import math

#Variables

n = 5.0                  #number of cycles
t = 10.0                 #time period (in micro-seconds)

#Calculation

f = n / t                #frequency (in Mega-hertz)
T = 1/f                  #Time period (in micro-seconds)

#Result

print "Frequency and Time period of the sine wave is ",f," MHz and ",T," micro-seconds."

Frequency and Time period of the sine wave is  0.5  MHz and  2.0  micro-seconds.


## Example 6.4 , Page Number 95¶

In [4]:
import math

#Variables

f = 69.0                #frequency (in Mega-hertz)

#Calculation

T = 1/f                 #Time period (in micro-seconds)

#Result

print "Time period is ",round(T * 10**3,2), " ns."

Time period is  14.49  ns.


## Example 6.5 , Page Number 97¶

In [5]:
import math

#Variables

Vmax = 20.0            #Voltage (in milli-volts)

#Calculation

Vrms = 0.707 * Vmax    #Rms Voltage (in milli-volts)
Vdc = 0.637 * Vmax     #Average value of signal (in milli-volts)

#Result

print "RMS value is ",Vrms," mV.\nAverage value is ",Vdc," mV."

RMS value is  14.14  mV.
Average value is  12.74  mV.