Skip to main content
. Author manuscript; available in PMC: 2019 Jan 1.
Published in final edited form as: IEEE Trans Neural Syst Rehabil Eng. 2017 Sep 22;26(1):224–232. doi: 10.1109/TNSRE.2017.2756023

Table I.

The NMPC-based DCA that uses gradient projection algorithm.

1 Initialization: j = 0
(a) Set the convergence tolerance εj.
(b) Choose initial control trajectory u¯k(0)(τ)U[t0,T], where τ ∊ [t0, T].
(c) Integrate the system dynamics forward in time to solve for x¯k(0)(τ) given u¯k(0)(τ) and x¯k(0)(0)=xk, where τ ∊ [t0, T].
2 Gradient Step:
(d) Integrate backward in time to solve for the costates λ(j) (τ) λ˙(τ)=H(x,λ,u)x|x=x¯k(j),u=u¯k(j), where λk(j)(T)=V(x¯k(j)(T))x¯(T) is the terminal condition.
(e) Compute the search direction, sk(j)(τ), from the Hamiltonian sk(j)(τ)=H(x,λ,u)u|x=x¯k(j),u=u¯k(j),λ=λk(j).
(f) Compute the step size, αk(j)
αk(j)=argminα>0J(xk(j),ψ(u¯k(j)+αsk(j))).
(g) Compute the new control trajectory u¯k(j+1)(τ)=ψ(u¯k(j)+αk(j)sk(j)),
ψ(u){u,u<uu,uuu+u+,u+<u.
(h) Integrate the system dynamics forward in time (h1) solve for x¯k(j+1)(τ) given u¯k(j+1)(τ),
(h2) evaluate the cost function J(xk(j+1),u¯k(j+1))·
(i) Check Quit Conditions(i1) quit if |J(xk(j+1),u¯k(j+1))J(xk(j),u¯k(j))|εj,
(i2) quit if j has exceeded the max iteration limit, Nt,
(i3) otherwise set j = j + 1 and reiterate gradient step from (a).