Consider the Lyapunov barrier function
Vθ(θ, θmax, kp) = -kp/2 * log1p(-(θ/θmax)^2)
# with gradient
∇Vθ(θ, θmax, kp) = kp*θ / (θmax^2 - θ^2)
This together with $V = E^2/2 + V_\theta + ...$ gives a energy-based swingup with arm centering that is lax near center and a barrier function near the end stop
Consider the Lyapunov barrier function
This together with$V = E^2/2 + V_\theta + ...$ gives a energy-based swingup with arm centering that is lax near center and a barrier function near the end stop