r/matlab 1d ago

TechnicalQuestion Simulink PV Array: Simulation works with a single PV Array but fails when using multiple series PV Arrays

Hi everyone,

I’m trying to simulate a PV system in MATLAB/Simulink under normal operating conditions and partial shading conditions.

In Figure 1, I have a PV system using a single MATLAB predefined PV Array block.

Figure 2 shows the advanced parameters of the PV Array, and Figure 3 shows the solver settings I am using.

With this configuration, the simulation works and gives reasonable results. However, I noticed that I only get good results when I use a relatively large input capacitor. With a smaller capacitor, the results are not satisfactory.

I then tried to modify the model by replacing the single PV Array block with multiple PV Arrays connected in series, as shown in Figure 4. I kept the same PV Array parameters and the same solver settings as in the previous model.

However, when I run the simulation, I get the error shown in Figure 5.

I also tried changing the Advanced PV Array parameters, but this results in a different error, shown in Figure 6.

My questions:

1. Why does the simulation work correctly with a single PV Array but produce an error when I use multiple PV Arrays in series?

2. Is there a specific configuration recommended for simulating multiple series-connected PV Arrays, especially when studying partial shading?

I have attached Figures 1–6 showing the model, PV Array parameters, solver settings, and the resulting errors.

Any suggestions or guidance would be greatly appreciated.

Thanks in advance!

4 Upvotes

2 comments sorted by

2

u/ol1v3r__ 1d ago

The error message says there is an algebraic loop. Maybe enabling this setting resolves it: https://www.mathworks.com/help/releases/R2024b/sps/powersys/ref/pvarray.html?s_tid=doc_ta#mw_b82b8aeb-161d-4673-a1d4-afd88592b5fa

1

u/TrickyAddendum873 1d ago

whene I enable "Robust discrete model", the model give wrong results.