Appearance
Pwm Subsystem
A closed-loop PWM power regulator with its controller wrapped in a reusable Subsystem.
A PID compares the output against a setpoint and drives a PWM stage that switches an IGBT into a resistive load — but the control logic lives inside a Subsystem with named input/output ports, the pattern you use to encapsulate and reuse a control block or tidy a large sheet. Two scopes and a plot probe signals on both sides of the subsystem boundary.
Functionally this is the same power regulator as the PWM power controller: it measures V_R and I_R, forms the average power, and lets a PID trim the PWM duty until that power hits the P_ref = 30 setpoint on the 5 Ω load. The difference is packaging — everything but the raw power stage is hidden behind a Subsystem whose ports (V_R, I_R in; gate out) are the only wires crossing the boundary. That is exactly how you turn a working control loop into a drop-in block. The run uses a 50 µs step over 3 s; probe inside and outside the Subsystem to confirm the encapsulated signals match.
