# Functions by Category

GridPV Toolbox

## Contents

- OpenDSS Functions
- Circuit Analysis Functions
- Plotting Functions
- Geographic Mapping Functions
- Solar Modeling Functions
- Example Simulations

## OpenDSS Functions

- `DSSStartup` - Function for starting up OpenDSS and linking to MATLAB
- `getBusCoordinatesArray` - Gets the coordinates for all buses that have a location in OpenDSS
- `getBusInfo` - Gets the information for all Bus in busNames
- `getCapacitorInfo` - Gets the information for all capacitors in the circuit
- `getCoordinates` - Gets the coordinates for the buses in busNames
- `getGeneratorInfo` - Gets the information for all generators in the circuit
- `getLineInfo` - Gets the information for all lines in the circuit
- `getLoadInfo` - Gets the information for all loads in the circuit
- `getPVInfo` - Gets the information for all PV plants in the circuit
- `getTransformerInfo` - Gets the information for all transformers in the circuit
- `isinterfaceOpenDSS` - Used to check for a valid interface input.

## Circuit Analysis Functions

- `circuitCheck` - Used to error-check the circuit for any obvious abnormalities
- `findDownstreamBuses` - Finds all buses downstream of the busName
- `findHighestImpedanceBus` - Finds the highest impedance bus for each phase to the source bus
- `findLongestDistanceBus` - Finds the bus for each phase that is farthest distance away
- `findSubstationLocation` - Locates the substation coordinates
- `findUpstreamBuses` - Finds all buses upstream of the busName

## Plotting Functions

- `plotAmpProfile` - Plots the line currents profile and line rating vs. distance
- `plotCircuitLines` - Plots the feeder circuit diagram
- `plotCircuitLinesOptions` - GUI for providing options for how to plot the feeder circuit diagram
- `plotKVARProfile` - Plots the feeder profile for the kVAR power flow on the lines
- `plotKWProfile` - Plots the feeder profile for the kW power flow on the lines
- `plotMonitor` - Plots a monitor from the simulation
- `plotVoltageProfile` - Plots the voltage profile for the feeder (spider plot)

## Geographic Mapping Functions

- `initCoordConversion` - Function to initialize the coordinate conversion process
- `createCircuitCoordConversion` - Function to create conversion of circuit coordinates to GPS coordinates
- `createCircuitCoordConversionUTM` - Function to create conversion of circuit coordinates in UTM to GPS coordinates
- `plotGoogleMap` - Plots a Google map on the current axes using the Google Static Maps API

## Solar Modeling Functions

- `placePVplant` - Draw PV on the circuit diagram and save plant info for WVM input
- `createPVscenarioFiles` - Runs the WVM model and puts out the OpenDSS PV scenario files
- `distributePV - Allocates` PV based off of the load transformer size (kva)
- `findMaxPenetrationTime` - Finds the max penetration time
- `IneichenClearSkyModel` - Generates the clear sky irradiance using Ineichen and Perez model
- `makePFoutputFunction` - GUI for creating power factor as a function of PV power output
- `makePFprofile` - Creates varying Power Factor profile by schedule or PV output
- `makePFschedule` - GUI for creating a power factor daily schedule
- `makeVVCcurve` - GUI for setting up the OpenDSS VVControl function parameters
- `pvl_WVM` - WVM Wavelet Variability Model

## Example Simulations

- `examplePeakTimeAnalysis` - Runs simulation during peak penetration time and generates plots
- `exampleTimeseriesAnalyses` - Timeseries analysis and plots monitor values from the simulation
- `exampleVoltageAnalysis` - Example analysis of maximum and minimum feeder voltages through time