How can we calculate the power consumed by a circuit in xschem?
➕ 1
s
Stefan Schippers
04/08/2024, 2:19 PM
power is the product of voltage * current, so you can plot the product and take an average:
"power; v(vcc) i(vvcc) * 2n ravg()"
the expression calculates the running average over 2ns for vcc * icc
in the image below the ring oscillators are consuming 500uW of power while running.
🙌 1
l
Luke Harold Miles
04/09/2024, 11:57 PM
Any good tricks for when multiple voltage sources are involved? Is the naive sum(i(vsource)*v(vsource)) correct? I realize this is a question about electricity, not xschem 😆
s
Stefan Schippers
04/10/2024, 8:53 AM
If you sum up
branch current
*
voltage across terminals
for all voltage and current sources (included controlled sources if present) you get the total power delivered (and consumed) to the circuit. Given the convention for voltage and current orientations these power contributions are negative if generated and positive if consumed.
In below circuit V1 generates 10mW, R1 consumes 4mW and V2 consumes 6mW
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.