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 questions about speed reversal

Hello,

I have some questions about speed reversal.

At start up, it is possible that that my motor run at the reverse direction I need. So I need to make a fying start and then a speed reversal.

On the first project with instaspin, inertia was quite low and this was working correctly, but now we have a motor with a high inertia and some time, the motor "stall" around zero RPM and oscillate.

Regarding : SPRUHJ1F, the following set up must be made:

• Enable offsets recalibration; described in Section 14.1.1.1.
• Enable stator Rs recalibration; described in Section 14.1.1.2.
• Disable forced angle; described in Section 14.1.1.3.
• Tune speed controller to avoid motor stall; described in Section 14.1.1.4.
• Tune voltage feedback circuit; described in Section 14.1.1.5.

But for a flying start, the offset and Rs recalibration are impossible.

During speed reversal, the speed will reduce from negative to positive and during a while, the speed will be too low to be identified (under USER_ZEROSPEEDLIMIT). So during this time, how thas it work without the force angle?

Another question is regarding this force angle, in a previous post Chris wrote this :

 FORCE_ANGLE_FREQ > 2 * (USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz )

This seems to be a problem for me because USER_ZEROSPEEDLIMIT is linked to HW scaling and flux of the motor and regarding test I have done, FORCE_ANGLE_FREQ is linked to inertia (frequency must be lower for a high inertia motor). So It seems difficult for a high inertia motor to respect what Chris wrote.

Regards.

