# Modeling a Photovoltaic Panel

Quote from KerimF on September 6, 2024, 10:46 amPlease note that this topic is not urgent. I just wonder if it is possible to model for simulIDE a simple diode which is equivalent to the one that can be used by LTspice:

.model Dpv D(Is={Is} N={n})

Yes, two parameters only to be defined by the user!

If interested, I will attach the LTspice simple schematic (and its related files and photos). It plots the VI trace of a PV panel. It is based on the diode model above, besides a current source and two resistors (total 4 elements). To run it, it needs the following 4 parameters:

Imax = PV short-circuit current (for the current source)

Vmax = PV open-circuit voltage (for calculating ‘n’, see below)

Rs = equivalent series resistance of PV

Rp = equivalent parallel resistance of PV

n = Vmax*38.6/log(Imax/Is)I compared its VI plot to some VI traces provided by PV manufacturers. The average error doesn’t exceed a few percent in worst cases (at maximum power point).

Kerim

Please note that this topic is not urgent. I just wonder if it is possible to model for simulIDE a simple diode which is equivalent to the one that can be used by LTspice:

.model Dpv D(Is={Is} N={n})

Yes, two parameters only to be defined by the user!

If interested, I will attach the LTspice simple schematic (and its related files and photos). It plots the VI trace of a PV panel. It is based on the diode model above, besides a current source and two resistors (total 4 elements). To run it, it needs the following 4 parameters:

Imax = PV short-circuit current (for the current source)

Vmax = PV open-circuit voltage (for calculating ‘n’, see below)

Rs = equivalent series resistance of PV

Rp = equivalent parallel resistance of PV

n = Vmax*38.6/log(Imax/Is)

I compared its VI plot to some VI traces provided by PV manufacturers. The average error doesn’t exceed a few percent in worst cases (at maximum power point).

Kerim

Quote from arcachofo on September 6, 2024, 12:32 pmHi.

You probably can configure a Diode in simulide to match some Spice models, but you need actual values for

Isandn.

I see that you can calculaten, but I don't seeIsWhen you have those values, open Diode properties and choose model = Custom and configure the values: Saturation Current = Is, Emission coefficient = n.

Note that "Resistance" property of Diode in Simulide is a serial resistance.

And be sure that Diode "Max Current" is higher than the PV short-tcircuit current.

The rest of values (Spice defaults) you can take from here for example, but not sure if LTSpice use these:

https://www.allaboutcircuits.com/textbook/semiconductors/chpt-3/spice-models/To create a model to be available in the list, open Simulide/data/diodes.model and add a new entry with your values.

Hi.

You probably can configure a Diode in simulide to match some Spice models, but you need actual values for **Is** and **n**.

I see that you can calculate **n**, but I don't see **Is**

When you have those values, open Diode properties and choose model = Custom and configure the values: Saturation Current = Is, Emission coefficient = n.

Note that "Resistance" property of Diode in Simulide is a serial resistance.

And be sure that Diode "Max Current" is higher than the PV short-tcircuit current.

The rest of values (Spice defaults) you can take from here for example, but not sure if LTSpice use these:

https://www.allaboutcircuits.com/textbook/semiconductors/chpt-3/spice-models/

To create a model to be available in the list, open Simulide/data/diodes.model and add a new entry with your values.

Quote from KerimF on September 6, 2024, 4:09 pmHi,

Thank you for your prompt reply.

In the proposed diode model, Is = 10 pA

Rs (of the PV panel) = 0.5 Ohm and Rp = 1 mega Ohm.For the PV panel of interest (an example), Imax = 8.26 A and Vmax = 37 V, that is n=119.8458.

Its maximum power is 230W at 29.8 V. Therefore, Rload = 29.8^2 / 230 = 3.861 Ohm.In simulIDE diode model, I set:

Maximum Current: 10 A

Resistance: 1 mR

Breakdown Voltage: 0 V

