Open shclift opened 1 year ago
I think I found the problem:
...
if self.inc_form is False:
u = (self.Kp / self.b0) * r - self.w.T @ self.xhat
u = self._limiter(u)
else: # self.inc_form is True:
delta_r = r - self.rkm1
delta_u = ((self.Kp / self.b0) * delta_r
- self.w.T @ self.xhat_delta)
u = delta_u
self.rkm1 = r
self._update_eso(y, u)
...
Seems to work with the ESO update moved after the calculation of u - same as 0.3.0.
Were you referring to these lines? I also experience a similar problem with the latest version (0.4.1). https://github.com/onguntoglu/pyadrc/blob/06291221f2ecc0732ac4718dfc062614d1c523d8/docs/notebooks/quadcopter_basic.ipynb#L101-L103
The jyputer notebook is not execuable anymore, because t_settle
was, but no longer is the input parameter of constructor.
Previous version:
https://github.com/onguntoglu/pyadrc/blob/78806774f11aec9dee9f62fad237c7a1c238e0de/pyadrc/pyadrc.py#L71-L80
Current version:
https://github.com/onguntoglu/pyadrc/blob/06291221f2ecc0732ac4718dfc062614d1c523d8/pyadrc/pyadrc.py#L87-L97
now t_settle = 4 / w_cl
, hence I think the lines should be changed as following:
"adrc = pyadrc.StateSpace(order=2, delta=delta,\n",
" b0=1/0.028, w_cl=4/0.5, k_eso=10)"
]
An off-topic comment, if you're updating the file, could you please update this line too? There's a typo in \frac
https://github.com/onguntoglu/pyadrc/blob/06291221f2ecc0732ac4718dfc062614d1c523d8/docs/notebooks/quadcopter_basic.ipynb#L201
It would be clearer if it is expressed as $b_0 = \frac{1}{2} \frac{1}{0.028}$
Description
What I Did
Ran the Jupyter notebook for the different releases. With 0.3.0 I get this:
With 0.3.1 and more recent versions I get this:
Am I doing something wrong?