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.

电机驱动例程中ILEG2DCBUSMEAS模块里Vdc_bus gain值的计算,备注看不懂

Other Parts Discussed in Thread: DRV8353R

28335的永磁同步电机控制控制程序中的ILEG2DCBUSMEAS模块,用来输出ADC采集回来的电流值Id,Iq和DC BUS,头文件中有一段注释看不明白,这个gain值为什么这样算啊?

// Note: Assuming the base DC-bus voltage is 24 volt 
//        - ADC input for Vdc_bus range is 24*1/(24.9+1) = 0.927 volt on DMC550
//        - Then, Vdc_bus gain = 3.0/0.927 = 3.2375 (or 0x675C in Q13) 

typedef struct { int16 ImeasAGain;    // Parameter: gain for Ia (Q13) 
                 int16 ImeasAOffset;   // Parameter: offset for Ia (Q15) 
                 int16 ImeasA;         // Output: measured Ia (Q15) 
                 int16 ImeasBGain;     // Parameter: gain for Ib (Q13) 
                 int16 ImeasBOffset;   // Parameter: offset for Ib (Q15) 
                 int16 ImeasB;         // Output: measured Ib (Q15) 
                 int16 VdcMeasGain;    // Parameter: gain for Vdc (Q13) 
                 int16 VdcMeasOffset;  // Parameter: offset for Vdc (Q15) 
                 int16 VdcMeas;        // Output: measured Vdc (Q15) 
				 int16 Vcontrol; 	   // Output: V control for speed reference (Q15)
				 int16 ImeasC;	  	   // Output: computed Ic (Q15) 	
                 Uint16 ChSelect;      // Parameter: ADC channel selection
                 void (*init)();       // Pointer to the init function 
                 void (*read)();       // Pointer to the read function 
               } ILEG2DCBUSMEAS;

typedef ILEG2DCBUSMEAS *ILEG2DCBUSMEAS_handle;
/*-----------------------------------------------------------------------------
 Note 1 : It is necessary to call the init function to change the ADC 
            register settings, for the change in the channel setting for 
            ChSelect setting changes to take effect.
            The read function will not detect or act upon this change.
-----------------------------------------------------------------------------*/
// Default Initializer for the ILEG2DCBUSMEAS Object
// DMC1500 + eZdsp2808: ChSelect = 0x0710 //这里的DMC1500和DMC500是什么?
// DMC550 + eZdsp2808: ChSelect = 0x0610
// Note: Assuming the base DC-bus voltage is 24 volt 
//        - ADC input for Vdc_bus range is 24*1/(24.9+1) = 0.927 volt on DMC550
//        - Then, Vdc_bus gain = 3.0/0.927 = 3.2375 (or 0x675C in Q13) 

#define F28335_ILEG2_DCBUS_MEAS_DEFAULTS { 0x1FFF,0x0000,0x0000,             \
                                          0x1FFF,0x0000,0x0000,             \
                                          0x1FFF,0x0000,0x0000,             \
                                          0x0000,0x0000,0x0710,                    \
                                          (void (*)(Uint32))F28335_ileg2_dcbus_drv_init, \
                                          (void (*)(Uint32))F28335_ileg2_dcbus_drv_read  \
                                         }

#define ILEG2DCBUSMEAS_DEFAULTS F28335_ILEG2_DCBUS_MEAS_DEFAULTS