Gain calculations for Stability

Using the govorning equations of the unicycle model of a differential wheeled robot, we can summerize the following:

Therefore:

We can then try and calculate our idealized gains using the characteristic polynomial and the relationship of the system where it is locally exponentially stable to ensure we have a sound controller.


In [6]:
import numpy as np



#  USER INPUT FOR GAINS:
kp = 1
ka = 2
kb = -1

lin_sys = np.matrix([[-kp, 0, 0],[0, -(ka-kp), -kb],[0, -kp, 0]])

eigen = np.linalg.eig(lin_sys)
print (eigen[0])


[-0.5+1.32287566j -0.5-1.32287566j -2.0+0.j        ]