Project VAG: Using Arduino Due for current control

A simple solution could be a resistor in the primary line, whose temperature is measured to obtain the true effective current, independent of the wave form. I found such a circuit in a RF ammeter, where a thermocouple directly drives an analog meter.

In a digital solution you have to integrate (sum up) the current readings for a half wave, in order to obtain the effective current. The point is to find out where a half wave starts and ends. In theory the integrated value of a bipolar (signed) signal should continuously increase and decrease back to zero, so that it would be sufficient to track the last maximum and minimum sums, whose difference corresponds to the effective current. In practice the sum may run away, due to offsets in the measured values, so that the base line (zero) should be readjusted every now and then, to prevent integer overflows.

For driving the secondary current source a DAC is required, either built into the controller or an external one.