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

Torque OSWEC hydraulic PTO #247

Closed
NicolasQu opened this issue May 1, 2018 · 13 comments
Closed

Torque OSWEC hydraulic PTO #247

NicolasQu opened this issue May 1, 2018 · 13 comments
Assignees
Labels
Bug bug in WEC-Sim source, high priority PTO Class Power Take-off Class (ptoClass.m) PTO-Sim PTO-Sim (ptoSimClass.m)

Comments

@NicolasQu
Copy link

NicolasQu commented May 1, 2018

Hi!
I have a question about the hydraulic PTO for the OSWEC example.
When I increase the values of the piston top and bottom area, I saw that the power keeps increasing.
When I plot the velocity of the flap in pitch together with the torque applied by the PTO (calculated inside 'rotary to linear adjustable rod'), I noticed that the torque is positive when the velocity is positive, and negative when the pitch velocity is negative. Shouldn't this be the other way around?
Thanks in advance!
Regards
Nicolas

@kmruehl kmruehl self-assigned this May 10, 2018
@kmruehl kmruehl added the PTO Class Power Take-off Class (ptoClass.m) label May 10, 2018
@kmruehl
Copy link
Contributor

kmruehl commented May 10, 2018

@NicolasQu both of those observations should be correct. If you increase the surface area, you are increasing the force applied on the PTO, and thus the power. If the flap has a positive velocity, the power output should also be positive, and vice versa.

@NicolasQu
Copy link
Author

NicolasQu commented May 12, 2018

@kmruehl Thanks for your reply!
I understand that the power output should be positive when the velocity of the flap is positive, but I don't see why the pto-torque should then also be positive.
If I check the heaving rm3 with hydraulic pto and I plot its velocity together with the pto force (output.ptos.forceActuation(:,3)) I see that the pto force is always negative when the velocity is positive.
When I do the same for the oswec with hydraulic pto however, the flap output.ptos.forceActuation(:,5) pto force always has the same sign as the flap velocity velocity(:,5), so it is like the pto pushes the flap further to one side when the flap is moving that way.
Regards
Nicolas

@kmruehl kmruehl reopened this May 14, 2018
@kmruehl
Copy link
Contributor

kmruehl commented Jun 4, 2018

@NicolasQu, I looked into this issue a bit, and I think this has to do with a few different factors.

The first being that all outputs from joints/constraints are reported in the body fixed local coordinate system, not the global coordinate system. If you go under the mask for the PTO blocks you will see a series of Simscape Multibody Rigid Transform blocks in combination with a Simscape Multibody Revolute Joint (for the OSWEC) and a Simscape Multibody Prismatic Joint (for the RM3). Simscape Multibody specifies a default DOF for each joint, and WEC-Sim rotates these joints to the appropriate orientation. As a result, depending on where you are looking at the signal, it may not have been re-oriented yet. However, all dynamics/loads saved to the output data structure should have the correct body-fixed orientation.

Based on your post, the most likely reason for the observed sign discrepancy is that the output.ptos.forceActuation(:,5) signal is the signal applied to the pto, not the signal used to calculate power. Power is calculated in the OSWEC_Hydraulic_PTO/Rotational PTO Actuation Torque/InternalMechanics subsystem (for the OSWEC) by:
output.ptos.powerInternalMechanics(:,5)=output.bodies(1).velocity(:,5)^2 * pto.c

WEC-Sim actually does not directly output the internal force due to damping alone because:
output.ptos.forceInternalMechanics(:,5) = output.bodies(1).position(:,5) * pto.k + output.bodies(1).velocity(:,5) * pto.c

If your model has pto.k = 0 then you can use output.ptos.forceInternalMechanics(:,5) to reconstruct output.ptos.powerInternalMechanics(:,5).

@NicolasQu
Copy link
Author

@kmruehl , thank you for your explanation.

There is however still something I don't understand.
If I calculate the absorbed power for the OSWEC device with hydraulic PTO, the power seems to rise when the piston area rises. Calculations are done for regular waves with H = 1.5 m and T = 7s. In the figure below, the power reaches values until 600 kW which seems very high to me. I calculated the power by taking the mean value of output.ptosim.pistonNCF.absPower/1e3. pto.c and pto.k are set to 0.
image

When I do the same for the RM3 device with hydraulic PTO, I found an optimal value for the piston area with an optimal mean absorbed power of 105 kW, which seems more logical.
image

@kmruehl
Copy link
Contributor

kmruehl commented Jun 5, 2018

@NicolasQu it does seem unusual that the power for the OSWEC is increasing and does not show an optimal value based on piston area (within the plotted range). These application cases were developed to demonstrate functionality of the WEC-Sim code, but the devices and ptos were not optimized so it's hard to provide insight. I recommend running a larger range of piston areas for the OSWEC because I would expect its loads to be larger than those on the RM3. The other important factor to note is that the OSWEC model doesn't account for friction or drag which will likely be dominating physics, and thus WEC-Sim will overpredict the power output with their omission.

