Skip to content

Conversation

@jleonqu
Copy link
Contributor

@jleonqu jleonqu commented Feb 8, 2024

An issue regarding the power calculated with the RM3 example using PTO-Sim was reported in #1218

There are two inconsistent signs in the 'Electric Generator Equivalent Circuit'. The first inconsistent sign is in the voltage equation of the equivalent circuit. The correct equation for the voltage in the circuit is:

$e - L_a \frac{di}{dt} - R_ai-R_{load}i = 0$
$e = k_e \omega $

For the dynamic equation in the shaft, the torque input should be considered as a positive input, which is accelerating the motor shaft, and the electric torque should be negative because it is used to generate the electric power and it is decelerating the electric motor shaft. The correct dynamic equation is:

$J_{EM} \ddot{\theta} = T_L - b_{shaft}\dot{\theta}-k_t i$

This PR fix the signs in the 'Electric Generator Equivalent Circuit' block.

MShabara and others added 9 commits October 20, 2023 11:18
Added meta description to the website SEO
Meta descriptions may be included in search results to concisely summarize page content.
This commit excludes R2020b and R2021a from the Windows test runners.

Specific changes are:
+ Merged windows and linux jobs, using the matrix to vary version differences
+ Excluded R2020b and R2021a from Windows jobs
+ Include latest in the Linux jobs
* adding bemio cleanup function

* impedance block drafts

* readWAMIT fix

* cleanup, fix plot dofs for function

* remove impedance blocks and function

* write cleaned file to new name

---------

Co-authored-by: akeeste <akeeste@sandia.gov>
Merge Master Commits into Dev
* Add R2023b to shared release testing versions

* Remove redundant latest version on Linux

* Port changes to master tests

* Don't install WEC-Sim in separate step

This seems to fix some issues with pathdef not saving in R2023b

* Update out of date actions

* Re-include R2020b and R2021a on Windows

* Use file to capture MATLAB logs to support R2020b issues
* Adds the a new example (Cylinder to NEMOH_v3.0.2)

* Adds Sphere example to NEMOH_v3.0.2
@kmruehl kmruehl requested a review from dforbush2 February 9, 2024 19:36
@kmruehl kmruehl added Bug bug in WEC-Sim source, high priority PTO-Sim PTO-Sim (ptoSimClass.m) labels Feb 9, 2024
@dforbush2
Copy link
Contributor

The signs seem to agree now and the dynamics make sense. One problem here is that it is assumed that Rload can go negative: this amounts to current injection (i.e., reactive power), and can be a bit misleading represented in this way. Recommend eventually revising to a command current at the inverter.

Ready to merge.

@kmruehl
Copy link
Collaborator

kmruehl commented Feb 26, 2024

@dforbush2 and @jleonqu should this go in dev or main?

@dforbush2
Copy link
Contributor

Both actually @kmruehl. Lets merge here, and @jleonqu can you please make another PR of the same fix into master?
Can confirm this works as intended.

@kmruehl
Copy link
Collaborator

kmruehl commented Feb 26, 2024

@dforbush2 we usually recommend bugfix PRs into main (formerly master), and then we pull main into dev. That ensures that all bug fixes get propagated into both branches. @jleonqu can you update this PR to go into main, and then once merged we'll pull it into dev.

@jleonqu jleonqu changed the base branch from dev to main February 27, 2024 18:36
@jleonqu
Copy link
Contributor Author

jleonqu commented Feb 27, 2024

Done. I've changed the PR to 'main' and I've solved the conflicts. It is ready to merge

@jleonqu jleonqu merged commit 7ba7089 into WEC-Sim:main Feb 27, 2024
@kmruehl
Copy link
Collaborator

kmruehl commented Feb 27, 2024

Thanks @jleonqu

@akeeste
Copy link
Contributor

akeeste commented Feb 28, 2024

@jleonqu when this PR was changed from dev into main, did you rebase it to be based on the main branch? It looks like there are 185 files changed, and that all of dev was pulled into main, not just this fix

@akeeste
Copy link
Contributor

akeeste commented Feb 28, 2024

This PR was force overwritten to remove the commit that included items from dev. See new PR

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-Sim PTO-Sim (ptoSimClass.m)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants