# Foc\_current torque control and angle motor controller

**URL:** <https://community.simplefoc.com/t/foc-current-torque-control-and-angle-motor-controller/5436>\
**Category:** applications\
**Created:** [September 6, 2024, 9:37pm UTC](https://community.simplefoc.com/t/foc-current-torque-control-and-angle-motor-controller/5436 "2024-09-06T21:37:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charlie\_Chi](https://community.simplefoc.com/user_avatar/community.simplefoc.com/charlie_chi/32/4317_2.png) [@Charlie\_Chi](https://community.simplefoc.com/u/Charlie_Chi)\
**Post date:** [September 6, 2024, 9:37pm UTC](https://community.simplefoc.com/t/foc-current-torque-control-and-angle-motor-controller/5436/1 "2024-09-06T21:37:02Z")

</div>

HI,

I would like to implement this control using angle and foc\_current.

 ![Screen Shot 2024-09-06 at 2.27.31 PM](https://community.simplefoc.com/uploads/default/original/2X/c/ccbe260fc6c41980963846e952cb3c3469592595.png)

In angle control,  
current\_sp = PID\_velocity (shaft\_velocity\_sp - shaft\_velocity).

In foc current,  
voltage.q = PID\_current\_q(current\_sp - current.d).

Question 1: how do you convert current\_sp in angle control to target current for foc\_current?  
Question 2: where is the current limit (e.g. \_constraint(current\_sp, -current\_limit, current\_limit)?
