top of page

MATLAB Simulation of PV array with Partial Shading Effect

2 days ago
6 min read

MATLAB Simulation of PV array with Partial Shading Effect


𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧


Partial shading is one of the major operating challenges in a solar photovoltaic (PV) system. When some PV modules receive less sunlight because of trees, buildings, clouds, dust, or other obstacles, the electrical characteristics of the complete PV array change significantly.


MATLAB Simulation of PV array with Partial Shading Effect



MATLAB Simulation of PV array with Partial Shading Effect
₹2,000.00₹1,000.00
Buy Now


In this MATLAB/Simulink simulation, a PV array consisting of three series-connected PV panels is operated under different irradiance levels to reproduce the partial shading condition.

The model helps students, researchers, and engineers understand:

  • How partial shading affects PV output.

  • Why bypass diodes are required.

  • How multiple power peaks appear under partial shading.

  • How the I–V and P–V characteristics can be obtained in MATLAB/Simulink.

  • How different irradiance values influence array voltage, current, and power.

𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰

The simulated system uses three PV panels connected in series. Each panel is provided with an individual bypass diode.

Different solar irradiance levels are applied to the three panels to reproduce non-uniform illumination.

Main Components

Component

Purpose

PV Array Blocks

Generate electrical power from solar irradiance

Three PV Panels

Create the series-connected PV string

Bypass Diodes

Provide an alternate current path during shading

Constant Blocks

Set irradiance and temperature inputs

Controlled Voltage Source

Sweep the PV terminal voltage

Ramp Block

Generate the voltage sweep command

Current Measurement

Measure PV array current

Voltage Measurement

Measure PV array voltage

Product Block

Calculate PV output power

Scope

Display voltage, current, and power

powergui

Required for Specialized Power Systems simulation

𝐏𝐕 𝐀𝐫𝐫𝐚𝐲 𝐂𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐚𝐭𝐢𝐨𝐧

The PV array is configured using three individual PV sections.

Parameter

Configuration

Number of PV panels

3

Connection

Series

Parallel strings per PV block

1

Series modules per PV block

1

Bypass diodes

3

Voltage measurement channels

1

Current measurement channels

1

Scope input ports

3

Using individual PV blocks makes it easy to apply a different irradiance value to each panel.

𝐏𝐚𝐫𝐭𝐢𝐚𝐥 𝐒𝐡𝐚𝐝𝐢𝐧𝐠 𝐂𝐨𝐧𝐝𝐢𝐭𝐢𝐨𝐧

The partial shading effect is created by supplying different irradiance levels to the three PV panels.

PV Panel

Irradiance

Panel 1

1000 W/m²

Panel 2

300 W/m²

Panel 3

600 W/m²

The temperature is maintained at a constant value during the simulation. An example temperature of approximately 20°C is used during the model setup.

Because the irradiance is different for each panel, all three panels cannot produce the same current and power.

This creates the partial shading effect.

𝐖𝐡𝐲 𝐁𝐲𝐩𝐚𝐬𝐬 𝐃𝐢𝐨𝐝𝐞𝐬 𝐀𝐫𝐞 𝐔𝐬𝐞𝐝

Bypass diodes are extremely important when PV modules are connected in series.

When one panel is shaded:

  • Its available photocurrent decreases.

  • The shaded module can restrict the current of the complete string.

  • The shaded module may become reverse biased.

  • Excessive local heating can occur.

  • A hotspot condition may develop.

The bypass diode provides an alternative path for the string current when the associated PV section cannot support the required operating current.

Without a Bypass Diode

A heavily shaded panel can limit the complete series string and may experience excessive thermal stress.

With a Bypass Diode

The affected section can be bypassed under suitable operating conditions, allowing the remaining PV modules to continue supplying power.

𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬

The complete simulation operates in the following sequence:

  1. Three PV panels are connected in series.

  2. One bypass diode is connected across each PV section.

  3. Different irradiance values are supplied to the PV panels.

  4. Temperature is maintained constant.

  5. A controlled voltage source is connected across the PV array.

  6. A ramp signal changes the terminal voltage gradually.

  7. The PV voltage is measured.

  8. The PV current is measured.

  9. Voltage and current are used to determine PV power.

  10. Voltage, current, and power are displayed using a three-channel Scope.

