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.

Some fundamental questions about InstaSPIN FOC

Other Parts Discussed in Thread: MOTORWARE, DRV8312, TMDSHVMTRINSPIN


I have some fundamental questions about InstaSPIN FOC with piccolo 2802x:

We are using 3-phase PMSM motors with up to 44 poles in fully four-quadrant
operation. Till now a piccolo 28027 is excellent controlling the machine.

Because the motor shaft often is being driven externally, we need to
synchronize on a spinning machine when the system is powered up. These
operation mode will result in variable speeds and therefore also variable
back-EMF.

In addition our hardware is designed to inhibit the whole power stage
(e.g. all 6 Mosfets are disabled), to avoid unwanted propulsion as well
as unwanted dynamic braking.

1.) Is InstaSPIN FOC able to synchronize smooth on a spinning machine,
    when the system is powered up?

2.) Can we surely switch on and off without any jerk?

3.) If we immediately need to decelerate (dynamic brake), is it possible
    to alternate the operation quadrant "on-the-fly"?

4.) Can we obtain a fast and therefore good dynamic response?

5.) Do we need two or three shunts to measure the motor current?


Thank you in advance,
Attilio

  • 1. Yes, absolutely, one of the key features of the algorithm. We call this "Flying Start".  We have demonstrated this multiple times on different motors/applications (fans, washing machines, starter/generators, etc).  Here is a post that discusses the high level capability

    http://e2e.ti.com/support/microcontrollers/c2000/f/902/t/253662.aspx

    2. Yes, you will have to design this for your application though.  FAST can track the rotor within the normal boundaries - which is motor/inverter/sense dependent but typically ~1Hz - so you will have to add some system logic to understand what speed you are at and the associated behavior.  For example, in a boundary where FAST is tracking well you will make sure the ForceAngle option is DISABLED, and you will need to set your speed controller so it is synchronized in to the current speed.  Another option that actually works better is to take over in torque mode with an inital command of Iq = 0A, and hold this 0A command for a certain amount of time (will have to test with your application), at which you switch to speed mode with a new reference (either the current speed or your new target speed).  This will guarantee a synchronized start.

    You will also want to make sure that your current controller is stiffened for this application, so instead of using the default Kp values (which are the bandwidth *0.25 StiffnessFactor you want to use the full bandwidth, or a *1.0 factor). This is because when the inverter is first enabled, a 50% duty cycle is at the output, which can generate current flowing, so the current controller needs to get that back to zero. 

    This is the how this is done using the gMotorVars interface in all of the MotorWare projects

          CTRL_setKp(handle,CTRL_Type_PID_Id,gMotorVars.Kp_Idq);
          CTRL_setKp(handle,CTRL_Type_PID_Iq,gMotorVars.Kp_Idq);

    Of you can set them individually in case you are using different Ls_d and Ls_q in your user.h [this also shows you the calcualtions made for the Kp gain of the Iq/Id controllers: StiffnessFactor * Ls * Current / Ts * Voltage

      _iq Kp_Id = _IQ((1.0*Ls_d*fullScaleCurrent)/(ctrlPeriod_sec*fullScaleVoltage));

      _iq Kp_Iq = _IQ((1.0*Ls_q*fullScaleCurrent)/(ctrlPeriod_sec*fullScaleVoltage));

     3. Absolutely. FAST will be tracking and locked on to the signal (assuming the rotor speed isn't so slow that the feedback is corrupted, in this case enable ForceAngle) so you just need to manage the powering of the inverter and making sure any PI controllers aren't producing an immediate output that will cause an unwanted response in the system. You are immediately able to drive a torque command to the motor, so in your case you may have some logic that if the speed is over a certain threshold you will set a new target speed with certain acceleration (deceleration) to drive the motor as fast as possible to a new speed.  In other cases you may want to brake the motor by turning on all high side or low side switches.

    4. Yes, it is excellent.

    5. 2 or 3 current measurements has nothing to do with the flying start capability.  You decide 2 or 3 in your system based on the maximum bus voltage utiliization. If you want to use over modulation (beyond SVPWM to full Trapezoidal BLDC) you must have 3 current measurements (3 shunts or 2 phase and calculate the third). With only 2 shunts you must limit your maximum duty cycle/modulation to insure you always have valid sampling windowns on the two lower legs. This is also discussed on this forum in several places.

     

     

  • Here are some plots at some of the boundary conditions.

    Using DRV8312 + included motor, running at 4K RPM to start, turning off the inverter, and then telling the application to catch the rotor at 2 Hz (15 RPM) and keep it running at 2 Hz.

    Here is similar with TMDSHVMTRINSPIN usiagain catching and driving at 2 Hz

    And here is using TMDSHVMTRINSPIN with a direct drive Washing Machine, catching at 0.1 Hz (0.25 RPM) and then driving to 1 Hz speed reference right away so it’s not stuck below 1 Hz (2.5 RPM). It is repeatable and it never goes backwards.  For this motor, control at 1 Hz (2.5 RPM) is not so good, but this is ok as a transitional speed and keeps the estimator stable.  In this application you typically never need to motor below 10-20 Hz.

  • Hello Chris,

    thank you very much - really good support!

    At the moment we are discussing - and then deciding! - which system is the right for future developments.

    Unfortunately we don't have much time for evalution. So we appreciate your aid.

    Another question please: Can we use only torque control, without speed control? How to do this, when the machine is still spinning and the system is powered up?

    Thanx a lot

    Attilio

     

  • Yes, lab4 in MotorWare shows you how to do this, it's quite simple.

        // Dis-able the Library internal PI.  Iq has no reference now
        CTRL_setFlag_enableSpeedCtrl(ctrlHandle, false);

      // get the speed estimate
      gMotorVars.Speed_krpm = EST_getSpeed_krpm(obj->estHandle);


      // set the speed reference so that the forced angle rotates in the correct direction
      // for startup.
      if(_IQabs(gMotorVars.Speed_krpm) < _IQ(0.01))
      {
          if(iq_ref < 0)
              CTRL_setSpd_ref_krpm(handle,_IQ(-0.01));
          else if(iq_ref > 0)
              CTRL_setSpd_ref_krpm(handle,_IQ(0.01));
      }

      // Set the Iq reference that use to come out of the PI speed control
      CTRL_setIq_ref_pu(handle, iq_ref);

     

  • Hi chris,

    I'm evaluating instaSPIN to do "flying start", I do the procedure you explain :

    Another option that actually works better is to take over in torque mode with an inital command of Iq = 0A, and hold this 0A command for a certain amount of time (will have to test with your application), at which you switch to speed mode with a new reference (either the current speed or your new target speed).  This will guarantee a synchronized start.

    but it seems there is always a small problem:

    It seems that the Trajectory module always start from 0, is there a way to initialise this one to the current speed?

    Regards.

    Emmanuel

  • Emmanuel,

    I agree, taking over in Torque mode actually works better, this is what we've been using recently as well.

    You should be able to use the following to set the starting value for the Trajectory.

    TRAJ_setIntValue ( TRAJ_Handle  trajHandle,
    const _iq  intValue  

    )

  • Thank you very much, i was not sure that the intermediate value was in fact the starting value... Now it works fine. I've always a short time flowing current when I set the torque mode with Iq=0 but i will try to correct it later. The evaluation of the InstaSPIN solution on my motor is successfull. Regards. Emmanuel