Run the transient view first, then compare the Differential-mode gain and Common-mode gain views.

Open and run
- Open Examples from the Home ribbon.
- Choose Differential input filter.
- Open Simulate and choose Setup to review the analyses.
- Choose Run for one analysis or Run All for the complete configured set.
- 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
Differential input filter
Setup: Transient and CM/DM gain
| Analysis | Configuration |
|---|---|
| Transient |
|
| Differential-mode gainAC |
|
| Common-mode gainAC |
|
Scope views and expected results
Differential-filter response
Analysis: Transient
Differential inputs
V(inp)V(inn)
Filter and amplifier outputs
V(fp)V(fn)V(vout)V(vadc)
Readouts
- ADC input averageAverage
V(vadc) - ADC input ripplePk-Pk
V(vadc) - Filter output fp swingPk-Pk
V(fp) - Filter output fn swingPk-Pk
V(fn)
Differential-mode gain
Differential-mode gain
- DM gain
V(vout)/(V(inp)-V(inn))
Common-mode gain
Common-mode gain
- CM gain
V(vout)/((V(inp)+V(inn))/2)
Python scripts
These scripts are included with the example. Review trusted project code before choosing Run.
CM DM sweep.py
Default sheet: Differential input filter
# Sweep the filter's differential (DM) and common-mode (CM) response.
sheet = get_sheet("Differential input filter")
dm_sheet = sheet.override(V1=ac_source(0.5), V2=ac_source(0.5, phase=180))
cm_sheet = sheet.override(V1=ac_source(1), V2=ac_source(1))
dm = dm_sheet.ac("10", "10Meg", save="V(vout)")
cm = cm_sheet.ac("10", "10Meg", save="V(vout)")
fig, (mag, ph) = subplots(2, 1, title="Differential filter CM/DM response", sharex=True)
mag.set(title="Magnitude", ylabel="|vout| (dB)", xscale="log")
ph.set(title="Phase", xlabel="Frequency (Hz)", ylabel="Phase (deg)", xscale="log")
mag.plot(dm.v("vout").db, label="DM gain")
mag.plot(cm.v("vout").db, label="CM gain")
ph.plot(dm.v("vout").phase, label="DM")
ph.plot(cm.v("vout").phase, label="CM")
fig.show()Tran + AC sweep.py
Default sheet: Differential input filter
# One script, two analyses: transient as drawn, then a differential AC drive.
sheet = get_sheet("Differential input filter")
tran_run = sheet.tran("3m", step="1u", save=["V(inp)", "V(inn)", "V(vout)"])
ac_sheet = sheet.override(V1=ac_source(0.5), V2=ac_source(0.5, phase=180))
ac_run = ac_sheet.ac("10", "10Meg", save="V(vout)")
fig, (t_ax, f_ax) = subplots(2, 1, title="Differential filter tran + AC")
t_ax.set(title="Transient", xlabel="Time", xformat="time", ylabel="Voltage (V)")
f_ax.set(title="DM frequency response", xlabel="Frequency (Hz)", ylabel="|vout| (dB)", xscale="log")
t_ax.plot(tran_run.v("inp") - tran_run.v("inn"), label="inp-inn")
t_ax.plot(tran_run.v("vout"), label="vout")
f_ax.plot(ac_run.v("vout").db, label="DM gain")
fig.show()