Simulation of solar photovoltaic (PV) converters using the MATLAB/Simulink graphical environment and PLECS module library.
2026-04-06 04:29:29··#1
[align=left] Authors: M. Ciobotaru, T. Kerekes, R. Teodorescu, Energy Technology Institute, Aalborg University, Denmark; A. Bouscayrol, University of Lille, France. Abstract: This paper describes the simulation of a photoelectric energy conversion system and its control. Before real-time execution, a simulation study of the system is required to test the effectiveness of the control algorithm. Furthermore, to directly generate real-time code for the dSPACE control board, the control system must be developed using MATLAB/Simulink. This paper, using MATLAB/Simulink, studies the simulation of a power system for the first time. In the second step, the power system is simulated using the PLECS toolbox, and the simulation model used in the experiment and the results of the provided selective simulation are compared. English Abstract: In this paper, a photovoltaic (PV) energy conversion system is simulated jointly with its control. The simulation of the system is developed for testing the control algorithm before a real-time implementation. The control part is developed using MATLAB/Simulink in order to ensure a direct generation of the real-time code for the dSPACE control board. The simulation of the power system is first realized using MATLAB/Simulink. In a second step, the simulation of the power system is realized using the PLECS toolbox. Both simulation models are tested and selective simulation results are provided for a comparative study. Keywords: converter simulation 1 Introduction Simulating modern electronic systems using power appliances has always been a challenge due to the nonlinear performance of power switches, the connection with continuous subsystems, and the design of discrete-time control [1]. Nowadays, simulation studies are also used in more and more complex systems in order to design effective control strategies. For example, renewable energy conversion systems [2], complete traction systems [3], etc. In these cases, effective simulation of actual control is required. At present, a large number of simulation software have been developed, some of which have been dedicated to the simulation of power electronic performance based on specific circuit libraries, such as PSCAD (a professional tool for power system simulation), CASPOC (power electronics and electrical drive modeling and simulation software), PSPICE (design and simulation of analog and digital circuits), PSIM (simulation software design for power electronics, motor control and dynamic system simulation), etc. Other software can effectively control development based on specific system libraries or toolboxes, such as MATLAB/Simulink. Using such software is valuable for directly generating real-time control algorithms, such as obtaining dSPACE controller boards. Therefore, it is necessary to adapt the individual software used to ensure effective simulation of the entire system that takes into account the nonlinear performance of power electronics and the direct implementation of control laws [4][5][6]. This paper takes a photoelectric (PV) energy conversion system as an example and studies the simulation of the power electronic control system in the reference [7] using the MATLAB/Simulink toolbox PLECS. In Section 2, two graphical environments are described. Section 3 of this paper is specifically used to simulate photoelectric applications. Finally, in Section 4, a comparison of simulation results is given. 2 Graphical Environments Two graphical software are considered for learning power electronic control systems. The first type is better suited for describing the physical structure of power systems, while the second is better suited for describing the signal flow of digital control. Circuit simulation programs are based on a library of physical components connected by lines represented by physical connections. A system is then built by connecting these physical components. The software must internally solve connection problems using several numerical methods. For example, if two inductors are connected in series, only one state variable is calculated because the two currents are equal. This type of software is very useful for system design and analysis. System simulation programs are based on function libraries. They describe the system by combining multiple basic functions using lines representing general variables. Several components are described through a single overall function. For example, two inductors connected in series are described by a single transfer function with a single time constant. This type of software provides a wealth of analysis and automation tools and is therefore widely used in control design. To describe observable systems and organize the control functions that must be designed, it is necessary to combine two graphical environments. However, their approaches are completely different, making it difficult to unify simulations. Furthermore, users without experimental experience may make mistakes when operating these environments. This paper tests a combined setup of the well-known MATLAB/Simulink simulation environment (a system simulation program containing powerful libraries and toolboxes for automatic control) and the new PLECS (a circuit simulation program including power electronics libraries). The aim is to develop digital control for power electronics, from simulation to actual execution. Therefore, the MATLAB/Simulink environment is well-suited for control development and includes an automatic code generator. The PLECS toolbox is used to provide a simulation model of the power plant before actual execution. 2.1 MATLAB/Simulink Environment To effectively design an embedded control system and accurately predict its performance, the designer must understand the performance of the entire system including the control system. MATLAB and Simulink form the core environment for model-based design, used to create accurate mathematical models of the physical system's performance. The graphical and block diagram paradigms of the MATLAB/Simulink environment allow users to drag and drop pre-modeled components and connect them, creating dynamic system models. These dynamic systems can be continuous-time, multi-rate, or discrete-time, or any combination of these three. The modeling environment is hierarchical, and the automatically generated files are shown in Figure 1. System structure and function can be represented by group combination models. [/align] Figure 1 Hierarchical model of complex control system using Simulink 2.2 PLECS toolbox PLECS is a Simulink toolbox for simulating electrical circuits in the Simulink environment. Because it provides ideal components, the simulation speed is fast. Figure 2 Some PLECS components used for circuit simulation As shown in Figure 2, the circuit formed using PLECS, including resistors, inductors, capacitors, switches, voltage and current sources, can all be regarded as ideal components. Voltage and current can be measured with probes. These measurements can be used as control feedback in the Simulink environment or only for online observation. Using special probes, voltage and current can only be observed in the graphics window. MATLAB/Simulink has very good simulation effect in processing simulation results. In fact, most simulation tools provide a Simulink interface. Using this toolbox, it is possible to simulate power converters and other electrical circuits in real time, just like PLECS subsystems and their control and standard Simulink subsystems. 2.3 The final step of real-time control Using the system model and real-time process, the real-time code for testing, verification and embedded implementation on the production task processor can be automatically generated, dSPACE hardware example [8]. Due to its creation, the code is automatically optimized, executes quickly, and makes efficient use of memory. The automatic generation of code by the system model avoids errors caused by manual conversion of model code and saves time, allowing software developers to focus on more demanding tasks. A typical example of simulating a dSPACE system using an electric drive is shown in reference [9], and a typical example of simulating a dSPACE system using a wind power conversion system (PWM) is shown in reference [10]. However, the control part of the power plant model simulation used must be effective before actual execution. Such models can be developed using Simulink transfer functions or PLECS toolboxes. 3 Simulation of Photovoltaic (PV) Converters 3.1 Study System and Control The general structure of a single-stage single-phase grid-connected photovoltaic (PV) converter system is shown in Figure 3, which includes two main parts—the power plant part (hardware part), such as the photovoltaic (PV) array, the photovoltaic (PV) conversion filter, and the utility grid; and the control part composed of algorithms, such as the highest power point tracking (MPPT), phase-locked loop (PLL), DC voltage controller, and current controller. Figure 3. Power Electronic System of Power Grid, Power Supply (PV Array), Power Converter, Control and PWM. Figure 4. Simulink Model of Photovoltaic (PV) Converter. A simulation model has been built using the graphical display capabilities of the Simulink environment, as shown in Figure 4. The simulation model is divided into a control section and a power plant section, allowing the control section to be directly executed in real-time applications during dSPACE experimental verification. Using the control system model and real-time workshop, code is automatically generated for testing, verification, and embedded implementation on the dSPACE system (see Figure 5). Therefore, the control blocks in Figures 4 and 5 are consistent and, for the first time, utilize a power plant and PWM model for offline simulation, as shown in Figure 4. By removing the power plant model and adding an interface to the actual power plant, online testing can be performed, significantly shortening the control development time, as shown in Figure 5. Figure 5. Control System Model Implemented in dSPACE. Figure 6. Control Diagram of Photovoltaic (PV) Energy Conversion System. The control structure of a single-stage single-phase photovoltaic (PV) converter system is shown in Figure 6. This control structure is mainly based on a phase-locked loop (PLL), MPPT algorithm, and synchronization algorithms for a DC voltage controller and a current controller. The simulation model of the control structure of the photoelectric (PV) converter is based on an intuitive graphical approach, as shown in Figure 7. Figure 7 Simulation model of the control structure of the photoelectric (PV) converter Figure 8 shows a single-phase phase-locked loop (PLL) structure, including grid voltage monitoring [11]. The PLL is used to provide unit power factor operation, including synchronization of the converter output current and grid voltage, and also provides a regular sinusoidal current reference. The equivalent Simulink model of the single-phase phase-locked loop (PLL) structure is shown in Figures 8 and 9. Figure 8 General form of single-phase phase-locked loop (PLL) structure including grid voltage monitoring Figure 9 Simulink model of single-phase phase-locked loop (PLL) structure The grid current controller is implemented using an appropriate resonant (PR) controller, and the formula is defined as follows [12]: The PR controller can be connected to a harmonic compensator (HC), Gn(s), defined as follows: The Simulink model of the grid current controller (PR+HC) is described in Figure 10, where the same blocks of the dual integrator are used for different resonant frequencies. Figure 10 Simulink Model of the Grid Current Controller Figure 11 Analysis of the Root Locus and Bode Plot of the PR Current Controller The tuning of the current controller has been completed using the Sisotool toolbox provided in the MATLAB/Simulink environment. The root locus and Bode plot analysis of the grid current controller (PR+HC) are shown in Figure 11. This tool allows manual setting of the controller gain, imposing a certain bandwidth, and ensuring stability by adjusting the phase difference. The MATLAB/Simulink environment is an effective tool for control design, but model switching converters are also a technical challenge. Therefore, to test the performance of power line simulation, this paper uses two different techniques to develop the same power plant: one using the transfer function method and the other using the PLECS toolbox. 3.2 Simulation of a Power Plant Using the MATLAB/Simulink Environment For the first time, a power plant model was developed using the transfer function method for monitoring signals at different points in the pilot circuit, which is highly complex and challenging. Figure 12 Power Circuit Diagram Figure 13 Simulink Model of the Voltage Source Inverter Figure 12 shows the simulated power circuit diagram, and Figure 13 shows the Simulink model diagram of the simulated voltage source inverter. Figure 14 shows the Simulink conversion path of the LCL filter and the utility grid. Because it is perceptible, it is difficult to track the signals of different nodes on the circuit board, especially when the circuit board is very complex. 3.3 Device Simulation Using PLECS Figure 14 Simulink Conversion Path of LCL Filter and Utility Build the circuit using PLECS is very simple and straightforward. Just drag and drop the required components together and connect them to make an ideal circuit board. The PV system simulation module using PLECS is the same as shown in Figure 4, except that the device subsystem is changed using the PLECS toolbox, and the control method is the same as described in Figure 7. The device subsystem is a circuit modeled using PLECS. The circuit board includes models of the DC power supply, inverter, LCL filter, and utility grid. The detailed circuit board of the device is shown in Figure 15. These models constitute the subsystem described below. The DC power supply is built using a voltage source. The inverter is built based on 4 IGBTs and built-in anti-parallel diodes. These switches are controlled by gating signals (Sa-Sb-Sc-Sd), using special gating signal ports to transfer signals from the Simulink control unit to the PLECS circuit. Electronic ports are used in the electronic signal input/output subsystem (DC+, DC-, L, N). An LCL filter is used to filter high-frequency pulses from the inverter. Inductor and capacitor values are set in the subsystem characterization code. Electronic ports are specifically used for the aforementioned electronic signals. Inductively coupled capacitors are used at the gate, with parameters set by the subsystem characterization code. Furthermore, as shown in Figure 15, current and voltage at any point in the circuit can be measured and displayed on an oscilloscope; or, in the Simulink environment, feedback information can be obtained through control methods. Figure 15. PLECS circuit with full-bridge layout, connected to the gate via an LCL filter. 4. Simulation Results Figure 16. Simulation results of the PV inverter: (a) Inverter voltage and current waveforms using the PLECS model; (b) Gate voltage and power supply waveforms using the PLECS model; (c) Inverter voltage and power supply waveforms using Simulink; (d) Gate voltage and power supply waveforms using Simulink (text in the figure). Figure 16 shows a comparison of simulation results using two different device modeling techniques. One used the PLECS toolbox (first two sets of figures), and the other used the Simulink conversion function path (last two sets of figures). The simulation results were obtained using the same control structure and the same device parameters (as shown in the figure). The two sets of different device applications are almost identical. However, the device using the PLECS model takes four times less time than the device using the Simulink conversion function path. Therefore, one second of actual time takes 59 seconds using the PLECS model, while one second takes 3 minutes and 46 seconds using the Simulink conversion function path. 5. Conclusion This paper focuses on the simulation operation of power system control prior to real-time execution. Firstly, it specifically discusses the simulation operation of a single-phase PV inverter in Simulink within the control design. The controller can be automatically tested online using the dSPACE system. Secondly, it introduces PLECS, a novel component device, as a circuit simulator. The combination of these two tools provides an excellent environment for switching power conversion simulators. PLECS is a very suitable tool for circuit board modeling in the MATLAB/Simulink environment. The advantages of combining PLECS and Simulink lie not only in accelerating simulation operations and simplifying the circuit board fabrication process, but also in its leading-edge circuit board simulation and component modeling control within the standard Simulink environment. However, the circuit combination software accompanying the system software may confuse novice users. Furthermore, the wiring connections between components are not the same concept.