The simulator has AC analysis at a single frequency (MNASolver.solveAC(frequency)) but no frequency sweep capability.
Use Case
Students studying active filters (already in templates: active_filters.js) need to see how gain and phase vary with frequency.
Proposed Features
- A frequency sweep from f_start to f_stop with N points
- Bode plot: magnitude (dB) vs frequency and phase vs frequency
- Logarithmic frequency axis
- Export sweep data as CSV
Technical Approach
- Loop over
np.logspace(log10(f_start), log10(f_stop), N) in JS
- Call
solveAC(freq) for each point
- Collect results and plot on a chart
- The
SimpleChart.js and OscilloscopeChart.js UI can be adapted for Bode plots
The simulator has AC analysis at a single frequency (
MNASolver.solveAC(frequency)) but no frequency sweep capability.Use Case
Students studying active filters (already in templates:
active_filters.js) need to see how gain and phase vary with frequency.Proposed Features
Technical Approach
np.logspace(log10(f_start), log10(f_stop), N)in JSsolveAC(freq)for each pointSimpleChart.jsandOscilloscopeChart.jsUI can be adapted for Bode plots