-
Notifications
You must be signed in to change notification settings - Fork 22
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
BUG: Last frequency component is wrong #225
Comments
@michaelcdevin can you add more details? |
See attached zipped file for a basic example to replicate this behavior using WecOptTool v2.4.0 using a similar setup to Tutorial 1, part 1: issue225_test.zip The highest frequency will give a different optimal excitation force each time as well. Since there is a large amount of energy in that frequency, this will substantially alter the optimal power: |
The root causes for this behavior have been identified:
Example of bug from cause (2) -- use WecOptTool v2.1.0:
Point regarding the above comment: |
Another bug, but not sure if it fixes it: The second derivative operator is not the 1st derivative squared because of the nyquist frequency. @michaelcdevin lets talk about this next week |
After further discussion, we determined the velocity being zero at the top frequency is actually correct behavior. Since However, something is still not right here. I am still getting the same behavior when using a PI or PID controller, where position/acceleration should affect the objective function since it impacts the force. Related bugs mentioned in this issue regarding the incorrect DFT matrix behavior and the 2nd derivative matrix affecting the acceleration have been addressed in #232. |
One clarification. The last component of velocity (last component in the state vectors is |
A bit more info on the behavior with a structured controller. I'm testing convergence with a consistent The post processed results are the same as above, with an arbitrary last frequency and a different optimal average power each time. |
Disregard my earlier comment, I forgot to switch my script back to using the same waves each time... The behavior I'm seeing with the PI controller w/ 16 frequencies is that |
Through this issue we
The last issue we were discussing is not a bug and is actually the expected behavior. See the following writeup showing how for the linear problem with average mechanical power as the objective and an unstructured controller the DC and Nyquist components of the WEC position and PTO force are arbitrary. Same as PDF above, but in Markdown, some formatting issues...Objective function: Average mechanical powerThe states are Xwec and Fpto which $$ Note that the second derivative state can not be obtained by applying In the time domain, these are: $$\begin{split} The power in the time domain is the product of velocity and force. This $$ The average power is the integral of power in the time domain, or the DC $$\begin{split} If we generalize to n frequencies: $$ Neither the DC component nor the last frequency component of the PTO DynamicsThe linear dynamics can be expressed in the frequency domain, where each where DC frequencyFor the first (DC) frequency, there is no radiation or excitation. Nyquist frequencyFor the last frequency n, the EOM is $$ If fpto is arbitrary (as above, with Form observations, the Nyquist component can also be driven to zero by a Intermediate frequenciesFor intermediate frequencies, position, velocity, and acceleration In general all these intermediate frequency components of the PTO force Structured ControllerA structured controller changes how the the PTO force is computed but Similiatly, for a PID $$\begin{split} which implies either the relation in parenthesis is satisfied (likely Electrical PowerPTO force and velocity are converted to current and voltage using the $$ Considering that all components in $$ However, to re-emphasize, the intermediate components do impact the The electrical power in the time domain includes extra terms, when $$\begin{split} This results in the average electrical power depending on the DC and The DC and Nyquist components of the WEC position and PTO force have Note: The current DC and Nyquist components Idc and ConclusionFor average mechanical power the DC and Nyquist components of WEC For average electrical power using an impedance matrix, the DC and AppendixElectrical states $$\begin{aligned} Objective function: Average mechanical powerThe states are Xwec and Fpto which $$ Note that the second derivative state can not be obtained by applying In the time domain, these are: $$\begin{split} The power in the time domain is the product of velocity and force. This $$ The average power is the integral of power in the time domain, or the DC $$\begin{split} If we generalize to n frequencies: $$ Neither the DC component nor the last frequency component of the PTO DynamicsThe linear dynamics can be expressed in the frequency domain, where each where DC frequencyFor the first (DC) frequency, there is no radiation or excitation. Nyquist frequencyFor the last frequency n, the EOM is $$ If fpto is arbitrary (as above, with Form observations, the Nyquist component can also be driven to zero by a Intermediate frequenciesFor intermediate frequencies, position, velocity, and acceleration In general all these intermediate frequency components of the PTO force Structured ControllerA structured controller changes how the the PTO force is computed but Similiatly, for a PID $$\begin{split} which implies either the relation in parenthesis is satisfied (likely Electrical PowerPTO force and velocity are converted to current and voltage using the $$ Considering that all components in $$ However, to re-emphasize, the intermediate components do impact the The electrical power in the time domain includes extra terms, when $$\begin{split} This results in the average electrical power depending on the DC and The DC and Nyquist components of the WEC position and PTO force have Note: The current DC and Nyquist components Idc and ConclusionFor average mechanical power the DC and Nyquist components of WEC For average electrical power using an impedance matrix, the DC and AppendixElectrical states $$\begin{aligned} |
Describe the bug
The last frequency component of the results is not continues but has a significant jump.
To Reproduce
Run a case with irregular waves where the spectrum has significant ammount of energy in the last frequency (e.g. cut off the spectrum early).
Expected behavior
Smooth tail.
Observed behavior
Large jump at last frequency.
System:
All.
Additional information
We suspect this is related to the DFT matrix.
The text was updated successfully, but these errors were encountered: