Skip to main content
edited tags; edited tags
Link
xzczd
  • 71.6k
  • 10
  • 184
  • 524
Tweeted twitter.com/StackMma/status/1175152775447089152
Source Link
Reb.Cabin
  • 8.9k
  • 1
  • 35
  • 66

Stabilized Inverted Pendulum Blog Post Broken in 12.0?

One of the old Wolfram blog posts that I use frequently is this demonstration of the LQR gains computation.

https://blog.wolfram.com/2011/01/19/stabilized-inverted-pendulum/

I've been able to trust this since version 8. It's just one of those things I "go to" without thinking too much about it when starting a controls project.

It's now broken in ways I describe below, and despite a few hours of poking deep, I haven't found the root cause nor a workaround. This has me doubting not only Mathematica version 12 but my own sanity. I cannot trust the entire infrastructure this demo stands on.

I downloaded a fresh copy of the CDF this morning. The notebook no longer qualitatively matches the posted videos, and it certainly used to match in earlier versions of Mathematica.

In particular, the last two simulations are badly broken. In the penultimate demonstration, the cart does not return to center after the second bump, but drifts off to the right forever. That behavior is contrary to the video and contrary to the behavior I have observed in live notebooks since version 8.

Something changed in version 12!

The last demonstration fails even more dramatically. The cart does not move at all while being bumped hard. The video shows the expected behavior.

Anyone have any insight to this? Is NDSolve broken? Could it be related to broken eigenvalues? Eigenvalues broken in Version 12.0