Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

remove unneeded computation #132

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

Merged
merged 1 commit into from
May 21, 2020
Merged

remove unneeded computation #132

merged 1 commit into from
May 21, 2020

Conversation

acxz
Copy link
Contributor

@acxz acxz commented May 18, 2020

Was going through the math and I'm pretty sure L^T * gv + L^T * H * lv evaluates to zero in the computation for the value function first state derivative, sv.

L^T * gv + L^T * H * lv
= (- H^-1 * G)^T * gv + (- H^-1 * G)^T * H * (- H^-1 * gv)
= (- H^-1 * G)^T * gv + (H^-1 * G)^T * H * H^-1 * gv
= (-G^T * H^-T) * gv + (G^T * H^-T) H * H^-1 * gv
= (-G^T * H^-T) * gv + (G^T * H^-T) * gv
= 0

Edit: I have confirmed with iLQRTest and ex_NLOC that these modifications do not change the results.

L^T * gv + L^T * Hi * lv evaluates to zero
@markusgft
Copy link
Member

markusgft commented May 19, 2020

Hi, no unfortunately this is not generally true. This only holds for your specific experiments, where the matrix P_ (cross derivative for x and u) is zero.
In general, it is not true that (- H^-1 * G) == (-G^T * H^-T) , since G = P + B^T * S * A so you are also missing a transpose in above calculations, I think you accidentially dropped it from line 3 to 4.

@acxz
Copy link
Contributor Author

acxz commented May 19, 2020

Ah yes, I did drop the transpose from L^T. (updated OP) While I agree that (- H^-1 * G) == (-G^T * H^-T) is not generally true, isn't (- H^-1 * G)^T == (-G^T * H^-T) just by virtue of the multiplicative transpose property?
In fact we can forego the L^T term altogether in the above analysis and only compare gv and H * lv:
plugging lv = -H^-1 gv directly we have:
gv + H * lv
= gv + H * (-H^-1 gv)
= gv - gv
= 0

@markusgft
Copy link
Member

Okay, now I see your point. I will need a quiet minute to double check. I will come back to this thread soon!

@markusgft
Copy link
Member

I quickly looked over the math once again and indeed you are right, those terms cancel to zero!

@markusgft markusgft merged commit ca4fb2a into ethz-adrl:v3.0.2 May 21, 2020
@acxz acxz deleted the patch-1 branch May 21, 2020 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.