> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/microgrid-testbed-library/photovoltaic-generation-system.md).

# Photovoltaic Generation System

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-1850a154f716746c94cf76ede77ab7656f654f08%2FMG_photovoltaic_gen_system_block.png?alt=media" alt="" width="236"><figcaption></figcaption></figure>

The **PV Generation System (PVGS)** block, located in the **microGrid Testbed/DER** library, converts solar array power to an AC output suitable for connection to an external AC bus. A PV array with a smoothing capacitor feeds a boost converter that raises the DC voltage. This DC voltage is maintained across a second capacitor and supplied to a voltage source converter (VSC), which performs the DC/AC conversion.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-b9738da8a235a0f1b36702c632c267e3bc8a6c1e%2FMG_photovoltaic_gen_system_diagram.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
This block requires a valid RT-LAB license on both the workstation and the simulator, with the OP1420 feature enabled. For more information, see [Microgrid Control & DERs](https://www.opal-rt.com/docs/rt-lab/model-and-simulation/power-systems-with-artemis/microgrid-control-and-ders.md).
{% endhint %}

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-c44667daa84bd86ee61d925f2bb88e10efb15137%2FMG_photovoltaic_gen_system_mask.jpg?alt=media" alt="" width="563"><figcaption></figcaption></figure>

{% tabs %}
{% tab title="PV array" %}

<table><thead><tr><th width="240.20001220703125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Parallel strings</strong></td><td>Number of strings of series-connected modules connected in parallel. Default: 5.</td></tr><tr><td><strong>Series-connected modules per string</strong></td><td>Number of PV modules in series in each string. Default: 10.</td></tr><tr><td><strong>Module</strong></td><td>Select <code>User-defined</code> or a preset PV module from the NREL System Advisory Model database (over 10,000 modules measured under STC: irradiance=1000 W/m<sup>2</sup>, temperature=25 °C).<br>When a module is selected, Ncell, Voc, Isc, Vmp, Imp, and the temperature coefficients of Voc and Isc are updated. The five model parameters (IL, I0, nI, Rsh, Rs) are computed by optimization and displayed.<br>With <code>User-defined</code>, enter Ncell, Voc, Isc, Vmp, Imp, and the temperature coefficients; the function then computes the five model parameters. Default: SunPower SPR-305E-WHT-D.</td></tr><tr><td><strong>Maximum Power</strong></td><td>Power at maximum power point (Vmp, Imp).<br>Computed as Pmax = Vmp × Imp. Default: 305.2260 W.</td></tr><tr><td><strong>Cells per module (Ncell)</strong></td><td>Number of cells per module. Default: 96.</td></tr><tr><td><strong>Open circuit voltage Voc</strong></td><td>Open-circuit voltage when array terminals are open. Default: 64.2 V.</td></tr><tr><td><strong>Short-circuit current Isc</strong></td><td>Short-circuit current when array terminals are shorted. Default: 5.96 A.</td></tr><tr><td><strong>Voltage at maximum power point Vmp</strong></td><td>Voltage at maximum power point. Default: 54.7 V.</td></tr><tr><td><strong>Current at maximum power point Imp</strong></td><td>Current at maximum power point. Default: 5.58 A.</td></tr><tr><td><strong>Temperature coefficient of Voc</strong></td><td>Variation of Voc vs. temperature:<br>Voc<sub>T</sub> = Voc × (1 + beta_Voc × (T−25)),<br>where Voc is the open-circuit voltage at 25°C, VocT is the open-circuit voltage at temperature T (°C), beta_Voc is the temperature coefficient (in %/°C), and T is the temperature in °C.<br>Default: −0.27269 %/ °C.</td></tr><tr><td><strong>Temperature coefficient of Isc</strong></td><td>Variation of the short-circuit current Isc vs. temperature:<br>Isc<sub>T</sub> = Isc × (1 + alpha_Isc × (T−25)),<br>where <em>Isc</em> is the short-circuit current at 25 °C, <em>IscT</em> is the short-circuit current at temperature <em>T</em> (°C), <em>alpha_Isc</em> is the temperature coefficient (in %/°C) and <em>T</em> is the temperature in °C.<br>Default: 0.061745 %/°C.</td></tr><tr><td><strong>Display I-V and P-V characteristics of...</strong></td><td><p>To display the I-V and P-V characteristics of one module or of the whole array, for variable irradiance or for variable temperatures, select the characteristics to plot:</p><ul><li>one module @ 25 °C &#x26; specified irradiances</li><li>array @ 25 °C &#x26; specified irradiances</li><li>array @ 1000 W/m<sup>2</sup> &#x26; specified temperatures</li></ul><p>Click <strong>Plot</strong> to display the selected characteristics. Default: array @ 25 °C &#x26; specified irradiances.</p></td></tr><tr><td><strong>Irradiances</strong></td><td>Available only if “one module @ 25 °C &#x26; specified irradiances” or “array @ 25 °C &#x26; specified irradiances” is selected. Enter a vector of irradiances in W/m<sup>2</sup>. Default: [ 1000 500 100 ].</td></tr><tr><td><strong>T_cell</strong></td><td>Available only if “array @ 1000 W/m<sup>2</sup> &#x26; specified temperatures” is selected. Enter a vector of temperatures in °C. Default: [ 45 25 ].</td></tr><tr><td><strong>Light-generated current IL</strong></td><td>Current for one module under STC flowing out of the controllable current source modeling the light-generated current. Determined by optimization to fit module data. Default: 6.0092 A.</td></tr><tr><td><strong>Diode saturation current I0</strong></td><td>Saturation current of the diode modeling one module under STC. Determined by optimization to fit module data. Default: 6.3014e-12 A.</td></tr><tr><td><strong>Diode ideality factor</strong></td><td>Ideality factor of the diode modeling the PV array. Determined by optimization to fit module data. Default: 0.94504.</td></tr><tr><td><strong>Shunt resistance Rsh</strong></td><td>Shunt resistance for one module under STC. Determined by optimization to fit module data. Default: 269.5934 Ω.</td></tr><tr><td><strong>Series resistance Rs</strong></td><td>Series resistance for one module under STC. Determined by optimization to fit module data. Default: 0.37152 Ω.</td></tr></tbody></table>
{% endtab %}

{% tab title="VSC Controller" %}

<table><thead><tr><th width="241">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Nominal power Pn</strong></td><td>Converter nominal power (VA). Default: 60000.</td></tr><tr><td><strong>Nominal frequency fn</strong></td><td>Nominal frequency (Hz). Default: 50.</td></tr><tr><td><strong>Q regulator gain Kp</strong></td><td>Reactive power regulator proportional gain. Default: 1.</td></tr><tr><td><strong>Q regulator gain Ki</strong></td><td>Reactive power regulator integral gain. Default: 10.</td></tr><tr><td><strong>P regulator gain Kp</strong></td><td>Active power regulator proportional gain. Default: 0.8.</td></tr><tr><td><strong>P regulator gain Ki</strong></td><td>Active power regulator integral gain. Default: 2.5.</td></tr><tr><td><strong>Current regulator gain Kp</strong></td><td>Current regulator proportional gain. Default: 1.</td></tr><tr><td><strong>Current regulator gain Ki</strong></td><td>Current regulator integral gain. Default: 100.</td></tr><tr><td><strong>Islanded mode voltage regulator gain Kp</strong></td><td>Islanded-mode voltage regulator proportional gain. Default: 0.</td></tr><tr><td><strong>Islanded mode voltage regulator gain Ki</strong></td><td>Islanded-mode voltage regulator integral gain. Default: 0.</td></tr><tr><td><strong>DC voltage regulator enable</strong></td><td>Enable DC link voltage regulator. Default: 0.</td></tr><tr><td><strong>DC Link Voltage</strong></td><td>DC link voltage (V). Default: 1000.</td></tr><tr><td><strong>DC link voltage regulator Kp</strong></td><td>DC link voltage regulator proportional gain. Default: 1.</td></tr><tr><td><strong>DC link voltage regulator Ki</strong></td><td>DC link voltage regulator integral gain. Default: 10.</td></tr><tr><td><strong>Current limit</strong></td><td>Current limit (pu). Default: 1.2.</td></tr><tr><td><strong>Sample time</strong></td><td>Block sample time (s). Default: 50e-6.</td></tr><tr><td><strong>Priority</strong></td><td>Controller prioritization:<br>1 = prioritize active power if total power exceeds converter rating;<br>0 = prioritize reactive power.</td></tr><tr><td><strong>Mode</strong></td><td>PV mode in the network:<br>1 = Grid connected;<br>0 = Grid Forming.</td></tr></tbody></table>
{% endtab %}

{% tab title="Voltage source converter" %}

<table><thead><tr><th width="240.199951171875">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Model type</strong></td><td>Two-level converter section. Average model (Uref-controlled) is the only available converter model.</td></tr><tr><td><strong>Diode on-state resistance</strong></td><td>Two-level converter section. Internal diode resistance (Ω). Default: 1e-3.</td></tr><tr><td><strong>Diode snubber resistance</strong></td><td>Two-level converter section. Snubber resistance (Ω). Set to inf to eliminate snubbers. Default: 1000.</td></tr><tr><td><strong>Diode snubber capacitance</strong></td><td>Two-level converter section. Snubber capacitance (F). Set to 0 to eliminate snubbers. Default: 1e-6.</td></tr><tr><td><strong>Diode forward voltage</strong></td><td>Two-level converter section. Forward voltage across conducting diode (V). Default: 1e-3.</td></tr><tr><td><strong>Current source snubber resistance</strong></td><td>Two-level converter section. Snubber resistance across the two current sources (Ω). Set to inf to eliminate snubbers. Default: inf.</td></tr><tr><td><strong>Branch type</strong></td><td>Series RL branch.</td></tr><tr><td><strong>Resistance R</strong></td><td>Resistance (choke resistance) (Ω). Default: 0.01.</td></tr><tr><td><strong>Inductance L</strong></td><td>Inductance (choke inductance) (H). Default: 0.0244.</td></tr></tbody></table>
{% endtab %}

{% tab title="Filters" %}
**The voltage PV filter**

The voltage PV filter reduces PV array voltage oscillations to provide a smoother DC waveform to the DC-DC converter. If the converter lacks a controller, enable this filter to obtain a purer DC waveform and suitable DC output voltage.

<table><thead><tr><th width="239.4000244140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Branch type</strong></td><td>Series RC branch.</td></tr><tr><td><strong>Resistance</strong></td><td>Shunt branch resistance (Ω). Default: 0.01.</td></tr><tr><td><strong>Capacitance</strong></td><td>Voltage PV Filter section. Shunt capacitance (F). Default: 10000e-6.</td></tr><tr><td><strong>Set the initial capacitor voltage</strong></td><td>Voltage PV Filter section. When selected, the initial capacitor voltage is defined by “Capacitor initial voltage.” When cleared, the software calculates it for steady-state start. Default: selected.</td></tr><tr><td><strong>Capacitor initial voltage</strong></td><td>Voltage PV Filter section. Initial capacitor voltage (V) used at simulation start. Not visible and has no effect if “Set the initial capacitor voltage” is not selected. Default: 500 (half of DC Link Voltage).</td></tr></tbody></table>

**Ripple Filter**

The ripple filter reduces PV array current oscillations to improve the DC waveform supplied to the DC-DC converter.

<table><thead><tr><th width="239.4000244140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Resistance</strong></td><td>Shunt branch resistance (Ω). Default: 0.005.</td></tr><tr><td><strong>Inductance</strong></td><td>Shunt inductance (H). Default: 1e-3.</td></tr><tr><td><strong>Set the initial inductor current</strong></td><td>When selected, the initial inductor current is defined by “Inductor initial current.” When cleared, the software calculates it for steady-state start. Default: unselected.</td></tr><tr><td><strong>Inductor initial current</strong></td><td>Initial inductor current (A) used at simulation start. Not visible and has no effect if “Set the initial inductor current” is not selected. Default: 0.</td></tr></tbody></table>

**voltage DC Filter**

The voltage DC Filter reduces DC-DC converter output voltage oscillations.

<table><thead><tr><th width="239.4000244140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Branch type</strong></td><td>Series RC branch.</td></tr><tr><td><strong>Resistance</strong></td><td>Shunt branch resistance (Ω). Default: 0.02.</td></tr><tr><td><strong>Capacitance</strong></td><td>Shunt capacitance (F). Default: 12e-3.</td></tr><tr><td><strong>Set the initial capacitor voltage</strong></td><td>When selected, the initial capacitor voltage is defined by “Capacitor initial voltage.” When cleared, the software calculates it for steady-state start. Default: selected.</td></tr><tr><td><strong>Capacitor initial voltage</strong></td><td>Initial capacitor voltage (V) used at simulation start. Not visible and has no effect if “Set the initial capacitor voltage” is not selected. Default: 1000 (equals DC Link Voltage).</td></tr></tbody></table>
{% endtab %}

{% tab title="MPPT Parameters" %}

<table><thead><tr><th width="241">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Initial value for D output (Dinit)</strong></td><td>Initial boost converter duty cycle. Default: 0.5.</td></tr><tr><td><strong>Upper limit for D (Dmax)</strong></td><td>Upper limit for boost converter duty cycle. Default: 0.9.</td></tr><tr><td><strong>Lower limit for D (Dmin)</strong></td><td>Lower limit for boost converter duty cycle. Default: 0.1.</td></tr><tr><td><strong>Increment value used to increase/decrease (DeltaD)</strong></td><td>Duty cycle increment for the boost converter. Default: 3e-6.</td></tr></tbody></table>
{% endtab %}

{% tab title="Measurements" %}

<table><thead><tr><th width="241">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Time constant</strong></td><td>Low-pass filter time constant for power measurements (s). Default: 0.05.</td></tr><tr><td><strong>Nominal power of network</strong></td><td>Network nominal power (W). Default: 12e3.</td></tr><tr><td><strong>Time constant for power measurement filter</strong></td><td>Power measurement filter time constant for signal conditioning (s). Default: 0.05.</td></tr><tr><td><strong>Time constant for voltage measurement filter</strong></td><td>Voltage measurement filter time constant for signal conditioning (s). Default: 0.05.</td></tr><tr><td><strong>Time constant for current measurement filter</strong></td><td>Current measurement filter time constant for signal conditioning (s). Default: 0.05.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Inputs

<table><thead><tr><th width="250">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>P ref</strong></td><td>Active power reference of the PV Generation System (pu).</td></tr><tr><td><strong>Q ref</strong></td><td>Reactive power reference of the PV Generation System (pu).</td></tr><tr><td><strong>Ir ref</strong></td><td>Sun irradiance input (W/m<sup>2</sup>).</td></tr><tr><td><strong>T ref</strong></td><td>Cell temperature input (°C).</td></tr><tr><td><strong>Curtail enable</strong></td><td>Curtailment status input. 1: curtailment active; 0: no curtailment.</td></tr><tr><td><strong>Trip</strong></td><td>Trip status input (Boolean). 1: PVGS tripped; 0: PVGS not tripped.</td></tr><tr><td><strong>Reset</strong></td><td>Boolean</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="250.79998779296875">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Measurements</strong></td><td>Bus containing several measurements.</td></tr><tr><td><strong>A</strong></td><td>Connection port to phase A of the grid.</td></tr><tr><td><strong>B</strong></td><td>Connection port to phase B of the grid.</td></tr><tr><td><strong>C</strong></td><td>Connection port to phase C of the grid.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/microgrid-testbed-library/photovoltaic-generation-system.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