This voltage sweep allows the complete operating characteristics of the partially shaded PV array to be observed.

𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲

The model does not require a complex closed-loop controller to obtain the PV characteristics.

Instead, a Ramp block and Controlled Voltage Source are used.

Ramp Signal

The ramp signal gradually changes the voltage applied across the PV terminals.

During the demonstration, different slope values are tested.

Ramp Slope

Observation

50

Voltage changes very rapidly and can extend far beyond the useful PV operating range

12

Provides a slower voltage sweep

10

Suitable for clearly observing the PV characteristics

A ramp slope of approximately 10 provides a useful voltage sweep for displaying the characteristic curves clearly.

𝐕𝐨𝐥𝐭𝐚𝐠𝐞, 𝐂𝐮𝐫𝐫𝐞𝐧𝐭, 𝐚𝐧𝐝 𝐏𝐨𝐰𝐞𝐫 𝐌𝐞𝐚𝐬𝐮𝐫𝐞𝐦𝐞𝐧𝐭

The Scope is configured with three input ports.

Scope Channel

Displayed Quantity

Channel 1

PV Voltage

Channel 2

PV Current

Channel 3

PV Power

The Scope layout can also be configured with three separate display areas so that each quantity can be viewed independently.

𝐔𝐧𝐢𝐟𝐨𝐫𝐦 𝐈𝐫𝐫𝐚𝐝𝐢𝐚𝐧𝐜𝐞 𝐯𝐬. 𝐏𝐚𝐫𝐭𝐢𝐚𝐥 𝐒𝐡𝐚𝐝𝐢𝐧𝐠

One of the most important concepts demonstrated by this simulation is the difference between normal and partially shaded PV operation.

Condition

Power Characteristic

Uniform irradiance

Generally one dominant maximum power point

Partial shading

Multiple local power peaks can appear

Strong irradiance mismatch

More noticeable variation in the characteristic curve

Bypass diode conduction

Produces distinct regions in the array characteristics

Under uniform sunlight, the PV array normally exhibits a relatively straightforward power curve with a dominant maximum power point.

Under partial shading, the characteristic becomes more complicated.

𝐖𝐡𝐲 𝐌𝐮𝐥𝐭𝐢𝐩𝐥𝐞 𝐏𝐨𝐰𝐞𝐫 𝐏𝐞𝐚𝐤𝐬 𝐀𝐩𝐩𝐞𝐚𝐫

Consider the irradiance conditions:

  • Panel 1 → 1000 W/m²

  • Panel 2 → 300 W/m²

  • Panel 3 → 600 W/m²

Each panel therefore has a different current-generation capability.

As the terminal voltage is swept:

  • Different PV sections reach their operating limits at different points.

  • Bypass diodes can become active in different voltage regions.

  • The effective number of contributing PV sections changes.

  • Several power maxima may appear.

These maxima are commonly described as local maximum power points, while the highest power point among them is the global maximum power point.

This phenomenon is one of the main reasons conventional maximum power point tracking becomes more challenging during partial shading.

𝐈–𝐕 𝐂𝐡𝐚𝐫𝐚𝐜𝐭𝐞𝐫𝐢𝐬𝐭𝐢𝐜 𝐔𝐧𝐝𝐞𝐫 𝐏𝐚𝐫𝐭𝐢𝐚𝐥 𝐒𝐡𝐚𝐝𝐢𝐧𝐠

The current characteristic changes noticeably because the three panels receive different irradiance levels.

Important observations include:

  • Higher irradiance produces greater available current.

  • The lowest-irradiance module can limit string operation in certain regions.

  • Bypass diode conduction introduces changes or steps in the current characteristic.

  • The complete array no longer behaves like a uniformly illuminated PV string.

Therefore, the I–V curve may contain several distinct operating regions.

𝐏–𝐕 𝐂𝐡𝐚𝐫𝐚𝐜𝐭𝐞𝐫𝐢𝐬𝐭𝐢𝐜 𝐔𝐧𝐝𝐞𝐫 𝐏𝐚𝐫𝐭𝐢𝐚𝐥 𝐒𝐡𝐚𝐝𝐢𝐧𝐠

