GridLAB-D™ Model Validation Process: Example Application to Inverter Control

The framework is applied to the example case of the design of a three-phase, four-quadrant inverter with constant real/reactive power and droop control modes. Boxes in the flowchart below contain clickable content with questions and statements specific to implementing this example within a software environment.

The model contains two overall control modes. The droop control mode derives reference real and reactive power values from P versus frequency and Q versus voltage magnitude curves. The model will be used to simulate the behavior of an inverter as it transitions from constant P/Q control to droop control at the onset of an islanding event. The inverter and its controller will be modeled after and validated against a hardware device used in islanding tests.

Flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart Quantities of Interest GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart GridLAB-D flowchart

Project Scope

These blocks address questions and process steps related to the overall scoping and goals of the final model. They are meant to provide an initial guide to translating high-level requirements towards a specific final model.

Return to flowchart

Software

These blocks address questions related to the software model and the modeling environment. This will include questions on the actual implementation, as well as limitations imposed by the chosen environment/platform on both the model implementation and subsequent simulations.

Return to flowchart

Hardware

These blocks address questions relating to the physical device being modeled and the testing environment. This will include specifics properties of the physical device, testing capabilities of the available facility and equipment, and the process to obtain validation data for refining the software model.

Return to flowchart

Decision

These blocks represent decision points or development of evaluation criteria in the framework process. They often represent a point in the process where the effectiveness of the approach or sufficiency of information must be decided. Affirmative outcomes result in progression through the flowchart. Negative outcomes don't necessarily constitute a failure, but may require a reiteration within the current section to refine details of the approach or implementation.

Return to flowchart

Problem Statement/Goals of Study

Mission statement: develop a mathematical model of a four-quadrant PWM inverter, especially for studies in microgrid islanding scenarios.

While the model should be expandable/flexible, the inverter to be modeled will be a single-level PWM-controlled voltage-sourced inverter implemented with gate-turn off switches to enable four-quadrant operation.

  • Coupling impedance will be capable of being included in the model
  • Two control modes will be modeled:
    • Constant real/reactive power control
    • Droop control implemented with f/P and |V|/Q droop curves
    • Automated control mode switching upon microgrid islanding detection will be modeled.

The developed model will accurately reproduce the electrical behavior (e.g., voltage and current) at the terminals of the inverter.

  • Of particular interest is the transient behavior (i.e., voltage/angle stability) of inverters in microgrids during islanding events.
    • High frequency behavior associated with semiconductor device switching need not be modeled.
  • The model should not only accurately reproduce standalone behavior of the inverter, but also interaction with other generation/load devices in the network.
  • Since it is desired to eventually integrate the inverter model into the GridLAB-D™ software package, the output signals should be modeled in complex phasor format.

Time Scale

Transient stability modeling is of paramount interest, so a timestep relating to steady state power flow calculations would not be sufficient. Since high-frequency switching transients are to be neglected, microsecond-level timesteps would be excessive. For this reason, a timestep choice of .1 milliseconds is reasonable.

The simulation duration will be determined by the settling time of any voltage/angle stability transients. These transients' time constants will be governed both by the damping and inertial constants of any rotating machines, and by the tuning parameters of the inverter controls. The maximum settling time of such events would be on the order of 10 seconds.

Quantities of Interest

  • Since the inverter's contribution to network stability is of highest importance, key quantities of interest will include complex voltage and complex current and power injection at the bus.
    • The described voltage and current quantities are fundamental quantities that should be readily available outputs of any successful model. They in turn provide the derived complex power values.
    • When considering hardware validation, voltage measurements would be readily available from potential transformers (PTs), which would be available in any setup where voltage stability was being studied. Current measurements may require current transformers (CTs), which while not assumed to be present, would be required for comprehensive power studies.
  • Since the developed model will approximate second order (or higher) dynamics, some inaccuracy is to be expected. It is reasonable to expect that maximum deviation of modeled voltage and current responses from hardware responses not exceed 1% of rated values.
  • This will be a device-level model, so aggregation will not be considered.

Decision Point: Goals

Yes, the project goals can be met given the time step and duration. Yes the project goals can be met given the resolution and dynamic range of quantities of interest.

Fatal

  • Can this problem be fixed with a parameter or procedural adjustment?
  • Is the process missing any equipment or software capabilities needed?
  • Does this require starting the model validation process from the beginning?

Return to flowchart

Model Capabilities

  • The key quantities to be modeled/fitted are those observed at the device terminals: three-phase voltage and current.
  • Since the model will be nonlinear, requiring some numerical approximation technique, all quantities will be modeled at the full resolution.
  • Since microgrid islanding is a key point of interest for the study, this will be the primary perturbation with which the system will be tested. The islanding can be modeled as the disconnection of an infinite bus from the inverter bus/subnetwork. Step changes in controller inputs can also be tested.
  • In order to replicate the setup in which the hardware model exists, the external 'system' will be modeled as a single node with a resistive load and an ideal voltage source to represent the grid before islanding.
  • The inverter model can be modeled and tested in MATLAB, and later built in C++ for integration in the GridLAB-D™ distribution systems analysis software. While the model will be fairly complex, typical desktop computing resources will be sufficient to develop and test the model.

Test Capabilities

  • This software model is being developed to represent an existing device at Oak Ridge National Laboratory (ORNL), so the hardware testing restrictions will be dictated by this setup. The model will be developed and tested against data from an islanding experiment to be conducted by ORNL. The data will contain signal data for an experiment wherein the inverter is connected to a 15kW three-phase resistive load. Initially the inverter will be set to the constant power control mode with set points of 5kW for real power and 5kVAr for reactive power. The device will then be islanded, triggering a switch to droop control.
  • The measurement equipment at ORNL imposes the following restrictions:
    • Sampling interval: 0.3 ms
    • Available measurements/signals: three-phase terminal voltage (point-on-wave), PLL frequency, calculated real and reactive power, calculated RMS voltage, islanding switch state

Acceptance Criteria

  • The use of preexisting hardware setup prescribes the signals that can be used for comparison:
    • Three-phase voltage - since the hardware data is point-on-wave data and the software model will be built in phasor form, the hardware data will need to be transformed to phasor.
    • Measured real and reactive power output
    • Measured three-phase output RMS voltage
    • Measured frequency
  • All signals will be modeled with .1ms resolution which is more than sufficient resolution to compare to the hardware data. This will capture significant behavior within a 60Hz cycle, but neglect high frequency (multiple kHz) oscillations associated with switching, which will not be modeled. A low pass filter will be implemented to remove these higher frequency components and other noise in the signals.
  • It is anticipated that the provided hardware data will contain a moderate amount of noise which will be ignored.
  • Aside from noise and any point-on-wave behavior that is lost in transformation to phasor domain, there is no expected behavior that will not be modeled.
  • DC offsets are not expected and should fall within the 1% error described Quantities of Interest.
  • Initially, the many tuning parameters involved with the controller will be modeled after hardware settings. However, adjustments may need to be made to account for differences between software and hardware time constants. Engineering judgment will be used for these adjustments.

Decision Point: Capabilities

The testing data is compatible with software modeling capabilities. The hardware data will be of sufficient resolution such 1% error acceptance will still be valid, even with the low-pass preprocessing.

Structure

  • The model electrical structure includes the inverter itself, which will be modeled as a controlled three-phase voltage source and the simple series three-phase coupling inductance.
  • The connection terminals will be the output of the coupling inductance.
    • Outside the device model itself, the inverter will appear as a circuit component, with only voltage and current being exchanged.
    • Since the voltage/current behavior at the inverter terminals is highly dependent on the network, voltage and current will need to be exchanged at every time step for a power flow to be performed.
  • As described previously, both a constant real/reactive power control mode, as well as a droop control mode will be modeled. The controller will be set up to switch from constant P/Q to droop upon islanding. In accordance with the hardware setup, the mode switch will manually set simultaneously with the islanding switch.
  • Equations
    • The coupling inductance will be modeled in phasor form as a linear reactive impedance (i.e., jωL).
    • The remainder of the model will require several differential equations and case statements due to the PI controllers and other nonlinear elements. Learn more about the Subsecond Inverter Specifications document on the GridLAB-D™ development wiki.
    • By stating the differential equations in a state space format, derivatives can be calculated at each time step without requiring iterative methods. However, the power flow for the external network will be a standard iterative Newton-Raphson method.
    • Transformation of the terminal voltages to the dq0 frame is required for the PLL.
  • The state variable behavior will be approximated using Euler's method.

