-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qe.solve_discrete_riccati versus scipy.linalg.solve_discrete_are #360
Comments
Hi @oyamad . I was searching for something else about Riccatis but I don't know how I ended up here :) Coincidentally I'm the one who revised the SciPy version of these solvers. Please let us know if you find discrepancies in Scipy versions too. Also if you want to extend your Riccati tests, we are using the CAREX and DAREX gallery for continuous and discrete solvers which you can find here. If you follow the references you can also get the matlab mat files for testing in other domains. By the way, very interesting project, as a control guy, I was aware of the usage of Kalman filters but I wouldn't expect to find LQ solvers inside economics package 😃 I'll definitely check it out. |
@ilayn Thanks for your message! We have a DARE solver based on a doubling algorithm, written by @jstac and @thomassargent30 (I am just a user, having no detailed knowledge about solution algorithms...). Our solver had a small bug, which has been fixed, and now, at least for my usecases, its outputs coincide with those by your current It will be interesting to see how our solver performs for the testcases in SciPy. Thanks for the information! |
Ah OK. There are some generalized Lyapunov solvers planned in the pipeline. I have the direct solvers coded in some other library in case you need a basis to built on (they are 5x slow compared to matlab now as they are currently in pure Python). I will try to polish them and propose to push them into SciPy at some point. Current main problem is detecting no solution cases properly but since as far as I can see you guys are pretty into solvers maybe you might have a better idea to vectorize or increase precision. The algorithm is the typical QZ-based symmetry exploitation and solve small linear systems of max 2x2 block size which I think what SLICOT does with extras. The solvers are in https://github.com/ilayn/harold/blob/master/harold/_solvers.py . I don't know if MIT license is free enough but please feel free to use them at your will which was the main idea of MIT in the first place. |
Related to #84 and #356, but open a separate issue.
The claim in the docstring in
solve_discrete_riccati
is no longer true.
N
, andR
.dare_test_tjm_2:
1.2591976102547471e-16
dare_test_tjm_3:
1.2510407154664449e-08
The text was updated successfully, but these errors were encountered: