A switching circuit comprising: an inductive component including at least one winding; a switch configured to transfer power from a voltage source to the inductive component in accordance with a switch control signal wherein the switch is a FET having a voltage at the source of the FET (Vsource), and a desired value of the voltage at the source of the FET (Vsource,setpoint); and a controller, configured to: integrate a signal representative of a voltage across the inductive component; generate a signal representative of magnetic flux in the inductive component from the integrated signal representative of a voltage across the inductive component, and use the signal representative of the magnetic flux in the inductive component to account for a peak magnetization current value in order to control the switch; wherin the controller is further configured to: record the value of the signal representative of the magnetic flux in the inductive component when the FET is switched off as a first value; record the value of the signal representative of the magnetic flux in the inductive component at the start of the secondary stroke at which time magnetic energy starts to flow to an output as a second value; use the first value and second value to determine the ratio between the values of the signal representative of the magnetic flux in the inductive component at S1 and S2; and use the determined ratio to adjust the Vsource or Vsource,setpoint in order to account for the peak magnetization current when controlling the FET. an inductive component including at least one winding; a switch configured to transfer power from a voltage source to the inductive component in accordance with a switch control signal wherein the switch is a FET having a voltage at the source of the FET (Vsource), and a desired value of the voltage at the source of the FET (Vsource,setpoint); and a controller, configured to: integrate a signal representative of a voltage across the inductive component; generate a signal representative of magnetic flux in the inductive component from the integrated signal representative of a voltage across the inductive component, and use the signal representative of the magnetic flux in the inductive component to account for a peak magnetization current value in order to control the switch; integrate a signal representative of a voltage across the inductive component; generate a signal representative of magnetic flux in the inductive component from the integrated signal representative of a voltage across the inductive component, and use the signal representative of the magnetic flux in the inductive component to account for a peak magnetization current value in order to control the switch; wherin the controller is further configured to: record the value of the signal representative of the magnetic flux in the inductive component when the FET is switched off as a first value; record the value of the signal representative of the magnetic flux in the inductive component at the start of the secondary stroke at which time magnetic energy starts to flow to an output as a second value; use the first value and second value to determine the ratio between the values of the signal representative of the magnetic flux in the inductive component at S1 and S2; and use the determined ratio to adjust the Vsource or Vsource,setpoint in order to account for the peak magnetization current when controlling the FET. record the value of the signal representative of the magnetic flux in the inductive component when the FET is switched off as a first value; record the value of the signal representative of the magnetic flux in the inductive component at the start of the secondary stroke at which time magnetic energy starts to flow to an output as a second value; use the first value and second value to determine the ratio between the values of the signal representative of the magnetic flux in the inductive component at S1 and S2; and use the determined ratio to adjust the Vsource or Vsource,setpoint in order to account for the peak magnetization current when controlling the FET.