This thesis project is focused on solving the problem of the trajectory tracking of a Mobile Robot on Wheels (WMR) using the Predictive Control based on Model (MPC) technique. The goal is to make the robot traveling trajectory assigned as precisely as possible and in real time. Model Predictive Control is the most widely used advanced process control technique in industrial automation. Since an MPC controller uses a model to rep- resent the system that needs to be controlled, the results will depend on the degree of similarity between the model and the real system. The robot in question consists of a pair of wheels controlled separately; the model used to represent the robot is the unicycle model (non-linear). The angular velocities necessary for the WMR to assume the desired position and orientation are identified through the differential-drive technique. In order to speed up the control a linear version of the MPC (L-MPC) is used; the model of the non-linear robot is therefore linearized and subsequently discretized, being the MPC defined at discrete times. In order to improve control, two optimizations are implemented. The first one consists in a new linearization on the calculated future states to every step of the algorithm; the second is based on the search for the nearest point between the real position and the reference from which to restart the control. The two wheels of the robot are driven by the Pulse With Modulation (PWM) technique. From the angular velocities detected by the MPC algorithm (defined as optimal) it is necessary to obtain the real inputs in PWM. In a first job the PWM inputs are obtained through a static correspondence between inputs and angular velocities. The results obtained were not entirely satisfactory. Subsequently, in a second work, we opted for a dynamic identification of inputs by means of a dynamic model ARX (AutoRegressive eXogenous). However, the identification increases the time to perform a step of the algorithm so it could not proceed to a real-time implementation of the control. In this work, in addition to a new identification of the ARX model, in order to reduce execution time, a new formulation of the MPC will be implemented. Several simulations will be carried out in the Matlab environment to test the correctness of the control. Once the MPC-ARX model is validated, control is applied to a real WMR robot. The development environment is briefly analyzed with the various components involved. The MPC control is entirely performed on Raspberry Pi 3 and then translated into C++ language. In order to realize the implemented technique in real-time mode, particular attention is paid to the execution times of each step of the algorithm, so that they do not exceed the order of milliseconds. Finally, the results of the real-time MPC control applied to the real robot are shown and analyzed.
Il progetto di tesi ha riguardato il problema dell’inseguimento di traiettoria tracking trajectory di un Robot Mobile su Ruote (WMR) utilizzando la tecnica di Controllo Predittivo basato su Modello (MPC). L'obbiettivo è far percorrere al robot, nel modo più preciso possibile e in tempo reale, una traiettoria assegnata a priori. MPC è una tecnica avanzata di controllo dei processi molto utilizzata in automazione industriale. Poiché un controller MPC utilizza un modello per rappresentare il sistema che deve essere controllato, i risultati dipenderanno dall'accuratezza del modello nel descrivere il sistema reale. Il robot in esame è costituito da una coppia di ruote comandate separatamente; il modello utilizzato per rappresentarlo è il modello ad uniciclo (non lineare) e, tramite la tecnica nota come differential-drive, si individuano le velocità angolari necessarie affinché il WMR assuma la posizione e l'orientamento desiderati. Al fine di velocizzare il controllo, si utilizza una versione lineare dell’MPC (L-MPC); il modello del robot non lineare viene dunque linearizzato e successivamente discretizzato, essendo l’MPC eseguito ad istanti di tempo regolati. Al fine di migliorare il controllo, si implementano due ottimizzazioni. La prima consiste in una nuova linearizzazione sugli stati futuri calcolati ad ogni passo dell'algoritmo; la seconda si basa sulla ricerca del punto più vicino tra posizione reale e riferimento da cui far ripartire il controllo. I motori delle due ruote del robot vengono pilotati tramite la tecnica Pulse Width Modulation (PWM). Dalle velocità angolari individuate tramite l'algoritmo MPC (definite ottime) bisogna ottenere gli ingressi reali in PWM. In un lavoro di tesi precedente gli ingressi PWM sono ottenuti attraverso una corrispondenza statica tra ingressi e velocità angolari. I risultati ottenuti non sono stati del tutto soddisfacenti. Successivamente, in un nuovo lavoro, si è optato per una identificazione dinamica degli ingressi mediante modello dinamico ARX (AutoRegressive eXogenous). Tuttavia, l'identificazione accresce i tempi per eseguire uno step dell'algoritmo e non si è potuto procedere ad una implementazione real-time del controllo. Il presente lavoro ha riguardato una nuova identificazione del modello ARX ed una nuova formulazione dell'MPC in cui gli stati sono definiti in funzione degli ingressi. Questo comporta una drastica diminuzione del numero di variabili da dover gestire con una conseguente riduzione dei tempi di esecuzione. Si sono svolte diverse simulazioni in ambiente Matlab al fine di validare la correttezza del controllo. Una volta validato il modello MPC-ARX, si applica il controllo ad un robot WMR reale. Si analizza brevemente l'ambiente di sviluppo con i vari componenti coinvolti. Il controllo MPC è interamente eseguito su Raspberry Pi 3 e quindi tradotto in linguaggio C++. Per realizzare il controllo in modalità real-time viene prestata particolare attenzione ai tempi di esecuzione di ogni passo dell’algoritmo, affinché non superino l’ordine dei millisecondi. Infine si mostrano e analizzano i risultati del controllo MPC, in real-time, applicato al robot reale.
Real-Time Tracking Trajectory of WMR using Model Predictive Control
CARDONE, ANGELO
2019/2020
Abstract
This thesis project is focused on solving the problem of the trajectory tracking of a Mobile Robot on Wheels (WMR) using the Predictive Control based on Model (MPC) technique. The goal is to make the robot traveling trajectory assigned as precisely as possible and in real time. Model Predictive Control is the most widely used advanced process control technique in industrial automation. Since an MPC controller uses a model to rep- resent the system that needs to be controlled, the results will depend on the degree of similarity between the model and the real system. The robot in question consists of a pair of wheels controlled separately; the model used to represent the robot is the unicycle model (non-linear). The angular velocities necessary for the WMR to assume the desired position and orientation are identified through the differential-drive technique. In order to speed up the control a linear version of the MPC (L-MPC) is used; the model of the non-linear robot is therefore linearized and subsequently discretized, being the MPC defined at discrete times. In order to improve control, two optimizations are implemented. The first one consists in a new linearization on the calculated future states to every step of the algorithm; the second is based on the search for the nearest point between the real position and the reference from which to restart the control. The two wheels of the robot are driven by the Pulse With Modulation (PWM) technique. From the angular velocities detected by the MPC algorithm (defined as optimal) it is necessary to obtain the real inputs in PWM. In a first job the PWM inputs are obtained through a static correspondence between inputs and angular velocities. The results obtained were not entirely satisfactory. Subsequently, in a second work, we opted for a dynamic identification of inputs by means of a dynamic model ARX (AutoRegressive eXogenous). However, the identification increases the time to perform a step of the algorithm so it could not proceed to a real-time implementation of the control. In this work, in addition to a new identification of the ARX model, in order to reduce execution time, a new formulation of the MPC will be implemented. Several simulations will be carried out in the Matlab environment to test the correctness of the control. Once the MPC-ARX model is validated, control is applied to a real WMR robot. The development environment is briefly analyzed with the various components involved. The MPC control is entirely performed on Raspberry Pi 3 and then translated into C++ language. In order to realize the implemented technique in real-time mode, particular attention is paid to the execution times of each step of the algorithm, so that they do not exceed the order of milliseconds. Finally, the results of the real-time MPC control applied to the real robot are shown and analyzed.È consentito all'utente scaricare e condividere i documenti disponibili a testo pieno in UNITESI UNIPV nel rispetto della licenza Creative Commons del tipo CC BY NC ND.
Per maggiori informazioni e per verifiche sull'eventuale disponibilità del file scrivere a: unitesi@unipv.it.
https://hdl.handle.net/20.500.14239/13023