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

Kinematics #63

Merged
merged 17 commits into from
Mar 2, 2022
Merged

Kinematics #63

merged 17 commits into from
Mar 2, 2022

Conversation

cmichelenstrofer
Copy link
Member

@cmichelenstrofer cmichelenstrofer commented Feb 28, 2022

Description

Verified that the kinematics are implemented correctly. Changed names of kinematics functions to make them more explicit. Added a test for multiple WEC/PTO DOFs.

Type of PR

  • Bug fix
  • Major change
  • New feature
  • Minor change

Checklist for PR

@cmichelenstrofer
Copy link
Member Author

Closes #52

@cmichelenstrofer
Copy link
Member Author

cmichelenstrofer commented Feb 28, 2022

Tested with the WaveBot in heave and surge (uncoupled). Ran 5 different combination of WEC - PTO DOFs: s=surge, heave=h, WEC_PTO DOFs (e.g. sh_s means the WEC can surge and heave but there is a PTO only in surge):

  • sh_sh
  • sh_s
  • sh_h
  • s_s
  • h_h

All cases match (WEC velocity, PTO force, PTO power) except for the WEC surge motion. Since there is no force that depends on WEC surge position (radiation & added mass surge forces depend on WEC surge velocity and acceleration), the mean surge position is arbitrary.

WEC SURGE POSITION
Screen Shot 2022-02-28 at 16 48 55

WEC HEAVE POSITION
Screen Shot 2022-02-28 at 16 49 09

PTO SURGE POWER
Screen Shot 2022-02-28 at 16 49 20

@cmichelenstrofer cmichelenstrofer changed the title Kinemtics Kinematics Mar 1, 2022
@cmichelenstrofer cmichelenstrofer requested a review from ryancoe March 1, 2022 00:01
@cmichelenstrofer cmichelenstrofer self-assigned this Mar 1, 2022
@cmichelenstrofer cmichelenstrofer added the documentation Improvements or additions to documentation label Mar 1, 2022
@cmichelenstrofer cmichelenstrofer linked an issue Mar 1, 2022 that may be closed by this pull request
@cmichelenstrofer
Copy link
Member Author

Closes #54

Copy link
Collaborator

@ryancoe ryancoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks great and OK to merge.

Only thought is that, given the extended discussion amongst our group, it would be good to explain the kinematic Jacobian in the docs and/or example(s). With the documents that you and @dtgaebe have prepared during our discussions (#52), this might not be too much work. I'll leave this up to you @cmichelenstrofer whether that should be part of this PR or another later on (if so make an Issue).

@cmichelenstrofer
Copy link
Member Author

@ryancoe I'll add the documentation and merge. Note this doesn't test that the code is using the off-diagonal terms correctly or not. If we think of a good test for this we can add it later.

@cmichelenstrofer cmichelenstrofer requested a review from ryancoe March 1, 2022 04:07
@cmichelenstrofer
Copy link
Member Author

@ryancoe @dtgaebe I added a paragraph in the Documentation. Please review. @dtgaebe you can expand on this documentation with #60 to include how to construct this matrix.

@cmichelenstrofer cmichelenstrofer requested a review from dtgaebe March 1, 2022 04:09
Copy link
Collaborator

@ryancoe ryancoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending the suggested fixes and @dtgaebe's concurrence.

@cmichelenstrofer cmichelenstrofer requested a review from dtgaebe March 2, 2022 03:12
@cmichelenstrofer cmichelenstrofer requested a review from ryancoe March 2, 2022 03:12
Copy link
Collaborator

@ryancoe ryancoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one minor clarification

f_w = K^T f_p \\
:label: conservation_energy

Again, this represents a linearization of the function :math:`f_w(f_p)` about the mean :math:`f_p=0` with :math:`K^T` being the Jacobian of :math:`f_w(f_p)` at :math:`f_p=0`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be (f_p=0 -> x=0)

Again, this represents a linearization of the function :math:`f_w(f_p)` about the mean :math:`x=0` with :math:`K^T` being the Jacobian of :math:`f_w(f_p)` at :math:`x=0`.

the linearization of K is based on position only, right

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmichelenstrofer will follow up with @dtgaebe on this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if we want to linearize K it is based on position only and doesn't need extra treatment to relate the forces

@cmichelenstrofer
Copy link
Member Author

@dtgaebe So.... I'm confused again. I am thinking about something you brought up. We define K as the best linearization for the motions and then conservation of energy requires K^T to relate the forces. But ... is K^T also the best linearization for the forces? I.e. if you linearized the force relation f_w(f_b) would you also get f_w = K^T f_b? Or is K^T some suboptimal linearization but required to conserve energy, given the linear assumption made for the motions

@dtgaebe
Copy link
Collaborator

dtgaebe commented Mar 2, 2022

@cmichelenstrofer Let's say we always use the instantaneous kinematic matrix K(x) defined as partial derivatives of dp/dx I think then the relation between the forces is not an approximation! Of course, if we linearize K(x) about (say the origin) everything else will be a linear approximation too.
The only inherent linearization comes into places if we use p =Kx = dp/dx * x and the x components are not of unit length.

@cmichelenstrofer cmichelenstrofer merged commit 7d9bbc7 into sandialabs:main Mar 2, 2022
@cmichelenstrofer cmichelenstrofer deleted the kinematics branch March 2, 2022 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PTO <=> WEC degrees of freedom
3 participants