@@ -155,7 +155,7 @@ The plant model is nonlinear:
155155``` math
156156\begin{aligned}
157157 \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)
159159\end{aligned}
160160```
161161
@@ -197,9 +197,9 @@ An [`UnscentedKalmanFilter`](@ref) estimates the plant state :
197197estim = UnscentedKalmanFilter(model, σQ=[0.5, 2.5], σQ_int=[0.5])
198198```
199199
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 `` :
203203
204204``` @example 2
205205par_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
209209p2 = plot(res, plotu=false, plotx=true, plotx̂=true)
210210```
211211
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 ) :
215214
216215``` @example 2
217216mpc = NonLinMPC(estim, Hp=20, Hc=2, Mwt=[0.1], Nwt=[1.0], Cwt=Inf)
218217mpc = setconstraint!(mpc, umin=[-1.5], umax=[+1.5])
219218```
220219
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):
222222
223223``` @example 2
224224res = sim!(mpc, 30, [180.0], x̂0=zeros(mpc.estim.nx̂), plant=plant, x0=zeros(plant.nx))
225225plot(res, plotŷ=true)
226226```
227227
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