RC Low Pass Filter

RC Low Pass Filter: SchematicRC Low Pass Filter: Schematic

Here is the input file that defines the circuit and requests the following analyses:

  • AC - small signal frequency response
  • NOISE - noise from the circuit
  • TR - transient (time domain) response

The filter corner frequency is set by a parameter named fo. The parameter can then be used to determine the limits of the AC analysis and to design the capacitor value in the circuit description.

.title RC Low Pass Filter

'specify the corner frequency with a parameter
.par fo { 10.khz }

' ac analysis, 20 intervals / decade from 1/10 to 10X fo
.ac 20 10 { fo 10. / } { fo 10. X }

' include noise analysis
.noise

'transient analysis, 100 intervals from 0.0 to 1.0 msec
.tr 100 0.0 0.2msec

' plot the responses
' ac response
.plot ac png eout eout >
' noise
.plot ac png NDM INM
' transient response
.plot tr png eout

.ckt
' define an RC low pass filter
' input source
v ein 1 0 1.
r r1 1 2 1.k
' use fo to calculate the required c, c = 1/(2*pi*fo*r1)
c c1 2 0 { 2 PI X fo X r1 X 1 XY / }
' output voltmeter
vm eout 2 0
.end

.go
.stop

The resulting plots are shown here:

AC Response (dB and phase)AC Response (dB and phase)

Spot Noise (NDM) and Total Noise (INM)Spot Noise (NDM) and Total Noise (INM)

Transient ResponseTransient Response