Skip to content

Commit

Permalink
Feature: Input power threshold for maxIncrease is less strict and res…
Browse files Browse the repository at this point in the history
…pects the overscaling configuration per inverter
  • Loading branch information
AndreasBoehm committed Dec 28, 2024
1 parent 3f297f0 commit ca9fcf8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/PowerLimiterSolarInverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@ uint16_t PowerLimiterSolarInverter::getMaxIncreaseWatts() const

float inverterEfficiencyFactor = pStats->getChannelFieldValue(TYPE_INV, CH0, FLD_EFF) / 100;

// 98% of the expected power is good enough
auto expectedAcPowerPerMppt = (getCurrentLimitWatts() / dcTotalMppts) * 0.98;
// with 97% we are a bit less strict than when we scale the limit
auto expectedPowerPercentage = 0.97;

// use the scaling threshold as the expected power percentage if lower,
// but only when overscalingis enabled and the inverter does not support PDL
if (_config.UseOverscaling && !_spInverter->supportsPowerDistributionLogic()) {
expectedPowerPercentage = std::min(expectedPowerPercentage, static_cast<float>(_config.ScalingThreshold) / 100.0);
}

// x% of the expected power is good enough
auto expectedAcPowerPerMppt = (getCurrentLimitWatts() / dcTotalMppts) * expectedPowerPercentage;

size_t dcNonShadedMppts = 0;
auto nonShadedMpptACPowerSum = 0.0;
Expand Down

0 comments on commit ca9fcf8

Please sign in to comment.