# CCM Boost PFC Controller (Average Current Mode) (`ccmPfcController`)

> Shapes the input current of a boost PFC to follow the line voltage without sensing the line, and regulates the output voltage.

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

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

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

## When to use it

Use it for a universal-input boost PFC with a UCC28180-class controller, when you want the data sheet's design procedure, the M1 and M2 loop gains, soft start, EDR and the protections with your own power stage. circuit.applicationCircuit with topology ccmPfc sizes every external part. To try your own PFC control law, use the PI Controller and PWM Generator instead.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `GND` | electrical | Ground reference of every pin |
| `ICOMP` | electrical | Current amplifier output, the capacitor CICOMP goes to GND |
| `ISENSE` | electrical | Current sense, through 220 ohm from the bridge side of the sense resistor |
| `FREQ` | electrical | Frequency set, the resistor RFREQ goes to GND |
| `VCOMP` | electrical | Voltage amplifier output, the RC compensation goes to GND |
| `VSENSE` | electrical | Output voltage sense, wire the divider from the PFC output here |
| `VCC` | electrical | Supply, the controller runs above the UVLO threshold |
| `GATE` | electrical | Gate drive of the boost switch |

## Common parameters

- `vRef`: Voltage error amplifier reference (Default: 5)
- `gmv`: Voltage error amplifier transconductance (Default: 0.000056)
- `gmi`: Current amplifier transconductance (Default: 0.00095)
- `vSoc`: Soft overcurrent threshold, magnitude of the negative ISENSE voltage (Default: 0.285)
- `vPcl`: Peak current limit threshold, magnitude of the negative ISENSE voltage (Default: 0.4)

## Parameters

| Key | Unit | Default | Typical range | Description | Datasheet source |
|---|---|---|---|---|---|
| `vFreq` | V | 1.5 | 500m – 5 V | Voltage FREQ is held at | Section 7.5 VFREQ typ 1.5 V, p.6 |
| `fTyp` | Hz | 65000 | 1k – 1meg Hz | fTYP of the frequency equation | Section 9.2.2.2 equation 12: fTYP = 65 kHz |
| `rTyp` | Ω | 32700 | 1k – 1meg Ω | RTYP of the frequency equation | Section 9.2.2.2 equation 12: RTYP = 32.7 kΩ |
| `rInt` | Ω | 1000000 | 10k – 100meg Ω | RINT of the frequency equation | Section 9.2.2.2 equation 12: RINT = 1 MΩ |
| `tOffMin` | s | 0.00000057 | 0 – 10u s | Minimum off-time of every period | Section 7.5 tOFF(min) typ 570 ns, p.6 |
| `kIsense` | V/V | 2.5 | 100m – 100 V/V | Gain from -V(ISENSE) to the internal current signal | Section 8.3.10: ISENSE is buffered by a fixed gain of -2.5 |
| `gmi` | S | 0.00095 | 1u – 1 S | Current amplifier transconductance | Section 7.5 gmi typ 0.95 mS, p.6 |
| `k1` | V/V | 7 | 100m – 100 V/V | Current loop constant K1 | Section 9.2.2.12 equation 79: K1 = 7 |
| `iCompMax` | A | 0.00005 | 100n – 10m A | Current amplifier output current limit | Section 7.5 current loop output linear range ±50 µA (characterized by design), p.6 |
| `vIcompFault` | V | 3 | 0 – 6 V | ICOMP voltage during OVP_H, OLP and ISOP | Section 7.5 ICOMP voltage during OLP typ 3 V, p.6; section 8.3.17 |
| `vRef` | V | 5 | 1 – 10 V | Voltage error amplifier reference | Section 7.5 VREF typ 5 V, p.6 |
| `gmv` | S | 0.000056 | 100n – 10m S | Voltage error amplifier transconductance | Section 7.5 gmv typ -56 µS (current out of VCOMP), p.6 |
| `iVcompMax` | A | 0.00004 | 100n – 10m A | Voltage error amplifier output current limit (soft-start source and normal sink) | Section 7.5 source current under soft start typ -40 µA and maximum sink current typ 40 µA, p.6 |
| `gmvEdr` | S | 0.00028 | 100n – 100m S | Transconductance under enhanced dynamic response | Section 7.5 gmv-EDR typ -280 µS, p.6 |
| `iEdrMax` | A | 0.000275 | 100n – 100m A | Voltage error amplifier output current limit under EDR | Section 7.5 maximum current under EDR operation typ -275 µA, p.6 |
| `kUvd` | — | 0.95 | 500m – 1 | UVD threshold, a fraction of vRef (EDR below it) | Section 7.5 VUVD typ 95 %VREF, p.6 |
| `kOvd` | — | 1.05 | 1 – 1.5 | OVD threshold, a fraction of vRef (EDR above it) | Section 7.5 VOVD typ 105 %VREF, p.6 |
| `kSsEnd` | — | 0.98 | 500m – 1 | End-of-soft-start threshold on VSENSE, a fraction of vRef | Section 7.5 VSENSE threshold, end-of-soft-start typ 98 %VREF, p.7 |
| `vPrecharge` | V | 1.5 | 0 – 5 V | VCOMP pre-charge voltage before the soft start | Section 7.5 VPRECHARGE typ 1.5 V, p.7 |
| `iPrecharge` | A | 0.001 | 1u – 100m A | VCOMP pre-charge current at VCOMP = 0 V | Section 7.5 IPRECHARGE typ -1 mA, p.7 |
| `kOlp` | — | 0.165 | 10m – 900m | OLP/standby threshold on VSENSE, a fraction of vRef | Section 7.5 VOLP typ 16.5 %VREF, p.6 |
| `vIsop` | V | 0.085 | 0 – 1 V | ISENSE open-pin threshold | Section 7.5 VISOP typ 0.085 V, p.6 |
| `iIsop` | A | 0.0000023 | 0 – 1m A | ISENSE open-pin pull-up current | Section 7.5 IISOP typ -2.3 µA, p.6 |
| `rVcompFault` | Ω | 80 | 1 – 1meg Ω | VCOMP pull-down in UVLO, OLP and ISOP | Section 7.5 VCOMP voltage during OLP typ 0.04 V at 0.5 mA, p.7 |
| `kOvpL` | — | 1.07 | 1 – 1.5 | OVP_L threshold on VSENSE, a fraction of vRef (VCOMP discharged through rVcompDis) | Section 7.5 VOVP_L typ 107 %VREF, p.6 |
| `kOvpH` | — | 1.09 | 1 – 1.5 | OVP_H threshold on VSENSE, a fraction of vRef (GATE off) | Section 7.5 VOVP_H typ 109 %VREF, p.6 |
| `kOvpHRst` | — | 1.02 | 900m – 1.5 | OVP_H reset threshold on VSENSE, a fraction of vRef | Section 7.5 VOVP_H(RST) typ 102 %VREF, p.6 |
| `rVcompDis` | Ω | 4000 | 1 – 1meg Ω | VCOMP discharge resistor of OVP_L and SOC | Sections 8.3.4 and 8.3.11: a 4-kΩ resistor connects VCOMP to ground |
| `vSoc` | V | 0.285 | 10m – 2 V | Soft overcurrent threshold, magnitude of the negative ISENSE voltage | Section 7.5 VSOC typ -0.285 V, p.6 |
| `vPcl` | V | 0.4 | 10m – 2 V | Peak current limit threshold, magnitude of the negative ISENSE voltage | Section 7.5 VPCL typ -0.4 V, p.6 |
| `vccOn` | V | 11.5 | 1 – 30 V | VCC UVLO turn-on threshold | Section 7.5 VCCON typ 11.5 V, p.6 |
| `vccOff` | V | 9.5 | 500m – 30 V | VCC UVLO turn-off threshold | Section 7.5 VCCOFF typ 9.5 V, p.6 |
| `vGateClamp` | V | 15.2 | 1 – 30 V | GATE high-level clamp | Section 7.5 GATE high voltage typ 15.2 V at VCC = 20 V, p.7 |
| `vGateDrop` | V | 1 | 0 – 5 V | GATE high level below VCC when not clamped | Section 7.5 GATE high voltage typ 11.2 V at VCC = 12.2 V, p.7 |
| `rGateHi` | Ω | 10.1 | 100m – 10k Ω | GATE pull-up resistance | assumption: the 15.2 V clamp over the 1.5 A peak sourcing current (section 7.5, p.7) |
| `rGateLo` | Ω | 2 | 100m – 10k Ω | GATE pull-down resistance | Section 7.5 GATE low voltage, sinking, typ 0.04 V at 20 mA, p.7 |
| `rOff` | Ω | 100000000 | 1k – 1t Ω | Off-state resistance of the internal switches | assumption: large against the VCOMP network |

