under a 90-degree step forcing.
Parameters: m, C=K/uB
def _predict(self, theta, params):
m, C, theta0, offset = map(np.real_if_close, params)
return 1/(m-1)*C**m*(np.cos(theta + offset)**(1-m)* \
self.F(m, theta + offset) \
- np.cos(theta + offset)**(1-m)* \
self.F(m, theta0 + offset))
After Change
"offset = {} > 0 will only lead to tears.").format(offset)
assert offset > -np.pi/2, (
"offset = {} < -pi/2 will only lead to tears.").format(offset)
assert np.cos(theta0 + offset) > 0, "We require cos(theta0 + offset) > 0."
assert C >= 0, (
"C = {} < 0 is not physical.").format(C)
assert m >= 0, (
"m < 0 is not physical.").format(m)