# getPVInfo

Gets the information for all PV plants in the circuit

## Contents

- Syntax
- Description
- Inputs
- Outputs
- Example

## Syntax

    PV = getPVInfo(DSSCircObj);
    PV = getPVInfo(DSSCircObj, pvNames);

## Description

Function to get the information about the PV plants in the circuit and return a structure with the information. If the optional input of pvNames is filled, the function returns information for the specified subset of PV installations, excluding the miscellaneous parameters mentioned in the outputs below.

## Inputs

- `DSSCircObj` - link to OpenDSS active circuit and command text (from DSSStartup)
- `pvNames` - optional cell array of PV names to get information for

## Outputs

`PV` is a structure with all the parameters for the PV plants in the active circuit. Fields are:

- name - Name of the PV source.
- numPhases - Number of phases associated with the PV.
- busName - Name of the associated bus.
- enabled - {1|0} indicates whether this element is enabled in the simulation.
- current - average phase current output
- coordinates - Coordinates for the PV bus
- distance - Line distance from the PV bus to the substation, obtained from getBusInfo.
- phaseVoltages - Value of voltage magnitudes calculated from the complex voltage returned by OpenDSS. Length is always 3, returning 0 for phases not on the bus
- phaseVoltagesPU - Per-unit value of voltage magnitudes calculated from the complex per-unit voltage returned by OpenDSS. Length is always 3, returning 0 for phases not on the bus.
- voltage, voltagePU, voltagePhasorPU, phaseVoltages, phaseVoltagePhasors, ... phaseVoltagePhasorsPU, phaseVoltagesLL, phaseVoltagesLLPU, voltageLL, voltageLLPU - voltages and voltage phasors
- seqVoltages, cplxVoltages, seqCurrents, cplxSeqCurrents - zero, positive, and negative sequence voltages and currents magnitude or complex phasors
- phasePowerReal - 3-element array of the real components of each phase's complex power injected by generator. Phases that are not present will return 0.
- phasePowerReactive - 3-element array of the imaginary components of each phase's complex power injected by generator. Phases that are not present will return 0.
- powerReal - Total phasePowerReal.
- powerReactive - Total phasePowerReactive.
- losses - total real and imaginary power losses
- phaseLosses - real and imaginary power losses
- kW, kvar, kva - Rated power of the PV
- kV - Rated voltage.
- PF - Rated power factor of the PV.
- pmpp - DC power rating of the PV system.

## Example

Returns PV information in the circuit

    [DSSCircObj, DSSText, gridpvPath] = DSSStartup;
    DSSText.command = ['Compile "' gridpvPath 'ExampleCircuit\master_Ckt24.dss"'];
    DSSText.command = ['Compile "' gridpvPath 'ExampleCircuit\Ckt24_PV_Distributed_7_5.dss"'];
    DSSText.command = 'solve';
    PV = getPVInfo(DSSCircObj) %Get information for all PV
    PV = getPVInfo(DSSCircObj, {'PV05410_g2100nj9400'}) %Get information for one PV
    PV = getPVInfo(DSSCircObj, [{'PV05410_g2100nj9400'};{'PV05410_g2100sn7200'}]); %Get information for two PV
    %

    PV =

    109x1 struct array with fields:

        name
        numPhases
        busName
        enabled
        current
        coordinates
        distance
        voltage
        voltagePU
        voltagePhasorPU
        phaseVoltages
        phaseVoltagesPU
        phaseVoltagePhasors
        phaseVoltagePhasorsPU
        phaseVoltagesLL
        phaseVoltagesLLPU
        voltageLL
        voltageLLPU
        phasePowerReal
        phasePowerReactive
        powerReal
        powerReactive
        losses
        phaseLosses
        seqVoltages
        cplxSeqVoltages
        seqCurrents
        cplxSeqCurrents
        seqPowers
        kV
        kVA
        kVAR
        pf
        pmpp

    PV =

                         name: 'PV05410_g2100nj9400'
                    numPhases: 3
                      busName: 'g2100nj9400_n300465_sec.1.2.3'
                      enabled: 1
                      current: 516.7991
                  coordinates: [31.6264 -80.9163]
                     distance: 5.6327
                      voltage: 283.0339
                    voltagePU: 1.0213
              voltagePhasorPU: -0.0016 + 0.0040i
                phaseVoltages: [282.1206 282.6982 284.2828]
              phaseVoltagesPU: [1.0180 1.0201 1.0258]
          phaseVoltagePhasors: [1x3 double]
        phaseVoltagePhasorsPU: [1x3 double]
              phaseVoltagesLL: [489.8906 490.0204 490.7701]
            phaseVoltagesLLPU: [1.0206 1.0209 1.0224]
                    voltageLL: 490.2270
                  voltageLLPU: 1.0213
               phasePowerReal: [-146.2704 -146.2702 -146.2699]
           phasePowerReactive: [-0.0034 -0.0023 -0.0021]
                    powerReal: -438.8104
                powerReactive: -0.0078
                       losses: -4.3881e+02 - 7.7827e-03i
                  phaseLosses: [1x3 double]
                  seqVoltages: [1.2047 283.0326 0.3166]
              cplxSeqVoltages: [-0.4506 1.1173 226.2340 -170.0753 -0.0808 -0.3061]
                  seqCurrents: [0.5703 516.7968 2.1995]
              cplxSeqCurrents: [0.4884 0.2945 -413.0784 310.5563 -2.1881 0.2242]
                    seqPowers: [1x6 double]
                           kV: 0.4800
                          kVA: 482.7000
                         kVAR: 0
                           pf: 1
                         pmpp: 438.8100