pvlib / pvlib-python

A set of documented functions for simulating the performance of photovoltaic energy systems.
https://pvlib-python.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.21k stars 1.01k forks source link

DC Optimizer #1588

Open mikofski opened 2 years ago

mikofski commented 2 years ago

Is your feature request related to a problem? Please describe. related to #1581 - a model for systems with DC optimizers and coupled string inverters would be useful

Describe the solution you'd like

  1. some references
  2. a specification of the inputs required
  3. an implementation of a published algorithm

Describe alternatives you've considered I think DC optimizers can be considered to be like the MPPT of an inverter. Connected either singly or to pairs of modules, they will find the max power point (Imp, Vmp) of those modules, then convert that to an equivalent operating condition (I, V) that when combined with other optimizers in the string will add up to the a fixed voltage (Vfix) that the string inverter expects, which then converts that to AC like a normal inverter, except it operates at constant input voltage, IE no MPPT, b/c that's handled by the DC optimizer. Because the DC optimzers are in series they are constrained by their current, they must all have identical current. ~Therefore all of the DC optimizers will have to sweep across a range of currents to find the current for which the sum of voltages (from all the DC optimizers in the string) corresponds to the fixed voltage of the inverter.~

Actually, the current can be solved analytically directly from the total power because it's a linear relation!

vtest = SUM(Vtest_i) = SUM(Pmp1/itest + Pmp2/itest + ...) = SUM(Pmp_i)/itest
# so
ifixed = SUM(Pmp_i)/vfixed

IE the voltage from each dc optimizer is the power divided by the test current, which is constant for all dc optimizers in the series. This is equivalent to summing the powers from all the optimizers and dividing the sum by the test current. QED

Then the inverter is like a grid-connected SAPM inverter.

There can be additional losses for the DC optimizers:

Summary algorithm:

  1. ~Apply the DC loss to the inverter fixed voltage to get V_fixed = V_inverter * (1-DC_loss)~ wrong this goes to power!
  2. Combine IV curves for pairs of modules.
  3. For each pair of modules, find MPP and (Pmp = Imp*Vmp) of combined IV curve
  4. ~for all DC optimizers in a string, loop over a range of currents~
  5. ~given current (I_i) calculate V_i = (Pmp)/I_i~
  6. ~calculate SUM(V_i) and check if it is within tolerance of inverter fixed voltage (V_fixed)~
  7. calculate I_fixed from total power and fixed voltage Pmp*(1-DC_loss) / vfixed <- loss goes here!_
  8. when V_i for all DC optimizers has been found, use the grid-connected Sandia model to get inverter efficiency based on P_dc = V_fixed * I_i

Additional context If anyone has references, please list them here

mikofski commented 2 years ago

here's the cleaned up algorithm:

  1. Combine IV curves for modules connected to DC optimizer
  2. Find MPP of modules connected to DC optimizer
  3. Add power of all DC optimizers in string
  4. Apply DC optimizer loss to sum of power in string
  5. Calculate current through string as Istring = SUM(Pmp)*(1-DC_loss)/Vfixed
  6. Apply standard grid-connected inverter efficiency curves to (Vfixed, Istring, SUM(Pmp)*(1-DC_loss))

I made an example in this gist: https://gist.github.com/mikofski/70f29b7ea8d7fa91b5e6e02551bf42d2

cwhanse commented 2 years ago

Find MPP of modules connected to DC optimizer

Do you mean the MPP of the combined IV curve? Vfixed is an input to this algorithm, correct?

cwhanse commented 2 years ago

We may want to make space for DC_loss to be a function of power and input voltage (although a default 1% seems appropriate). See this note.

mikofski commented 2 years ago

Do you mean the MPP of the combined IV curve?

yes, that's correct. Find the MPP of the combined IV curves. Usually 2 modules are connected to a DC optimizer.

Vfixed is an input to this algorithm, correct?

Yes, Vfixed is an input, should be in the specification of the string inverter that's part of the DC optimizer & inverter pair.

