In electronics and signal processing you have to deal with electrical signals. In many cases you may need to calculate **signal power*** *and * energy*.

### –it is easy with DC

In standard situation when DC power supply is applied to known resistor or other device like LED, motor you can calculate its power very easy by applying Ohms law:

If we rung this device for time T then we can calculate total energy used:

In some cases you may not know the resistance of your circuit. In this case you can measure the current flow. So your power formula can be transformed by using same Ohms law:

So for instance if you connect your circuit to 3V power supply and measure that it uses 0.5A of current, you can calculate the instant power usage:

And energy used during on hour:

### –variable signal power and energy apllied to load

Things are getting a bit more complicated when signal current isn’t continuous DC. In signal processing applications the therm signal power and signal energy is introduced. The idea is practically same as in DC. But since current (or voltage) change in time it is written as v(t) and i(t). for instance for periodic harmonic signals we can write .

In order to calculate signal power we can apply Ohms formula from above.

This way we can calculate instantaneous power of signal at any time: .

Lets say our voltage is periodical where f = 50Hz. And we apply this voltage across 100Ω resistor. At 20 seconds time we can calculate momentary power usage:

If we want to calculate energy loss during 100s wee need to integrate the power in period from 0 to T:

I know – everyone hates integrals, but this is how math works. In many cases you don’t need to integrate manually – just place formulas in to one of packages like Wolframalpha and you will get answer immediately.

Lets apply **energy** formula to our signal:

!dont apply 220V to 100Ω resistor.

When we know the energy consumed during time T we can calculate **average power **over period of time:

and with our previous example we calculate average power:

We recommend **EasyEDA** for circuit design and PCB prototype

**From Schematic Drawing to PCB Production, Just Need One Tool**

Cheap PCB Prototype: 10 pcs 2 layers only $10, quick delivery, 100% E-test

!dont apply 220V to 100Ω resistor.

Hope you get the idea what’s going on here.

### –signal power and energy

In signal processing for it is agreed to eliminate resistance parameter from equations by making it equal to 1 (R = 1). Also instead of v(t) usually signals are expressed as s(t). Thus we can express **signal energy** as follows:

signal **power**:

and **average power** over period of time:

### –finite and infinite signal energy

There is one more important matter about signals. They can be finite length and infinite. If we need to find *power of infinite signal* we need to find its average power over all time:

Power of infinite signal can be calculated as follows:

For some signals power and energy can be found by intuition. For instance lets take step signal:

We can clearly see that energy of signal grows to infinity when time goes also to **infinity**. Average power in other hand is **0.5W**.

In another case we have sinusoidal signal:

If we would apply formulas above we would get **signal energy = ∞** and **average power = 0.5W**.

And lastly very interesting case – sinc signal:

**signal energy = π** and **average power = 0W.**

### –RMS

If we take square root of average power then we get root mean square (*RMS*) of the signal:

For instance if we get sine wave average power equal to 0.5W then RMS:

What does RMS mean in practice? RMS is equivalent to DC voltage to get same heating effect. It is easy to calculate RMS voltage of sine wave. You need to multiply peak voltage by 0.707 and you get RMS value.

If you have sine signal amplitude 220V then its RMS = 220·0.707 = 155.54V.