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.

LAUNCHXL-F280025C: Universal Motor Control Lab build 4 no open loop spin-up?

Part Number: LAUNCHXL-F280025C
Other Parts Discussed in Thread: DRV8316REVM, C2000WARE, LAUNCHXL-F280049C, BOOSTXL-DRV8320RS, DRV8316, DRV8323, MOTORWARE, DRV8320

I'm working on a sensorless FOC drive for a very small custom PMSM pump motor with a magnetically levitated axial suspension. I have a LAUNCHXL-F280025C connected to a DRV8316REVM and I am trying to follow the universal motor control lab document (SPRUJ26). I have everything working through step 3 which uses closed loop control, but with a generic ramp generator as the angle signal rather than using the FAST or eSMO angle estimation schemes. The pump spins just fine using build 3. I set Iqd_set_A to 0.5 to reduce the drive current to 170mA or so and everything looks great. The estimator waveforms appears to be correct. Here's the DATALOG graph output with the force angle generator on top and estimator on bottom:

motorVars_M1.speed_Hz does track speedRef_Hz well and stays within a few Hz. Here's a scope capture of the drive waveforms where the first three channels are on the three motor phases and the red channel is a clip on current probe:

Here the motor is running at 350Hz electrical (10500 RPM). It's not quite sinusoidal - is that a problem? If so, what should I adjust?

My user_mtr1.h settings are:

#define USER_MOTOR1_Rr_Ohm (5.7) // DC resistance phase-phase measured
#define USER_MOTOR1_Rs_Ohm (5.7)
#define USER_MOTOR1_Ls_d_H (0.000223) // series L phase-phase measured
#define USER_MOTOR1_Ls_q_H (0.000223)

#define USER_MOTOR1_RATED_FLUX_VpHz (0.04) //

#define USER_MOTOR1_FREQ_LOW_HZ (100.0f) // Hz
#define USER_MOTOR1_FREQ_HIGH_HZ (800.0f) // Hz
#define USER_MOTOR1_VOLT_MIN_V (16.0f) // Volt
#define USER_MOTOR1_VOLT_MAX_V (24.0f) // Volt

The R and L values are measured and the flux value was figured out by trial and error until the estimator and speed readings looked right. I included the V/f ratio values even though I'm pretty sure they don't matter for closed loop drive.

Based on all of this it seems to me that I am ready to move on to build 4 where the angle estimator is engaged. However, when I run build 4 the drive goes all over the place. It constantly jitters between different drive levels and the waveforms on the scope go crazy. Draws about 1.5A. This actually makes sense to me because as far as I can tell it goes straight into relying on the estimated rotor angle without spinning up in open loop first. Is that right? Isn't the estimated angle useless until the motor is already spun up? My impression is that any FOC scheme has to go through an alignment and open loop spin up before switching to closed loop operation. Is there any provision for that in this code?

Edit:

In searching on the forum here I came across this post which references to the R/L ratio of the motor being a factor. For my motor the ratio is 5.7/0.000223 = 25560. I think that qualifies it as a "low inductance" motor and thus needs a higher PWM frequency (and control freq?). It appears to be set in user_mtr1.h:

//! \brief Defines the Pulse Width Modulation (PWM) frequency, kHz
//!
#define USER_M1_PWM_FREQ_kHz ((float32_t)(60.0f))
#define USER_M1_PWM_TBPRD_NUM (uint16_t)(USER_SYSTEM_FREQ_MHz * 1000.0f / USER_M1_PWM_FREQ_kHz / 2.0f)

and I figured out that you also have to change USER_M1_NUM_PWM_TICKS_PER_ISR_TICK so the ISR isn't trying to run too fast. I set it to 3 and PWM freq to 100kHz, which should mean a slight increase of the ISR control loop frequency from 30kHz to 33.3kHz, both of which are above my 25560 R/L. There doesn't seem to be any change. Step 3 still works fine and step 4 still goes crazy. I tried the automatic motor parameter identification on step 4 and it spat out the values R=15.29, L=9.99e-07, flux=2.95, R/L ~ 15000. Still went crazy when I hit run.

Edit 2:

