Skip to content

Type II compensator generator, SMU example tuning#449

Merged
ducky64 merged 20 commits intomasterfrom
smu-tuing
Feb 9, 2026
Merged

Type II compensator generator, SMU example tuning#449
ducky64 merged 20 commits intomasterfrom
smu-tuing

Conversation

@ducky64
Copy link
Collaborator

@ducky64 ducky64 commented Feb 9, 2026

Tuning and tested with the actual hardare.

  • Add the Type II Compensator as a generator, and replace the simple integrator in the SMU with this, with a current-limiting-mode cutoff frequency of 75kHz
  • Change the current sense diff-RC cutoff frequency to 1-10MHz to push the pole higher, for stability
  • Up the gate drive resistance to 150ohm, so it doesn't load the source opamp to instability
  • Update SPICE sim

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Type II compensator building block and updates the USB Source Measure Unit (SMU) example hardware/simulation artifacts to match new loop-compensation and stability tuning.

Changes:

  • Introduces CompensatorType2 (Type II compensator) as an importable schematic-backed control circuit.
  • Updates the SMU example to use the new compensator and changes the gate-drive resistor implementation (now a 10× series split).
  • Refreshes KiCad + SVGPCB + LTSpice simulation files to reflect the tuned analog control/power stage.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
examples/test_usb_source_measure.py Updates driver gate resistance/power assumptions and increases the series-split resistor count.
examples/UsbSourceMeasure/analysis/power_stage.asc Updates LTSpice power-stage model for new tuning/loop analysis setup.
examples/UsbSourceMeasure/UsbSourceMeasure.svgpcb.js Updates PCB placement/netlist to match schematic changes (compensator + resistor array changes).
examples/UsbSourceMeasure/SourceMeasureControl.kicad_sch Switches integrator block to #CompensatorType2(...) and adjusts filter cutoff parameters + notes.
edg/abstract_parts/resources/CompensatorType2.kicad_sch Adds the KiCad schematic resource used by the new compensator block import.
edg/abstract_parts/init.py Exposes CompensatorType2 from abstract_parts.
edg/abstract_parts/ControlCircuits.py Implements the new CompensatorType2 block and KiCad import/conversions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

SYMATTR Value 150
SYMBOL cap 992 736 R0
SYMATTR InstName C3
SYMATTR Value 100�
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SYMATTR Value 100� contains a replacement/invalid character (likely intended to be a micro prefix). LTspice value fields are typically ASCII (eg 100u), and this character can cause parsing issues depending on editor/encoding. Replace it with an unambiguous ASCII value.

Suggested change
SYMATTR Value 100
SYMATTR Value 100u

Copilot uses AI. Check for mistakes.
@ducky64 ducky64 merged commit a9b66bd into master Feb 9, 2026
18 of 19 checks passed
@ducky64 ducky64 deleted the smu-tuing branch February 9, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant