Appearance
Single-Phase PQ Meter
Single-phase active / reactive power meter. Takes instantaneous voltage v and current i (control signals) and computes active power P = LPF(v·i) and reactive power Q = LPF(v_q·i), where v_q is v delayed by a quarter fundamental cycle (a 90° phase shift) — the standard single-phase quadrature method. Both outputs are smoothed by a first-order low-pass filter 1/(τs+1); set the time constant τ = 0 for the raw instantaneous product (which still carries the 2·f ripple). Optional outputs: phase angle φ = atan2(Q, P) in radians, and signed power factor PF = ±|P|/√(P²+Q²) (positive = lagging / inductive Q ≥ 0, negative = leading / capacitive Q < 0). For a sinusoid at the configured frequency, P → Vrms·Irms·cos φ and Q → Vrms·Irms·sin φ once the filter settles.
Category: Continuous
Ports
| Name | Direction | Value type | Notes |
|---|---|---|---|
v | input | double | |
i | input | double | |
p | output | double | |
q | output | double | |
phi | output | double | Visible when emit_phi == 1 |
pf | output | double | Visible when emit_pf == 1 |
Parameters
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
frequency | f | double | 60 | — | Fundamental frequency. Sizes the quarter-cycle (90°) voltage delay used for the reactive-power computation (delay = 1 / (4·f)). Set to your AC system's nominal frequency (60 in North America, 50 in Europe). |
time_constant | τ (s) | double | 0.0167 | — | Time constant of the first-order low-pass filter applied to both P and Q (1/(τs+1)). Larger values smooth the 2·f power ripple more but settle slower; the default ≈ one 60 Hz cycle. Set τ = 0 to output the raw instantaneous v·i and v_q·i products with no filtering. |
emit_phi | Output φ | enum (Off / On) | 0 | — | Add a φ output port carrying the phase angle atan2(Q, P) in radians. |
emit_pf | Output PF | enum (Off / On) | 0 | — | Add a PF output port carrying the signed power factor ±|P|/√(P²+Q²) (sign follows Q: + lagging/inductive, − leading/capacitive; unity when there is no power flow). |
