bjack205 / BilinearControl.jl

MIT License
26 stars 1 forks source link

Example stabilizing pendulum about top equilibrium w/ MPC #76

Closed bjack205 closed 2 years ago

bjack205 commented 2 years ago

Adds an example that learns a bilinear model for the pendulum about the top equilibrium. A convex MPC controller is used to stabilize the real nonlinear system about the upright position (the unstable equilibrium).

Check out the script in examples/learned_models/pendulum_equilibrium.jl.

As a part of this, I added a few new controllers, most importantly the BilinearMPC controller that takes a bilinear model and forms a MPC controller for tracking a reference trajectory of the original system.

codecov[bot] commented 2 years ago

Codecov Report

Merging #76 (df7d7a6) into main (96c4a3c) will decrease coverage by 16.13%. The diff coverage is 29.11%.

@@             Coverage Diff             @@
##             main      #76       +/-   ##
===========================================
- Coverage   79.50%   63.36%   -16.14%     
===========================================
  Files          15       16        +1     
  Lines        1361     1736      +375     
===========================================
+ Hits         1082     1100       +18     
- Misses        279      636      +357     
Impacted Files Coverage Δ
src/edmd/edmd.jl 100.00% <ø> (ø)
src/linear_model.jl 0.00% <0.00%> (ø)
src/utils.jl 80.95% <ø> (-1.98%) :arrow_down:
src/trajopt_qp.jl 28.26% <28.26%> (ø)
src/edmd/regression.jl 46.03% <40.90%> (-23.54%) :arrow_down:
src/edmd/eigenfunctions.jl 37.68% <75.00%> (-2.60%) :arrow_down:
src/lqr_solver.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 739a976...df7d7a6. Read the comment docs.