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.

Velocity control together with Position Control

Other Parts Discussed in Thread: MOTORWARE

Hi there,

I am using lab13a as a reference design for my position controller, however I also need to be able to control the velocity. Ideally I would use the velocity control for the majority of the movement and only position control for the accuracy of the position. Is there a way to add velocity control to this lab without removing position control?

Thanks!

  • velocity reference is an output of the position control command.
    in theory you could still be running the position controller but not connecting it's output to the velocity controller, but with the SpinTAC library position and velocity are combined into a single controller.

    I've sent this over to the SpinTAC expert to see if he has comments
  • Shiran,

    You should be able to add in the velocity control into the project.  The code for MotorWare is fairly similar between all of the projects.  The key trick will be the make sure the hand-off between the velocity control and the position control is smooth.  

    Another thing you should look at is lab 13e.  This lab uses the profile generator in order to run the position controller in speed mode.  I think this would be a pretty simple approach to combining speed and position.

  • Hello,

    Is it possible to have a smooth transition between the position control (referenced from lab 13b) and velocity control (referenced from lab 13e) without stopping or changing the instantaneous velocity?

    Thanks.
  • To change position command your profile needs to be finished first. So it is not possible to change position command on the fly.
    If you want that. You have to make your own motion profile generator. I did that.
    Take a look at Lab5D/lab5F.
    Search for STVELCTL_setVelocityReference that is where the speed reference is set. note that it is in PU.

    A bit of a warning. modifying the library beyond the scope what TI intended. You really needs to now what you are doing. It is not that easy.