Measure instantaneous or cycle-average power
The Power Sensor block calculates the power taken by the load connected across the + and - terminals under the assumption that only the load is connected to the + terminal. Refer to the block icon for the arrangement of internal current and voltage sensors.
The sensor can return either instantaneous power, or power averaged over a fixed time period. Use the latter option for periodic current and voltage waveforms such as those associated with PWM control.
The following figure shows how you connect the block to measure power dissipated in a resistor.
For an alternative workflow using data logging to view component powers, see the Synchronous Buck Converter example.
Select whether you want to measure
Average power over a specified
period. The default value is
The fixed period of time for measuring the average power. This
parameter is only visible when you select
over a specified period for the Measurement
type parameter. The default value is
The block has the following ports:
Electrical conserving port connected to the positive supply rail
Electrical conserving port connected to the positive terminal of the load
Electrical conserving port connected to the negative terminal of the load
Physical signal port that outputs the measured power