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.

demo 12A problem

Genius 5910 points

Hi,

I have a problem with demo 12A.

I used demo 3A to check that my motor is running and my encoder is working correctly (scope)

 Then I run demo 12A.

 What I see is that the motor is toggling only one line from the encoder. motor is vibrating.
Then I got the errors 2003 or 2004. I set the speed as low at 100 RPM and the gMotorVars.SpinTAC.VelIdTorqueRampTime_sec at 1. No luck

 I also switched the encoder wires but that didn't work.

 So I'm out of options but did I mess-up my user.h

this are my defines.

#define USER_MOTOR_TYPE MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS (4)
#define USER_MOTOR_Rr (NULL)
#define USER_MOTOR_Rs (0.35525)
#define USER_MOTOR_Ls_d  (0.0001088917)
#define USER_MOTOR_Ls_q  (0.0001088917)
#define USER_MOTOR_RATED_FLUX (0.1576235)
#define USER_MOTOR_MAGNETIZING_CURRENT (NULL)
#define USER_MOTOR_RES_EST_CURRENT (1.0)
#define USER_MOTOR_IND_EST_CURRENT (-1.0)
#define USER_MOTOR_MAX_CURRENT (1.0)
#define USER_MOTOR_IDENT_FREQUENCY_Hz (20.0)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (5.0)                // During Motor ID, maximum commanded speed (Hz, float). Should always use 5 Hz for Induction.
#define USER_MOTOR_ENCODER_LINES        (75.0)             //Encoder( 360 P/R at 4.8:1 reducer)  Number of lines on the motor's quadrature encoder
#define USER_MOTOR_MAX_SPEED_KRPM       (1)              // Maximum speed that the motor
#define USER_SYSTEM_INERTIA             (0.1739310026)               // Inertia of the motor & system, should be estimated by SpinTAC Velocity Identify
#define USER_SYSTEM_FRICTION            (0.2174943686)               // Friction of the motor & system, should be estimated by SpinTAC Velocity Identify

48V faulhaber 4490 h motor

Any suggestion?

 

  • Ernst,

    Which direction did the motor spin when you ran lab 03a?

    If the motor is not spinning when you try to run the inertia identification than there is a problem in either the configuration or the hardware.  Typically we want the encoder on the shaft of the motor because when using an encoder through gearing this will often cause backlash related issues in the motor control.

    1. Add "st_obj.vel.conv.Pos_mrev" into the watch window in CCS.  This is an IQ24 variable.  So if you right click on this variable you can set the Q value so that it will display correctly.

    2. Set gMotorVars.Flag_enableSys to 1, but do not set gMotorVars.Flag_Run_Identify to 1.

    3. Manually rotate the motor in the direction it spun when running lab 03a.  You should see the value in st_obj.vel.conv.Pos_mrev increase.

    4. Once you have rotated the motor one mechanical rotation you should see a value of 1.0 in that variable.  In your case with the reducer, I think the value should be 4.8.  

    5. If you see a negative value then the encoder lines should be switched.  If you see a value that is wildly different than what you expect then there is an issue in the encoder or pole configuration.

  • Adam,

     Thanks for the detailed reply.

     In lab03A the motor was rotating CW.

     After following the staps I got 4.8 for 1 full rotation. That seems to me correct.

     

     

  • To verify that my user.h is correct. I tested it with lab 6B. that works fine.

    I'm a bit out of options.

    Note:

    I'm having only 75 pulses per round. Is that a problem?

  • This are both encoder signal. (if the motor is rotating both works fine). But when I start demo 12A I see this.

  • Ernst,

    Only having 75 pulses per revolution is not much resolution, but it should be fine.  

    In looking at the specs on the Faulhaber motor from: http://www.faulhaber.com/n169933/n.html, I think you might have the number of pole pairs incorrect.  I think this motor only has 1 set of pole pairs.

    The pole pairs number is critical for sensored control so that the electrical angle can be generated from the encoder.  In sensorless control (lab 03b, 06b), if the pole pairs is incorrect, the motor would still spin, but it would be with an incorrect speed.  The speed would appear to be higher than what it truly is.

    My recommendation would be to set the pole pairs to 1 and try again.

  • If I select only one pole pair a got the error message:

    USER_ERRORCode_RoverL_estFreq_Hz-High

    I can't find any information about this error message so i changed it too two. are they poles or pole pairs??

  • The documentation for those errors is still being worked on.  The issue is that when you set the pole pairs to 1, the base frequency for the project is not 1 / 0.008 -> 125 Hz.  And the default for USER_R_OVER_L_EST_FREQ_Hz is 300.  This is what is causing the error.  To get rid of this error set USER_R_OVER_L_EST_FREQ_Hz to 100.