Skip to content

Add AC frequency sweep analysis (Bode plot) for filter circuits #5

Description

@amaydixit11

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions