ADC Offset Calibration in FOC
ADC offset calibration for current sensing is essential for achieving high-performance Field-Oriented Control (FOC) in real-world applications. In an inverter, signal conditioning for the current sensor introduces an offset voltage in the ADC input to measure both positive and negative current. This offset value is different for each target hardware because it depends on the tolerances of the components in the signal sensing and conditioning circuit. Current sensor ADC offset is represented in ADC counts that correspond to zero ampere current.
In FOC, the measured motor phase currents (I_a, I_b, I_c) are the primary feedback for the inner current control loop. These currents are transformed (using Clarke, Park transformations) into I_d and I_q. The ADC offset is a constant value added to or subtracted from the true analog signal during analog-to-digital conversion, to ensure efficient FOC performance even at low currents and speeds.
Using Motor Control Blockset™, you can design Simulink model to run the motor using open-loop control (also known as scalar control or Volts/Hz control) and calculate the ADC offsets for the current sensors available on the hardware. This approach uses a target model (that runs the open-loop motor control algorithm) and a host model (which is a user interface to the controller hardware board that has the target model deployed). You perform the ADC offset calibration after disconnecting the motor wires for three phases from the hardware board terminals.
| If you want to.... | Then.... |
|---|---|
| Use current sensor for any custom motor-control hardware to run a three-phase PMSM using field-oriented control (FOC), and perform ADC offset calibration | Refer to Open-Loop Control and ADC Offset Calibration linked from Algorithm-Export Workflows for Custom Hardware. |
| Use LAUNCHXL-F28379D controller and BOOSTXL-3PHGANINV inverter (with current sensors) to run a three-phase PMSM using field-oriented control (FOC), and perform ADC offset calibration | Refer to Run 3-Phase AC Motors in Open-Loop Control and Calibrate ADC Offset. The measured ADC offset values can be used to update the
|
| Overwrite the default values for current sensor ADC offset directly in the hardware initialization subsystem in Motor Control Blockset examples (All the examples use a model initialization script for the target model) | Set This setting enables the current sensor offset calibration in the target hardware during initialization. In the hardware initialization subsystem, ADC channels read the input current multiple times and averages them. The current controller uses this averaged ADC offset value. To disable the current sensor offset
calibration and use the default values from the initialization script, set
|
Note
Always measure the current sensor ADC offset when the motor is not running. It is recommended that you unplug the electric wires connected to the motor.