cancel
Showing results for
Did you mean:

## How to compute active and reactive power from current and voltage waveforms in script?

Hello,

I have a file containing the current and corresponding voltage waveforms of several appliances (TDMS). I need to compute in DIADem the relative active and reactive powers using the simple formulas : P=U*I*cos(phi) ; Q=U*I*sin(phi)

Can you help?

Message 1 of 3
(232 Views)

## Re: How to compute active and reactive power from current and voltage waveforms in script?

Yes, in DIAdem you can multiply whole channels together and perform math functions like sine and cosine on them.  Here is an example code that can get you started:

```Call Calculate("ch(""Results/P"") = ch(""Raw Data/U"") * ch(""Raw Data/I"") * cos(Pi)")
Call Calculate("ch(""Results/Q"") = ch(""Raw Data/U"") * ch(""Raw Data/I"") * sin(Pi)")```

Also, you can use the channel calculator to do those calculations manually (or to record them into script):  Message 2 of 3
(212 Views)

## Re: How to compute active and reactive power from current and voltage waveforms in script?

Thank you! that works! Message 3 of 3
(190 Views)