# Constant On-Time Modulator (`cotModulator`)

> Starts a fixed or adaptive on-time whenever the feedback falls below the reference.

![cotModulator](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/cotModulator.svg)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/ic/cotModulator/)

**Group:** ICs · **Kind:** `{"definition":"cotModulator","kind":"subsystem"}`

## When to use it

Use it at the architecture stage of a ripple-based (COT, D-CAP class) controller, to see the frequency, the DC offset of valley regulation and the ESR condition for stability with the real output capacitor. Use the Hysteretic Modulator for bang-bang control without a fixed on-time.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `FB` | electrical | Feedback, the divided output with its ripple |
| `REF` | electrical | Reference voltage |
| `EN` | signal | Enable signal, high to switch |
| `GATE` | signal | Switch command, 0 or 1 |
| `GND` | electrical | Reference of FB, REF, VIN and VOUT |
| `VIN` | electrical | Input voltage, read for an adaptive on-time |
| `VOUT` | electrical | Output voltage, read when adaptive is 1 |

## Common parameters

- `tOn`: On-time of every pulse; in a buck fsw = Vout/(Vin·tOn) (Default: 0.0000005)
- `tOffMin`: Minimum off-time between pulses (sets the highest duty, tOn/(tOn + tOffMin)) (Default: 0.0000001)
- `adaptive`: On-time: 0 = tOn fixed, 1 = kOn·V(VOUT)/V(VIN) + tOnAdd, 2 = kOn/V(VIN) + tOnAdd (Default: 0)
- `kOn`: Adaptive on-time constant: with adaptive = 1 in s (a buck switches at 1/kOn), with adaptive = 2 in V·s (a buck switches at Vout/kOn) (Default: 0.000002)

## Parameters

| Key | Unit | Default | Typical range | Description | Datasheet source |
|---|---|---|---|---|---|
| `tOn` | s | 0.0000005 | 1n – 10m s | On-time of every pulse; in a buck fsw = Vout/(Vin·tOn) | typical, user must set |
| `tOffMin` | s | 0.0000001 | 1n – 10m s | Minimum off-time between pulses (sets the highest duty, tOn/(tOn + tOffMin)) | typical, user must set |
| `adaptive` | — | 0 | 0 – 2 | On-time: 0 = tOn fixed, 1 = kOn·V(VOUT)/V(VIN) + tOnAdd, 2 = kOn/V(VIN) + tOnAdd | typical, user must set |
| `kOn` | s | 0.000002 | 1n – 1 s | Adaptive on-time constant: with adaptive = 1 in s (a buck switches at 1/kOn), with adaptive = 2 in V·s (a buck switches at Vout/kOn) | typical, user must set |
| `tOnAdd` | s | 0 | 0 – 1m s | Time added to every adaptive on-time (make up for a driver's dead time or delay) | typical, user must set |
| `tOnMin` | s | 0.00000005 | 1n – 10m s | Shortest adaptive on-time (it holds at start-up, while V(VOUT) is near zero) | typical, user must set |

_Parameter descriptions are in English in both languages._

## Model

When V(FB) falls below V(REF), EN is high and at least tOffMin has passed since the last pulse, a pulse of tOn starts. The valley of the feedback is held at the reference (Redl and Sun, IEEE TPEL 2009). In a buck, volt-second balance gives fsw = Vout/(Vin·tOn). With the feedback taken from the output capacitor the loop is stable when ESR·C > tOn/2 (Li and Lee, IEEE TCAS-I 2010); ceramic capacitors need ripple injection. With adaptive = 1 each on-time is kOn·V(VOUT)/V(VIN) + tOnAdd, read at the start of the pulse and never below tOnMin, so a buck switches at 1/kOn at every input once tOnAdd makes up for the driver's dead time; adaptive = 2 uses kOn/V(VIN) + tOnAdd and gives fsw = Vout/kOn.

## Common mistakes

- The defaults are typical, user must set. Size tOn for your frequency, tOn = Vout/(Vin·fsw), and remember that a driver's dead time shortens the on-time the switch node sees.
- With low-ESR ceramic capacitors the feedback ripple lags the inductor current and the pulses bunch together. Check ESR·C > tOn/2, or add a ripple-injection network: a resistor from the switch node and a capacitor to the output across the inductor, coupled into FB through a small capacitor (the cotBuck application circuit with rippleInjection 1).

Problems rules: `step.too_large`, `ground.missing`

## Datasheet and sources

This is an architecture block, so its numbers come from your design. tOn is the on-time and tOffMin the minimum off-time. When you later model a real COT controller, take the on-time equation (often tOn = k·RON/VIN) and the minimum off-time from its data sheet.

## Example

Open the example with the command `file.openExample` and the name `demo:cotModulator`.

---
Generated by `cargo xtask reference` from the usage texts and parameter specs. Do not edit by hand.
