Measure active and reactive powers of voltage-current pair
A discrete version of this block is available in the powerlib_extras/Discrete Measurements library.
A phasor version of this block is available in the powerlib_extras/Phasor Library.
The Measurements section of the Control and Measurements library contains the Power block. This is an improved version of the Active & Reactive Power block. The new block features a mechanism that eliminates duplicate continuous and discrete versions of the same block by basing the block configuration on the simulation mode. If your legacy models contain the Active & Reactive Power block, they continue to work. However, for best performance, use the Power block in your new models.
The Active & Reactive Power block measures the active power P and reactive power Q associated with a periodic voltage-current pair that can contain harmonics. P and Q are calculated by averaging the V I product with a running average window over one cycle of the fundamental frequency, so that the powers are evaluated at fundamental frequency.
where T = 1/(fundamental frequency).
A current flowing into an RL branch, for example, produces positive active and reactive powers.
As this block uses a running window, one cycle of simulation has to be completed before the output gives the correct active and reactive powers.
The discrete version of this block, available in the powerlib_extras/Discrete Measurements library, allows you to specify the initial input voltage and current (magnitude and phase). For the first cycle of simulation, the outputs are held constant using the values specified by the initial input parameters.
The fundamental frequency, in hertz, of the instantaneous voltage and current.
The first input is the instantaneous voltage, in volts.
The second input is the instantaneous current, in amperes.
The output is a vector [P Q] of the active and reactive powers, in watts and vars, respectively.
power_transfo example simulates a three-winding distribution transformer rated at 75 kVA:14400/120/120 V.