Hello ionp, thanks for the reply.
What I do for active energy is similar to what you said, but since I don't need the active power I simply accumulate the instantaneous power to obtain the active energy.
I'm not sure I understood your reactive power calculation method. Vrms*Irms would lead to apparent power (S). You mean I should get the reactive power from the relation S = sqrt(P^2 + Q^2)?
That'd be one kind of solution, though I'm not really interested in knowing the powers (P, Q ,S) and rms values. I'd have to try this to see if I can get accurate metering from it.
I'm also reading about the hilbert-transform in the internet, trying to find a more practical guide, since I know only the basics of DSP.
If someone knows: if I implement an hilbert-transform using IIR filters, the phase shift will be 90 degrees from the original frequency for all frequencies? (My requirement is from 50 to 70Hz). The amplitude response will also be the same? (I mean the maximum value will be the same for different frequencies?).