I have been working on a control software for below given bidirectional buck-boost converter. enter image description here

The planned usage is for charging and discharging of a traction battery in electrical vehicle. I am not sure how to control this type of dc-dc converter.

From my perspective there four operating modes:

a) battery charging in buck mode (S1: pwm, S2: off, S3: off, S4: off)

b) battery charging in boost mode (S1: on, S2: off, S3: off, S4: pwm)

c) battery discharging in boost mode (S1: off, S2: pwm, S3: on, S4: off)

d) battery discharging in buck mode (S1: off, S2: off, S3: pwm, S4: off)

As far as the operating mode selection I think that

a) selection between battery charging and discharging takes place based on commands comming from higher layer which is able to made a decision whether there is enough energy in the system or there is a lack of energy

b) selection between buck mode and boost mode takes place based on relation between Vbus1 and Vbus2 voltages

As far as measurement both Vbus1 and Vbus2 are measured along with the inductor current. Only for clarification. The bus1 consists of capacitor C1, the bus2 consists of capacitor C2 in parallel to the traction battery.

As far as the control algorithm I think that there should be two cascaded PI loops (external voltage loop and internal current loop). At the output of the internal PI loop there is the duty cycle for the transistors switching. One set of cascaded PI loops is for battery charging (battery voltage - Vbus2 - is regulated) and one set of cascaded PI loops is for battery discharging (dc bus voltage - Vbus1 - is regulated).

Please can anybody tell me wheter my understanding how to cotrol the bidirectional buck-boost converter is correct? If not so can anybody recommend me some information source? Thanks in advance for any suggestions.


2 Answers 2


Battery charging in buck mode

battery charging in buck mode (S1: pwm, S2: off, S3: off, S4: off)

No, it's like this: -

enter image description here

In other words it's a synchronous buck regulator as per this: -

enter image description here

Battery charging in boost mode

battery charging in boost mode (S1: on, S2: off, S3: off, S4: pwm)

Nearly right (you have assumed a non-synchronous boost circuit). A synchronous boost (more efficient) is like this: -

enter image description here

In other words it's a synchronous boost charger like this: -

enter image description here

Given that its bidirectional there's no need to repeat myself for the other two modes.


Your diagram is missing any way to sense, and therefore control, current. As drawn, it a voltage source, which is not good, strung as it is between two low impedance batteries.

While which battery gets charged would be determined by energy state of the batteries, and which mode of buck or boost would be selected by which side has higher voltage, the actual charge process then ought to instruct the charger to send X amps from donor to recipient battery. This cannot be done.

In order to protect that H bridge, given that all components shown are low impedance, as a minimum the current sense ought to be in series with the inductor, to directly control the timing of the switches, and make the bridge a current source rather than a voltage source.

You could relate the inductor current to the charging current by dead reckoning, knowing the battery voltages, as no great precision is required. You could put current sense resistors into one or both supply lines as well if you wanted to sense the charge current directly.

  • \$\begingroup\$ thank you for your reaction. As far as the measured variables I have added this information. I would like to know whether the idea with two (one for battery charging and one for battery discharging) cascaded PI loops (internal current loop and external voltage loop) is correct. \$\endgroup\$
    – Steve
    Jul 20, 2020 at 8:22
  • \$\begingroup\$ The inductor current is instantaneous and is used in hardware to control each switching time of the bridge, it's not something that can go through a PI loop, it must be done in hardware. The target inductor current might be controlled by a loop, but is that really necessary? The fact I don't mention loops in my answer is that I don't see anything that would benefit from being controlled by a loop, in your particular battery charging application. As such, suggesting loops is not only putting the cart before the horse, it's putting the bicycle before the fish. \$\endgroup\$
    – Neil_UK
    Jul 20, 2020 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.