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.

problem of tracking positions with SpinTAC-Position

why the rate of changing position signal cannot be too fast when tracking positions with SpinTAC-Position ?

I modified the code in lab 13a , and finally the system can track position. But there comes an question , when I changed the position signal  too fast ,  the motor moved in wrong way, when I change the position signal slowly , the motor moved in right way. I wonder it is the rate of change the position has  a limit . How can I fix the problem ? 

  • How fast were you changing the position signal?  SpinTAC expects to get at least 3 samples per rollover.  But if you increase the sample rate of SpinTAC, by modifying USER_NUM_CTRL_TICKS_PER_SPEED_TICK.  This sets the number of FOC ticks between position control ticks.  If you run SpinTAC at a faster sample rate it should be able to track a faster update rate.

  • Adam:

        Thanks for your reply~ .

        In lab13a , I modifed the code of  fuction ST_runPosCtl like this:

        The  position_signal come from slide rhostat . 

        The order_average add(subtract) order_average_max each time when ST_runPosCtl is called , and so does the Position_now .

        when I Rotaring sliding rheostat , the motor will move until Position_now  and the position_signal  are equal .

        But Here are 4 questions , 

        1) the motor  is unstable at frist time , like spin from left to right , after few  back and forth , it becomes stable.

        2) the order_average_max I set has a limit ,when  order_average_max  is large than 0.25 , the motor will uncontrollably and CCS wil report errors . it seems connected  to ST_MREV_ROLLOVER,ST_POS_ERROR_MAXIMUM_MREV , USER_NUM_CTRL_TICKS_PER_SPEED_TICK ,I'm not for sure .

        3) the speed when  the motor spining cannot reach the rated speed I set .  I define  USER_MOTOR_MAX_SPEED_KRPM       (2.8)   for my ACIM motor  .   It is obviously that the speed is relating to order_average_max , but order_average_max  cannot set too high , so the speed cannot reach the rated speed .

        4) if I  Rotaring the sliding rheostat  back and forth fast , the motor will run uncontrollably and CCS will report errors . 

        the purpose I modify the code is that ,  the motor will spin 0 to 200(can be set to any number ) no matter how fast i Rotaring sliding rheostat , and the motor run as fast as I Rotaring sliding rheostat , if I Rotaring too fast , the motor will run with  rated speed .

     

  • 1. Have you tuned the position controller?  I would expect that to happen if it hasn't been tuned to hold a fixed position.  The other reason could be that the "step change" in position when first started is very large and so the step is so big that with the tuning it is difficult for the controller to come quickly to a stop.

    2. You should change the order of your logic so that you are saturating for rollover after you update the command, this way you are not in danger of providing a bad value to Position Control.

    3. The speed of your motor is not being directly set, the effective speed is going to be delta position / delta time.  The motor will go up to the maximum speed it needs in order to achieve the position target, but there is nothing guaranteeing that it will hit the motor maximum speed.

    4. It sounds like you need to tune the controller and make sure that you have estimated the system inertia using lab 12a.  I think this is a tuning issue.