Engee documentation

Power Meter

Power measurement and CCDF of the power of the voltage signal.

power meter

Description

Block Power Meter calculates the power of the voltage signal.

If the parameters are checked. *Compute CCDF*check box, the block also calculates the complementary cumulative distribution function (CCDF) of the voltage signal power. The output of the CCDF is the relative power and probability (in per cent). Power measurements include average power, peak power, and the ratio of peak to average power.

For more details on how the block calculates the power measurements and CCDF, see the section Algorithms.

Ports

Input

# IN — input signal
vector | matrix

Details

An input signal given as a vector or matrix.

  • If the input signal is a matrix, the unit treats each column as an independent channel and calculates the power measurement for each channel.

If the parameters Allow arbitrary frame length for fixed-size input signals is not selected and you input a fixed-size signal, the frame length must be a multiple of the jump size (window length - overlap length). In all other cases the input frame length can be arbitrary.

The block accepts variable-sized input signals (the frame length changes during the simulation). When you input a variable size signal, the frame length of the signal can be arbitrary.

Data types

Float64 | Float32.

Complex numbers support

Yes

# Rst — reset signal
scalar

Details

A Boolean reset signal specified as a scalar.

  • If the input signal on the Rst port is `true', the unit clears internal histograms and statistics before processing the current input signal.

  • If the input signal on the Rst port is `false', the unit calculates measurements from the start of the simulation or from the last reset.

Dependencies

To use this port, select the parameters checkboxes Compute CCDF и Reset port.

Data types

Bool.

Complex numbers support

No

Output

# Avg — average power
scalar | vector | matrix

Details

The output value of the average power of the voltage signal since the start of the simulation or since the last reset, returned as a scalar, vector or matrix.

The unit calculates the average power for each channel in the units specified in parameters Output power units.

If the parameters unchecked. Compute CCDF, the block will calculate the sliding average power using the Sliding window method.

Refer to this table for details on the output dimensions.

Input signal Input dimensions Output dimensions with parameters enabled Allow arbitrary frame length for fixed-size input signals Output dimensions when parameters are off Allow arbitrary frame length for fixed-size input signals

Fixed size signal

to , where is a multiple of the jump size (window length - slab length)

( /size of jump) to

to

Fixed size signal

at , where is not a multiple of the jump size (window length - overlap length)

ceil( /jump size) at when the parameters are enabled. Allow arbitrary frame length for fixed-size input signals.

If you do not enable the parameters. Allow arbitrary frame length for fixed-size input signals, the block generates an error.

to

Variable size signal

at

ceil( /size jump) at

at

