Skip to content

Commit e9576d6

Browse files
committed
Improve introductory paragraph
1 parent f6ae1ae commit e9576d6

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

src/content/docs/misc/motor_control.mdx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,30 @@ With the introduction of the brushless era of motors in FRC, motors have become
44
Brushless motors have incredible size to performance ratios, and the smart motor controllers that accompany them make it easy to control a variety of mechanisms.
55
This section will cover the most common control modes seen on FRC robots: position control, velocity control, and open-loop control.
66

7-
## Open- and Closed-loop mechanisms
7+
## Motor Controllers
8+
Not to be confused with hardware motor controllers like the REV Spark Max or CTRE TalonFX, a software motor controller is a function that converts a setpoint input to a motor output.
9+
In the simplest case, the input _is_ the output, such as when using voltage or throttle (duty-cycle) control.
810

9-
The manner in which you control a mechanical mechanism can be split into two categories: open-loop, and closed-loop.
10-
Open-loop refers to a mechanism that uses no measurement to correct the output of the motor.
11-
Closed-loop mechanisms use measurements, such as an encoder reading, to adjust the output of a motor to get closer to a target setpoint.
11+
## Open- and Closed-loop Controllers
12+
The types of controllers that you can create can be split into two categories: open-loop, and closed-loop.
13+
Open-loop refers to a mechanism that have only a single input, the setpoint.
14+
Open-loop controllers will often, but not always, utilize a mathematical model of the motor and mechanism to make an educated estimate of how the motor should act in order to reach the setpoint.
15+
However, they have no way of knowing if the motor is behaving according to the model, so open-loop control is inadequate for most FRC mechanisms.
16+
17+
Closed-loop mechanisms have an additional input: a measurement of the current state of the mechanism.
18+
A closed-loop controller will combine this measurement and setpoint to determine the output.
19+
Using a measurement from the mechanism is beneficial because it gives your controller insight into how the mechanism is actually behaving.
20+
This _feedback_ from the mechanism can help account for the modle being inaccurate, or disturbances which have caused the mechanism to not act exactly according to the model.
1221

1322
Closed-loop control is fundamental to creating fast and accurate mechansims, but requires more effort to get working properly.
14-
Open-loop control is easy, but may lack the precision that closed-loop offers.
23+
Open-loop control is simpler, but may lack the precision that closed-loop offers.
1524

16-
Open- and closed-loop refers to the shape of the mechanism when diagrammed out.
25+
Ther terms open- and closed-loop refers to the shape of the controller when diagrammed out.
1726
See this image from the [WPILib Docs](https://docs.wpilib.org/en/stable/docs/software/advanced-controls/introduction/control-system-basics.html#block-diagrams):
1827
![Closed Loop Block Diagram](/misc/loop_block.png).
1928

2029
When there is no feedback, the diagram forms a straight line from input to output.
21-
With feedback, the feedback _closes the loop_, hence closed-loop control.
22-
23-
A key similarity between open- and closed-loop control is that both schemes utilize setpoints.
24-
An open-loop controller will simply not measure the mechanisms current state and make adjustments.
25-
While it is necessary for closed-loop mechanisms to use real-world units such as degrees for an arm, or inches for an elevator, an open-loop mechanism may use motor control units, such as voltage or duty-cycle, as its setpoint.
26-
27-
Open-loop control does not inherently mean unpredictable, or uncontrolled.
28-
Using mathematical models of your mechanism, it is possible to create a controlled output _profile_ that your mechanism can follow in order to reach its setpoint.
29-
However, because an open-loop controller lacks any feedback, it will not adjust for an error, and is unlikely to reach the target setpoint exactly.
30+
In the closed-loop case, the input -> output -> feedback forms a loop.
3031

3132
## Open Loop Control
3233

0 commit comments

Comments
 (0)