@kmruehl
Copy link
Contributor

kmruehl commented Jun 8, 2018

@NicolasQu does this answer your question?

@kmruehl kmruehl closed this as completed Jun 8, 2018
@NicolasQu
Copy link
Author

NicolasQu commented Jun 10, 2018

@kmruehl the loads are indeed larger for the OSWEC than for the RM3, but the absorbed power going to 600 kW seems very high, especially when comparing with the absorbed power for OSWEC with a linear damper which goes to ca 260 kW. If the range of piston areas increased, I get an error for excessive pitch angles.

When I added one minus sign in the Simulink model calculation of the PTO-torque of the hydraulic OSWEC, this is the result I got:
image
In this case the power reaches a maximum of ca 225 kW, which seems more logical. Due to adding this minus sign, the forceActuation(:,5) and velocity(:,5) now always have opposite signs.

@kmruehl kmruehl reopened this Jun 11, 2018
@kmruehl
Copy link
Contributor

kmruehl commented Jul 19, 2018

@NicolasQu, sorry for the delayed response. I finally had some time to delve deeper into this issue and came to the same conclusion you have; there is indeed a sign error for the OSWEC Hydraulic PTO application case. I think this is due to the inclusion of Rotary to Linear Adjustable Rod and its sign convention (since that's the only difference between the RM3 and OSWEC Hydraulic PTO cases).

My question for you is where did you add the minus sign for the PTO-torque in the OSWEC Hydraulic PTO case?

@kmruehl
Copy link
Contributor

kmruehl commented Jul 19, 2018

Note to self...

OSWEC Hydraulic PTO: Flap Velocity, and Sensed Actuator Torque. The torque and velocity have the same sign:
oswec_vf

RM3 Hydraulic PTO: Float velocity, relative velocity, and Sensed Actuator Force. The force and velocity have opposite signs:
rm3_vf

Sensed Actuator Torque is the torque applied to the PTO and 'sensed' by the Simscape Revolute Joint:
sensed_actuator_torque

For the OSWEC, the Sensed Actuator Torque (output.ptos.forceActuation(:,5)) and PTO-Sim Torque (output.ptosim.pistonNCF.force) have the same sign but different magnitudes (due to linkage), and the Internal Mechanics Torque (output.ptos.forceInternalMechanics(:,5)) is zero (for pto.c and pto.k set to 0):
oswec_f

For the RM3, the Sensed Actuator Force and PTO-Sim Force have the same sign and different magnitudes, and the Internal Mechanics Force is zero (for pto.c and pto.k set to 0):
rm3_f

Added a negative sign internal to the pto-sim subsystem, this corrects the sign error for the Sensed Actuator Torque output.ptos.forceActuation(:,5), but not for the PTO-Sim Torque output.ptosim.pistonNCF.force:
oswec_negsign

Need to resolve issue to correct both the Sensed Actuator Torque (output.ptos.forceActuation(:,5)) and PTO-Sim Torque (output.ptosim.pistonNCF.force)

@kmruehl kmruehl added Bug bug in WEC-Sim source, high priority and removed question labels Sep 18, 2018
@liangsunwut
Copy link

liangsunwut commented Apr 9, 2020

Was this issue solved in new version?

@kmruehl kmruehl added the PTO-Sim PTO-Sim (ptoSimClass.m) label Nov 18, 2020
@jleonqu
Copy link
Contributor

jleonqu commented Dec 7, 2020

I spent some time working on this issue and I found an error in the Rotary to Linear Adjustable Rod block in PTO-Sim. The error is in the calculation of the torque of the hydraulic PTO. The hydraulic cylinder exerts a force on the flap, and this creates a torque on the pivot of the flap. I recalculated the torque by using a different equation based on the figure shown below:

image

The torque in the point O can be calculated using this equation:

image

The torque obtained using the new formulation and the flap velocity have opposite signs, as it was expected. This new formulation corrects the original results, when the torque and the flap velocity had the same sign.

image

@kmruehl
Copy link
Contributor

kmruehl commented Dec 7, 2020

@jleonqu Thank you for documenting the issue and resolution. Please submit a PR to resolve this issue, and then we can close it out. Thanks again!

kmruehl pushed a commit that referenced this issue Dec 17, 2020
refer to #247 for more detail about bug
@kmruehl
Copy link
Contributor

kmruehl commented Dec 17, 2020

This issue was resolve by @jleonqu with PR #485

@kmruehl kmruehl closed this as completed Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug bug in WEC-Sim source, high priority PTO Class Power Take-off Class (ptoClass.m) PTO-Sim PTO-Sim (ptoSimClass.m)
Projects
None yet
Development

No branches or pull requests

4 participants