-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add a toy 2D system with nonlinear dynamics. #18
Conversation
9bb6138
to
4094906
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+@Chuanruijiang for review please, thanks!
Reviewable status: 0 of 5 files reviewed, all discussions resolved (waiting on @Chuanruijiang)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 5 files at r1, all commit messages.
Reviewable status: 2 of 5 files reviewed, 2 unresolved discussions (waiting on @hongkai-dai)
compatible_clf_cbf/clf_cbf.py
line 575 at r1 (raw file):
Note that this function only adds the constraint -(1+ϕᵢ,₀(x))*bᵢ(x) +∑ⱼϕᵢ,ⱼ(x)pⱼ(x) is sos It doesn't add the constraint ϕᵢ,₀(x), ϕᵢ,ⱼ(x) are sos.
Why we don't need these \phi(x) polynomials to be SOS?
examples/nonlinear_toy/toy_system.py
line 24 at r1 (raw file):
{ sym.Monomial(x[0]): sym.Expression(-1), sym.Monomial(x[0], 3): sym.Expression(-1.0 / 6.0),
Maybe sym.Expression(1.0/6.0)? I saw that the system dynamics above is dot(x1) = -x0 + 1/6(x0)^3
We can certify the CLF/CBF are compatible for this toy system.
4094906
to
bb367af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 5 files reviewed, 2 unresolved discussions (waiting on @Chuanruijiang)
compatible_clf_cbf/clf_cbf.py
line 575 at r1 (raw file):
Previously, Chuanruijiang wrote…
Why we don't need these \phi(x) polynomials to be SOS?
Because we will use this function in two cases (during bilinear alternation)
- Fix the Lagrangian multiplier \phi(x), search for the CLF/CBF.
- Fix the CLF/CBF, search for the Lagrangian multiplier \phi.
In the second case, we will need the condition that \phi(x) is sos; while in the first case we do not.
examples/nonlinear_toy/toy_system.py
line 24 at r1 (raw file):
Previously, Chuanruijiang wrote…
Maybe sym.Expression(1.0/6.0)? I saw that the system dynamics above is dot(x1) = -x0 + 1/6(x0)^3
Done. Good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 5 files reviewed, 2 unresolved discussions (waiting on @hongkai-dai)
compatible_clf_cbf/clf_cbf.py
line 575 at r1 (raw file):
Previously, hongkai-dai (Hongkai Dai) wrote…
Because we will use this function in two cases (during bilinear alternation)
- Fix the Lagrangian multiplier \phi(x), search for the CLF/CBF.
- Fix the CLF/CBF, search for the Lagrangian multiplier \phi.
In the second case, we will need the condition that \phi(x) is sos; while in the first case we do not.
Ah, I see. So in this file, "class compatible_cbfclf " should be used when we fix the lagrangian and find b(x),V(x). And the first three classes are used when we fix the b(x), V(x) and compute the lagrangian. Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 5 files reviewed, 1 unresolved discussion (waiting on @Chuanruijiang)
compatible_clf_cbf/clf_cbf.py
line 575 at r1 (raw file):
Previously, Chuanruijiang wrote…
Ah, I see. So in this file, "class compatible_cbfclf " should be used when we fix the lagrangian and find b(x),V(x). And the first three classes are used when we fix the b(x), V(x) and compute the lagrangian. Is that correct?
class CompatibleClfCbf
will be used in both cases: 1) when we fix the Lagrangian and 2) when we fix the CLF/CBF. In both cases we will call this function _add_barrier_safe_constraint
. But when we search for the Lagrangian, we will additionally add the constraint that the Lagrangian is sos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 5 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @hongkai-dai)
We can certify the CLF/CBF are compatible for this toy system.
This change is