---
title: Bidirectional converters and the dual active bridge
heading: Converters that move power both ways: synchronous buck–boost battery interfaces, constant-current and constant-voltage charging, and the dual active bridge's phase-shift power transfer
eyebrow: S11 · Lesson 13 · Bidirectional converters and the dual active bridge
xp: 50
---

::: hook
A battery is charged and discharged by the same converter. An electric car sends power from its battery to its motor and back during braking, and, with vehicle-to-grid, back to the house. Replace a converter's diodes with transistors and it can carry current either way; add a transformer with a full bridge on each side and the dual active bridge transfers kilowatts in either direction with a single control variable, the phase shift between its two bridges.
:::

::: play
- The curve is a dual active bridge's power against the phase shift φ between its bridges, $P = \frac{V_1V_2'\phi(\pi - |\phi|)}{2\pi^2f_sL}$, for 400 V on both sides (referred), 100 kHz and the series inductance on the slider.
- Positive φ sends power from side 1 to side 2; negative φ reverses it. The maximum, at φ = 90°, is $V_1V_2'/(8f_sL)$.
- Less inductance raises the maximum but makes the power more sensitive to small phase errors and raises the circulating current.
:::

```sim plot
view: graph
x: p = -180..180
y: P = -10000..10000
slider: L = 20..100 = 40
plot: 400*400*(p*pi/180)*(pi - abs(p*pi/180))/(2*pi^2*1e5*L*1e-6) | label: power, W, against phase shift in degrees
```

::: predict
## A dual active bridge with 400 V on both sides (referred to one side), 40 µH and 100 kHz must deliver 3 kW. Roughly what phase shift does it need?

- [ ] 90°
- [x] About 33°
- [ ] About 5°
- [ ] 180°

::: reveal
The maximum is $400 \times 400/(8 \times 100\text{ kHz} \times 40\ \mu\text{H}) = 5$ kW at 90°. For 3 kW, $\phi(\pi - \phi) = 3000 \times 2\pi^2 \times 10^5 \times 40 \times 10^{-6}/160\,000 = 1.48$, so φ = 0.577 rad, 33°. Reversing the shift to −33° sends 3 kW back the other way.
:::
:::

::: nameit
## Bidirectional DC–DC

Replacing a buck's diode with a second transistor gives a half-bridge leg with an inductor: run as a buck from the high side ($D = V_\text{low}/V_\text{high}$) or as a boost from the low side, the complementary transistor taking the switching role. The same hardware charges a battery from a bus or supports the bus from the battery.

## Charging

Lithium-ion cells are usually charged at **constant current** until they reach their maximum voltage (about 4.2 V per cell), then at **constant voltage** while the current tapers. A rate of 1C is the current that would charge the capacity in an hour; the constant-current phase to about 80% at 0.5C takes about 1.6 h.

## The dual active bridge

Two full bridges, each producing a square wave, drive the two sides of a transformer (ratio n:1) through a series inductance L (often its leakage). With side 2's voltage referred to side 1, $V_2' = nV_2$, and side 2 lagging side 1 by φ,
$$P = \frac{V_1V_2'\,\phi(\pi - |\phi|)}{2\pi^2f_sL}, \qquad P_\max = \frac{V_1V_2'}{8f_sL}$$
Power flows from the leading bridge to the lagging one. When $V_2' = V_1$ both bridges switch at zero voltage over a wide load range; when the voltages differ, light-load operation loses ZVS and carries large circulating current, which more elaborate modulation (adding phase shifts within each bridge) addresses.
:::

::: example
## A DAB links a 400 V bus to a 48 V battery through an 8.33:1 transformer and 40 µH (referred to the 400 V side) at 100 kHz. What is its maximum power, and what phase shift gives 3 kW?

::: solution
1. **Battery referred to the bus.**
   $$\begin{aligned} V_2' &= 8.33 \times 48 \\ &= 400\ \text{V} \end{aligned}$$
2. **Maximum power.**
   $$\begin{aligned} P_\max &= \frac{400 \times 400}{8 \times 10^5 \times 40\ \mu\text{H}} \\ &= 5\ \text{kW} \end{aligned}$$
3. **Phase shift for 3 kW.** The power is proportional to $\phi(\pi - \phi)$, so for 3 kW
   $$\phi(\pi - \phi) = 1.480$$
   a quadratic whose smaller root is
   $$\begin{aligned} \phi &= 0.577\ \text{rad} \\ &= 33.1° \end{aligned}$$
4. **Reversing the flow.** With the battery side leading instead, the same 3 kW would flow back to the bus.

**Answer:** the maximum power is 5 kW, and 3 kW needs a phase shift of 0.577 rad (33.1°).
:::
:::

