You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/simplefoc_library/code/current_sense/index.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,4 +72,6 @@ Note: current sensing on Renesas MCUs will be added in a future release.
72
72
73
73
## Digging deeper
74
74
75
-
For more theoretical explanations and source code implementations of the current sensing and its integration into the FOC and motion check out the [digging deeper section](digging_deeper).
75
+
For more theoretical explanations and source code implementations of the current sensing and its integration into the FOC and motion check out the digging deeper section.
76
+
77
+
[Learn about current sensing theory and implementation](digging_deeper){: .btn .btn-docs}
The driver code is written in a way to support as many different drivers out there as possible and in a way to be fully interchangeable.
29
31
These classes can be used as stand-alone classes and they can be used to set certain PWM value to the driver outputs, see example codes in `utils > driver_standalone_test`.
Copy file name to clipboardExpand all lines: docs/simplefoc_library/code/motion_control/closed_loop_control/angle/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,8 @@ This angle control loop is therefore created by adding one more control loop in
54
54
55
55
</div>
56
56
<divclass="cascade cascade-n hide"markdown="1">
57
-
<imgclass="width60 type type-b"src="extras/Images/an_b_i.drawio.png">
58
-
<imgclass="width60 type type-s hide"src="extras/Images/an_s_i.drawio.png">
57
+
<imgclass="width60 type type-b"src="extras/Images/an_b_i1.drawio.png">
58
+
<imgclass="width60 type type-s hide"src="extras/Images/an_s_i1.drawio.png">
59
59
60
60
In **No-cascade position control** the angle control loop is closing the loop directly around the torque control loop. This means that the angle controller will be setting the torque target to the torque controller, without using the velocity controller in between.
This is the standard motion control approach where the position sensor is used to provide feedback to the motion control loop. The motion control loop (`motor.move()`) will calculate the target torque (current or voltage) to be applied to the motor using the underlying torque/FOC control loop (`motor.loopFOC()`) in order to achieve the desired motion.
41
23
42
24
<spanclass="simple">Simple<spanclass="foc">FOC</span>library</span> gives you the choice of using 3 different Closed-Loop control strategies:
43
25
-[Torque control loop](torque_loop)
44
26
-[Velocity motion control](velocity_loop)
45
27
-[Position/angle motion control](angle_loop)
46
28
47
-
You set it by changing the `motor.controller` variable. If you want to control the motor angle you will set the `controller` to `MotionControlType::angle` or `MotionControlType::angle_nocascade`, if you want to control the torque of the BLDC or Stepper motors either through voltage or the current use `MotionControlType::torque`, if you wish to control motor angular velocity `MotionControlType::velocity`.
48
29
49
30
```cpp
50
31
// set FOC loop to be used
@@ -55,8 +36,38 @@ You set it by changing the `motor.controller` variable. If you want to control t
55
36
motor.controller = MotionControlType::angle;
56
37
```
57
38
39
+
58
40
| Torque control | Velocity control | Position/angle control |
|[Go to Torque control docs](torque_loop){: .btn .mr-2 .btn-docs} |[Go to Velocity control docs](velocity_loop){: .btn .mr-2 .btn-docs} |[Go to Position/angle control docs](angle_loop){: .btn .mr-2 .btn-docs}|
0 commit comments