cancel
Showing results for
Did you mean:

# Profile of the trapezoidal move - position control using FOC

Senior

Can someone help me understand the profile of the trapezoidal move? for example if I would like to make a movement of 10 radiance in 10 seconds using the MC_ProgramPositionCommandMotor1 how much of the 10 seconds will be acceleration, constant velocity and deceleration? and can this profile be changed? Ideally i would like to achieve 1/6 accelleration 4/6 constant velocity and 1/6 deceleration, is this even possible? is there somewhere in the code where I can specify this?

1 ACCEPTED SOLUTION

Accepted Solutions
Associate III

The code you need to modify is the function TC_MoveCommand in trajectory_ctrl.c. This function currently divides the movement into 9 steps, 3 acceleration, 3 cruise and 3 deceleration. It shouldn't be too difficult to change this to meet your 1-4-1 requirement.

8 REPLIES 8
ST Employee

Hello,

There is a Position Control Application note:

https://www.st.com/resource/en/application_note/an5464-position-control-of-a-threephase-permanent-magnet-motor-using-xcubemcsdk-or-xcubemcsdkful-stmicroelectronics.pdf

Best regards.

GMA

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
Senior

Dear @GMA​,

Thanks for your reply, I've had a look at this document however I am struggling to find the answer to my question. I have based my question considering the attached graph, if time at D is 10 seconds what would be the time at B and C?

Kind Regards

Manpreet Singh

ST Employee

Hello,

Page 7/22:

• total duration DeltaT =  fDuration parameter = 9A then A=fDuration/9 with B=3A
• cruise= l =Deltat/3

Best regards.

GMA

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
Associate III

The code you need to modify is the function TC_MoveCommand in trajectory_ctrl.c. This function currently divides the movement into 9 steps, 3 acceleration, 3 cruise and 3 deceleration. It shouldn't be too difficult to change this to meet your 1-4-1 requirement.