Skip to content

Commit 76d1d67

Browse files
committed
minor doc modification
1 parent bd928b4 commit 76d1d67

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/manual/nonlinmpc.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ old_logger = global_logger(); global_logger(errlogger);
1212
## Nonlinear Model
1313

1414
In this example, the goal is to control the angular position ``θ`` of a pendulum
15-
attached to a motor. Knowing that the manipulated input is the motor torque ``τ``, the I/O
16-
vectors are:
15+
attached to a motor. Knowing that the manipulated input is the motor torque ``τ`` in Nm, the
16+
I/O vectors are:
1717

1818
```math
1919
\begin{aligned}
@@ -49,7 +49,7 @@ using ModelPredictiveControl
4949
function pendulum(par, x, u)
5050
g, L, K, m = par # [m/s²], [m], [kg/s], [kg]
5151
θ, ω = x[1], x[2] # [rad], [rad/s]
52-
τ = u[1] # [N m]
52+
τ = u[1] # [Nm]
5353
dθ = ω
5454
dω = -g/L*sin(θ) - K/m*ω + τ/m/L^2
5555
return [dθ, dω]
@@ -59,7 +59,7 @@ const par = (9.8, 0.4, 1.2, 0.3)
5959
f(x, u, _ ) = pendulum(par, x, u)
6060
h(x, _ ) = [180/π*x[1]] # [°]
6161
nu, nx, ny, Ts = 1, 2, 1, 0.1
62-
vu, vx, vy = ["\$τ\$ (N m)"], ["\$θ\$ (rad)", "\$ω\$ (rad/s)"], ["\$θ\$ (°)"]
62+
vu, vx, vy = ["\$τ\$ (Nm)"], ["\$θ\$ (rad)", "\$ω\$ (rad/s)"], ["\$θ\$ (°)"]
6363
model = setname!(NonLinModel(f, h, Ts, nu, nx, ny); u=vu, x=vx, y=vy)
6464
```
6565

0 commit comments

Comments
 (0)