This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

instaspin中电流偏置值的设置

Other Parts Discussed in Thread: DRV8312

最近学习28069m和8305套件,对其中的电流电压偏置值的设置不是很明白,看到设置的值都是不同的,

#define I_A_offset (1.20)
#define I_B_offset (1.20)
#define I_C_offset (1.20)

//! \brief ADC voltage offsets for A, B, and C phases
//! \brief One-time hardware dependent, though the calibration can be done at run-time as well
//! \brief After initial board calibration these values should be updated for your specific hardware so they are available after compile in the binary to be loaded to the controller
#define V_A_offset (0.50)
#define V_B_offset (0.50)
#define V_C_offset (0.50)

这里的1.2和0.5是如何确定的?

同样试着打开别的套件的user.h程序,有的是三个值不同,有的甚至是负值,因此很是疑惑。

  • user's guide有这部分介绍,请自行查阅
  • 请问下能具体说下哪部分吗?
    4.1.10 I_A_offset、I_B_offset、I_C_offset
    #define I_A_offset (0. 8661925197)
    #define I_B_offset (0.8679816127)
    #define I_C_offset (0.8638074994)
    此模块定义A、B 和C 相的ADC 电流偏移。
    与硬件一度相关,也可在运行时执行校准。
    在电路板上进行初始校准后,应针对特定硬件更新这些值,使其可在编译为二进制后加载到控制器中。

    14.4.1.1 加载有效偏移并禁用偏移重校准
    请注意,I_A_offset、I_B_offset、I_C_offset、V_A_offset、V_B_offset 和V_C_offset 为之前系统运行的预
    校准偏移。重校准启用后,若这些偏移发生更新,可使用以下示例从HAL 对象获取它们。


    这两部分也没说具体怎么操作啊,原谅我的愚钝,恳请不吝指教
  • ERic:
    InstaSPIN 的6.6.2章 有谈到这些理论值是如何计算的:
    6.6.2 CTRL_State_OffLine and EST_State_Idle (Hardware Offsets
    Calibrated)

    The current offsets, also known as bias values, ideally should be:
    = 0.5 ∙ _
    This current scale factor (Current_sf or USER_CURRENT_SF) is calculated in the following example
    with values for the DRV8312 board revision D:
    USER_CURRENT_SF =
    USER_ADC_FULL_SCALE_CURRENT_A
    USER_IQ_FULL_SCALE_CURRENT_A
    =
    17.69
    10.0
    = 1.769
    Current_BiasIdeal = 1.65
    3.3
    ∙ USER_CURRENT_SF = 0.5 ∙ 1.769 = 0.8845
    The 0.5 value comes from the fact that the current feedback circuit is bidirectional, providing an ideal
    zero at VDD/2, or 1.65V.
    The voltage bias is calculated as follows. First, the voltage scale factor is done as shown here:
    USER_VOLTAGE_SF =
    USER_ADC_FULL_SCALE_VOLTAGE_V
    USER_IQ_FULL_SCALE_VOLTAGE_V
    =
    66.32
    48.0
    = 1.3817
    Voltage_BiasIdeal =


    2
    USER_ADC_FULL_SCALE_VOLTAGE_V
    ∙ USER_VOLTAGE_SF = 0.25