Parameters

  • Controller parameters - F: fixed, D: dynamic, T: tunable, N: not tunable
    • PLL parameters: PI controller KP (D,T), PI controller KI (D,T) - these are dynamic in the sense that there can be a set associated with each of the control modes
    • Real power control:
      • Reference real power output (D, T)
      • PI controller KP(D, T), PI controller KI (D, T) - one set for each control mode
      • Terminal voltage angle update limits (F, T), reference value filter delay (F, T)
    • Reactive power control:
      • Reference reactive power output (D, T)
      • PI controller KP (D, T), PI controller KI (D, T) - one set for each control mode
      • Terminal voltage magnitude update limits (F, T), reference value filter delay (F, T)
    • Droop control parameters (F, T): P vs f curve: {P1, P2, f1, f2}; Q vs |V| curve: {Q1, Q2, |V|1, |V|2}
    • Any time constants/delays associated with measurements (P,Q, V) for feedback (F, N)
  • Inverter parameters: rated complex power magnitude (F, N), DC voltage (F, T) - in this setup the DC side is being treated as an infinite DC bus, so the DC voltage is modeled as a fixed tunable parameter
  • Coupling impedance (F, N): per-phase inductance for simple series coupling inductance
  • Internal algebraic quantities
    • Complex voltage on inverter side of coupling impedance
    • Transformed/rotated voltage and current signals (in synchronous frame)
  • Internal state variables
    • PLL integrator output & calculated angle
    • Real & reactive power control error integrator outputs
    • Measured/reference real and reactive power delay integrator outputs
  • Per unitizing would not be particularly valuable in this model.
  • Initialization
    • While transition from steady state constant power control mode to steady state droop control mode is the scenario of interest, the model must still be initialized. A flat start may not guarantee a stable startup so the variables will be initialized as follows:
      • Algebraic variables: internal three-phase voltage/current phasors will be calculated using network voltage and current initial values and reference real and reactive power values.
      • State variables: all error integrator outputs initialized to 0, filtered reference value variables initialized to initial reference values.
  • Time step - as described earlier, a 0.3 ms timestep will be used
  • Experiment duration - a window of 10s around the event time (islanding event) provides an adequate amount of data for the transient to settle, as well as a good amount of steady state data for each control mode.

Simulation

Simulation executed as expected.

System Staging

  • The experiment described in earlier sections does can be carried out given the hardware and measurement equipment available at ORNL.
  • The islanding switch is operated by hand, with a synchronized electrical signal indicating switch position.
  • Measurements will be conducted using data acquisition devices attached to MATLAB software within the DECC. Measurements are based on 16-bit DAC devices and expected to have resolution 0.000003 per unit.
  • Beyond sampling rate and feasibility measurements, details about measurement devices/techniques are not yet available.
  • The data will be recorded with a sample every 0.3 ms, and saved to a MATLAB database.
  • All parameters will be held constant and provided in a separate set of documents.

Test Procedure

  • Bus with inverter and 15kW resistive load will be connected to grid.
  • Inverter will be initialized and set to constant power control with reference real power of 5kW and reference reactive power of 5 kVAr.
  • The 'microgrid switch' will be engaged which disconnects the grid from the bus and switches the inverter control mode to droop control.
  • Internal ORNL DECC safety procedures will be followed for all test equipment.

Carry Out Tests

The described experiment was carried out by ORNL as intended, and the data was delivered in the MATLAB format. Noise levels are reasonable and there are no unexpected anomalies in the data.

Apply Acceptance Criteria

Acceptance criteria applied to comparison of simulation results and hardware test results.

Return to flowchart

Decision Point: Acceptance

The simulation results match the hardware test results.

Apply Acceptance Criteria

Finished

    Congratulations! You have successfully implemented and validated your model!

Return to flowchart

Restart or Exit

    Reaching this block represents a problem in the model validation process. Early discovery of this problem prevents excess time and effort from being invested in a model validation that may be impossible, or require a change in scope.

Return to flowchart