## 1 Introduction  
Electric current is fundamental to modern industry, playing a crucial role in many aspects of industry, especially in power electronic converters and power distribution systems, where precise current measurement is often mandatory. Today, many current measurement techniques offer a specific performance in terms of linearity, accuracy, bandwidth, isolation, cost, measuring range, and size. Among these techniques, fluxgate current sensors have always been attractive to researchers due to their high performance and broad application in power electronics. A fluxgate current sensor is a magnetic field sensor widely used in DC or low-frequency AC measurements [1, 2]. Compared to other types of magnetic sensors, fluxgate sensors offer advantages such as high sensitivity, high accuracy, high resolution (up to 0.1 nT), a wide operating temperature range, long-term stability, and minimal temperature drift of sensitivity [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]. However, their bandwidth is relatively limited [12]. To enhance their high-frequency performance, a current transformer can be incorporated, with its output combined with the low-frequency component from the fluxgate sensor [13; 14; 15]. Due to their superior performance, fluxgate current sensors are widely utilized in various applications. These include monitoring local magnetic field distributions on magnetic tape, assessing the influence of solar storms on Earth's geomagnetic field, and analyzing human heartbeats [16]. Additionally, fluxgate sensors are crucial in battery management systems, energy storage solutions, and space applications, where high sensitivity and precision are essential [17; 18; 19]. Fluxgate current sensors are commonly classified into open-loop and closed-loop types based on the sensing configuration [6]. Compared to an open-loop system, a closed-loop fluxgate sensor is less susceptible to flux sensor gain variations. It has better linearity because the core flux density is always close to zero, avoiding the non-linearity introduced by the core material in open-loop systems [13]. Additionally, a closed-loop fluxgate sensor with a magnetic core and a feedback winding can improve the sensor's sensitivity, eliminate offset and drift related to temperature, and significantly reduce the error caused by the magnetic hysteresis phenomenon [1; 2]. However, these advantages come at the cost of a complex structure due to additional feedback windings and a higher power consumption due to the feedback loop. The high accuracy of a closed-loop sensor can be achieved by obtaining a zero-flux condition, i.e., a perfect balance between the magnetic flux generated by the measured current in the primary winding and that generated by the feedback current in the feedback winding [20]. Innovations in fluxgate current sensors have been made in both structure and signal processing. In terms of structure, a ripple compensation coil is added to reduce the high-frequency harmonics in the excitation waveform and to reduce the interference from external disturbances [21; 22]. Completing signal processing in the digital domain means that after analog to digital conversion, it is completely unaffected by temperature, interference, and change in power supply [22]. Thus, employing digital closed-loop control in fluxgate current sensors is desirable. PID control theory is typically applied to achieve closed-loop control [23; 24]. With its simple structure, good stability, and reliable performance, it has become one of the main industrial control technologies. In most control system applications, over 90% of control loops are in the PID form [25; 26]. Most traditional analog closed-loop fluxgate current sensors rely on an analog PI or PID circuit to control the feedback current for magnetic field compensation to achieve a zero-flux condition. However, adjusting the parameters of analog PI or PID circuits is tedious and laborious. In addition, once the PID parameters of the analog sensor are fixed, they cannot be easily modified.