Working pendulum lspi implementation.