# Power Factor Meter (`powerFactor`)

> The power factor and displacement factor of a voltage and current, while the circuit runs.

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

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

**Group:** Control · **Kind:** `{"block":"powerFactor","kind":"control"}`

## When to use it

Use it to watch or regulate the power factor of a PFC stage or a grid inverter during the run. Use Power Meter for the efficiency of a converter.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `v` | signal | Voltage, from a voltmeter |
| `i` | signal | Current, from an ammeter |
| `freq` | signal | Optional fundamental frequency in hertz, such as a PLL output |
| `pf` | signal | Power factor p/s |
| `dpf` | signal | Displacement factor: the cosine of the angle between the fundamentals of v and i |
| `p` | signal | Real power, mean of v*i |
| `s` | signal | Apparent power, RMS of v times RMS of i |

## Common parameters

- `f`: Fundamental frequency: the window is cycles/f seconds; a wired freq input replaces it (50 Hz mains, IEC 60038:2009 Table 1) (Default: 50)
- `cycles`: Window length in periods of the fundamental; whole periods give exact figures (Default: 1)

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `f` | Hz | 50 |  | Fundamental frequency: the window is cycles/f seconds; a wired freq input replaces it (50 Hz mains, IEC 60038:2009 Table 1) |
| `cycles` | — | 1 |  | Window length in periods of the fundamental; whole periods give exact figures |

_Parameter descriptions are in English in both languages._

## Model

Over the sliding window p = mean(v*i), s = sqrt(mean(v^2))*sqrt(mean(i^2)) and pf = p/s. The fundamentals of v and i are found as in Harmonic Meter, and dpf is the cosine of the angle between them. For a sine voltage the power factor is the displacement factor times the distortion factor I1/I, so a distorted current lowers pf but not dpf. Both are 0 while what they divide by is zero.

## Common mistakes

- The sign of p follows the current direction of the ammeter. A current measured into the load gives a positive power; turn the ammeter around and pf and dpf turn negative.
- dpf does not say whether the current leads or lags. Read the phase of two Harmonic Meters when the sign matters.

Problems rules: `pin.unconnected`

## Datasheet and sources

A PFC controller data sheet gives the power factor at a stated line voltage and load, measured with a power analyser over whole line cycles; set f to that line frequency and cycles to the analyser's window to compare.

## Example

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

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