@@ -155,7 +155,7 @@ The plant model is nonlinear:
155
155
``` math
156
156
\begin{aligned}
157
157
\dot{θ}(t) &= ω(t) \\
158
- \dot{ω}(t) &= -\frac{g}{L}\sin\big( θ(t) \big) - \frac{k}{m} ω(t) + \frac{m}{ L^2}τ(t)
158
+ \dot{ω}(t) &= -\frac{g}{L}\sin\big( θ(t) \big) - \frac{k}{m} ω(t) + \frac{1}{m L^2} τ(t)
159
159
\end{aligned}
160
160
```
161
161
@@ -197,9 +197,9 @@ An [`UnscentedKalmanFilter`](@ref) estimates the plant state :
197
197
estim = UnscentedKalmanFilter(model, σQ=[0.5, 2.5], σQ_int=[0.5])
198
198
```
199
199
200
- The standard deviation of the angular velocity `` ω `` is higher here (second value of ` σQ ` )
201
- since `` \dot{ω}(t) `` equation includes the friction coefficient `` k `` , an uncertain
202
- parameter . The estimator tuning is tested on a simulated plant with a different `` k `` value :
200
+ The standard deviation of the angular velocity `` ω `` is higher here (` σQ ` second value )
201
+ since `` \dot{ω}(t) `` equation includes an uncertain parameter: the friction coefficient
202
+ `` k `` . The estimator tuning is tested on a plant simulated with a different `` k `` :
203
203
204
204
``` @example 2
205
205
par_plant = (par[1], par[2], par[3] + 0.25, par[4])
@@ -209,20 +209,20 @@ res = sim!(estim, 30, [0.5], plant=plant, y_noise=[0.5]) # τ = 0.5 N m
209
209
p2 = plot(res, plotu=false, plotx=true, plotx̂=true)
210
210
```
211
211
212
- The Kalman filter performance seems sufficient for control applications. As the motor torque
213
- is limited to -1.5 to 1.5 N m, we incorporate the manipulated input constraints in a
214
- [ ` NonLinMPC ` ] ( @ref ) :
212
+ The Kalman filter performance seems sufficient for control. As the motor torque is limited
213
+ to -1.5 to 1.5 N m, we incorporate the input constraints in a [ ` NonLinMPC ` ] ( @ref ) :
215
214
216
215
``` @example 2
217
216
mpc = NonLinMPC(estim, Hp=20, Hc=2, Mwt=[0.1], Nwt=[1.0], Cwt=Inf)
218
217
mpc = setconstraint!(mpc, umin=[-1.5], umax=[+1.5])
219
218
```
220
219
221
- We test ` mpc ` performance on ` plant ` by imposing an angular setpoint of 180° (inverted position):
220
+ We test ` mpc ` performance on ` plant ` by imposing an angular setpoint of 180° (inverted
221
+ position):
222
222
223
223
``` @example 2
224
224
res = sim!(mpc, 30, [180.0], x̂0=zeros(mpc.estim.nx̂), plant=plant, x0=zeros(plant.nx))
225
225
plot(res, plotŷ=true)
226
226
```
227
227
228
- The controller here seems robust enough to variations on `` k `` coefficients .
228
+ The controller seems robust enough to variations on `` k `` coefficient .
0 commit comments