::: example
## A synchronous half-bridge leg links a 48 V battery to a 400 V bus. What duty cycle does its upper switch run at when charging the battery, and what does its lower switch run at when discharging?

::: solution
1. **Charging.** Charging is buck operation from 400 V, so the upper switch's duty is
   $$\begin{aligned} D &= \frac{48}{400} \\ &= 0.12 \end{aligned}$$
2. **Discharging.** Discharging is boost operation into 400 V, so the lower switch's duty is
   $$\begin{aligned} D' &= 1 - \frac{48}{400} \\ &= 0.88 \end{aligned}$$
   which leaves the upper switch on for the remaining 0.12.
3. **Which way power flows.** It's the same switching pattern either way; the sign of the inductor current decides which way power flows.

**Answer:** the upper switch runs at 0.12 when charging, and the lower switch at 0.88 when discharging.
:::
:::

::: example
## A 10 Ah battery is charged at 0.5C from empty. How long does the constant-current phase take to reach 80%, and what current is that?

::: solution
1. **Charging current.**
   $$\begin{aligned} I &= 0.5 \times 10\ \text{A} \\ &= 5\ \text{A} \end{aligned}$$
2. **Time to 80%.** 80% of 10 Ah is 8 Ah:
   $$\begin{aligned} t &= \frac{8\ \text{Ah}}{5\ \text{A}} \\ &= 1.6\ \text{h} \end{aligned}$$
3. **The rest of the charge.** The constant-voltage phase then tops up the remaining 20% while the current tapers, typically over another hour or so, which is why fast charging stops at 80%.

**Answer:** the constant-current phase takes 1.6 hours at 5 A.
:::
:::

::: check
kind: parts
given: V = 300 | 400 | 800; W = 300 | 400 | 800; f = 50 | 100 | 200; L = 20 | 60

## A DAB has {V} V on side 1 and {W} V (referred) on side 2, with {L} µH at {f} kHz.

::: part
answer: V*W/(8*f*1e3*L*1e-6)/1e3
unit: kW
tolerance: 0.5%

### What is its maximum power?

::: misses
- [any] $V_1V_2'/(8f_sL)$.
:::
:::

::: part
answer: V*W*(pi/6)*(pi - pi/6)/(2*pi^2*f*1e3*L*1e-6)/1e3
unit: kW
tolerance: 0.5%

### What does it transfer at a 30° phase shift?

::: misses
- [any] $V_1V_2'\phi(\pi - \phi)/(2\pi^2f_sL)$.
:::
:::
:::

::: check
kind: parts
given: f = 100 | 150; L = 20 | 30; P = 1 | 2 | 3

## A DAB with 400 V on each side (referred), {L} µH at {f} kHz, must deliver {P} kW.

::: part
answer: (pi - sqrt(pi^2 - 4*P*1e3*2*pi^2*f*1e3*L*1e-6/(400*400)))/2*180/pi
unit: °
tolerance: 0.5%

### What phase shift does it need?

