FPGA-based compensation of current transformers