Also, "hybrid hysteretic" control:
https://www.ti.com/lit/ds/symlink/ucc256404.pdfBasics for most types seem to be either doing a VCO, or a comparator on the resonant cap voltage (or some sampling of it), or both (basically, doing a VCO with current source/sink into a capacitor, but also feeding some resonant cap current into it with a cap divider).
At a glance, I don't know what the waveforms are measuring. In general, the output will ring when commutation occurs slowly: current falls to zero, diode recovery occurs (or equivalent from relatively abrupt schottky capacitance), ringing ensues, waveform swings down and delivers another gulp of current, etc.
Likewise, primary side rings whenever it's open circuit (free ringdown), or hard switching (loop inductance * inverter capacitance). Neither of which should happen in normal operation, except ringdown at the end of a tone burst, when burst mode (at light load or current limiting) is employed.
Specifically, it's a
protective feature to avoid hard switching, except for a few cycles during startup, usually with a brief delay and auto-restart, or a fault-out, function when it occurs otherwise. Hard switching means insufficient or wrong phase of circulating current, very high peak switching currents, and high inverter dissipation.
I absolutely don't recommend doing it (like, full deal, at scale) with an MCU, as you'll have a hard time processing signals fast enough to handle it. I can think of some workarounds, that might work with certain hardware, but I don't have nearly a complete solution myself, let alone enough to tell a beginner how to do it. (But, at low power levels, by all means experiment; the stakes are low and the learning is high.
)
Tim