_Parameter descriptions are in English in both languages._

## Model

FREQ is held at vFreq and the switching frequency follows its current: fsw = fTyp * rTyp * (rInt + RFREQ) / (RFREQ * (rInt + rTyp)) with RFREQ = vFreq / I. The internal current signal is -kIsense times V(ISENSE). ICOMP is fed gmi * (signal - M1 * V(ICOMP) / k1), limited to iCompMax, with M1 a piecewise-linear function of V(VCOMP). Each period starts with GATE low; GATE turns on where a ramp rising at M2 = fsw / 65 kHz * 0.1223 * (V(VCOMP) - 0.5)^2 V/us crosses V(ICOMP), after tOffMin. VCOMP is fed gmv * (vRef - V(VSENSE)) limited to iVcompMax, or gmvEdr limited to iEdrMax when VSENSE leaves 95 to 105 % of vRef after the soft start; until VSENSE first reaches kSsEnd * vRef a pre-charge source pulls VCOMP to vPrecharge. UVLO, OLP (VSENSE below kOlp * vRef) and ISOP stop GATE, pull VCOMP to GND and ICOMP to vIcompFault. OVP_L and the soft overcurrent (ISENSE below -vSoc) discharge VCOMP through rVcompDis. OVP_H holds GATE off from kOvpH * vRef until kOvpHRst * vRef. ISENSE below -vPcl ends the period.

## Common mistakes

- The voltage loop crosses over near 10 Hz, so a start from an empty output takes hundreds of milliseconds of soft start. Start the output capacitor and the VCOMP capacitors charged to the operating point, as the ccmPfc application circuit does, to look at a few line cycles.
- The sense resistor sits in the return path and ISENSE reads negative. Wiring it on the positive side leaves ISENSE above 0.085 V and the open-pin protection stops the converter.

Problems rules: `step.too_large`, `param.out_of_range`, `pin.unconnected`

## Datasheet and sources

RFREQ, CICOMP, the VCOMP network, the VSENSE divider and the sense resistor are your own parts. vFreq, tOffMin, gmi, iCompMax, vIcompFault, vRef, gmv, iVcompMax, gmvEdr, iEdrMax, the UVD, OVD, OLP, OVP and end-of-soft-start fractions, vPrecharge, iPrecharge, vIsop, iIsop, vSoc, vPcl, vccOn, vccOff, the GATE levels and rGateLo come from the electrical characteristics, rVcompFault from the VCOMP voltage during OLP at its test current. fTyp, rTyp, rInt and k1 come from the design procedure (equations 12 and 79), kIsense and rVcompDis from the feature description. rGateHi is an assumption: the clamp voltage over the peak sourcing current.

## Example

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

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