Electrical Network Interactive Analysis Console
and the Eniac Extension language
SourceForge.net Logo

Active pass band filter



File "active-passband.txt" (execute with read "active-passband")
#===========================================
# Quadratic Active Pass Band filter design
#===========================================

# Clear network
@netmat={}

# Design parameters

f0=10K   # Central frequency
B=1000   # Band width
A0=3     # Gain 
C=10uF   # A convenient value

# Calculate components values (using theory)

Q=f0/B
w0=2*pi*f0  
C1=C2=C
R3=2*Q/w0/C1
R1=R3/(2*A0)
R2=Q/(2*Q^2-A0)/w0/C2

# Analize network

R ( [1,2] ,  R1 )
R ( [2,0] ,  R2 )
C ( [2,3] ,  C1 )
C ( [2,4] ,  C2 )
R ( [4,3] ,  R3 )
Op( [0,4,3]     )    # remember [V+,V-,Vout]

# Transfer function formula (from theory)
print("1) Next formula come from theory")

g=-s/R1/C1/(s^2+1/R3*(1/C1+1/C2)*s+1/R3/C1/C2*(1/R1+1/R2))

# Transfer function calculated by Eniac
print("2) Next formula is calculated by Eniac and should be the same of (1)")

f=Gain([3],[1]) 

# Draw bode plots
bode(f)

# Draw root locus
rootlocus(f)

# Draw nyquist plot
nyquist(f)

Return to main page