Skip to content
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

Differentiable PTO impedance #238

Merged
merged 5 commits into from
May 17, 2023

Conversation

cmichelenstrofer
Copy link
Member

@cmichelenstrofer cmichelenstrofer commented May 16, 2023

Description

The PTO impedance was not differentiable. This was OK because the impedance is just created once during the solve, and does not depend on x_wec or x_opt which is what we differentiate w.r.t. But in the EWTEC LUPA study we want to get gradients w.r.t. PTO parameters.

Type of PR

  • Bug fix
  • New feature
  • Documentation
  • Other: (specify)

Checklist for PR

Additional details

This is needed for the LUPA EWTEC study. Other parts of the PTO and code are likely still not differentiable.

@cmichelenstrofer
Copy link
Member Author

cmichelenstrofer commented May 16, 2023

the main issues were:

  1. indexing in an assignment (we already knew autograd doesn't like it)
  2. using np.block function (discovered autograd doesn't like it)

@cmichelenstrofer cmichelenstrofer merged commit 9380543 into sandialabs:main May 17, 2023
@cmichelenstrofer cmichelenstrofer deleted the lupa_ewtec branch October 5, 2023 19:24
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.

1 participant