We may want to make space for DC_loss to be a function of power and input voltage (although a default 1% seems appropriate).

Aha that's very interesting, I see from that note that a fixed loss is too restrictive and that DC optimizer efficiency is a function of both power and voltage, although

image

It looks very similar to an inverter curve to me, and I think our best bet is to just use raw data and interpolate if we can. Baring that, I wonder if perhaps we can determine generic inverter inputs and reuse the Sandia grid-connected inverter model?

[edited: ignore what I said earlier about voltage regulators. I was uninformed. Sorry :(]

adriesse commented 2 years ago

The curve should look similar to an inverter because the same loss mechanisms are at work (or play). See the adr inverter references for more explanations. I started generalizing here but it is a background task.

The wiggles in the curves are probably because the dc/dc converters are programmed to be by-passed under conditions when they would be expected to lose more than they gain.

mikofski commented 2 years ago

Can we get access to the curves? I am going to start looking at data sheets

cwhanse commented 2 years ago

DC-DC optimizer datasheets (usually) have two efficiency values (maximum and weighted), so I'd expect users to have those values and probably not the full curve. There's no list of optimizer parameters, that I'm aware of. Most of the energy production will be at high power, so I think a constant efficiency is OK for many use cases. Perhaps an initial function could accept an array and interpolate (I think that could also work for a length-one array).

mikofski commented 2 years ago

More links:

adriesse commented 2 years ago

The solaredge curves (like pretty much all datasheet curves) are heavily smoothed and based on an unknown number of measurements, so it's probably not a good idea to try to use them for model development.

cwhanse commented 1 year ago

@mikofski I shared this discussion with a colleague who has a deep understanding of inverters and DC-DC optimization algorithms. His response: "looks like an entirely reasonable approach." One suggestion is to include an MPPT efficiency term unless we want to simplify by accounting for MPPT efficiency in the DC optimizer loss.

PVSC poster perhaps?

mikofski commented 1 year ago

Maybe an MPPT efficiency term should be applied to all inverters, not just MLPE?

DC-DC optimizer datasheets (usually) have two efficiency values (maximum and weighted), so I'd expect users to have those values and probably not the full curve.

I'd like to learn more about these two parameters and start from there. How do I use the max and weighted efficiencies to get a curve of dc-optimizer loss vs. output power? Jeff Newmiller had derived some equations to convert max/weighted eff for SolarFarmer which is in the SF calculation theory docs. Does that look right?

Does anyone have any examples of dc optimizer data sheets we could link to as test cases? thanks! I think we should try to cover at least SE, Tigo, and Ampt.

Point of clarification: this issue doesn't include micro-inverters like Enphase, which I believe can be modelled using the existing Sandia grid-connected inverter model or Anton's ADR model. Am I correct?

adriesse commented 1 year ago

Jeff Newmiller had derived some equations to convert max/weighted eff for SolarFarmer which is in the SF calculation theory docs. Does that look right?

Are the referenced research notes published? Some assumptions need to be made to produce a curve from two data points.

adriesse commented 1 year ago

Point of clarification: this issue doesn't include micro-inverters like Enphase, which I believe can be modeled using the existing Sandia grid-connected inverter model or Anton's ADR model. Am I correct?

I think these models are indifferent to size/scale of inverter, so they work equally well with microinverters. However, they rely on the PV module/array calculations to provide the correct operating point. None of the models/implementations currently have the inverter and module/array interacting to find the correct operating point under constraints.

cwhanse commented 1 year ago

I'd like to learn more about these two parameters and start from there. How do I use the max and weighted efficiencies to get a curve of dc-optimizer loss vs. output power? Jeff Newmiller had derived some equations to convert max/weighted eff for SolarFarmer which is in the [SF calculation theory docs]

That actually looks to me like its own inverter model (calculates power not delivered as AC as a function of input DC power, given CEC or EU weighted, and maximum, efficiencies; hence it converts DC power to AC power delivered).