::: misses
- [any] Solve $\phi(\pi - \phi) = 2\pi^2f_sLP/(V_1V_2')$ for the smaller root.
:::
:::
:::

::: check
kind: parts
given: l = 12 | 48 | 96; h = 380 | 400 | 800

## A synchronous leg links a {l} V battery to a {h} V bus.

::: part
answer: l/h
tolerance: 0.5%

### What duty does the upper switch run at while charging the battery?

::: misses
- [any] Buck: $V_\text{low}/V_\text{high}$.
:::
:::

::: part
answer: 1 - l/h
tolerance: 0.5%

### What duty does the lower switch run at while discharging?

::: misses
- [any] Boost: $1 - V_\text{low}/V_\text{high}$.
:::
:::
:::

::: check
kind: parts
given: C = 5 | 50 | 100; r = 0.3 | 0.5 | 1; s = 70 | 80

## A {C} Ah battery is charged from empty at {r}C until it reaches {s}%.

::: part
answer: C*r
unit: A
tolerance: 0.5%

### What is the charging current?

::: misses
- [any] Rate times capacity.
:::
:::

::: part
answer: s/100/r
unit: h
tolerance: 0.5%

### How long does that phase take?

::: misses
- [any] Charge over current.
:::
:::
:::

::: check
kind: parts
given: V = 400 | 800; W = 400 | 800; f = 50 | 100; P = 5 | 10 | 20

## A DAB with {V} V and {W} V (referred) at {f} kHz must be able to deliver {P} kW at a phase shift of 90°.

::: part
answer: V*W/(8*f*1e3*P*1e3)*1e6
unit: µH
tolerance: 0.5%

### What series inductance does that allow at most?

::: misses
- [any] $L = V_1V_2'/(8f_sP_\max)$.
:::
:::
:::

::: check
kind: parts
given: n = 5 | 8.33 | 16; V = 24 | 48 | 60

## A DAB's transformer has ratio {n}:1 and its low side sits at {V} V.

::: part
answer: n*V
unit: V
tolerance: 0.5%

### What does the low side look like referred to the high side?

::: misses
- [V/n] Referring to the high side multiplies by n.
- [any] $nV_2$.
:::
:::
:::

::: check
kind: choice

## What decides which way power flows in a dual active bridge?

- [ ] The transformer's turns ratio
- [x] Which bridge's square wave leads: power flows from the leading bridge to the lagging one, so reversing the sign of the phase shift reverses the flow with no change in hardware
- [ ] Which side has the higher voltage
- [ ] The switching frequency

::: misses
- [1] The ratio scales the voltages, not the direction.
- [3] Power can flow from the lower referred voltage to the higher.
- [4] Frequency scales the power, not its sign.
:::
:::

::: check
kind: derivation
vars: V = 50..1000, W = 50..1000, p = -3..3, f = 10000..500000, L = 0.000001..0.0002

## A DAB has V and W (referred) on its two sides, phase shift p (radians), frequency f and series inductance L.

::: step
answer: V*W*p*(pi - abs(p))/(2*pi^2*f*L)

### What power does it transfer?
:::

::: step
answer: V*W/(8*f*L)

### What is its maximum?
:::

::: right
Right. The power is a smooth, odd function of the phase shift, which makes it a convenient control variable.
:::
:::

::: check
kind: python

## Write `dab_power(V1, V2, phi, f, L)`: integrate the inductor current of a DAB driven by a ±V1 square wave and a ±V2 square wave lagging by phi (radians) over one period (100 000 steps), remove its average to get the steady state, and return the average of V1's square wave times the current.

```python starter
def dab_power(V1, V2, phi, f, L):
    return 0.0
```

```python solution
import math

def dab_power(V1, V2, phi, f, L):
    M = 100000
    T = 1 / f
    dt = T / M
    i = 0.0
    cur, v1s = [], []
    for k in range(M):
        t = k / M
        v1 = V1 if t % 1 < 0.5 else -V1
        v2 = V2 if (t - phi / (2 * math.pi)) % 1 < 0.5 else -V2
        cur.append(i)
        v1s.append(v1)
        i += (v1 - v2) / L * dt
    m = sum(cur) / M
    return sum(v * (c - m) for v, c in zip(v1s, cur)) / M
```

```python tests
import math
P = lambda V1, V2, p, f, L: V1 * V2 * p * (math.pi - abs(p)) / (2 * math.pi ** 2 * f * L)
assert abs(dab_power(400, 400, 0.5774, 1e5, 40e-6) - 3000) < 5, "33° gives 3 kW."
assert abs(dab_power(400, 300, math.pi / 2, 1e5, 40e-6) - P(400, 300, math.pi / 2, 1e5, 40e-6)) < 5, "Unequal voltages follow the formula too."
assert dab_power(400, 400, -0.5774, 1e5, 40e-6) < -2990, "A negative phase shift reverses the flow."
```

::: right
Right. The inductor current is piecewise linear, and its average product with the square wave gives the closed-form power.
:::
:::

::: explain
## Why is the dual active bridge attractive for vehicle chargers and solid-state transformers?

::: model
These applications need isolation, power flow in both directions and high efficiency at high power. The dual active bridge provides all three with a symmetric structure: a full bridge on each side of a high-frequency transformer, with the transformer's leakage inductance doing the job of the energy-transfer element. Power is set by a single phase shift between the bridges, whose sign sets the direction, so the same hardware charges and discharges. When the two voltages are matched through the turns ratio, the switches turn on at zero voltage across a wide load range, which allows high switching frequencies and a small transformer.
:::
:::

::: practice
::: check
given: V = 400 | 600; f = 100 | 150; L = 25 | 45
answer: V*V/(8*f*1e3*L*1e-6)/1e3
unit: kW
tolerance: 0.5%

## Maximum DAB power: {V} V both sides, {L} µH, {f} kHz?

::: misses
- [any] $V_1V_2'/(8f_sL)$.
:::
:::

::: check
given: l = 24 | 72; h = 400 | 700
answer: 1 - l/h
tolerance: 0.5%

## Boost duty discharging a {l} V battery into {h} V?

::: misses
- [any] $1 - V_l/V_h$.
:::
:::

::: check
given: r = 0.3 | 0.5 | 1 | 2
answer: 0.8/r
unit: h
tolerance: 0.5%

## Time to 80% at {r}C?

::: misses
- [any] 0.8/rate.
:::
:::
:::
