Modelling and control of a PEM electrolyzer
Abstract
The aim of this thesis is to study and analyze the modelling and control of the energy exchange of a PEM electrolyzer connected to a three-phase three-wire grid. For this purpose, the average model of a two level VSC and a DC-DC Buck converter have been studied and implemented. The control scheme includes a PLL, a current loop and a reference computation using a DC voltage regulator in both sides of the DC-DC Buck converter. In addition, an experimental model of the PEMEL is adopted to characterise the electrolyzer behavior.
Full text
Universitat Politècnica de Catalunya Master in Industrial Engineering MASTER THESIS MODELLING AND CONTROL OF A PEM ELECTROLYZER Author Iker Carboné Alejos Supervisors at UPC Eduardo Prieto Araujo Max Tavana Academic Year 2023 - 2024
Abstract The aim of this thesis is to study and analyze the modelling and control of the energy exchange of a PEM electrolyzer connected to a three-phase three-wire grid. For this purpose, the average model of a two level VSC and a DC-DC Buck converter have been studied and implemented. The control scheme includes a PLL, a current loop and a reference computation using a DC voltage regulator in both sides of the DC-DC Buck converter. In addition, an experimental model of the PEMEL is adopted to characterise the electrolyzer behavior. Resum L’objectiu d’aquest treball és estudiar i analitzar el modelatge i el control de l’energia elèctrica intercanviada d’un electrolitzador tipus PEM connectat a una xarxa trifàsica. Per poder realitzarho, s’han implementat i estudiat els models dels convertidors VSC i DC-DC Buck. L’esquema de control inclou un PLL, un llaç de corrent i un càlcul de referència mitjançant un regulador de tensió continua tant en l’entrada com en la sortida del convertidor DC-DC Buck. A més a més, s’ha adoptat un model experimental per tal de caracteritzar el comportament de l’electrolitzador. Resumen El objetivo de este trabajo es estudiar y analizar el modelado y el control de la energía eléctrica intercambiada de un electrolizador tipo PEM conectado a una red trifásica. Para poder realizarlo, se han implementado y estudiado los modelos de los convertidores VSC y DC-DC Buck. El esquema de control incluye un PLL, un lazo de corriente y un cálculo de referencia mediante un regulador de tensión continua tanto en la entrada como en la salida del convertidor DC-DC Buck. Además, se ha adoptado un modelo experimental para caracterizar el comportamiento del electrolizador. 1
Acknowledgements First of all, I would like to express my most sincere thanks to my Thesis director, Eduardo Prieto, for the confidence placed in me during these months. For all the training I have received, which has helped me to understand the work of an engineer and will surely be a great help in my future, both academically and professionally. I am also grateful for your willingness to provide me with a final year project to complete my master studies. I also would like to thank Max Tavana for his constant support and guidance during all the process of this thesis. His experience and knowledge on the subject had been crucial for me to understand the main field of this project and how to overcome the challenges that have arisen throughout the process. Thank you Max for all the meetings, help and motivation, and especially for dedicating your time to teaching me, I will not forgive that. Moreover, I must thank my family and flatmates Genís, Emil and William who have been with me during these two years. Moving to a new city to study is not always easy, and they have provided me with the necessary motivation to succeed in my studies. Finally, I would like to thank the reader who has taken the time to read this project. I hope you find it as interesting as I did in developing it. 3
Acronyms •AC: Alternating Current •AEL: Alkaline Electrolyzer •BOE: Boletín Oficial del Estado •DC: Direct Current •ECTS: European Credit Transder System •ETSEIB: Escola Tècnica Superior d’Enginyeria Industrial de Barcelona •GHG: Greenhouse Gases •IGBT: Insulated Gate Bipolar Transistor •MEA: Membrane Assembly •MUEI: Master’s Degree in Industrial Engineering, (CAT) Master Universitari en Tecnologies Industrials •P: Active Power •PEMEL: Proton Exchange Membrane Electrolyzer •PI: Proportional Integrator controller •PID: Proportional Integrator Derivator controller •PLL: Phase Locked Loop •PV: Photovoltaic •PWM: Pulse Width Modulation •Q: Reactive Power •RL filter: Resistor Inductance filter •RMS: Root Mean Square •S: Aparent power •UPC: Universitat Politècnica de Catalunya •VSC: Voltage Source Converter 5
Contents Abstract 1 Acknowledgemets 3 Acronyms 6 1 Introduction 13 1.1 Origin of the project and motivation .......................... 13 1.2 Objectives of the project ................................. 14 1.2.1 General objectives ................................ 14 1.2.2 Specific objectives ................................. 14 1.3 Previous requirements .................................. 15 2 System description and control scheme 21 2.1 Instantaneous Power Theory ............................... 21 2.1.1 Clarke transformation .............................. 22 2.1.2 Park transformation ............................... 24 2.1.3 Instantaneous Power Theory in the Synchronous Reference Frame . . . . 27 2.2 Control scheme ...................................... 27 2.3 Voltage Source Converter (VSC) modelling ...................... 28 2.4 Voltage equations ..................................... 30 2.5 Phase Locked Loop .................................... 31 2.5.1 PLL operation example ............................. 32 2.6 Current loop ........................................ 34 2.6.1 Current loop operation example ........................ 36 2.7 DC side implementation in the VSC average model .................. 36 2.8 Reference computation .................................. 37 2.8.1 Outer DC voltage control ............................ 37 2.9 DC-DC Buck Converter modelling ........................... 38 2.9.1 DC-DC Buck Converter design parameters .................. 40 2.9.2 DC-DC Buck Converter control loop ...................... 41 2.10 PEM electrolyzer model ................................. 42 3 Case study 45 3.1 System description and simulation parameters .................... 45 3.2 Simulation results ..................................... 46 3.2.1 General power flow analysis .......................... 47 3.2.2 PEM electrolyzer behaviour results ....................... 48 3.2.3 VSC behaviour results .............................. 49 3.2.4 AC grid behaviour results ............................ 51 4 Budget 53 4.1 Theoretical scenario .................................... 53 4.2 Real scenario ........................................ 55 5 Environmental impact 57 6 Social and gender equality impact 59 7
For all these reasons, this thesis is an introduction to control and design of decentralized PEM electrolyser system connected to the grid for the purpose of study the general control scheme for power electronic devices precisely the voltage source converter (VSC) and the DC-DC converter and analyse the behaviour of an average model of a PEM electrolyser based on experimental tests. 1.2 Objectives of the project In the matter of the objectives of this project can be split into general and specific. 1.2.1 General objectives On one hand, the principal objective of this thesis is to implement an experimental model of a PEM electrolyser in a medium-low scale grid connected to a two level VSC and a DC-DC converter and control the active power flow. In addition, some simulations will be done in order to check the performance of the PEM electrolyser model. 1.2.2 Specific objectives On the other hand, some particular objectives can be derived from the main purpose of the project. Some of this objectives are related to a several parts of the study and all of them help to realize this thesis. •Look into the concept of smart grids, their characteristics, and their application in renewable energy generation. •Figure out the principles of the Park and Clarke transformations and their application in controlling active and reactive power. •Implement the average model of a two-level VSC. •Implement the average model of a DC-DC converter. •Analyze the control strategy for renewable generation systems, focusing on the different controls and loops like PLL, DC voltage regulation, and reference computation. •Check the studies published in the field of PEM electrolyzer experimental models and attempt to implement them in the system. •Use MATLAB/Simulink®to simulate the studied system, aiming to validate the developed theory and models. 14
1.3 Previous requirements As a way to be able to accomplish the general and specific objectives of the thesis previously mentioned it is crucial to study and understand which are the actual standards and the way to work in the different areas of this project. All of this previous requirements are described in the next parts of this sections. First of all, the elaboration of this thesis requires a significant number of computations and simulations, so an specific software for engineering is needed. In this case MATLAB/Simulink® became the most used alternative for this kind of works. Developed by MathWorks is a programming and numerical computing software used by millions of engineers and scientists to analyze data, develop algorithms, and create simulation models. The software is divided in two different tools dedicated to some specific areas, on one side MATLAB®is oriented to code programming for scientific computing, whereas Simulink®is a graphical programming and simulation tool. Thanks to this features and the capability to share a common workspace, allows to model and simulate dynamic systems like electrical circuits and devices which is basic for the development of the thesis. Focusing a bit more on the main topic of the thesis, which is electrical engineering, a basic knowledge related to high and medium voltage systems and three-phase grids are obviously important. Also the use of PID controllers and closed loops applying the Laplace Transformation is necessary to control the system variables. Furthermore, as the system developed in this thesis will include some electric conversions, a general knowledge of power electronics is needed. This includes the controlled switches, the converters and their average models. Finally, understand the process to produce hydrogen from water and the different types of electrolysis devices it is also crucial, as the system is connected to a PEM electrolyzer. Starting by the power electronics, is an electrical engineering field that implements electronic engineering in order to deal with conversion, control and manipulation of electrical power using solid-state circuits. It’s main goal is to optimize the power efficiency and meet the requirements for user loads by modifying voltages and currents. The key components and devices used in power electronics are created using semiconductors. From simple to complex, the most common semiconductor devices are, diodes, transistors, thyristors and all kind of integrated circuits made using combinations of this switches and passive elements such as resistances, inductances and capacitors [9]. It is important to mention that this complex integrated circuits became an important part in microgrids development. Moving into the microgrids context, these small-scale power subsystems control and connect distributed generation, energy storage and local loads. These used to connect only AC links as the AC signal was presumed to be more efficient [9]. Even so, with the implementation of renewable energies resources, power electronic devices become more relevant and as a consequence, these grids have evolved into smart grids which combine the connection and control of both AC and DC devices. Also is important to mention that DC systems are being more used considering their higher reliability and efficiency, simpler control and renewable generation and storage systems. In Figure 1, an example of a microgrid that includes AC and DC systems is found. 15
Figure 1: Example of microgrid with AC and DC signals found in [9] As it can be seen in Figure 1, in a microgrid many different agents take part with its own particularities that have to be considered. For example, PV pannels and storage systems work in the DC frame, wind power generation needs an intermediate DC frame stage between the generation and distribution, and, in addition, the distribution grid operates in the AC frame with a determinate frequency. Therefore, taking all of this into account, the power converters become the core components of smart grids because they can manage the DC and AC signal conversions. Nowadays, exists a wide variety of different types of converters depending on their components and the signal transformations they are able to manage, from AC to DC, otherwise or both. Nevertheless, in this thesis the Voltage Source Converter (VSC) and the DC-DC converter are the ones that will be part of the system. A little explanation of how they work is explained below. •Voltage Source Converter (VSC) This converter is considered as a grid electronic converter since is synchronized with the grid frequency, for this reason, can be classified as a phase-controlled converter. Depending on the power flow’s direction can operate as a rectifier, as an inverter or even as a bidirectional converter. Furthermore, the switching frequency is controlled using distinct modulation strategies like Pulse Width Modulation (PWM), which is the most widely used [9]. •DC/DC Converters As their name indicates, this type of converters can increase or decrease the DC voltage of the input signal. There are two different types, the Buck converters which decrease the voltage and the Boost converters which increase it [9]. 16
As previously mentioned, power electronics have an important role into the electric energy system, especially nowadays, where the renewable energy generation is having an important role and the implementation of new sustainable technologies it is becoming more and more significant, due to the climate change emergency and the lack of fossil fuel crisis. In this context, it is clear that the energy storage devices have more importance basically because of the unpredictable generation behaviour of the renewable energies. The storage technology that will be studied in this thesis will be related to the hydrogen generation field. Hydrogen is the most innumerable and simplest element on Earth. It can store and deliver usable energy, in fact, has the highest specific energy per kilogram of all fuels (i.e., 120-140 MJ/kg) [12]. However, it does not exist in nature by itself and must be made from different elements that contain it, for example water. The process to split water into hydrogen and oxygen it is called electrolysis and it is remarkable that requires energy to be carried out. For this reason, the kind of energy source adopted is a key factor, for example, hydrogen produced by fossil fuels is known as grey hydrogen due to its indirect pollution. In order to limit the environmental impact, renewable energy sources (e.g., wind turbines, photovoltaic panels) are the most suitable alternative to supply the water electrolysis process. In this way the so-called green hydrogen is produced. The water electrolysis process is execute by a device called electrolyzer. Nowadays, there are two main types of electrolyzers that are currently available on the market: alkaline electrolyzer (AEL) and proton exchange membrane electrolyzer (PEMEL). A brief explanation of the features and its operation is explained next. AEL is the most widespread and common electrolysis technology used for large-scale systems. The principal advantage is its long lifespan and lower capital cost due to the cheaper catalyst material. However, AELs have several drawbacks such as a low current density an operational pressures. In case of dynamic operations, their response time is slower compared to PEMELs and also AELs lead up to more inertia since they are based on a liquid electrolyte so the ion transportation is also slower. This point is particularly crucial when an electrolyzer has to operated under fast dynamics, usually met when renewable energy sources are adopted. Indeed, a renewable energy source depends on weather conditions (as solar irradiance or wind speed) that can vary abruptly during the operation. For this reason, AELs are not generally considered to be coupled with the renewable energy sources [13]. In comparison, PEMELs are generally used for small-scale hydrogen production. However, can be connected in series to form a multi-stack electrolyzer for large-scale systems. Furthermore, PEMELs present some advantages compared to AELs, such as high current densities, high cell voltage efficiency, and fast system response when operating dynamically, since PEMEL has faster ion transportation due to the solid and thin membrane [13]. Besides, the most of renewable energy sources generate high DC voltage output and PEMELs work in a lower DC voltage signals so DC-DC converters must play a crucial role in these systems. In addition, the system needs and AC-DC converter, for example an VSC, if a power grid is used to supply the energy to the electrolyzer. For all of this reasons, this thesis put the focused on the PEMEL technology since it can be connected with renewable energy sources. 17
Dealing with PEMEL supplied by power converters, two systems with their own dynamics have to interact with each other. For this reason, it is very important to know how this device works and needs a deep investigation. The electrolysis process and how the PEMEL carried out is explained next. The PEMEL converts the electrical energy directly into chemical energy. The principle of PEMEL is shown in Figure 2. The water is oxidized electrochemically within the anode catalyst layer combine with electricity side (Wele, including Gibbs energy and energy losses); then water is broken down into oxigen gas, protons and electrons, and this reaction called oxidation reaction is given by (1). The protons transport across the proton conductive membrane to the cathode side while the electrons move through the outer circuit and also reach the cathode side. The protons and the electrons electrochemically react within the cathode catalyst layer produce hydrogen gas. This reaction called reduction reaction, and the overall reaction, called redox reaction, are given by (2) and (3), respectively [13]. It is also important to mention that the redox reaction (3) requires energy to be performed, whereas the reduction (2) is almost spontaneous. Figure 2: Principle of proton exchange membrane (PEM) electrolyzer found in [13] Oxidation reaction 2H2O+Wele →4H++ 4e−+O2(1) Reduction reaction 4H++ 4e−→2H2(2) Redox reaction 2H2O→2H2+O2(3) 18
Moving into the constructive structure of the PEMEL, the key components are bipolar plates with flow channels, current collectors and the membrane assembly (MEA). Figure 3illustrates a cross-section of the electrolysis process handled in a PEMEL where these different components can be seen. A brief explanation of how they operate and their constrictive requirements is explained below. •Bipolar plates These are mandatory and have crucial functions in PEMEL operation, like conduce electrons, connect single cells to realize a stack, arrange a flow path for pure water-sharing over the current collectors, isolate hydrogen and oxygen, support the membrane and electrodes and bring thermal conduction to handle the PEMEL temperature. To meet this functions, they must feature specific properties such as high thermal and electrical conduction, low gas permeability and high mechanical and corrosion resistance [13]. •Current collectors Its principal function is moving the electrons from the catalyst layer to bipolar plates and also to eliminate the gases (i.e., hydrogen and oxygen) from the catalyst layer. In addition, current collectors must operate in the same environment conditions (i.e., acid and high overvoltage) as the bipolarplates. This means that porosity and electrical conductivity are relevant requirements in choosing the materials of current collectors [13]. •Membrane electrode assembly (MEA) Becomes essential to move the protons from the anode to the cathode side and drive the electrons to migrate around a flow path to the anode. Furthermore, the MEA allows the electrical insulation between the anode and the cathode while acting as a reactant barrier against gas crossover. For this purpose, the membrane must be perfectly hydrated [13]. Figure 3: Cross-section of mass transport in a PEM electrolyser found in [13] 19
Finally, it is necessary to point out the PEMEL system as the stack is not only the key component. In a system formed by a PEMEL several ancillaries also takes place, like power conditioning system (i.e., AC-DC and/or DC-DC converters), pure water circulation system (i.e., tanks, circulation pump and valves), hydrogen processing system (i.e., storage tanks, hydrogen separator and valves) and cooling system. Taking into account that PEMELs operate at low DC voltages, is not feasible to directly couple them with the power grid in the hydrogen production system. For this reason, power converters are mandatory to meet the requirements of PEMELs, particularly in terms of low conversion gain. For grid-connected applications, the available power significantly overcomes the power required by the electrolyzer; hence it can be regulated based on the quantity of hydrogen produced [13]. Figure 4illustrates the hole system including all of the parts mentioned above. However, this thesis puts its focus on the electrical part, the grid, the rectifier (VSC), the DCDC converter and the PEMEL. Figure 4: Cross-section of mass transport in a PEM electrolyser found in [13] 20
2 System description and control scheme 2.1 Instantaneous Power Theory The development of alternating current (AC) power transmission and distribution systems began in the late 19th century. At that time, conventional power theory was used, which established a sinusoidal wave form of the voltage along with a constant frequency. This significantly simplified the design of transformers and transmission lines, even for very long distances [1]. The conventional power theory is based on active, reactive and apparent power. These three electrical magnitudes are defined taking into account the phase difference between the load current and the source voltage. The active power Pis the actual power that a load is consuming at certain moment. The reactive power Qrepresents the quantity of power caused by the load current not being in phase with the source. Apparent power Sis a result of combining active and reactive power and gives the idea of how much electric energy can be transferred if the voltage and current are sinusoidal and perfectly in phase, and can be computed as S=P+jQ. Before concluding, an another relevant concept should be mention, the power factor ϕ, that defines a relation between the active and reactive power and also determines the efficiency of the system, not only electrically but also economically. For that reason, a main concern related to electric equipment is the compensation of the reactive power using commonly capacitor banks [1]. As it was commented before, in the beginnings of the power systems development, the load behaviour could be considered as a linear circuit drawing a sinusoidal current from a sinusoidal voltage. Therefore, the conventional power theory based on active-, reactive-, and apparentpower was enough for the design and analysis jobs. Nowadays, power electronics represent a very high percentage of the total loads in the power system. The widespread adoption of these technologies introduces disturbances and non-sinusoidal waveforms, which directly contradict the principles of the conventional power theory. Therefore, to adapt to this new reality, more detailed approximations must be considered [1]. In this context is where the instantaneous power theory becomes more relevant. This theory, also known as p-q Theory, defines a set of instantaneous powers in the time domain. There no exists any restrictions on voltage and current waveforms, so it can be applicable to different type of systems and states: single-phase, three-phase with or without neutral conductors and steady o transient states. To sum up, the instantaneous power theory set an efficient and flexible basis that helps in order to design and implement controllers for power electronic devices [1]. This theory was defined on the Clarke transformation that consist in transform an abc reference frame into an αβ0frame. In addition, the Park transformation which is defined as a rotation of Clarke’s became also relevant. The use of Park and Clarke transformation has been very common in the power control of AC systems as they let and easier control of active and reactive power. These is because the PI controllers, that are the most popular, work with constant o DC signals. These transformations simplify this control by transforming the sinusoidal waves in abc frame to a non-sinusoidal two-dimension frame which is the qd frame. Working in the qd frame permits easier calculations and a decoupling of active and reactive control allowing the use of PI controllers [1]. 21
In addition, the instantaneous power theory it is applicable in balanced an unbalanced systems, and exists a three-phase system approach. Therefore, the transformations mentioned previously can have different forms or expressions, the next subsections focuses on describe them more deeply [1]. 2.1.1 Clarke transformation The Clarke transformation is used, basically, for the conversion of three phase instantaneous electrical magnitudes expressed in the abc reference frame to an αβ0orthogonal reference frame. There are two versions of the Clarke transformation: the standard (amplitude-invariant) transformation and the power invariant transformation. The first one is the most popular version because when voltages are balanced, the magnitude of vacoincides with vα. The power invariant transformation is a rotation where the αaxis correspond to the −−→ vabc in R3[4]. Figure 5: Geometrical interpretation of the Clarke transformation In this thesis the standard Clarke transformation is used, and is detailed bellow. The Figure 5 illustrates the geometrical interpretation of the Clarke transformation to see the match between vαand va. The zero sequence doesn’t appears as it is perpendicular to the αβ plane. So the Clarke transformation is defined as [3] [xαβ0] = [Tαβ0][xabc](4) The xabc is a vector that contains the three phase quantities in the abc frame and xαβ0is another vector with the same quantities but transformed in the αβ0frame. The expression (4) can be also written as xα xβ x0 =2 3 1−1 2−1 2 0−√3 2 √3 2 1 2 1 2 1 2 xa xb xc (5) 22
And its inverse xa xb xc = 1 0 1 −1 2−√3 21 −1 √2 √3 21 xα xβ x0 (6) Moreover, one advantage of the Clarke transformation is the separation the zero-sequence components from the abc phase components. The αand βphases make a null contribution to zerosequence component. If the three-phase voltages are balanced in a four-wire system, no zerosequence voltage is present so x0can be eliminated [2]. So if x0can be eliminated from the transformation matrix, the Clarke transformation and its inverse have the following structure "xα xβ#=2 3"1−1 2−1 2 0−√3 2 √3 2# xa xb xc (7) xa xb xc = 1 0 −1 2−√3 2 −1 √2 √3 2 "xα xβ#(8) However, when zero-sequence voltage and current components are present, the complete transformation must be considered. Figure 6shows and example of Clarke transformation without zero sequence. Figure 6: Clarke transformation applied to a three-phase three-wire system. 23
Figure 13: VSC electrical model. 2.4 Voltage equations As it has been explained in previous sections, the system is divided in to parts, the AC side and the DC side. In order to obtain the voltage equation, the AC side has to be considered. It can be modeled as illustrated in Figure 14. This equivalent scheme considers the AC side of the VSC electrical model described in Section 2.3 and includes the grid and the equivalent electrical parameters of the wiring and filter, resistance Rfand inductance Lf. Figure 14: Equivalent model of the AC side of a VSC converter. Taking this model into account and considering a balanced sinusoidal three-wire three-system with constant frequency, the voltage equation for the AC side in the abc frame can be computed as vc−vl−(vl0−vc0) = Rfi+Lf di dt (21) where vcis the three-phase instantaneous grid voltage in the abc frame, vlis the three-phase instantaneous converter voltage in the abc frame, iis the three-phase instantaneous current in the abc frame, Rfis the inductance equivalent resistance and Lfis the inductance value. vl0−vc0 is the voltage difference between the converter and the grid neutrals [3]. Noticing that there is no neutral conductor and the system is balanced, this difference is 0. Additionally the voltage equation (21) can be expressed in matrix format as equation (22) shows below. 30
vca vcb vcc − vla vlb vlc −(vl0−vc0) 1 1 1 = Rl0 0 0Rl0 0 0 Rl ia ib ic + Lf0 0 0Lf0 0 0 Lf d dt ia ib ic (22) To control sinusoidal waves, the qd frame is widely and commonly use as it was discussed in Section 2.1. So applying the Park transformation (4) to the voltage equation in matrix format (22) and taking into account that for three-wire systems i0≡0(this means that the zero sequence can be eliminated), the voltage equation can be express as "vcq vcd#−"vlq vld#="RfLfωc −LfωcRf#"iq id#+"Lf0 0Lf#d dt "iq id#(23) where vcq and vcd are the grid qd voltages, vlq and vld are the converter qd voltages, iqand idare qd currents and ωcis the electrical angular velocity [3]. 2.5 Phase Locked Loop As it was mentioned in Section 2.1.3, the angle θcand the angular velocity of the grid ωcare needed to obtain the active and reactive power quantities in the synchronous reference frame. In order to determine the values of θcand ωca phase locked loop (PLL) is used. A three-phase PLL consists in a feedback of the d-axis filtered by a PI controller. The output of the controller corresponds to the angular velocity ωcof the grid and the integration of this signal corresponds to the grid angle θc[3]. Moreover, the PLL is also used to guarantee the synchronization between the qd frame and the grid angle θc. To achieve that, the PLL has to control vcd using the PI and setting it to 0. In a synchronous reference frame the structure of the PLL can be illustrated as shown in Figure 15 Figure 15: A phase locked loop (PLL) structure. To sum up, the PLL not only measures the angular velocity ωeand the angle θeof the grid also synchornizes the qd frame to the grid ensuring that vd= 0. In order to study the design of the PLL controller a system linearization must be done assuming the angle error to be small. The following second order system is obtained [3] 31
ˆ θ(s) θ(s)=2ξP LLωP LLs+ω2 P LL s2+ 2ξP LLωP LLs+ω2 P LL (24) where ˆ θ(s)is the estimated grid angle and θ(s)is the real grid angle. The PLL controller can be defined as Kf,P LL(s) = Kp,P LLs+Ki,P LL s(25) where Kf,P LL(s)is the PI equation in a general form. Therefore, the PLL parameters can be computed as Kp,P LL =2ξP LLωP LL ˆ VKi,P LL =ω2 P LL ˆ V=Kp,P LL τP LL (26) τP LL =2ξP LL ωP LL (27) where ˆ Vis the peak voltage of the grid, ξP LL is the damping ratio which is recommended to be in the interval [√2 2,1] and ωP LL is the AC electrical angular velocity [3]. 2.5.1 PLL operation example In order to understand and visualize the functioning of the PLL that was explained in Section 2.5, a simple simulation was created. This example shows the waveforms used an the output bye the PLL, Figure 16. First of all, it can be observed that the PLL is able to track the grid angle of a three-phase three-wire balanced system. The grid angle θP LL goes from 0to 2πrad in a period of 20ms which corresponds to the grid frequency, 50Hz. The ωereminds constant at 100π rad/s which also corresponds to the grid frequency. 32
Figure 16: θP LL and ωcobtained from the PLL in a three-phase three-wire balanced system. Moreover, it can be noticed a lack of 90◦between the θP LL computed grid angle from the PLL and the grid angle. This occurs because in this thesis, the qd transformation has been defined considering that the q axis coincides with the αaxis and the d axis has a lack of 90◦compared to the q axis. This consideration relays on the geometrical interpretation of the Park transformation found in Figure 7. Seeing the PLL controls vd, the angle computed will have a lack of 90◦regarding the αor aaxis, which coincides with the delay of the d axis already explained. Since the objective of the PLL is to track the grid frequency, a frequency variation was included in this example in order to prove a good performance of the PLL. The alteration consists in an increase of 10Hz (from 50Hz to 60Hz) during 50ms. Figure 17 illustrates how this variation affects to the waveforms involved in the PLL. As it is shown, between t= 0.05sand t= 0.1s the vabc waves and the θlines are closer amid them. Referring to the electrical angular velocity, there is a transient of 20 ms approx. at t= 0.05sand t= 0.1swhere the frequency changes its value, apart from that, when the steady state is achieved the ωeis constant at 100πrad/s or 120π rad/s. This proves a right tracking of the grid frequency. 33
Figure 17: θP LL and ωcobtained from the PLL in a three-phase three-wire balanced system with a frequency variation from 50Hz to 60Hz. 2.6 Current loop The current loop, also known as current control or inner loop, permits the regulation of the current flow between the grid and the converter. Putting this state into practice, the current control compute the AC side reference voltages in the qd frame of the VSC considering the reference currents in the qd frame computed at the reference computation block, this structure illustrated in Figure 10. The current loop is built regarding the voltage equation developed in Section 2.4 which is "vcq vcd#−"vlq vld#="RfLfωc −LfωcRf#"iq id#+"Rf0 0Rf#d dt "iq id#(28) As it can be seen in equation (28), exists a coupling between the qand dcomponents of voltages and currents. In order to control the iqand id, it is true that a multi-variable control approach can be designed but also exists a less complex approach which consists to decouple qand d components and control them independently using a PI controller[3]. The qand dcomponents can be decoupled using "vlq vld#="−ˆvlq +vcq −Lfωcild −ˆvld +Lfωcild #(29) where ˆvlq and ˆvld are the outputs of the qand dcontrollers and vlq,vld are the reference voltages to be applied at the AC side of the converter. Substituting in the voltage equations "vlq vld#="Rf0 0Rf#"iq id#+"Lf0 0Lf#d dt "iq id#(30) 34
In order to derive the transfer function between the controller voltages and converter currents, the Laplace transformation has to be applied iq(s) ˆvlq(s)=1 Lfs+Rf id(s) ˆvld(s)=1 Lfs+Rf (31) For the characterization of the PI controller the Internal Model Control technique is used. This method provides an acceptable tracking with control loop stability. Using the general structure of a PI controller Gciq(s) = Gcid(s) = Kp,is+Ki,i s(32) where the constants can be computed as Kp,i =Lf τKi,i =Rf τ(33) where τis the closed loop time constant of the electrical system. This constant is usually defined as 100 times (for example) faster than the converter switching frequency of the VSC’s switches as it considers the converter physical restrictions [3]. The implementation of the current loop is sketched in Figure 18. Figure 18: Current loop structure. 35
2.6.1 Current loop operation example As a way to understand and visualize the performance of the current loop explained in Section 2.6, a simple simulation was built. This example displays the response of the current in the qd frame to a step reference, Figure 19. Figure 19: iqand idtracking using a current loop. It can be observed, that the current loop is capable to track the different current magnitudes in the qd frame. Moreover, the response matches as a first order system as it was stated in equation (31). Going a little bit deeper, the iqand idhas reach the 63,2% of the steady state value at t=τ that in this example is 1 ms, this step response behaviour is characteristic of first order systems and can be used to check a good working of the current loop [8]. 2.7 DC side implementation in the VSC average model Referring to Section 2.2 in order to build the control scheme related to the reference calculation blocks, the DC side of the VSC average model has to be implemented. This first step is relevant as means to obtain the DC magnitudes of voltage and current that will be used in the reference computation blocks. Figure 20 shows a more detailed diagram of the DC side of the VSC average model. 36
Figure 20: DC side of the VSC average model based on the system found in [10]. As it can be seen in Figure 20 the DC side can be modelled with a DC capacitor and a controlled current source Imthat represent the external system that is connected to the converter, the PEM electrolyser in this thesis. Also, the AC and DC side of the VSC are interconnected considering the power exchange between both sides. Pac =Pdc =IdcVdc →Idc =Pac Vdc (34) 2.8 Reference computation The current references in the qd frames have to be computed in order to obtain the desired active and reactive power. In addition, the VSC model expects a DC current and a AC voltage reference, that must be calculated separately but maintaining the power conservation Pdc =Pac. The DC current reference computation was detailed in Section 2.7. Moving on the AC current reference computation, it can be derived differently depending on the form of the system. Some versions of the system have been considered to achieve the final system are explained with more detailed Section 2.2. Overall, the reference computation scheme depends on the reference magnitudes. In the first version, without DC side consideration, the reference magnitudes will be P∗and Q∗. However, in the following versions, the DC side of the VSC is implemented, so the reference magnitude will be V∗ tdc. In this cases, the control loop for DC voltage reference magnitude is detailed next. 2.8.1 Outer DC voltage control As it was mention in previous sections, in order to compute the iqreference, a DC voltage loop is implemented instead of a active power loop. DC voltage loop is designed assuming that the dynamic response of the current loop is neglected. The control design can be defined depending on the reference input that can be Vdc or the DC current from external system, in this thesis, the PEM elctrolyser. Since the VSC usually operates at constant DC voltage, the design is based on disturbance Idc−mrejection, Figure 21 illustrates the DC voltage control loop used in this thesis. 37
Figure 21: DC voltage control loop. Therefore, regarding the control design the closed-loop system is considered as a second-order system and the DC voltage controller as PI controller. Gv(s) = Kpvs+Kiv s←→ Itdc Vtdc =s Cts2+Kpvs+Kpi (35) Defining a desired ωnnormally 100πand ξbetween [√2 2,1],Kpv and Kpi can be derived as Kpv = 2ξωnCtKiv =ω2 nCt(36) where Ctis the value of the DC voltage capacitor. 2.9 DC-DC Buck Converter modelling As it is mentioned in the previous requirements and the control scheme parts, Sections 1.3 and 2.2 respectively, the implementation of a buck converter between the VSC and the PEMEL is required. Similarly to the VSC, the Buck converter is based on IGBT technologies and also for simulation purposes two different models can be derived. This are the switched model and the averaged model and its characteristics and advantages and disadvantages are detailed next. The switched model is the most widely used. It contains switches (e.g., Mosfets, diodes, IGBTs, etc.) to simulate the circuits. For a Buck converter simulation model, one switch, one diode, an inductance a capacitor and a resistance are used to built the model, as it can be seen in Figure 22. This approach gives a very detailed analysis of the cycle-to-cycle variations of the circuit which is great for transients. However, for static circuits this become less relevant as once a circuit is under static condition a point by point evaluation is quite time consuming and provides several limitations to the users [14]. 38
Figure 22: DC-DC Buck converter switched model. The averaged model is developed using the average values of the voltages and currents. The principal advantage is that it is not time consuming. Therefore, this averaged model is an interesting topic in power electronic especially if it is used for control purposes, in the same way as the VSC average model. For that reasons, this is the approach that it is used in this thesis [14]. To develop an averaged model of a Buck converter, a mathematical analysis of the converter itself. Starting from the switching model approach, the voltage gain ratio Dof a lossless Buck converter can be computed as Vo Vs =D=Is Io (37) If we focus more on the expression 37, it is very similar to the concept of a transformer. However, in this case as the value of the Dratio must be in into the interval [0,1] the output voltage cannot be greater than the input voltage. Splitting the equation 37, two more expressions are obtained. Vo=D·Vs(38) Is=D·Io(39) Applying some basic circuit analysis techniques, it can be seen in equation 38, that the output voltage Vois equal to the input voltage Vsmultiplied by a dependent voltage source having a gain equal to D. Similarly, if we take equation 39, the input current Isis equal to the output current Iomultiplied by a dependent current source having a Dgain. Based on these to equations the average model can be developed as it is shown in Figure 23. 39
Initials Magnitude Value ξP LL PLL dumpling ratio √2 2 ωP LL PLL angular velocity 100πrad/s τiCurrent loop time constant 1 ms ξvVoltage reference computation dumpling ratio √2 2 ωvVoltage reference computation angular velocity 100πrad/s ξbuck Buck converter dumpling ratio √2 2 ωbuck Buck converter angular velocity 5000πrad/s Table 4: System control parameters. Finally it is important to remark that an initial transient is performed in all simulations due to the initialization parameters at t= 0 s. This transient do not correspond to the real results achieved in the simulations, for this reason, all the figures start at t= 10 s in order to ignore this initial transient. 3.2 Simulation results Before moving to the result visualization, some important aspects of the simulation have to be mentioned. First, the simulation is discrete with a sample time of 0.01 ms, this is done to speed up the simulation. The total duration is 200 s due to the big values of the PEMEL cathode and anode capacitors, and also to replicate the test don in [19]. For the same reason, the power demand used is the same as in [19] in order to compare the results and see if the behaviour of the PEMEL is the same in both tests. Table 5shows the PEMEL power demand during the simulation time. t∈[0,30)s t ∈[30,110)s t ∈[110,200)s PEMEL power demand 0 W 25W 50W Table 5: PEMEL power demand. 46
3.2.1 General power flow analysis In order to check that all of the system is performing in a good way and all of the devices are well modelled, the power flow between them is measured. Figure 26 shows the power measurements in the system. Figure 26: System power measurements. As it can be seen in Figure 26 the power flow between all of the elements involved in the system is about 50W. Regarding Table 5the PEMEL demands 50W in the last time of the simulation, the displays of the Pc=−50.42Wand Pt=−50W, grid and VSC power respectively show that they are able to supply this power. Also the negative value of this measurements indicates a correct power flow direction because they are the suppliers, in contrast to the PEMEL which is the consumer Ph= 50Wso it has a positive value. Finally, a study of the losses in the PEMEL is don in order to quantify the efficiency of the model. In [19], the production of hydrogen is done computing the power in the voltage source Vint, and in their experiment about 30W had been converted into hydrogen. As it can be seen in Figure 26 the production of hydrogen in the model built for this thesis is 29.33W which can be considered a good value and demonstrates the correct performance of the model. 47
3.2.2 PEM electrolyzer behaviour results This section focuses on the PEMEL parts, anode, cathode and the membrane. In order to analyse the PEMEL model the voltages in the three parts of the device ar ploted. Figure 27 shows this grafics. Figure 27: PEMEL anode, membrane and cathode voltages during simulation. In general, all parts react well to the power demand steps. Analysing a bit more the Figure 27 it can be seen the dynamic difference between the anode and the cathode mentioned in Section 2.10 where the cathode is much faster than the anode. Comparing these result withe the ones achieved in [19], they are very similar, this prove that the model is well integrated in the whole system. Furthermore, focusing on the connection between the PEMEL an the Buck converter. Figure 28 shows the evolution of the voltage between the Buck converter and the PEMEL, and it can be seen that the control system is able to track perfectly the voltage reference settled by the power demand. On the other hand, Figure 29 contains the dynamic of the power flow between those devices. As shown, the implemented control loop is capable to follow perfectly the power demand steps of the PEMEL. 48
Figure 28: PEMEL voltage tracking. Figure 29: PEMEL voltage tracking. 3.2.3 VSC behaviour results Moving to the power supply elements, despite that in Section 3.2.1 is shown that the VSC has a good performance, in this section the dynamics of the power supply and the voltage are plotted in order to check the behaviour of the current and voltage reference computation loops explained in Section 2.6 and 2.9.2 respectively. 49
Figure 30: VSC power supply. Figure 31: VSC voltage track. Firstly in therms of the power supply, Figure 30 shows that despite some distortions at t= 30 s and t= 110 s which correspond to the changes in the power demand, the systems response reaches the desired values of power. Same happens with the voltage, in Figure 31 it can be seen the voltage reference calculation loop sensible to the power demand changes and also is stable. However, the values of this distortions are lower compared with the reference so can be negligible. 50
3.2.4 AC grid behaviour results Finally, to conclude the results chapter, a brief analysis of the AC grid is done. In therms of the power supply, Figure 32, the behaviour is similar to the VSC analysed in Section 3.2.3. There are distortions when the power demand changes but in general the system has a good performance. In therms of the voltages and currents, it can be seen in Figure 33 that the dvalues are null, this is because there is no reactive power requirements. Moving to the qmagnitudes, the currents have very low values due to the high value of the voltage of the grid (Vgpeak = 326.6V) and the low power demand scenario (Phmax = 50W). Figure 32: Grid power supply. Figure 33: Grid qd frame voltages and currents. 51
4 Budget The budget of this project takes into account the total economic costs in two different scenarios, theoretical and real. The first one considers that the development of the project has been handled in the professional field, and the more realistic analysis is done regarding this thesis as it really is, an academic research project.The total budged can be divided in 4 different types of costs for both scenarios: personal, licensing, material and energetic. 4.1 Theoretical scenario The theoretical case considers a recently graduated junior engineer working in a industrial company. Doing a simple approximation, the amount of time spent in studying, simulating and writing of this thesis has been four months considering a eight-hour workday. This means a total of 640 hours. In order to calculate the personal cost, the Spanish XX Convenio colectivo nacional de empresas de ingeniería, oficinas de estudios técnicos, inspección, supervisión y control técnico y de calidad. must be considered. Publicated the march 10th of 2023 at the BOE, considers a junior engineer in the salary level 1 which corresponds to 26323.57 €/year meaning 2193.63 €/month considering twelve wages. To sum up, the total personal costs of four months is 8774.52€. The software and licensing costs include the costs of all the softwares needed to make up the project. The different tools used are detailed next: •The memory of this thesis was written using a L A T EXtext editor called Overleaf®which is free. Considering the project features, the premium version was not needed. •MATLAB/Simulink®was the software used for all the scripting an simulating tasks. The year licence for each product and for the different packages used in the thesis is detailed next Product €/year €/4 month MATLAB 860 287 Simulink 1300 433 Simscape 860 287 Simscape electrical 1300 433 TOTAL 4320 1440 Table 6: Simulink year prices. •For the drawing of the figures and the graphics, a free software called Inkscape®was used. •The Articles and Papers consulted have a wide range of prices that can go from free to 1778€/article. In this budget scenario the access to these Articles and Papers was considered free. Taking all of this into account, the total licensing cost is 1440€. 53
Moving to the material costs of the project, these involve the four months amortization of the hardware used which means the laptop and the tablet. The useful life of the devices is considered in seven years. Product Total 4 month amortization Asus Notebook 950€45.24€ iPad Air 699€33.28€ Apple pencil 120€5.72€ Smart Keyboard 170€8.1€ TOTAL 1939€92.34€ Table 7: Material cost amortization. Finally, the energetic costs of the project have to be considered. The calculation it is done regarding the energy consumption of the computer, the tablet and the indirect electricity costs of illumination an climatization. The average electricity price considered for this year 2024 is 0.144 €/kWh. The energetic costs are all detailed in Table 8. Product Consumption Hours Energy consumption Cost Laptop 0.060 kW 640 38.4 kWh 5.53€ Tablet 0.012 kW 640 7.68 kWh 1.106€ Illumination 0.008 kW 320 2.56 kWh 0.37€ Climatization 1 kW 300 300 kWh 43.2€ TOTAL - - 348.64 kWh 50.2€ Table 8: Detail of the energetic costs Therefore, the total energetic cost is 50.2€. To summarize, the costs and the total amount required to do this thesis is detailed in Table 9. Concept Cost Personal cost 8774.5€ Licensing cost 1440€ Material cost 92.34€ Energy cost 50.2€ TOTAL 10375.04€ Table 9: Total budget for the theoretical scenario. 54
4.2 Real scenario The real case considers the really of the project which is developed by an Industrial engineering student in ETSEIB as his Master Thesis. It is true that this budget will be much lower compared to the previous scenario but it is important to remark all the knowledge gained in the engineering field, technical aspects and writing techniques. In this way,the development of this thesis can bee seen as a future investment. Regarding the personal costs, they would include both the salary of the tutor an the student. However, professors are not paid for that kind of jobs and also the students, therefore the total personal cost is zero. In the matter of the licensing costs, the fact that the thesis is developed in collaboration with the UPC-ETSEIB makes that the MATLAB/Simulink®licence is free. The same happens with the Articles and Papers. Nevertheless, the material and energy costs of this thesis are the same as in the previous scenario being 92.34€and 50,2€respectively. Finally, another type of cost has to be mention and it is the enrollment fee for the master thesis. This project consists of 12 ECTS and the cost of each ECTS is 18.46€. Consequently, 12 ECTS plus the proportional part of the service costs of the enrollment (40,07€) rises up to 263.59€. The total budget for the real case of the thesis is detailed in Table 10. Concept Cost Personal cost 0€ Licensing cost 0€ Material cost 92.34€ Energy cost 50.2€ Enrollment fee 263.59€ TOTAL 406.13€ Table 10: Total budget for the real scenario. 55
Bibliografia [1] E. H. W. Hirofumi Akagi and M. Aredes, "Chapter 1: Introduction", in Instantaneous Power Theory and Applications to Power Conditioning, 2007 [2] E. H. W. Hirofumi Akagi and M. Aredes, "Chapter 3: The instantaneous power theory", in Instantaneous Power Theory and Applications to Power Conditioning, 2007 [3] A. J.-F. Agustí Egea-Alvarez and O. Gomis-Bellmunt, Active and reactive power control of grid connected distributed generation systems, pp. 47–81 [4] C. J.O’Rourke, M. M. Qasim, M. R. Overlin and J. L. Kirtley, "A geometric interpretation of reference frames and transformations: dq0, clarke, and park", in IEEE Transactions on Energy Conversion, vol. 34, no. 4, 2019 [5] Prof. E. Prieto, Control of power electronics-dominated power systems, "AMCPS - Voltage Source Converter (Part I)", in https://www.youtube.com/watch?v=sEv6230B8X8, 2021 [6] Prof. E. Prieto, Control of power electronics-dominated power systems, "AMCPS - Voltage Source Converter (Part II)", in https://www.youtube.com/watch?v=az07jaec4pE, 2021 [7] Prof. E. Prieto, Control of power electronics-dominated power systems, "AMCPS - Voltage Source Converter (Part III)", in https://www.youtube.com/watch?v=dGeY2fXrH9A, 2021 [8] K. Ogata, Modern Control Engineering, Pertinence Hall, 1997 [9] M. Sans Esqué, Instantaneous power control on a PV energy generation system using a VSC, Degree Thesis, 2023 [10] M. Cheah Mañé, "Assignment 2: PV generation model", in Application of PE for Renewable Generation, MUEI course, 2024 [11] L. Bruno, Optimisation of hydrogen system to produce high-temperature heat in the glass industry, Master Thesis, 2023 [12] 2019 DOE Hydrogen and Fuel Cells Program Annual Merit Review and Peer Evaluation Report Released. Office of Energy Efficiency and Renewable Energy Home Page. Available online: https://www.energy.gov/eere/fuelcells/articles/2019-doe-hydrogen-and-fuel- cells-program-annual-merit-review-and-peer (accessed on 22 August 2024). 63
[13] B. Yodwong, D. Guilbert, M. Phattanasak, W. Kaewmanee, M. Hinaje and G. Vitale, Proton Exchange Membrane Electrolyzer Modeling and Power Electronics Control: A Short Review, 2020 [14] Dr. Hadeed Ahmed Sher, Senior Member IEEE, "Power Electronics Module 2 Lecture 6 | Averaged model simulation", in https://www.youtube.com/watch?v=HvX5Uq7J-LM, 2021 [15] D. Montesinos-Miracle, "Buck converter design and simulations", in Electric Energy conversions, MUEI course, 2024 [16] "Quadre de comandament d’indicadors", Gabinet de planificació, avaluació i qualitat UPC, 2024 [17] "Las renovables alcanzaron en abril una cuota del 64,6% sobre el total de generación mensual", Red Eléctrica de España, 2024 [18] Icograms Template webpage, avilabe online: https://icograms.com/templates/infographics/hydrogenproduction, accessed on 3 September 2024. [19] D. Guilbert, G. Vitale, Dynamic Emulation of a PEM Electrolyzer by Time Constant Based Exponential Model, 2019 64