Manu

  • Manu36 said:
    But for a flying start, the offset and Rs recalibration are impossible.

    the OffsetRecalc should be done when the HW is enabled.

    Agree that with flying start RsRecal can not be done. You may use RsOnline if your application requires, but that doesn't have much to do with this...We say to do RsRecalc for loaded start as it will help to align the rotor, enabling the initial stator field to generate closer to full torque and lock on even quicker. 

    I'm a little confused about what you are asking about....are you doing speed reversals, flying starts, or loaded starts?  These are three different cases.

    Manu36 said:
    During speed reversal, the speed will reduce from negative to positive and during a while, the speed will be too low to be identified (under USER_ZEROSPEEDLIMIT). So during this time, how thas it work without the force angle?

    during a speed reversal, where you are transitioning from + to - or - to +, ForceAngle should normally be DISABLED assuming that you accelerate fast enough.  It also helps to have a very stiff speed controller (SpinTAC is remarkably better than a PI for this use case).  If the acceleration is too slow - and this can't be changed - it may be a use case to enable ForceAngle so that a stable "estimated" angle is generated. In this case you would want a ForceAngle frequency > the effective speed you are moving through zero.

    Manu36 said:
     FORCE_ANGLE_FREQ > 2 * (USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz )

    USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz is the speed range where - when ForceAngle is enabled - you will stop using estimations from FAST and instead use "false" estimations that are being created from a "false" rotating angle.  The purpose of this ForceAngle feature is to help the control system drive to an area of operation outside this ForceAngle zone so that true FAST estimations can be used.  So it is a good idea to have the "false" rotation speed be > the actual speed of the rotor so you don't get "stuck" in this slow speed.  And it is important to choose an operating area/zone where once FAST estimations are used they are actually valid and can be trusted.

    Manu36 said:
    This seems to be a problem for me because USER_ZEROSPEEDLIMIT is linked to HW scaling and flux of the motor and regarding test I have done, FORCE_ANGLE_FREQ is linked to inertia (frequency must be lower for a high inertia motor).

    Can you explain this a bit more?  Are you talking about having multiple motors being used with the same HW?  It should be possible to choose some values that work for a range of motors:

    ex: 1000 Hz * 0.002 and 4 Hz; or 600 Hz * 0.005 and 6 Hz, etc.

    you can also load different settings for different motors if needed.

  • ChrisClearman said:
    are you doing speed reversals, flying starts, or loaded starts?  These are three different cases.

    I do a flying start but the motor is not running in the correct direction so after the flying start I need to do a speed reversal. The motor load is quite small but there is a high inertia.

    ChrisClearman said:

    This seems to be a problem for me because USER_ZEROSPEEDLIMIT is linked to HW scaling and flux of the motor and regarding test I have done, FORCE_ANGLE_FREQ is linked to inertia (frequency must be lower for a high inertia motor).

    Can you explain this a bit more? 

    [/quote]

    In fact if the motor contruction,HW, and maximum speed are the same, the USER_ZEROSPEEDLIMIT will be the same but regarding test I have done with several load which have different inertia, i need to change FORCE_ANGLE_FREQ from 2Hz for light inertia to 0.5Hz for high inertia. So I f need to reduce  FORCE_ANGLE_FREQ without modifying USER_ZEROSPEEDLIMIT, I can't have FORCE_ANGLE_FREQ > 2 * (USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz ) true.

    ChrisClearman said:
    If the acceleration is too slow - and this can't be changed - it may be a use case to enable ForceAngle so that a stable "estimated" angle is generated

    This is what I do (I find it on the forums), without this, speed reversal doesn't work, with this, it works fine four out of five.

    Regards.

    Manu

  • Manu36 said:
    but regarding test I have done with several load which have different inertia, i need to change FORCE_ANGLE_FREQ from 2Hz for light inertia to 0.5Hz for high inertia.

    you're saying that if you use 2 Hz with a large inertia system that you have issues with ForceAngle Enabled? And those issues are solved by reducing the frequency to 0.5 Hz?  Have you tried just disabling ForceAngle?

    With a flying start you shouldn't need to enable ForceAngle at all.  MAYBE if the initial speed is below the resolution of where FAST can provide good feedback....MAYBE.

    Manu36 said:
    This is what I do (I find it on the forums), without this, speed reversal doesn't work, with this, it works fine four out of five.

    Speed reversal should certainly work w/ ForceAngle Disabled. The only issue you might see is if the acceleration/deceleration is too slow and you completely stall out in the low speed area where FAST is not providing good feedback.  It should still recover, but ForceAngle can help the recovery be smoother, and if settings are proper should provide reliable starting 100% of the time.

    Can you increase the acceleration to move through zero faster? 

    Application: Is this a fan or some sort of wheel?

  • ChrisClearman said:
    you're saying that if you use 2 Hz with a large inertia system that you have issues with ForceAngle Enabled? And those issues are solved by reducing the frequency to 0.5 Hz?

    Yes (in this case, it is a start from zero speed, not a flying start).

    ChrisClearman said:
    Have you tried just disabling ForceAngle?

    Yes and it's work for zero speed start but for speed reversal, it is clearly better with 0.5Hz.

    ChrisClearman said:
    With a flying start you shouldn't need to enable ForceAngle at all.  MAYBE if the initial speed is below the resolution of where FAST can provide good feedback....MAYBE.

    When I do a flying start, ForceAngle is disabled, I only enabled it at start from zero speed and when speed reach 0 RPM (speed reversal).

    ChrisClearman said:
    Can you increase the acceleration to move through zero faster? 

    In fact I just try to reduce acceleration and, with forceAngle enabled, this is clearly better. Increasing acceleration is worst.

    ChrisClearman said:
    Application: Is this a fan or some sort of wheel?

     Yes, a blower.

  • Manu36 said:

    you're saying that if you use 2 Hz with a large inertia system that you have issues with ForceAngle Enabled? And those issues are solved by reducing the frequency to 0.5 Hz?

    Yes (in this case, it is a start from zero speed, not a flying start).

    [/quote]

    Ok, zero speed start-up. In the case of 2 Hz and 0.5 Hz, are you also changing

    USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz

    Manu36 said:

    Have you tried just disabling ForceAngle?

    Yes and it's work for zero speed start but for speed reversal, it is clearly better with 0.5Hz.

    [/quote]

    for zero speed start-up I agree and this is expected behavior.

    Manu36 said:

    With a flying start you shouldn't need to enable ForceAngle at all.  MAYBE if the initial speed is below the resolution of where FAST can provide good feedback....MAYBE.

    When I do a flying start, ForceAngle is disabled, I only enabled it at start from zero speed and when speed reach 0 RPM (speed reversal).

    [/quote]

    "and when speed reach 0 RPM (speed reversal)."

    How do you know when speed reaches 0 RPM?  If already controlling the motor with FAST and reversing through 0 speed, I would try first to keep ForceAngle disabled. It should provide better operation assuming you aren't spending too much time in the "bad zone".  If you are going very slow and spend too much time in the "bad zone", what settings are you using for

    FORCE_ANGLE_FREQUENCY_HZ

    and

    USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz

    Manu36 said:

    Can you increase the acceleration to move through zero faster? 

    In fact I just try to reduce acceleration and, with forceAngle enabled, this is clearly better. Increasing acceleration is worst

    [/quote]

    My comment was to increase acceleration during speed reversal with ForceAngle DISABLED.  Spend less time in the "bad zone" so that you can move through and FAST can begin tracking properly once estimated speed is > USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz

  • Chris,

    Thak you very much for the support.

    I will made test according your advices in some days. For the moment, other tests must be done with the product.

    I will let you know the results.

    Regards

    Manu

  • Chris,

    I'm back on the speed reversal improvment.

    Following your advices, I have modified my setting.

    #define USER_ZEROSPEEDLIMIT (0.002)

    #define USER_FORCE_ANGLE_FREQ_Hz (0.6)

    with #define USER_IQ_FULL_SCALE_FREQ_Hz        (150.0) (4000RPM, 2 pole pair)

    The ForceAngle is disabled, starting from zero speed are good but it was impossible to make correct speed reversal without enabling ForceAngle (even if I try to spend less time in the bad zone), so, in case of speed reversal, when absolute value of speed is below 50RPM (I have check that speed estimation is correct at 50rpm), ForceAngle is enabled.

    With this, speed reversal is fluent.

    Please let me know your opinion about this setting.

    Regards.

    Manu

  • Manu,

    My recommendation is to set the variable as so

    #define USER_ZEROSPEEDLIMIT   (1.0 / USER_IQ_FULL_SCALE_FREQ_Hz)  

    where "1.0" is whatever +/- Hz that works for your motor. This will be the window (+/-) - based on FAST's speed estimation - where FAST feedback is no longer being used, but the ForceAngle frequency / angle will be, IF ForceAngle is enabled.

    In your post, you have this Hz setting as: 150 * 0.002 = 0.3 Hz

    This is very low unless you have an unusually large Bemf motor that constitutes a large resolution of your ADC_VOLTAGE.  Attach your user.h and I can give you some advice, but I probably wouldn't go below 1 Hz here for almost any motor.


    #define USER_FORCE_ANGLE_FREQ_Hz   (2.0 * USER_ZEROSPEEDLIMIT * USER_IQ_FULL_SCALE_FREQ_Hz) 

    I say to set these variables like this because it makes it easier to clearly see the actual Hz settings you are using. Also, if you change your IQ_FULL_SCALE_FREQ it will keep the Hz settings the same.

    Your USER_IQ_FULL_SCALE_FREQ_Hz doesn't need to be so low. It doesn't buy you anything to make it this low (just above your max Hz). Personally, I never make it lower than the filter pole Hz. So my recommendation is to use (400.0) assuming you have a ~300 Hz filter pole.

    Back to speed reversal, what is the exact test you are doing?

    From which speed to which?  At which acceleration?

  • ChrisClearman said:

    Back to speed reversal, what is the exact test you are doing?

    From which speed to which?  At which acceleration?

    The application is a fan, when this one is not running, it is possible to have a reverse air flow which spin the motor in reverse direction. So When the motor is started, I need to make a flying start (at reverse direction) and then I need to make a reverse speed. The reverse starting speed is unknow but this will be lower than nominal speed of the motor, but this doesn't seems to be a problem because flying start is OK, decceleration is quite OK also. The acceleration is not really imposed, 5seconds, 10 seconds will be OK to reach 0RPM (then acceleration is set 100RPM/second).

    The problem is near 0 RPM, if reverse torque is zero (only inertia of the impaller), this works fine (with setting of my previous post) but if there is a reverse torque (reverse air flow), so the speed reversal doen't work (even with the setting of my previous post).

    Regarding frequency setting, this was made to have a force angle frequency around 0.5Hz, because with higher frequency, rotor is not abble to follow (I think, this is due to high inertia, because with lower inertia, higher frquency was not a problem). Because without forceAngle enabled, I was not able to make speed reversal, if I can make speed reversal without forceAngle, so this will not be a problem anymore and I could modify it without problems.

    You will find here the user.h

    2553.user.h

    My speed regulator is not very well tuned, could it be a concern?

    For information, i have limit the output of the PID speed to 0 (no negative current) to prevent overvoltage during braking:

     _iq outMin = -_IQ(0.0 / USER_IQ_FULL_SCALE_CURRENT_A);

    Regards.

    Manu

  • Manu36 said:
    The acceleration is not really imposed, 5seconds, 10 seconds will be OK to reach 0RPM (then acceleration is set 100RPM/second).

    See, this is where I think we are crossed.

    What I would do is - in your logic - if you catch your fan in a flying start at a speed high enough for you to track - just set your new commanded speed and acceleration directly. There is no need to drive the motor to 0 speed and then deal with a start-up.  The point is to always get away from zero whenever possible.  You are purposely bring the motor to a stop then trying to start-up again?

    If the fan is moving - even in reverse - that's MUCH better than being stopped. You can just command right through zero to the target speed.  Catch the fan, stabilize the control system, then set your target.

    Manu36 said:
    Because without forceAngle enabled, I was not able to make speed reversal

    You should be able to do a speed reversal w/o ForceAngle.  That is the intent.  If it's falling then

    - speed controller needs better tuning (typically stiffer)

    - current controller may need to be stiffer

    - accelerate faster through zero (you're spending too much time at low speeds)

    Manu36 said:
    My speed regulator is not very well tuned, could it be a concern?

    certainly. this is very important.

    Manu36 said:
    For information, i have limit the output of the PID speed to 0 (no negative current) to prevent overvoltage during braking:

    I saw this was Jorge's recommendation, but I think this is just for the initial "catch" of the fan. Once you are synchronized and the control is stable you should drive the control as required.

    Maybe I'm missing something...

  • user.h comments

    change to

    #define USER_IQ_FULL_SCALE_FREQ_Hz        (400.0)

    Why is this changed? This is for your custom HW scaling?

    #define USER_ADC_FULL_SCALE_VOLTAGE_V       (44.18)

    IF that's the case...this is a bit high IMO. This should be set to the larger of your bus voltage or RATED_FLUX * maximum Hz)

    #define USER_IQ_FULL_SCALE_VOLTAGE_V      (42.0)

    ok, I guess this is your custom HW after seeing

    #define USER_ADC_FULL_SCALE_CURRENT_A        (75.0)

    Decimation:

    Only 10 KHz PWM?

    And then FAST is running at 5 KHz PER_EST_TICKS (2)

    and your speed and trajectory are running at 667 Hz (not a huge issue)

    for your low frequency motor you should change this

    #define USER_R_OVER_L_EST_FREQ_Hz (100.0)

    USER_MOTOR looks ok

  • ChrisClearman said:
    What I would do is - in your logic - if you catch your fan in a flying start at a speed high enough for you to track - just set your new commanded speed and acceleration directly. There is no need to drive the motor to 0 speed and then deal with a start-up.  The point is to always get away from zero whenever possible.  You are purposely bring the motor to a stop then trying to start-up again?

    I don't try to drive motor to 0 speed, I just set the speed reference to the positive speed I want to reach, the trajectory generator will do the rest... Perhaps you want to turn away the trajectory generator but I'm afraid about mechanical stress.

    Regarding what you think, It seems to be clearly better to make the reversal in torque mode. I will try to do this.

    Regards.

    Manu

  • I obtains better results in torque mode but find something wich could be a problem:

    -during reverse flying start (before the speed reversal), SpeedRef and trajectory are set to the actual speed (not the desired speed), and so all are negative value, and then, In torque mode, when force angle is activated (and I think it is the same without force angle), the rotation is not immediatly in the correct direction but it take about 2 or 3 seconds to reverse, and I think it is because trajectory as not reach the sign inversion. To prevent this, I put a huge decceleration, and it is clearly better but is there another solution to fix the correct direction without thinking about trajectory?

    Regards.

    Manu

  • set a positive speed right before you enable the torque controller reference, just like is done in the labs

    void updateIqRef(CTRL_Handle handle)
    {
      _iq iq_ref = _IQmpy(gMotorVars.IqRef_A,_IQ(1.0/USER_IQ_FULL_SCALE_CURRENT_A));

      // 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 < _IQ(0.0))
            {
              CTRL_setSpd_ref_krpm(handle,_IQ(-0.01));
            }
          else if(iq_ref > _IQ(0.0))
            {
              CTRL_setSpd_ref_krpm(handle,_IQ(0.01));
            }
        }

  • Hello Chris,

    Unfortunately, even following you advices, speed reversal can't be made without force_angle.

    This is not really a problem, because I manage to make it quite reliable.

    I think the explanation is that the reverse torque is always present: when I make a reverse flying start and then speed reversal without the reverse torque being present, this can work without force angle but If if the reverse torque is always present during the speed reversal it is not the same because motor need to create a much higher torque than reverse torque, this is OK when speed is sufficient but it seems to be more difficult near zero speed.

    I think about something wich could perhaps improve this but I'm not sure it will be possible:

    Do you think it will be possible to start with a very low frequency Force_Angle and progressively increase it until it reach FORCE_ANGLE_FREQ ?

    Regarding function wich managed this, it seems to be in ROM code so it seems to be difficult to modify it... 

    Regards.

    Emmanuel

  • I still don't understand why you are seeing a problem.

    I did this 4 quadrant experiment

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

    and had ZERO issues with speed reversals with either + or - torque...as long as I moved through zero quick enough.

    Manu36 said:
    Do you think it will be possible to start with a very low frequency Force_Angle and progressively increase it until it reach FORCE_ANGLE_FREQ ?

    I don't see what this buys you.  The only thing that matters is that if the angle from FAST is going to deteriorate because you are spending too much time at speeds that it cannot estimate accurately, only then do you need to use ForceAngle.  When you need to use ForceAngle you limit it to the area where FAST cannot estimate well and you make sure the ForceAngle Frequency is > 2x the limit point.

  • Perhaps the difference is coming from the high inertia of my motor. Your acceleration is set to 1000 Rpm/s. Even in torque mode with highest current allowable, I'm lower than yours, and so, I spend more time in the zero zone.

    Regarding angle frequency, I understand very well why I need to set ForceAngle Frequency > 2x the limit point but I can see clearly that if force angle frequency is too high, this doesn't spin the motor (I think again about inertia), so it is quite difficult to find a force angle frequency high enought to have ForceAngle Frequency > 2x the limit point and low enought to spin the motor. That's why I was thinking about starting at lower frequency and increasing progressively until ForceAngle Frequency > 2x the limit point.

    Regards 

    Manu

  • Manu36 said:
    Perhaps the difference is coming from the high inertia of my motor. Your acceleration is set to 1000 Rpm/s. Even in torque mode with highest current allowable, I'm lower than yours, and so, I spend more time in the zero zone.

    Yes, certainly with a higher inertia motor the speed controller becomes even more important. We've gotten really good results by using the SpinTAC controller in InstaSPIN-MOTION to dramatically improve this exact scenario.  You need a stiff, high performance controller to keep the inertia moving through zero - with ForceAngle disabled.

    Exactly how slow are you going?  What is the FLUX of your machine?

    Manu36 said:
    Regarding angle frequency, I understand very well why I need to set ForceAngle Frequency > 2x the limit point but I can see clearly that if force angle frequency is too high, this doesn't spin the motor (I think again about inertia), so it is quite difficult to find a force angle frequency high enought to have ForceAngle Frequency > 2x the limit point and low enought to spin the motor. That's why I was thinking about starting at lower frequency and increasing progressively until ForceAngle Frequency > 2x the limit point.

    ok, I understand your point now. (Finally!) 

    I'm not convinced this will work, but you can create your own start-up mode. Just disable ForceAngle and then have your own logic to "over-write" of the angle in CTRL until you want to use the angle from EST / FAST.

    I know of a customer who has done this...but he is also using a very different forward control system (he's essentially just using FAST as the feedback sensor).

  • Hi Chris,

    ChrisClearman said:
    Just disable ForceAngle and then have your own logic to "over-write" of the angle in CTRL until you want to use the angle from EST / FAST.

    Could you please confirm that the angle I have to "over-write" is the following one :

    // generate the motor electrical angle
     angle_pu = EST_getAngle_pu(obj->estHandle);

    in CTRL_runOnLine_User.

    Regards.

    Manu