WECCCOMP – Forums WECCCOMP forum Power performance computation

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1335

    Last issue for today: I think that there is a flaw in the computation of power performance in ‘userDefinedFunction.m’.

    This is the current code:

    force = output.ptos.forceActuation(ii:end,3);
    vel = output.ptos.velocity(ii:end,3);
    power = force.*vel;
    eff = 0.7;
    for i = 1:length(power)
    if power(i)>= 0
    power_eff(i) = power(i)*eff;
    else
    power_eff(i) = power(i)/eff;
    end
    end

    When a positive damping is applied (cc = 10, for instance), the resulting instantaneous power (power = force.*vel) is negative. The convention seems to be that a negative instantaneous power corresponds to power production. Changing the sign of the damping leads to simulation errors, so my guess should be correct.

    However, if power being produced has a negative sign, the code above should be modified as follows:

    for i = 1:length(power)
    if power(i)<0
    power_eff(i) = power(i)*eff;
    else
    power_eff(i) = power(i)/eff;
    end
    end

    Otherwise, produced electric power will be greater than mechanical power. Of course, one could change the power sign convention instead (power = force.*vel;).

    Best regards,

    Paolino Tona
    IFPEN Team

    #1344
    Ruehl Kelley
    Organiser

      Thank you very much for bringing this issue to our attention. You are correct. The power calculation in the userDefinedFunctions.m script was incorrect. This post-processing script has been updated on the WECCCOMP repo (https://github.com/WEC-Sim/WECCCOMP), and your power values should now be positive.

    Viewing 2 posts - 1 through 2 (of 2 total)
    • You must be logged in to reply to this topic.