Am I even using the right lab guide? Looking through the motorcontrol SDK files I see a similarly named but totally different lab guide located at C:\ti\c2000\C2000Ware_MotorControl_SDK_4_00_00_00\solutions\common\sensorless_foc\docs\labs\MotorControl SDK InstaSPIN Lab Guide.pdf. Looking inside it seems to only support the LAUNCHXL-F280049C which I do have and the BOOSTXL-DRV8320RS which I do not have. Is it possible to get that lab to work with the DRV8316 I am using? Which lab guide should I be trying to follow? It looks like other forum posts are referencing that lab guide rather than the "universal" one I am using. And what is the deal with the GUI? I'm a bit confused.

  • What's the rated current of your motor?

    Recommend that you may try to use the other DRV boostxl board like DRV8323RS/DRV8323RH to identify or run the motor.

    for motor parameters identification, to ensure that the motor spins smoothly during Flux measurement and Ls identification states.

    #define USER_MOTOR1_RES_EST_CURRENT      (1.5f)                               // A -  10-30% of rated current of the motor

    #define USER_MOTOR1_IND_EST_CURRENT      (-1.0f)                             // A -  10-30% of rated current of the motor,  just enough to enable rotation

    #define USER_MOTOR1_MAX_CURRENT            (5.0f)                               // A -  30~150%  of rated current of the motor

    #define USER_MOTOR1_FLUX_EST_FREQ_Hz     (40.0f)                            // Hz - 10~30% rated frequency of the motor

  • Thanks for the reply.

    The motor is custom and doesn't have a known rated current. What is different about DRV8323 that would make it work better? Am I using the right software (MotorControl SDK InstaSPIN Lab Guide vs. Universal Lab Guide vs. MotorWare lab)?

    Would the fact that this motor has a magnetically levitated axial suspension have any effect? The rotor's levitation position moves axially with different speeds (flow rates) which could change something about the back-EMF and flux. The axial levitation controller is also imperfect and has its own response to the step motions that seem to be involved in the motor identification process. It wouldn't surprise me if the identification didn't work at all with this suspension - do you have any experience with that?

  • What is different about DRV8323 that would make it work better?

    DRV8323 board uses the external shunt resistor on low-side which has much better current sampling accuracy than DRV8316 using the Rdson of the low-side MOSFET.

    Am I using the right software (MotorControl SDK InstaSPIN Lab Guide vs. Universal Lab Guide vs. MotorWare lab)?

    If you are using F280025C for motor control with InstaSPIN-FOC, you need to use the MotorControlSDK and universal lab. MotorWare just supports F2802xF, F2806xF for motor control with InstaSPIN-FOC.

    Would the fact that this motor has a magnetically levitated axial suspension have any effect? The rotor's levitation position moves axially with different speeds (flow rates) which could change something about the back-EMF and flux. The axial levitation controller is also imperfect and has its own response to the step motions that seem to be involved in the motor identification process. It wouldn't surprise me if the identification didn't work at all with this suspension - do you have any experience with that?

    I am not fully understand your questions here. If you are trying to run a PMSM with this lab, and follow the guide to tuning the identification variables, the electrical parameters of the  PMSM should be identified correctly, and the motor can run well on the related supporting kits with this lab.

  • Thank you for the detailed reply.

    I didn't realize the DRV8316 was relying on the FET Rdson to measure current. I'll look into getting a DRV8323. Would the DRV8320 also work?

    What I mean about the axial suspension is that with this particular PMSM some of those electrical parameters could change based on how fast the motor is spinning. When it spins faster it pumps more fluid which changes the balance of forces in the axial suspension which means the rotor is now at a different place relative to the stator. Most motors don't have this problem and the rotor and stator always stay with the same relationship (except for rotation, of course). My intuition is that the rotor moving axially changes the air gap (actually water gap in this case) which has some effect on the back-EMF and magnetic flux (R and L would stay the same). I'm not sure exactly what effect that might have from the FOC controller perspective and I'm wondering if you have any insight.

    That being said, you can see from my original post that the angle estimator appears to be working just fine at various speeds.

  • Also, what about my question regarding an open-loop spinup before switching to closed loop? I thought all FOC drives had to do alignment and open loop before the loop was closed.

  • The air gap between the rotor and the stator is not the major factor, it should keep close to a constant value in most of the motor include the pump.

    The stability of the speed depends on the control parameters, load, and the accuracy of the motor electrical parameters, the sampling signals of the phase current and voltage.

    The instaSPIN-FOC with FAST includes the open-loop control for the very low speed, you don't need to add the specifically alignment and open-loop control steps.