Solar PV Battery Integrated UPQC
Solar PV Battery Integrated UPQC
𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧
The Solar PV Battery Integrated UPQC system combines renewable energy generation, battery energy storage, and power-quality improvement in a single MATLAB/Simulink architecture.

A Unified Power Quality Conditioner (UPQC) uses two power electronic converters to improve voltage and current quality:
Series Converter – compensates grid-side voltage disturbances.
Shunt Converter – compensates load-current harmonics and improves source current.
Solar PV System – supplies renewable DC power to the common DC link.
Battery Storage – supports DC-link voltage through charging and discharging.
MPPT Controller – extracts maximum available power from the PV array.
The complete system demonstrates how renewable energy can be integrated with voltage sag/swell compensation, harmonic mitigation, DC-link regulation, and battery energy management.
𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰
The MATLAB/Simulink model contains the following major sections:
Solar PV array
Boost converter
P&O MPPT controller
Battery energy storage system
Bidirectional DC–DC converter
Common DC link
Shunt active converter
Series active converter
Coupling transformer
Nonlinear load
Three-phase utility grid
Power-quality control system
The arrangement allows the renewable energy source and battery to work together while the UPQC improves both grid-current quality and load-voltage quality.
𝐒𝐨𝐥𝐚𝐫 𝐏𝐕 𝐒𝐲𝐬𝐭𝐞𝐦
The PV system forms the renewable energy source of the proposed UPQC configuration.
PV Array Parameters
Parameter | Value |
Series-connected modules per string | 18 |
Parallel-connected strings | 28 |
Power of each PV module | Approx. 213.15 W |
Voltage at maximum power point | 29 V |
Current at maximum power point | 7.35 A |
Approximate PV array maximum power | 107.4 kW |
Approximate operating PV voltage | 522 V |
DC-link reference voltage | 700 V |
With 18 modules connected in series, the PV operating voltage is approximately 522 V near its maximum power point.
The PV array is connected to the DC link through a DC–DC boost converter.
𝐏𝐕 𝐁𝐨𝐨𝐬𝐭 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫
The boost converter increases the PV-side voltage to the required DC-link level.
Boost Converter Details
Parameter | Approximate Value |
PV-side operating voltage | 522 V |
DC-link voltage | 700 V |
PV system rating | 107.4 kW |
Boost inductance | 3 mH |
Calculated capacitance | Approx. 6600 µF |
The converter is controlled using the duty cycle generated by the PV MPPT algorithm.
Its primary functions are:
Increase the PV voltage to the DC-link voltage.
Control PV operating conditions.
Support maximum power extraction.
Transfer solar energy to the UPQC DC bus.
Maintain efficient PV-side power conversion.
𝐏&𝐎 𝐌𝐏𝐏𝐓 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
A Perturb and Observe (P&O) MPPT algorithm is used for extracting maximum available solar power.
The MPPT controller continuously receives:
PV voltage
PV current
From these measurements, the controller determines the appropriate boost-converter duty cycle.
The duty-cycle command is processed by the PWM generator, which produces the switching pulses for the boost converter.
MPPT Control Flow
PV Voltage + PV Current → P&O MPPT → Duty Cycle → PWM Generator → Boost Converter
When solar irradiance changes, the controller automatically adjusts the converter operating point to obtain the maximum available PV power.
𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐄𝐧𝐞𝐫𝐠𝐲 𝐒𝐭𝐨𝐫𝐚𝐠𝐞
The battery is connected to the common DC bus through a bidirectional DC–DC converter.
Battery Parameters
Parameter | Value |
Battery unit voltage | 24 V |
Series-connected battery units | 20 |
Approximate battery-bank voltage | 480 V |
Battery capacity | 48 Ah |
Initial SOC | 50% |
Converter switching frequency | 10 kHz |
DC-link reference | 700 V |
The bidirectional converter allows energy flow in both directions.
Battery Charging Mode
When sufficient PV power is available:
PV Array → DC Link → Bidirectional Converter → Battery
The battery absorbs excess renewable power.
Battery Discharging Mode
When PV generation decreases or additional DC-link support is required:
Battery → Bidirectional Converter → DC Link
The battery therefore helps maintain stable operation even when solar irradiance changes.
𝐃𝐂-𝐋𝐢𝐧𝐤 𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
A major control objective of the system is maintaining the DC-link voltage at approximately 700 V.
The controller continuously compares:
Measured DC-link voltage
700 V reference voltage
The resulting voltage error is processed by a PI controller.
For the battery converter, the outer voltage-control loop generates the battery-current reference. The actual battery current is then compared with the required reference and processed through another current controller.
The resulting control signal generates the switching pulses for the bidirectional converter.
This approach enables:
DC-link voltage stabilization
Automatic battery charging
Automatic battery discharging
Renewable power balancing
Transient power support
𝐔𝐏𝐐𝐂 𝐂𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐚𝐭𝐢𝐨𝐧
The UPQC contains two main voltage-source converters.
UPQC Converter | Connection | Main Function |
Shunt Converter | Parallel with system | Current harmonic compensation |
Series Converter | Series with grid | Voltage disturbance compensation |
Both converters share the same 700 V DC link, which is supported by the PV system and battery.
This arrangement provides simultaneous compensation of voltage-related and current-related power-quality disturbances.
𝐒𝐡𝐮𝐧𝐭 𝐀𝐜𝐭𝐢𝐯𝐞 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫
The shunt converter is mainly responsible for improving the source/grid current waveform.
The system contains a nonlinear load that can draw distorted current. Without compensation, these harmonics can propagate toward the utility grid.
The shunt converter injects an appropriate compensation current so that the grid current becomes close to sinusoidal.
Main Objectives
Compensate nonlinear load-current harmonics.
Improve source-current waveform.
Reduce current THD.
Support reactive-power compensation.
Assist DC-link voltage regulation.
𝐩–𝐪 𝐓𝐡𝐞𝐨𝐫𝐲 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
The shunt active filter uses the instantaneous p–q theory for determining the required compensation current.
The controller measures:
Three-phase grid voltage
Three-phase load current
DC-link voltage
The three-phase electrical quantities are transformed into stationary components.
From these quantities, the controller determines:
Instantaneous real power
Instantaneous reactive power
Zero-sequence component
Average real power
Oscillating power component
A low-pass filter is used to extract the required average power component.
The DC-link controller also calculates the additional power required to maintain the 700 V DC-link voltage.
𝐑𝐞𝐟𝐞𝐫𝐞𝐧𝐜𝐞 𝐂𝐮𝐫𝐫𝐞𝐧𝐭 𝐆𝐞𝐧𝐞𝐫𝐚𝐭𝐢𝐨𝐧
Based on the instantaneous power calculations, the controller generates the required three-phase compensation-current references.
These reference currents are compared with the actual shunt-converter currents.
The current error is then processed using a hysteresis current controller.
Shunt Converter Control Flow
Grid Voltage + Load Current → p–q Theory → Compensation Current → Hysteresis Controller → Gate Pulses → Shunt Converter
Complementary switching signals are produced for the six semiconductor switches of the three-phase converter.
𝐇𝐚𝐫𝐦𝐨𝐧𝐢𝐜 𝐂𝐨𝐦𝐩𝐞𝐧𝐬𝐚𝐭𝐢𝐨𝐧
A nonlinear load produces a distorted load-current waveform containing harmonic components.
The shunt converter generates a compensation current containing the required opposing harmonic components.
As a result:
Load current may remain distorted.
Shunt converter supplies the compensation component.
Grid current becomes much more sinusoidal.
Current distortion seen by the utility is reduced.
This is one of the most important functions of the UPQC.
𝐒𝐞𝐫𝐢𝐞𝐬 𝐀𝐜𝐭𝐢𝐯𝐞 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫
The series converter is responsible for maintaining the required load voltage when disturbances occur on the grid side.
It is connected to the AC system through a series injection transformer.
The converter can compensate disturbances such as:
Voltage sag
Voltage swell
Voltage imbalance
Grid-voltage variations
When the utility voltage changes, the series converter generates the required compensating voltage and injects it through the transformer.
𝐒𝐞𝐫𝐢𝐞𝐬 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
The series-converter controller monitors the source and load voltages.
The measured three-phase quantities are processed in the rotating reference frame using abc–dq and dq–abc transformations.
The controller determines the difference between:
Desired load voltage
Actual system voltage
The voltage error is processed by PI controllers.
The resulting control voltages are converted back into three-phase quantities and supplied to the PWM generator.
Control Sequence
Voltage Measurement → dq Transformation → Voltage Error → PI Control → dq–abc Transformation → PWM → Series Converter
𝐍𝐨𝐫𝐦𝐚𝐥 𝐆𝐫𝐢𝐝 𝐂𝐨𝐧𝐝𝐢𝐭𝐢𝐨𝐧
When the grid voltage is already at the rated value:
Voltage error is very small.
Compensation demand approaches zero.
Series converter injection is minimal.
Load receives the required voltage directly from the source.
This avoids unnecessary voltage injection during healthy grid conditions.
𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐒𝐚𝐠 𝐎𝐩𝐞𝐫𝐚𝐭𝐢𝐨𝐧
During a voltage sag, the grid voltage drops below its rated level.
The series converter detects the voltage deficiency and generates the required compensation voltage.
The injected voltage is added to the reduced grid voltage so that the load-side voltage remains close to its rated value.
Sag Compensation
Quantity | Behaviour |
Grid voltage | Decreases |
Series injected voltage | Increases |
Load voltage | Maintained near rated value |
UPQC response | Supplies missing voltage |
𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐒𝐰𝐞𝐥𝐥 𝐎𝐩𝐞𝐫𝐚𝐭𝐢𝐨𝐧
During a voltage swell, the grid voltage rises above its rated value.
The series converter produces an opposing compensation voltage.
This injected voltage reduces the effective voltage appearing across the sensitive load.
Swell Compensation
Quantity | Behaviour |
Grid voltage | Increases |
Series compensation | Opposes excess voltage |
Load voltage | Maintained close to rated level |
UPQC response | Cancels excess voltage |
𝐓𝐞𝐬𝐭 𝐂𝐨𝐧𝐝𝐢𝐭𝐢𝐨𝐧𝐬
The simulation introduces different power-quality disturbances to evaluate the UPQC performance.
Test Parameter | Value / Condition |
Three-phase grid voltage | Approx. 450 V |
DC-link reference | 700 V |
Normal voltage | 1.0 p.u. |
Sag operating level | Approx. 0.8 p.u. |
Swell operating level | Approx. 1.2 p.u. |
Severe disturbance case | Approx. 0.5 p.u. |
Nonlinear load | Diode rectifier with resistive load |
Battery initial SOC | 50% |
Converter switching frequency | 10 kHz |
Voltage disturbance transitions are introduced at different simulation intervals to examine the dynamic response of the series converter.
𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬
The overall operating process can be summarized as follows:
Solar PV GenerationThe PV array converts solar irradiation into DC electrical power.
Maximum Power ExtractionP&O MPPT continuously adjusts the boost-converter duty cycle.
DC Voltage BoostingThe converter raises the PV voltage toward the 700 V DC bus.
Battery Energy ManagementThe bidirectional converter controls charging and discharging.
DC-Link RegulationControllers maintain the common DC bus near 700 V.
Current Harmonic CompensationThe shunt converter injects compensation current.
Voltage Disturbance CompensationThe series converter injects the required compensating voltage.
Load Voltage RegulationThe load continues receiving approximately rated voltage during disturbances.
𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲
The complete system combines several control techniques.
System Section | Control Method |
Solar PV | P&O MPPT |
PV boost converter | PWM control |
Battery converter | Cascaded voltage/current control |
DC-link regulation | PI control |
Shunt converter | Instantaneous p–q theory |
Shunt current tracking | Hysteresis current control |
Series converter | dq-reference-frame control |
Series voltage control | PI control |
Converter switching | PWM / switching pulse generation |
This coordinated control structure allows the UPQC, PV, and battery systems to operate as one integrated power-quality platform.
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬
The MATLAB/Simulink results demonstrate the performance of the proposed configuration under several operating conditions.
1. Grid Voltage and Current
The grid voltage contains intentionally created disturbance conditions.
Despite the nonlinear load, the compensated grid current remains close to sinusoidal because the shunt converter supplies the harmonic compensation current.
2. Load Voltage
The load-side voltage remains close to its desired value even when voltage disturbances occur on the grid side.
During sag:
Grid voltage decreases.
Series converter supplies additional voltage.
Load voltage remains regulated.
During swell:
Grid voltage increases.
Series converter generates opposing voltage.
Load voltage remains around the required magnitude.
3. Series Voltage Injection
The series converter only injects substantial voltage when compensation is required.
Grid Condition | Series Converter Action |
Normal | Very low compensation |
Voltage Sag | Injects supporting voltage |
Voltage Swell | Injects opposing voltage |
Voltage imbalance | Generates corrective voltage |
This confirms the dynamic response of the series active filter.
4. Nonlinear Load Compensation
The nonlinear diode-rectifier load produces a non-sinusoidal current.
The shunt converter supplies the corresponding harmonic compensation current.
Therefore:
Distorted Load Current + Compensation Current → Improved Grid Current
This prevents a significant portion of the nonlinear load harmonics from flowing into the utility grid.
5. PV Power Response
At high irradiation, the PV system produces high output power and the P&O MPPT operates the array close to its maximum-power region.
When solar irradiation decreases:
PV current decreases.
Available PV power decreases.
MPPT changes the converter duty cycle.
Battery charging power can decrease.
Battery support changes according to the system power balance.
6. Battery Charging and Discharging
When PV power is sufficient, the battery can operate in the charging mode.
When renewable generation becomes insufficient or DC-link support is required, the bidirectional converter allows the battery to supply power.
PV Power Condition | Typical Battery Response |
High PV generation | Charging |
Excess renewable power | Charging |
Reduced irradiation | Charging current reduces |
Low PV availability | Battery support increases |
DC-link power deficit | Discharging |
𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬
107.4 kW solar PV integration
700 V common DC-link operation
P&O-based maximum power point tracking
Battery charging and discharging capability
Bidirectional battery power flow
Series and shunt UPQC converters
Voltage sag compensation
Voltage swell compensation
Three-phase voltage regulation
Nonlinear load harmonic compensation
Improved grid-current waveform
Instantaneous p–q theory control
Hysteresis current control
dq-reference-frame voltage control
PI-based DC-link regulation
Dynamic solar irradiation operation
MATLAB/Simulink-based implementation
𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬
The Solar PV Battery Integrated UPQC configuration is useful for studying and developing:
Renewable-energy-supported distribution systems
Power-quality improvement systems
Smart-grid interfaces
Industrial power conditioning
Sensitive-load protection
Solar PV grid integration
Battery energy storage integration
Voltage sag and swell mitigation
Harmonic compensation
Distributed renewable generation
Active power filtering
Power electronic converter control
Microgrid power-quality management
𝐖𝐡𝐲 𝐈𝐧𝐭𝐞𝐠𝐫𝐚𝐭𝐞 𝐏𝐕 𝐚𝐧𝐝 𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐰𝐢𝐭𝐡 𝐔𝐏𝐐𝐂?
A conventional UPQC primarily focuses on power-quality compensation.
Integrating solar PV and battery storage extends its functionality.
Conventional UPQC | PV–Battery Integrated UPQC |
Power-quality compensation | Power quality + renewable generation |
Series voltage compensation | Series voltage compensation |
Shunt current compensation | Shunt current compensation |
DC-link support required | PV and battery support DC link |
No renewable generation | Solar power generation |
Limited energy management | Battery charging/discharging |
Grid-dependent operation | Improved energy flexibility |
The combined configuration therefore provides both energy management and power-quality enhancement.
𝐌𝐚𝐣𝐨𝐫 𝐏𝐨𝐰𝐞𝐫-𝐐𝐮𝐚𝐥𝐢𝐭𝐲 𝐅𝐮𝐧𝐜𝐭𝐢𝐨𝐧𝐬
Power-Quality Issue | Responsible Section |
Voltage sag | Series converter |
Voltage swell | Series converter |
Voltage imbalance | Series converter |
Load-current harmonics | Shunt converter |
Reactive-current component | Shunt converter |
DC-link fluctuation | PV/battery/DC-link controller |
Solar-power variation | MPPT + battery |
Nonlinear load effects | Shunt active filter |
𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧
The Solar PV Battery Integrated UPQC in MATLAB/Simulink provides a complete platform for studying renewable energy integration together with advanced power-quality compensation.
The solar PV system supplies renewable power through a P&O MPPT-controlled boost converter, while the battery system provides bidirectional energy support and assists in maintaining the 700 V DC link.
The shunt converter improves grid-current quality by compensating harmonics generated by the nonlinear load. At the same time, the series converter protects the load against grid-side voltage sag, swell, imbalance, and other voltage variations.
The simulation demonstrates that a coordinated PV–Battery–UPQC architecture can simultaneously provide renewable power utilization, battery energy management, voltage regulation, harmonic compensation, and improved grid-side power quality.



Comments