RegDspLib: Development of a C++ DSP common control library for Cancun, HL-LHC18kA and RF3kA power converters at CERN

English: The European Organization for Nuclear Research (CERN, Conseil Européen pour la Recherche Nucléaire in French), located in Geneva, Switzerland, hosts the largest particle accelerator complex in the world, which aims to push the boundaries of human knowledge on particle physics. The main acce...

Descripción completa

Detalles Bibliográficos
Autor: Pinillos Zamorano, Nagore
Tipo de recurso: tesis de maestría
Fecha de publicación:2023
País:España
Institución:Universidad del País Vasco
Repositorio:Addi. Archivo Digital para la Docencia y la Investigación
OAI Identifier:oai:addi.ehu.eus:10810/62810
Acceso en línea:http://hdl.handle.net/10810/62810
Access Level:acceso abierto
Palabra clave:switch-mode power converter
CERN
OOP
C++
inheritance
DSP
FPGA
software
library
control
standardization
Descripción
Sumario:English: The European Organization for Nuclear Research (CERN, Conseil Européen pour la Recherche Nucléaire in French), located in Geneva, Switzerland, hosts the largest particle accelerator complex in the world, which aims to push the boundaries of human knowledge on particle physics. The main acceleration technologies at CERN rely on radio-frequency (RF) cavities and superconducting electromagnets. Usually, these systems need to be fed from the grid using high-efficiency and high-precision switch-mode power electronic converters. This Master’s Thesis has been conducted to complete the Master's studies in Advanced Electronic Systems at the Univesity of the Basque Country (EHU/UPV, Universidad del País Vasco in Spanish). It has been carried out during a short-term internship at CERN’s System Department-Electric Power Converters-Low Power Converters (SY-EPC-LPC) group. This group is in charge of designing and developing low-voltage and high-current modular and compact converters, ranging from some Watts up to several kW. The SY-EPC-LPC manages a variety of power converters within the particle accelerator complex. Most digitally controlled ones share the same control hardware architecture consisting of a proprietary crate, named RegFGC3, which includes several cards. Among these, a Digital Signal Processor (DSP) regulation board and a State Control card containing a Field Programmable Gate Array (FPGA) can be highlighted. This RegFGC3 crate is part of a larger control platform, named FGC3. Although the hardware is highly standardized, nowadays each power supply uses converter-specific software for control purposes, coded in C programming language. This makes all code redundant, difficult to test, debug and maintain. Considering the aforementioned drawbacks, this Master's Thesis aims to design, develop and test a common control library which supports the regulation software of several power converters, providing standardization, flexibility and time-saving. To do so, as a first step, three of the accelerators' power converters have been selected: CANCUN (Cern Acdc Narrow CoNverter), HL-LHC18kA (High Luminosity Large Hadron Collider 18 kA) and RF3kA (Radio-Frequency 3 kA). This selection is based on that these converters incorporate a variety of operating and control requirements, i.e., 1-quadrant, 2-quadrant and 4-quadrant architectures, module parallelization, various current and voltage regulation loops, and different Pulse Width Modulation (PWM) modes including, in some cases, interleaving. After analysing the three power converters and their control (hardware and software), synergies have been identified, which are still missing at the software level. To provide a unified control software library that takes into account such synergies, the refactorization of the code from C to C++ has been justified as the best option. This approach allows using a fast and efficient Object Oriented Programming (OOP) language, whose nature facilitates the expression of the existing relationship between converter-specific codes. The main idea behind the proposed and implemented library, named RegDspLib, is based on constructing a parent class that supports all the converters. It contains all the shared similarities between converters, which eases the development of additional and specialized code. This base class allows the inheritance of the configured common features with the possibility of using, modifying, or adding what is needed by each converter in their corresponding derived classes. C++ language mechanisms have been used to correlate different classes, modules, methods and attributes of the code, easing the development of the common library. This, would have been more laborious in the C language. A variety of modules have been configured to provide logic to the classes, in which a generic module for the configuration of a generic Finite State Machine (FSM) template, and a regulation module with configurable PWM inputs are included, among others. Besides this and to make this library design possible, multiple modifications have been proposed. These consist of the design of a standard FSM for all the converters, the modification of the FPGA which is controlling and monitoring the power converter’s status, the interrupt handling on the DSP, and the building of new generic functions that work with multiple converters. The latter includes the slew rate method that controls the increasing/decreasing rate of the control algorithm’s reference value and an automatic parameter calculation script for interleaving control mechanisms. Verification of the RegDspLib library has been carried out using the CANCUN power converter. First, the same regulation response has been proved when comparing the original and the proposed library-based codes. Regarding digital resources, experimental results show an increase of only 2.48 % in the execution time of the program for the worst-case scenario, and up to a 24.63 % time-saving for the best-case. This demonstrates that it has been possible to standardize, refactor the code to C++ and add more features to the software without generating overruns. All things considered, the C++ programming language is proven valid for real-time control in the DSP target of CERN’s power converters. Besides, building a control library that groups all the common features has also provided a better-structured program, making it easier to understand and to work with. This work could lead to further improvements in the library and it can be completed in order to generalize it to control other power converters besides the presented ones. Moreover, although the RegDspLib library was originally aimed at the FGC3 control platform, this work provides the first steps for developing libraries taking into mind the future control hardware upgrade FGC4 (already in development). In such novel architecture, dedicated cards in the FGC3 (control, monitoring, regulation, measurement, etc.) will be replaced by one single main Central Processing Unit (CPU).