Documentation

RC low-pass filter

Compare frequency response and signal attenuation in a simple RC filter.

Basics

Compare the AC response with the 100 Hz Transient waveform, then change R1 or C1 and rerun.

Editor showing the RC low-pass filter SPICE example as an unsaved schematic.
RC low-pass filter opens as an editable, unsaved schematic.

Open and run

  1. Open Examples from the Home ribbon.
  2. Choose RC low-pass filter.
  3. Open Simulate and choose Setup to review the analyses.
  4. Choose Run for one analysis or Run All for the complete configured set.
  5. Select a matching Scope view after the run. Use Save as sheet to keep the example or Discard to close it.

Sheets, analyses, and Scope

RC low-pass filter

#

Setup: AC frequency sweep

AnalysisConfiguration
AC
  • Sweep dec
  • Points 100
  • Start 1
  • Stop 1Meg
100 Hz transientTransient
  • Step 10u
  • Stop 50m

Scope views and expected results

Low-pass frequency response

Analysis: AC

AC Response
Waveforms
  • V(vin)
  • V(vout)
100 Hz waveform

Analysis: 100 Hz transient

Transient
Waveforms
  • V(vin)
  • V(vout)

Python scripts

These scripts are included with the example. Review trusted project code before choosing Run.

RC R sweep.py

Default sheet: RC low-pass filter

sheet = get_sheet("RC low-pass filter").override(V1=ac_source(1))
resistances = ["1k", "2.2k", "4.7k", "10k", "22k"]
runs = sheet.sweep(R1=resistances).ac("1", "1Meg", points=100, sweep="dec", save="V(vout)")

fig, (mag, phase_ax) = subplots(2, 1, title="RC low-pass R sweep", sharex=True)
mag.set(title="Magnitude", ylabel="|Vout| (dB)", xscale="log")
phase_ax.set(title="Phase", xlabel="Frequency (Hz)", ylabel="Phase (deg)", xscale="log")

for resistance, result in zip(resistances, runs):
    mag.plot(result.v("vout").db, label=f"R={resistance}")
    phase_ax.plot(result.v("vout").phase, label=f"R={resistance}")

fig.show()