The power characteristic provides the clearest indication of partial shading.

Instead of one simple maximum, the curve can contain:

  • First local peak

  • Additional local peaks

  • One global maximum power point

  • Rapid changes near bypass-diode transition regions

This makes the P–V characteristic particularly useful when studying advanced MPPT methods.

𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬

The simulation demonstrates the expected behavior of a series-connected PV array under non-uniform irradiance.

Main Observations

  • The PV terminal voltage increases according to the ramp input.

  • PV current varies as the voltage operating point changes.

  • Different irradiance values create non-uniform module behavior.

  • The power waveform shows multiple peak regions.

  • The characteristic differs significantly from the normal uniform-irradiance condition.

  • Bypass diodes influence the shape of both the current and power characteristics.

The appearance of several power peaks confirms the partial shading effect.

𝐖𝐡𝐲 𝐂𝐮𝐫𝐫𝐞𝐧𝐭 𝐨𝐫 𝐏𝐨𝐰𝐞𝐫 𝐌𝐚𝐲 𝐁𝐞𝐜𝐨𝐦𝐞 𝐍𝐞𝐠𝐚𝐭𝐢𝐯𝐞 𝐃𝐮𝐫𝐢𝐧𝐠 𝐭𝐡𝐞 𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐒𝐰𝐞𝐞𝐩

If the ramp slope or final applied voltage is too high, the controlled voltage source can force the PV array beyond its normal generating region.

As a result, the simulated current may reverse and calculated power can become negative.

For obtaining the useful generating characteristic:

  • Keep the voltage sweep within the expected PV operating range.

  • Reduce the ramp slope when necessary.

  • Stop the sweep before entering an unwanted reverse-current region.

A slope close to 10 provides a more suitable characteristic in this example.

𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬

  • Three series-connected solar PV panels

  • Individual bypass diode for every PV section

  • Independent irradiance input for each panel

  • Partial shading implementation

  • Controlled PV voltage sweep

  • Direct voltage measurement

  • Direct current measurement

  • Power calculation

  • Three-channel Scope visualization

  • Observation of multiple power peaks

  • Suitable for studying PV characteristics under non-uniform sunlight

𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠 𝐎𝐮𝐭𝐜𝐨𝐦𝐞𝐬

After studying this MATLAB simulation, learners can understand:

  • How to configure a PV Array block in Simulink.

  • How series-connected PV modules behave.

  • How to connect bypass diodes correctly.

  • How partial shading can be reproduced using different irradiance inputs.

  • How to sweep PV terminal voltage.

  • How to obtain voltage, current, and power data.

  • Why multiple maximum power points occur.

  • Why partial shading creates difficulties for MPPT controllers.

  • How bypass diodes improve the operation of series-connected PV strings.

𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬

This simulation approach is useful for studying:

  • Solar PV array performance

  • Partial shading analysis

  • Bypass diode operation

  • PV module mismatch

  • Global maximum power point tracking

  • P&O MPPT

  • Incremental Conductance MPPT

  • Fuzzy MPPT

  • Neural Network MPPT

  • PSO-based MPPT

  • Hybrid MPPT algorithms

  • Grid-connected PV systems

  • Battery-integrated PV systems

  • Solar charging systems

  • Renewable energy research

𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧

The MATLAB Simulation of PV Array with Partial Shading Effect clearly demonstrates how unequal solar irradiance changes the electrical behavior of a series-connected PV system.

By operating three PV panels at 1000 W/m², 300 W/m², and 600 W/m², partial shading can be reproduced effectively. Individual bypass diodes protect shaded sections and significantly influence the resulting I–V and P–V characteristics.

The most important result is the appearance of multiple power peaks under partial shading. This behavior explains why identifying the global maximum power point is more difficult than under uniform irradiance.

The model therefore provides a simple and effective platform for understanding PV characteristics, bypass diode behavior, partial shading, and MPPT challenges in MATLAB/Simulink.


Comments


bottom of page