Ideal instantaneous or cycle-average power measurement
Simscape / Electrical / Sensors & Transducers
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 Buck Converter example.
P — Measured power
Physical signal port that outputs the measured power
S — Positive supply rail
Electrical conserving port connected to the positive supply rail
+ — Load positive terminal
Electrical conserving port connected to the positive terminal of the load
- — Load negative terminal
Electrical conserving port connected to the negative terminal of the load
Measurement type — Measurement type
Instantaneous power (default) |
Select whether you want to measure
Average power over a specified
period. The default value is
Averaging period — Averaging period
Fixed period of time for measuring the average power.
This parameter is visible only when you select
power over a specified period for the
Measurement type parameter.