YaChienChang / Neural-Lyapunov-Control

Learning Lyapunov functions and control policies of nonlinear dynamical systems
119 stars 30 forks source link

Contour plot of Lyapunov functions #2

Closed camontblanc closed 4 years ago

camontblanc commented 4 years ago

Hi! @YaChienChang I was checking your amazing work and approach! However, when plotting the level sets of the Lyapunov functions, why do you substract some values from the NN and LQR approach?

ax.contour(X, Y, V-0.11, 0, linewidths=2, colors='k') ax.contour(X, Y, V_lqr-2.6, 0, linewidths=2, colors='m',linestyles='--') ax.contour(X, Y, V_SOS, 0, linewidths=2, colors='b')

Here, why do you substract V-0.11 or V_lqr-2.6?

I'd really appreciate if you can give me some light in here! Thank you!

YaChienChang commented 4 years ago

Hi @camontblanc, In the example, ax.contour(X, Y, V-0.11, 0, linewidths=2, colors='k') plots one level curve (V(x,y) = 0.11) of the Lyapunov function V.