English: Hardware-in-the-Loop techniques consist of creating real-time models of physical elements, called plants, that are connected to real controllers. This is useful if one needs to simulate operations that are dangerous, expensive, impractical, or not possible for any reason. The user requires that the models deliver accurate results in real time. This thesis examines the modeling of switched power electronics converters and proposes improvements in two directions: in the calculation of the state variables and in the workflow used to translate high-level descriptions automatically into models.
The state variables are calculated typically by solving a set of differential equations, usually with a numerical method. Higher-order numerical methods deliver more accurate results than first-order forward Euler method, at the expense of more complex calculations. The operation of switched converters is based on alternative action of elements behaving as switches. Therefore, the differential equations that model these converters are also alternating. The consequence is that two elements contribute greatly to loss of accuracy in the case of the synchronous buck converter, or other half-bridge converters, and they must be thoroughly examined: the deadtimes --which usually generate additional equations, and during a time that can be shorter than the numerical method integration time-- and the measurement of the duty cycle of the switches --that determine which equations must be applied.
Synchronous buck converters and other half-bridge modules have deadtimes in their switched elements to avoid short-circuiting the source during changes of state. If a deadtime occurs while the inductor current drops down to zero, the model must take it into account. Otherwise the more accurate numerical methods lose their advantages, even if they need longer integration times. Aside from this, the model measures the duty cycle by sampling the states of the switching elements. The errors arise because the model is not synchronized with the switching determined by the controller, and because the minimum detectable time is limited by the sampling rate. The slower the sampling rate, the higher the contribution to the global error.
In summary, the more precise numerical methods are negatively affected by not modeling the inductor current during deadtimes and by not detecting the switching with the required accuracy. For the first issue, this thesis proposed two solutions. The first one is saturating the current to zero, and is good enough for second-order numerical methods. The second solution divides the integration time into two fractions, whose duration is calculated with a linear approximation. These solutions are implemented in a Field-Programmable Gate Array (FPGA) device using fixed-point arithmetic. Also, a computational block called K-calculator is proposed. It reuses hardware resources in successive clock cycles. The state variables of a buck converter are calculated with greater accuracy (several orders of magnitude) than with the forward Euler method, even if longer integration time is needed.
For the second case, incorrect measurement of the duty cycle, this thesis proposes measurement of the duty cycle at a faster rate than the model integration time. When a switching event is detected, the previous time step is recalculated, and the current step is combined with the one immediately following it.
Using a second-order method, state variables can be computed one order of magnitude slower than the duty cycle measurement, and the results are more accurate than with the forward Euler method. A model using a K-calculator with an integration time of 112 ns is shown.
The second part of this thesis examines the workflow used to generate HDL (Hardware Description Language) models and implement them in FPGAs. The designer can choose among many devices the one most suited to the application. But the generation of efficient HDL code is difficult for power electronics experts because they are not FPGA experts. An alternative is starting from a MATLAB/Simulink high-level model, which can be created by a power electronics engineer, and translate it into HDL code with automatic tools. This Thesis analyzes the workflows offered by tools to generate HDL code and why are inefficiencies created. In particular, both MATLAB code and Simulink block designs are translated automatically into VHDL code. This code is analyzed manually and the sources of inefficiencies, are shown, whose consequences are higher resource usage and slower operation.
A design workflow is proposed that addresses these inefficiencies. It consists of four major stages: 1. code rewriting by creating intermediate signals to avoid the generation of redundant calculation structures; 2. forcing all signals to signed arithmetic to avoid uncontrolled growing of signal sizes; 3. adjustment of signals to the input width of multiplication elements, which ensures the precise control of how many will be synthesized; and 4. verification in the synthesis tool.
This workflow generates a VHDL model of an ideal buck converter with an operating speed and resource utilization similar to that of the reference design. In order to verify that the method can be generally applied, it is used with a more complex circuit: a full-bridge converter with losses, using a second-order numerical method. The result is a model with performance very close to that of a reference model constructed manually. This shows that the proposed workflow can be considered generic enough for creation of high-performance VHDL models automatically.
Español: Hardware-in-the-Loop consiste en crear modelos de un sistema físico, llamado planta, que operan en tiempo real conectados a controladores reales. Es una técnica útil para simular operaciones peligrosas, caras, poco prácticas, o imposibles por alguna razón. El usuario necesita que los modelos matemáticos den resultados exactos y en tiempo real. Esta tesis estudia el modelado de convertidores conmutados de electrónica de potencia y propone mejoras en dos ámbitos: en el cálculo de las variables de estado y en el flujo de trabajo que permite generar modelos automáticamente a partir de descripciones de alto nivel.
Para calcular las variables de estado típicamente hay que solucionar un sistema de ecuaciones diferenciales. Se suelen usar métodos numéricos. Los métodos de mayor orden dan resultados más exactos que el método Euler directo de primer orden, a cambio de mayor complejidad en los cálculos. Los convertidores conmutados se basan en la acción alternativa de elementos que actúan como interruptores. Por tanto, las ecuaciones diferenciales que modelan estos convertidores también van alternándose. En consecuencia, dos elementos contribuyen en gran medida a la pérdida de exactitud en el caso del convertidor buck síncrono, u otros convertidores que contienen medios puentes, y deben ser examinados en detalle: los tiempos muertos -que suelen añadir nuevas ecuaciones, y durante un tiempo que puede ser menor que el tiempo de integración del método numérico - y la medida del ciclo de trabajo de los interruptores - que deciden qué ecuaciones deben ser aplicadas.
Los convertidores buck síncronos y otros módulos de medio puente incorporan tiempos muertos en los elementos conmutados para evitar cortocircuitar la fuente durante los cambios de estado. Si hay un tiempo muerto cuando la corriente de la bobina llega a cero, el modelo debe tenerlo en cuenta. De otro modo se pierden las ventajas de los métodos numéricos más exactos, a pesar de necesitar mayores tiempos de integración. Por otra parte, el modelo mide el ciclo de trabajo muestreando los estados de los elementos que conmutan. Los errores ocurren porque el reloj del modelo no está sincronizado con la conmutación dictada por el regulador, y porque el tiempo mínimo detectable está limitado por la tasa de muestreo. Cuanto más lenta es la tasa de muestreo, mayor es la contribución al error global.
En definitiva, los métodos numéricos más precisos se ven afectados por no modelar la corriente de la bobina en los tiempos muertos y por no detectar el momento de la conmutación con la exactitud requerida. Para el primer caso esta tesis propone dos soluciones. La primera es saturar la corriente a cero, y es suficiente para usar métodos numéricos de segundo orden. La segunda solución divide el tiempo de integración en dos partes, cuya duración se calcula con una aproximación lineal. Estas soluciones se implementan en una FPGA (Field-Programmable Gate Array) con aritmética de coma fija. Además se propone un bloque de cómputo llamado calculador-K que reutiliza los recursos hardware en sucesivos ciclos de reloj. Las variables de estado de un convertidor buck se calculan con mayor exactitud (varios órdenes de magnitud) que con el método Euler directo a pesar de necesitar más tiempo de integración.
Para el segundo caso, detección incorrecta del ciclo de trabajo, se propone medir el ciclo de trabajo a una velocidad más rápida que el tiempo de integración del modelo. Cuando se detecta un cambio de los conmutadores, se recalcula el paso anterior y el paso actual se combina con el siguiente. Si se usa un método de segundo orden, se pueden calcular las variables de estado a una velocidad un orden de magnitud más lenta que la medida del ciclo de trabajo, y se obtienen mejores resultados que con el método Euler a máxima velocidad. Se muestra un modelo con tiempo de integración de 112 ns que usa bloques calculador-K.
La segunda parte de la tesis estudia el flujo de trabajo para generar modelos HDL Hardware Description Language e implementarlos en FPGAs. El diseñador puede elegir de entre muchos dispositivos comerciales el que sea más adecuado para la aplicación. Pero es difícil para los expertos en electrónica de potencia generar código HDL eficiente porque no son expertos en FPGAs. Una alternativa es partir de un modelo de alto nivel en MATLAB/Simulink, que sí puede ser generado por el ingeniero de potencia, y traducirlo a HDL usando herramientas automáticas. Esta tesis analiza los flujos de trabajo que ofrecen estas herramientas para generar código HDL y por qué se generan ineficiencias. En particular, en esta tesis se traduce código MATLAB y diseños de bloques Simulink en código VHDL. Este código se analiza manualmente y se muestra el origen de las ineficiencias que provocan uso de recursos y menor velocidad de operación.
Se propone un flujo de diseño que soluciona estas ineficiencias. Consiste en cuatro etapas: 1. reescritura del código, creando señales intermedias para evitar la generación de estructuras de cálculo redundantes; 2. forzar todas las señales a aritmética con signo para evitar su aumento de tamaño no controlado; 3. ajuste de señales a las entradas de los elementos multiplicadores, que da un control preciso sobre cuántos se van a sintetizar; y 4. verificación en la herramienta de síntesis.
Este flujo de trabajo genera un modelo de un convertidor buck ideal con una velocidad de operación y uso de recursos similares a los del diseño de referencia. Para comprobar que el método es generalizable, se aplica a un circuito más complejo: convertidor de puente completo con pérdidas usando un método numérico de segundo orden. El resultado es un modelo con prestaciones muy parecidas a las de uno de referencia generado a mano. Esto muestra que el flujo de trabajo propuesto se puede considerar genérico para crear automáticamente modelos HDL de altas prestaciones.
© 2001-2025 Fundación Dialnet · Todos los derechos reservados