Buck Converter with State Machine-Based Constant On-Time Controller

The PLECS demo model shows a buck converter with constant on-time control implemented using the PLECS State Machine block.


The outer loop voltage compensator is implemented using a proportional-integral (PI) controller. This computes a current reference from the difference between the actual output voltage and the voltage reference. The inner loop current compensator uses a constant on-time control (COT) scheme as follows: when the actual current becomes less than the reference current, the FET is switched on for a fixed duration. After the FET is switched off, it must remain switched off for a minimum duration before it can switch on again.

PLECS State Machine Block

The COT scheme is implemented with a state machine that has the current error ‘Ierr’ as its input and the FET switching signal ‘S’ as its output. The constant on-time and the minimum off-time are configured as internal constants ‘ton’ and ‘toff_min’. The state machine has two states On and Off that are used to switch the FET on and off, and a waiting state ReadyForOn.

When state On is entered, its Enter action will set the output signal ‘S’ to 1. Exactly ‘ton’ seconds after the start of state On, the state machine is executed again and the timer event AFTER(ton) becomes active. This causes the state machine to transition to state Off and the output signal ‘S’ is set to 0. Exactly ‘toff_min’ seconds after this event, the state machine is executed again, and the timer event AFTER(toff_min) becomes active. The transition for this timer event is branched with a Junction. If the input signal ‘Ierr’ is already greater than 0 at this instant, the state machine transitions directly to state On again; else, the state machine transitions to the waiting state ReadyForOn and remains there until ‘Ierr’ becomesgreater than 0. The default transition targets the same Junction so that the state machine will start in the On state or theReadyForOn state depending on whether ‘Ierr’ is greater than 0 at simulation start.

A COT implementation using the standard Control blocks is shown in the demo model Series Capacitor Buck Converter.

Try it

This model is available in the PLECS Demo Model library provided in both versions of PLECS.