If the output signal size has an upper bound ceil( //size jump) at , during simulation the size of the first dimension changes within this boundary, while the size of the second dimension remains constant.

If you have selected the parameters Compute CCDF, the block calculates the stationary average power of the entire signal along each channel. In this case, the output signal size is equal to by , where is the number of channels (columns) in the input signal.

Dependencies

To use this port, set for the parameters Measurement value Average power or All.

Data types

Float64 | Float32

Complex numbers support

No

# RelPwr — relative power
`matrix N on M

Details

Relative power returned as a matrix by , where:

  • - is the number of channels (columns) in the input signal.

  • If you set the parameters CCDF output value Relative power and probability, is equal to ceil(Power range (dB)/Power resolution (dB)) + 1.

Relative power is the power in dB by which the instantaneous signal power exceeds the average signal power with probability Prob expressed as a percentage.

Dependencies

To use this port, select the parameters check box CCDF output, and then set the parameters CCDF output to Relative power (dB above average power) or Relative power and probability (whole CCDF curve).

Data types

Float64 | Float32.

Complex numbers support

No

# Peak — peak power
scalar | vector | matrix

Details

The peak voltage value of the voltage signal since the start of the simulation or since the last reset, returned as a scalar, vector or matrix. The block calculates the peak power for each channel in the units specified in the parameters Output power units.

If the parameters unchecked. Compute CCDF*parameter unchecked, the block will calculate the peak power in motion using the *Sliding Window Method algorithm.

Refer to this table for details on the output signal dimensions.

Input signal Input dimensions Output dimensions with parameters enabled Allow arbitrary frame length for fixed-size input signals Output dimensions when parameters are off Allow arbitrary frame length for fixed-size input signals

Fixed size signal

to , where is a multiple of the jump size (window length - slab length)

( /size of jump) to

to

Fixed size signal

at , where is not a multiple of the jump size (window length - overlap length)

ceil( /jump size) at when the parameters are enabled. Allow arbitrary frame length for fixed-size input signals.

If you do not enable the parameters. Allow arbitrary frame length for fixed-size input signals, the block generates an error.

to

Variable size signal

at

ceil( /size jump) at

at

If the output signal size has an upper bound ceil( /size jump) at , during simulation the size of the first dimension changes within this boundary and the size of the second dimension remains constant.

If you have selected the parameters Compute CCDF, the block calculates the stationary average power of the entire signal along each channel. In this case, the output signal size is equal to by , where is the number of channels (speakers) in the input signal.

Dependencies

To use this port, set for the parameters Measurement value Peak power or All.

Data types

Float64 | Float32

Complex numbers support

No

# PAPR — peak to average power ratio
scalar | vector | matrix

Details

The peak-to-average power ratio (PAPR) of a voltage signal, returned as a scalar, vector or matrix. The block calculates the peak-to-average power ratio for each channel.

If the parameters are unchecked. Compute CCDF*the block will calculate the peak power in motion using the *Sliding Window Method algorithm.

Refer to this table for details on the output signal dimensions.

Input signal Input dimensions Output dimensions with parameters enabled Allow arbitrary frame length for fixed-size input signals Output dimensions when parameters are off Allow arbitrary frame length for fixed-size input signals

Fixed size signal

to , where is a multiple of the jump size (window length - slab length)

( /size of jump) to

to

Fixed size signal

at , where is not a multiple of the jump size (window length - overlap length)

ceil( /jump size) at when the parameters are enabled. Allow arbitrary frame length for fixed-size input signals.

If you do not enable the parameters. Allow arbitrary frame length for fixed-size input signals, the block generates an error.

to

Variable size signal

at

ceil( /size jump) at

at

If the output signal size has an upper bound ceil( /size jump) at , during simulation the size of the first dimension changes within this boundary and the size of the second dimension remains constant.

If you have selected the parameters Compute CCDF, the block calculates the stationary average power of the entire signal along each channel. In this case, the output signal size is equal to by , where is the number of channels (speakers) in the input signal.

Dependencies

To use this port, set for the parameters Measurement value Peak-to-average power ratio or All.

Data types

Float64 | Float32

Complex numbers support

No

# Prob — probability
`matrix N on M

Details

The probability in per cent returned as a matrix by , where:

  • - is the number of channels (speakers) in the input signal.

  • If the parameters are set to CCDF output value Probability (%), is equal to the length of the column vector you specify in the parameters Specify relative power (dB) for probability output.

  • If you set the parameters to CCDF output value Relative power and probability, is equal to ceil(Power range (dB)/Power resolution (dB)) + 1.

Prob( )/100 is the probability that the instantaneous signal power of the -channel is higher than its average signal power by RelPwr( , ) in dB.

Dependencies

To use this port, select the parameters check box Compute CCDF*and then set the parameters *Compute CCDF value Probability (%) or Relative power and probability.

Data types

Float64 | Float32

Complex numbers support

No

Parameters

Parameters

# Measurement — required power measurement
Average power | Peak power | Peak-to-average power ratio | All

Details

Required power measurement. Defined as:

  • Average power (By default);

  • Peak power;

  • Peak-to-average power ratio;

  • All.

Values

Average power | Peak power | Peak-to-average power ratio | All

Default value

Average power

Program usage name

Measurement

Tunable

No

Evaluatable

No

# Reference load (ohms) — reference load, in ohms
Real number

Details

The reference load that the power meter uses to calculate power values, specified as a real positive scalar.

Default value

1

Program usage name

ReferenceLoad

Tunable

No

Evaluatable

Yes

# Output power units — power units
dBm | dBW | Watts

Details

Units of power measurement. Defined as:

  • dBm;

  • dBW;

  • Watts.

Values

dBm | dBW | Watts

Default value

dBm

Program usage name

OutputPowerUnits

Tunable

No

Evaluatable

No

# Window length — window length
Real number

Details

The length of the window during which the block calculates measurements, specified as a positive number.

Dependencies

To use this parameters, clear the check box Compute CCDF.

Default value

256

Program usage name

WindowLength

Tunable

No

Evaluatable

Yes

# Overlap length — floor length between windows
Real number

Details

The overlap length between sliding windows, specified as a non-negative integer. The value of the overlap length varies in the range [0, Window length, - 1].

Dependencies

To use this parameter, deselect the check box Compute CCDF.

Default value

255

Program usage name

OverlapLength

Tunable

No

Evaluatable

Yes

# Allow arbitrary frame length for fixed-size input signals — inclusion of arbitrary frame length for fixed-size input signals
Logical

Details

Select this checkbox to allow fixed-size input signals (whose size does not change during simulation) to have an arbitrary frame length, without the frame length necessarily being a multiple of the jump size. The jump size is defined as Window length - Overlap length. The block uses this parameter only for fixed-size input signals and ignores it if the input signal has a variable size.

When the input signal has a variable size, it can have an arbitrary frame length, i.e. the frame length does not have to be a multiple of the jump size.

For fixed-size input signals, if you:

  • Select the Allow arbitrary frame length for fixed-size input signals parameters check box, the frame length of the signal does not have to be a multiple of the jump size. If the input signal is not a multiple of the jump size, the output is usually a variable-sized signal. Therefore, to support arbitrary input size, the block must also support variable-size operations, which you can enable by selecting the Allow arbitrary frame length for fixed-size input signals parameters.

  • Uncheck the Allow arbitrary frame length for fixed-size input signals parameters, the input frame length must be a multiple of the jump size.

Dependencies

To use this parameter, clear the checkbox of the parameter Compute CCDF.

Default value

false (switched off)

Program usage name

AllowArbitraryInputLength

Tunable

No

Evaluatable

No

# Compute CCDF — CCDF output
Logical

Details

Specify the port to be output:

  • RelPwr - relative power (in dB above average power). This is the amount of power in dB by which the instantaneous power of the signal is above the average power.

  • Prob - probability in per cent. This is the probability that the instantaneous signal power is higher than the average signal power by the amount of relative power in dB.

  • Ports RelPwr and Prob.

Dependencies

To use this parameter, select the parameters check box. Compute CCDF.

Default value

false (switched off)

Program usage name

ComputeCCDF

Tunable

No

Evaluatable

No

# Power range (dB) — power range
Real number

Details

The range on the axis of the CCDF curves, specified as a positive scalar. The CCDF curves end at the maximum relative power, namely the PAPR of the signal, and begin at the PAPR - . Power range (dB). In the CCDF capability of the block, relative power is the power in dB by which the instantaneous power of the signal exceeds the average power of the signal.

Dependencies

To use this parameter, select the parameters check box Compute CCDF.

Default value

50

Program usage name

PowerRange

Tunable

No

Evaluatable

Yes

# Power resolution (dB) — power resolution
Real number

Details

The resolution on the axis of the CCDF curves, specified as a positive scalar.

Dependencies

To use this parameter, tick the checkbox of the parameters Compute CCDF.

Default value

0.1

Program usage name

PowerResolution

Tunable

No

Evaluatable

Yes

# CCDF output — CCDF output
Relative power | Probability (%) | Relative power and probability

Details

Specify the port for output:

  • RelPwr - Relative power (in dB above average power). This is the amount of power in dB by which the instantaneous power of the signal is above the average power.

  • Prob - probability in per cent. This is the probability that the instantaneous signal power is higher than the average signal power by the amount of relative power in dB.

  • Ports RelPwr and Prob.

Dependencies

To use this parameter, select the parameters check box. Compute CCDF.

Values

Relative power | Probability (%) | Relative power and probability

Default value

Relative power

Program usage name

CCDFOutput

Tunable

No

Evaluatable

No

# Specify probability (%) for relative power output — probability for relative power
Scalar / vector of real numbers

Details

The probability (in per cent) for the relative output power given as a vector of columns. The length of this vector determines the number of rows in the relative output power on the RelPwr port.

Dependencies

To use this parameter, select the parameters checkbox Compute CCDF and set the parameters CCDF output value Relative power.

This parameter also enables the RelPwr output port.

Default value

[ 10; 1; 0.1; 0.01; 0.001; 0.0001 ]

Program usage name

ProbabilityVector

Tunable

No

Evaluatable

Yes

# Specify relative power (dB) for probability output — relative power to infer probability
Scalar / vector of real numbers

Details

The relative power for the probability output, given as a vector of columns. The length of this vector determines the number of rows in the probability output on the Prob port.

Dependencies

To use this parameter, select the parameters check box Compute CCDF and set the parameters to CCDF output Probability (%).

This also enables the Prob output port.

Default value

[ 0; 3; 6; 9; 12 ]

Program usage name

RelativePowerVector

Tunable

No

Evaluatable

Yes

# Reset port — enabling the reset port
Logical

Details

Select this checkbox to enable the Rst input port that receives a logic signal. If the value on the Rst port is true, the unit clears internal histograms and statistics before processing the current input.

Dependencies

To use this parameter, select the parameters check box Compute CCDF and set the parameters to CCDF output.

Default value

false (switched off)

Program usage name

ResetPort

Tunable

No

Evaluatable

No

Additional Info

Algorithms

Sliding window method

If you have not configured the power meter to calculate CCDF measurements, the power meter calculates the sliding power measurements using the sliding window method.

In the sliding window method, the unit calculates a power measurement over a finite signal duration. The length of the window determines the length of the data over which the algorithm calculates the power value. The window moves as new data is received. The output for each input sample produces a measurement for the current sample and Len - 1 previous samples. Len is the length of the sliding window in samples. To compute the first output sample, the algorithm waits until it receives a jump in the number of input samples. The size of the jump is defined as window length - sliding window length. The remaining samples in the window are considered as zero samples. For example, if the window length is 5 and the overlap length is 2, the algorithm waits until it receives 3 input samples to calculate the first output sample. After generating the first output sample, it generates subsequent output samples for each jump of input samples.

If the window is large, the power that the block calculates is closer to the stationary power of the data. For data that does not change rapidly, use a long window to get a smoother measurement. For data that changes rapidly, use a smaller window.

When you configure the power meter to calculate CCDF measurements, the algorithm calculates the stationary power of the data. It sets the window length to Inf and the overlap length to 0, making both parameters read-only.

*Average power.

If you have not configured the power meter to calculate CCDF measurements, the power meter calculates the sliding average power of the voltage signal on each channel from the Sliding Window Method. If you have configured the power meter to calculate CCDF measurements, the power meter calculates the steady-state average power of the voltage signal on each channel.

These equations give the average power in units of dBm, dBW and in units of Watts.

where

  • - input voltage signal;

  • - is the reference load (in ohms) that the unit uses to calculate the power value;

  • Avg represents the moving average power value when the power meter is not calculating CCDF measurements.

When the power meter calculates CCDF measurements, Avg represents the steady-state average power for each channel.

* Peak power

If you have not configured the power meter to calculate CCDF measurements, the power meter calculates the moving peak power of the voltage signal on each channel using the Sliding Window Method. If you have configured the power meter to calculate CCDF measurements, the power meter calculates the stationary peak power of the voltage signal on each channel.

These equations give the average power in units of dBm, dBW and in units of Watts.

where

  • - input voltage signal;

  • - is the reference load (in ohms) that the unit uses to calculate the power value;

  • Max represents the sliding peak power when the power meter is not calculating CCDF measurements.

When the power meter calculates CCDF measurements, Max represents the steady-state peak power for each channel.

*Ratio of peak to average power.

If you have not configured the power meter to calculate CCDF measurements, the power meter calculates the ratio of the moving peak power to the average power of the voltage signal on each channel using the Sliding Window Method. If you have configured the power meter to calculate CCDF measurements, the power meter calculates the ratio of the stationary peak power to the average power of the voltage signal on each channel.

These equations give the average power in units of dBm, dBW and in units of Watts.

where

  • - is the input voltage signal;

  • Avg represents the moving average power value when the power meter is not calculating CCDF measurements.

When the power meter calculates CCDF measurements, Avg represents the steady-state average power for each channel.

  • Max represents the sliding peak power when the power meter is not calculating CCDF measurements.

When the power meter calculates CCDF measurements, Max represents the steady-state peak power for each channel.

*Relative Power

The power meter calculates relative power only if the algorithm is configured to calculate CCDF measurements. The algorithm uses an infinite duration window to calculate relative power.

Relative power is the amount of power in dB by which the instantaneous power of the signal is higher than the average power of the signal. The block calculates relative power using the following equations:

If the output power is given by dBm,

If the output power is specified in dBW,

If the output power is set in Watts,

where

  • - input voltage signal;

  • - the reference load (in ohms) that the unit uses to calculate the power value;

  • - instantaneous power of the signal in W;

  • - average power of the voltage signal.

*Probability

The power meter calculates probability only when you configure the algorithm to calculate CCDF measurements. Probability in percentage means the probability that the instantaneous signal power is higher than the average signal power by the relative power in dB.