AC voltage applied to a non linear load. Using a DSP processor, I digitize the resulting voltage and current along several periods (100 samples per period) and detect zero crossings, so I can calculate:
a) Vrms, by squaring each sample, summing all of them, taking its average and finally...