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.

MOTORWARE: motorware

Part Number: MOTORWARE

Hi TI

Our drive with motorware on F28069M gives error USER_ErrorCode_iqFullScaleFreq_Hz_High, because of high USER_VOLTAGE_FILTER_POLE_Hz and high USER_IQ_FULL_SCALE_FREQ_Hz and  consequently the term USER_IQ_FULL_SCALE_FREQ_Hz >= (128 * (float_t)USER_MOTOR_NUM_POLE_PAIRS * 1000.0 / 60.0 triggers the error. the only way to solve this is to change 128 to 256 as we've changed to IQ23 in IQmathlib. however when we do this, the adc reading are not correct. for example it reads the dc link voltage at half of real amount. 

I'll appreciate any comment

Thanks

  • What USER_VOLTAGE_FILTER_POLE_Hz  and USER_IQ_FULL_SCALE_FREQ_Hz are you using? Please post the user.h you used. 

  • 
    #define USER_IQ_FULL_SCALE_FREQ_Hz        (3000.0)   
    
    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (120)     
    
    #define USER_ADC_FULL_SCALE_VOLTAGE_V       (120)   
    
    #define USER_IQ_FULL_SCALE_CURRENT_A         (250.0)     
    
    #define USER_ADC_FULL_SCALE_CURRENT_A        (250.0)    
    
    
    #define USER_PWM_FREQ_kHz                (90.0) 
    
    #define USER_MAX_VS_MAG_PU        (0.5)   
    
    
    #define USER_NUM_PWM_TICKS_PER_ISR_TICK        (3)
    
    #define USER_NUM_ISR_TICKS_PER_CTRL_TICK       (1)     
    
    #define USER_NUM_CTRL_TICKS_PER_CURRENT_TICK   (1)     
    
    #define USER_NUM_CTRL_TICKS_PER_EST_TICK       (1)    
    
    #define USER_NUM_CTRL_TICKS_PER_SPEED_TICK  (90) 
    
    #define USER_NUM_CTRL_TICKS_PER_TRAJ_TICK   (90) 
    
    
    #define USER_MAX_NEGATIVE_ID_REF_CURRENT_A     (-0.5 * USER_MOTOR_MAX_CURRENT)  
    
    #define USER_R_OVER_L_EST_FREQ_Hz (300)              
    
    #define USER_ZEROSPEEDLIMIT   (0.5 / USER_IQ_FULL_SCALE_FREQ_Hz)   
    
    #define USER_FORCE_ANGLE_FREQ_Hz   (2.0 * USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz)     
    
    
    #define USER_VOLTAGE_FILTER_POLE_Hz  (2647.0)   
    
    
    
    #define USER_MOTOR a
    
    #elif (USER_MOTOR == a)
    #define USER_MOTOR_TYPE                 MOTOR_Type_Pm
    #define USER_MOTOR_NUM_POLE_PAIRS       (1)
    #define USER_MOTOR_Rr                   (NULL)
    #define USER_MOTOR_Rs                   (0.14)
    #define USER_MOTOR_Ls_d                 (0.00029)
    #define USER_MOTOR_Ls_q                 (0.00029)
    #define USER_MOTOR_RATED_FLUX           (0.06)
    #define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)
    #define USER_MOTOR_RES_EST_CURRENT      (1.0)
    #define USER_MOTOR_IND_EST_CURRENT      (-0.5)
    #define USER_MOTOR_MAX_CURRENT          (20)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz     (20.0)
    
    
    

    Hi Yanming
    its as following. 

  • You can't change the global IQ which must be IQ24 for instaspin-foc. You might change the USER_IQ_FULL_SCALE_FREQ_Hz to a small value like 2000 even though the motor maximum frequency is 3000Hz.

    BTW, the USER_VOLTAGE_FILTER_POLE_Hz, voltage filter pole is too high for instaspin-foc, it should be 300~1000Hz.

  • does it mean its a serious intrinsic limitation in motorware or it can be solved by somehow?

    Do you think motorcontrol_skd has the same limitation?

    Thanks

  • No, it's not a limitation in motorWare. The checking codes are just for helping the user to set the right parameters for instaSPIN.

    As mentioned above, you can still set the USER_IQ_FULL_SCALE_FREQ_Hz to 2000, but you can set the target speed to 3000, even 4000 as well.

    The motorControl uses the SI format with floating-point, doesn't have such checking code, but you still need to set a correct scale value based on your hardware and system.

  • its what you said

    BTW, the USER_VOLTAGE_FILTER_POLE_Hz, voltage filter pole is too high for instaspin-foc, it should be 300~1000Hz.

    now you say there is no limitation. 

  • We mean you can run the motor to a target frequency you want which is not limited to the USER_IQ_FULL_SCALE_FREQ_Hz.

    This is a hardware parameter based on the voltage sampling circuit, it has a recommended value. You can't use a too high/low filter frequency for voltage sensing that is required by the FAST algorithm. 

  • Thanks for your reply

    sth doesn't make sense here.

    The fundamental voltage and current frequency is 2.8 kHz for the rated speed. So we set the USER_VOLTAGE_FILTER_POLE_Hz around 2.7 kHz in hardware.

    when in the hardware the pole is 2.7 kHz, how I can set it to <1000 Hz in software?

    Do you mean that even if the hardware is sth, the software could be sth else? here in this case 2.7 kHz of hardware vs 1000 Hz of software.

    Or do you mean to lower the USER_VOLTAGE_FILTER_POLE_Hz in hardware as well to below 1000 Hz?

    If we set the USER_VOLTAGE_FILTER_POLE_Hz in hardware as 1000 Hz, then how about the rated speed signals?

    Could the software be able to perform normally at rated speed and fundamental frequency despite the low pass filter implemented in hardware will affect the read signals?

    Hope I didn't make any inconvenient query

     

  • You need to change the voltage sensing circuit and make the filter pole to <1000Hz which is ok for running the motor to 3000Hz. As described in the instaspin user's guide, just need to meet the following conditions, so you might use a 750Hz~1000Hz pole filter for voltage sensing.

    • Typical values for USER_VOLTAGE_FILTER_POLE_Hz fall between 300 Hz < pole < 400 Hz.
    • USER_VOLTAGE_FILTER_POLE_Hz ≥ 200 Hz.
    • IQ_FULLSCALE_FREQUENCY_Hz must be set to a value < 4.0 × USER_VOLTAGE_FILTER_POLE_Hz to avoid numerical saturation.

  • Many thanks Yanming for your help and time

    Stay safe and kind regards