Magnetic levitation represents a fascinating technology with applications in various fields, from scientific research to industry. This thesis focuses on the development of a Python software framework for the control and analysis of magnetic levitation systems. We will present the mathematical foundations governing magnetic levitation and provide an open-source Python implementation available on GitHub. We will discuss the major challenges in implementing the software in Python, highlighting the differences compared to MATLAB. Comparisons will be made between simulations performed using the software and results obtained with MATLAB, with an analysis of the speed differences between the two platforms. One of the key findings of this research is that Python is fundamentally slower than MATLAB in executing magnetic levitation simulations. This issue will be examined in detail, and solutions will be proposed to enhance the performance of the Python software. In particular, Just-in-time (JIT) compilation techniques will be considered to accelerate code execution. This thesis will analyze different approximations for the elliptic functions ellipk and ellipe used in the software, and compare their accuracy and performance. In the end, the LQR controller was simulated using MATLAB and Python. The primary objective of this work is to construct a comprehensive Python framework for the control and analysis of magnetic levitation, with the ambition of contributing to the advancement of research in this field.

La levitazione magnetica rappresenta una tecnologia affascinante con applicazioni in diversi settori, dalla ricerca scientifica all’industria. Questa tesi si concentra sulla creazione di un software in Python per il controllo e l’analisi della levitazione magnetica. Verranno presentati i fondamenti matematici che governano la levitazione magnetica e verr`a fornita un’implementazione Python open-source disponibile su GitHub. Saranno discussi i principali ostacoli nell’implementazione del software in Python, evidenziando le differenze rispetto all’uso di MATLAB. Verranno eseguite comparazioni tra le simulazioni effettuate con il software e i risultati ottenuti con MATLAB, con un’analisi delle differenze di velocit`a tra le due piattaforme. Uno dei principali risultati emersi dalla ricerca `e che Python risulta pi`u lento rispetto a MATLAB nell’esecuzione delle simulazioni di levitazione magnetica. Questo problema sar`a esaminato in dettaglio e saranno proposte soluzioni per migliorare le prestazioni del software Python. In particolare, verranno considerate le tecniche di compilazione Just-in-time (JIT) per accelerare l’esecuzione del codice. Questa tesi analizzer`a diverse approssimazioni per le funzioni ellittiche ellipk ed ellipe utilizzate nel software e ne comparer`a l’accuratezza e le prestazioni. Infine sono state eseguite simulazioni del controllore LQR in MATLAB e in Python. L’obiettivo principale di questo lavoro `e costruire un framework completo in Python per il controllo e l’analisi della levitazione magnetica, con l’ambizione di contribuire al progresso della ricerca in questo campo.

Towards a Pythonic framework for control and analysis of magnetic levitation systems

LINCETTO, ALESSANDRO
2022/2023

Abstract

Magnetic levitation represents a fascinating technology with applications in various fields, from scientific research to industry. This thesis focuses on the development of a Python software framework for the control and analysis of magnetic levitation systems. We will present the mathematical foundations governing magnetic levitation and provide an open-source Python implementation available on GitHub. We will discuss the major challenges in implementing the software in Python, highlighting the differences compared to MATLAB. Comparisons will be made between simulations performed using the software and results obtained with MATLAB, with an analysis of the speed differences between the two platforms. One of the key findings of this research is that Python is fundamentally slower than MATLAB in executing magnetic levitation simulations. This issue will be examined in detail, and solutions will be proposed to enhance the performance of the Python software. In particular, Just-in-time (JIT) compilation techniques will be considered to accelerate code execution. This thesis will analyze different approximations for the elliptic functions ellipk and ellipe used in the software, and compare their accuracy and performance. In the end, the LQR controller was simulated using MATLAB and Python. The primary objective of this work is to construct a comprehensive Python framework for the control and analysis of magnetic levitation, with the ambition of contributing to the advancement of research in this field.
2022
Towards a Pythonic framework for control and analysis of magnetic levitation systems
La levitazione magnetica rappresenta una tecnologia affascinante con applicazioni in diversi settori, dalla ricerca scientifica all’industria. Questa tesi si concentra sulla creazione di un software in Python per il controllo e l’analisi della levitazione magnetica. Verranno presentati i fondamenti matematici che governano la levitazione magnetica e verr`a fornita un’implementazione Python open-source disponibile su GitHub. Saranno discussi i principali ostacoli nell’implementazione del software in Python, evidenziando le differenze rispetto all’uso di MATLAB. Verranno eseguite comparazioni tra le simulazioni effettuate con il software e i risultati ottenuti con MATLAB, con un’analisi delle differenze di velocit`a tra le due piattaforme. Uno dei principali risultati emersi dalla ricerca `e che Python risulta pi`u lento rispetto a MATLAB nell’esecuzione delle simulazioni di levitazione magnetica. Questo problema sar`a esaminato in dettaglio e saranno proposte soluzioni per migliorare le prestazioni del software Python. In particolare, verranno considerate le tecniche di compilazione Just-in-time (JIT) per accelerare l’esecuzione del codice. Questa tesi analizzer`a diverse approssimazioni per le funzioni ellittiche ellipk ed ellipe utilizzate nel software e ne comparer`a l’accuratezza e le prestazioni. Infine sono state eseguite simulazioni del controllore LQR in MATLAB e in Python. L’obiettivo principale di questo lavoro `e costruire un framework completo in Python per il controllo e l’analisi della levitazione magnetica, con l’ambizione di contribuire al progresso della ricerca in questo campo.
Magnetic levitation
Control System
Python
File in questo prodotto:
File Dimensione Formato  
Lincetto_Alessandro.pdf

accesso aperto

Dimensione 872 kB
Formato Adobe PDF
872 kB Adobe PDF Visualizza/Apri

The text of this website © Università degli studi di Padova. Full Text are published under a non-exclusive license. Metadata are under a CC0 License

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/20.500.12608/57547