Saturation Current: 10 pA

Emission Coefficient: 119.846But, the ’Forward Voltage’ follows, in a way, the ‘Saturation Voltage’ automatically (and vice versa). For 10 pA, it becomes 80.9462 V.

The output voltage is 31.88 V which is not too far from the expected 29.8 V.

Hi,

Thank you for your prompt reply.

In the proposed diode model, Is = 10 pA

Rs (of the PV panel) = 0.5 Ohm and Rp = 1 mega Ohm.

For the PV panel of interest (an example), Imax = 8.26 A and Vmax = 37 V, that is n=119.8458.

Its maximum power is 230W at 29.8 V. Therefore, Rload = 29.8^2 / 230 = 3.861 Ohm.

In simulIDE diode model, I set:

Maximum Current: 10 A

Resistance: 1 mR

Breakdown Voltage: 0 V

Saturation Current: 10 pA

Emission Coefficient: 119.846

But, the ’Forward Voltage’ follows, in a way, the ‘Saturation Voltage’ automatically (and vice versa). For 10 pA, it becomes 80.9462 V.

The output voltage is 31.88 V which is not too far from the expected 29.8 V.

**Uploaded files:**

Quote from arcachofo on September 6, 2024, 10:20 pmDefinetly something wrong here.

The diode fordward voltage is over 80 V, and I think it should be lower that open voltage.

In this circuit the diode is doing nothing.Playing with the diode a bit, Emission Coefficient = 52.65 gives results similar to what you expect:

7.719 A and 29.8 V at the output.No idea why the discrepance, but maybe this is useful...

Definetly something wrong here.

The diode fordward voltage is over 80 V, and I think it should be lower that open voltage.

In this circuit the diode is doing nothing.

Playing with the diode a bit, Emission Coefficient = 52.65 gives results similar to what you expect:

7.719 A and 29.8 V at the output.

No idea why the discrepance, but maybe this is useful...

Quote from KerimF on September 6, 2024, 11:30 pmYour remark is right and interesting. Thank you.

For instance, by setting Emission Coefficient = 52.65, the ’Forward Voltage becomes 34.4406 (automatically) which is not higher than 37 V (as you pointed it out).

From your example test, we may conclude that the formula for 'n' (above) is not necessary right for all simulators. I will try to find it for simulIDE and test it for other PV panels.

Speaking practically, the PV panel model doesn't need to be very accurate to debug, for example, an MPPT circuit (hardware and firmware).

Your remark is right and interesting. Thank you.

For instance, by setting Emission Coefficient = 52.65, the ’Forward Voltage becomes 34.4406 (automatically) which is not higher than 37 V (as you pointed it out).

From your example test, we may conclude that the formula for 'n' (above) is not necessary right for all simulators. I will try to find it for simulIDE and test it for other PV panels.

Speaking practically, the PV panel model doesn't need to be very accurate to debug, for example, an MPPT circuit (hardware and firmware).

Quote from arcachofo on September 7, 2024, 9:35 amFrom your example test, we may conclude that the formula for 'n' (above) is not necessary right for all simulators. I will try to find it for simulIDE and test it for other PV panels.

It's difficult to know...

That formula is probably for an specific case.

For example: where the parameter 38.6 in n = Vmax*38.6/log(Imax/Is) comes from?

It's difficult to know...

That formula is probably for an specific case.

For example: where the parameter 38.6 in n = Vmax***38.6**/log(Imax/Is) comes from?

Quote from KerimF on September 7, 2024, 1:06 pmThe author of this constant (38.6) likely got it by trial and error while using LTspice. This constant seems to work for various types of PV panels. Perhaps another constant is also suitable for simulIDE. This study is on my waiting list.

The author of this constant (38.6) likely got it by trial and error while using LTspice. This constant seems to work for various types of PV panels. Perhaps another constant is also suitable for simulIDE. This study is on my waiting list.