I want to track a ‘triangular’ reference which basically turns on and off two IGBTs in order to increase output current (by closing IGBTs) and decrease output current (by opening IGBT when voltage across capacitor is below 1 V and also the current is higher than reference). However, if output current is greater than reference BUT voltage across capacitor is not below 1V yet, then continue to fire both IGBT’s to maintain the capacitor discharging. The next figure, shows that for some reason it is not following the reference at all.
As attachments you have my circuit and code.
Snubber.plecs (29.8 KB)
track.c (250 Bytes)
track.h (88 Bytes)