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.

CCS/LAUNCHXL-F28069M: 3-Phase Motor Ramp up/Ramp down Jittery, Steady-State Fine (Using Lab10d from Motorware)

Part Number: LAUNCHXL-F28069M
Other Parts Discussed in Thread: BOOSTXL-DRV8301, MOTORWARE

Tool/software: Code Composer Studio

Hello,

First time taking advantage of E2E...so bear with me if I forget to add something or leave out details.

I'm currently using a LAUNCHXL-f28069M with 2 BOOSTXL-DRV8301's in order to drive 2 3-phase brushless motors. The system setup is as follows:

Control Input: Joystick

Master Control: Arduino Teensy

Communication Protocol between Teensy & LAUNCHXL: Serial

Below is a snippet of the code added to the main() loop of proj_lab10d. There's an eStop added almost as an enable/disable. That appears to be 100% functional. 

if(SCI_rxDataReady(halHandle->sciBHandle)== true)
{

sciInput = SCI_getDataBlocking(halHandle->sciBHandle);
eStopStatus = sciInput & 0x80;
motorSelected = sciInput & 0x40;

if(eStopStatus == 0)
{

//gSystemVars.Flag_enableSystem = false;
gMotorVars[HAL_MTR1].Flag_enableSys = false;
gMotorVars[HAL_MTR2].Flag_enableSys = false;
gMotorVars[HAL_MTR1].Flag_Run_Identify = false;
gMotorVars[HAL_MTR2].Flag_Run_Identify = false;
}

else

{

gMotorVars[HAL_MTR1].Flag_enableSys = true;
gMotorVars[HAL_MTR2].Flag_enableSys = true;
gMotorVars[HAL_MTR1].Flag_Run_Identify = true;
gMotorVars[HAL_MTR2].Flag_Run_Identify = true;

}

if(motorSelected == motorLeft)
{

leftMotorSpeed = sciInput & 0x3F; //bitmask the last 6 bits

if(leftMotorSpeed == 0b1)
{

gMotorVars[HAL_MTR1].SpeedRef_krpm = speedP1;

}
else if (leftMotorSpeed == 0b10)
{

gMotorVars[HAL_MTR1].SpeedRef_krpm = speedP2;

}
else if (leftMotorSpeed == 0b11)
{

gMotorVars[HAL_MTR1].SpeedRef_krpm = speedP3;

}
else if (leftMotorSpeed == 0b101)
{

gMotorVars[HAL_MTR1].SpeedRef_krpm = speedN1;

}
else if (leftMotorSpeed == 0b110)
{

gMotorVars[HAL_MTR1].SpeedRef_krpm = speedN2;

}
else if (leftMotorSpeed == 0b111)
{

gMotorVars[HAL_MTR1].SpeedRef_krpm = speedN3;

}

When the motor starts turning initially after getting info from the Teensy (Happens roughly every 30ms), the motor almost has a "tug of war", where it constantly jitters back and forth, until it eventually levels out. 

When the input speed for the motors should be 0, they take ~7sec to decelerate and the jitter happens again close to 0 rpm. The tuning is done using the sensorless tuning provided by InstaSPIN. The motor controller receives 2 separate packets from the teensy, first is data for the left motor, then data for the right motor is sent. Above only shows the left motor just to save from code-dumping. 

Would incorporating the hall effect sensors of the motor resolve this issue? And if I use them, should I disable the sensorless tuning? Also, what might the jitter be coming from? it seems to happen in a small interval right in the beginning of the ramp up and the end of the deceleration. 

Let me know if there might be any other helpful information!

  • Nicholas,

    It is Thanksgiving week in US. Most of the TI engineers are on vacation. Please expect delay in response.

    I would realistically expect a response back from TI early next week.

    Regards,
    Manoj
  • Hi Nicholas

    What is your acceleration variable set to? You could try increasing this value to compensate for the slow acceleration/deceleration you are seeing.

    Also, it is not feasible to command '0 speed' with a sensorless observer. What is happening is that the sensorless estimator is trying to command a '0' output using the information extrapolated from the feedback. But, when the speed is near 0, there is very little to no information actually available to the estimator from the current and voltage feedback circuits. In effect, when the back EMF is near 0, there is no way to properly supply the PI controllers with feedback to match the reference command. As a result, the output oscillates. A better way to command '0 speed' is to disable the PWM output, which will turn the drive off

    Using hall sensors will allow the flux angle to be extrapolated when the back EMF is near 0. You can interface them using GPIO inputs, among other ways. You can explore lab 11e in Motorware 18 to get an idea how hall sensors can be integrated into an InstaSPIN application

    Sean