Return to search

Hardware-in-The-Loop Simulation of a High Speed Servo System / Realtids simulering av hög hastighets servo system

In production industries there is a constant demand for shorter time to market and lower development costs. Using models and simulations has been shown to decrease development time and increase product quality. One reason for this is that these methods allow development and testing of control systems before actual prototypes are available. The purpose of this thesis is to implement a Hardware-in-the-loop simulation of the MY500 solder jet printer, which is produced by Micronic Mydata AB. The MY500 has high accuracy and speed requirements, resulting in a short control loop, which puts hard constraints on the model calculation time. The simulation is implemented on a dSPACEMicroAutoBox, using the MATLAB toolboxes Simulink and SimMechanics. It communicates with the control system via SPI and implements an existing SimMechanics model and a newly developed Simulink model. The Simulink model developed in this thesis was found to be a sufficiently realistic simplification of the SimMechanics model. Furthermore, the findings show that the Sim-Mechanics model cannot be run in closed loop on the chosen hardware due to its extensive complexity. The thesis also shows that when using the internal clock, even the shortest model step time allowed by the hardware is not sufficient to perform a stable HIL simulation. Lastly, the SPI implementation tested in this thesis introduced computational delays into the control loop of the MY500, which led to the system only being able to calculate one axis. This thesis concludes that even though the current implementation has some limitations, there is reason to continue the work and making a good simulator of the MY500. Two main avenues of investigation are; firstly, implementing an external interrupt for the HIL simulation, which should allow a larger time step and eliminate jitter in the model output. Secondly, moving the SPI communication code out of the control loop and instead implementing it directly on the FPGA, which should minimize the computational delay added by SPI and thereby allows control of more than one axis. / I produktionsbranscher finns det en ständig efterfrågan på kortare tid till marknad och lägre utvecklingskostnader. Modeller och simuleringar har visat sig vara ett sätt att minska utvecklingstiden och öka produktkvalitén. En anledning till detta är att dessa metoder tillåter utveckling och testning av styrsystem innan de faktiska fysiska prototyperna är tillgängliga.Syftet med detta examensarbete är att genomföra en realtids simulering av lödpastaskrivaren MY500 som tillverkas av Micronic Mydata AB. MY500 har hög krav på noggrannhet och hastighet, vilket resulterar i en kort samplingstid som i sin tur sätter hårda restriktioner på modellens beräkningstid. Simuleringen genomförs på en dSPACE MicroAutoBox tillsammans med simuleringsverktyg i MATLAB. närmare bestämt Simulink och SimMechanics. Simulatorn kommunicerar med styrsystemet via SPI och implementerar en befintlig SimMechanics modell och en nyutvecklad Simulink modell. Simulink modellen, som utvecklats i detta examensarbete, visade sig vara en tillräckligt realistisk förenkling av SimMechanics modellen. Vidare visar resultaten att SimMechanicsmodellen inte kan köras på den valda hårdvaran p.g.a. dess komplexitet. Studien visar också att, när den interna klockan används, även med det kortaste tidssteget som hårdvaran klarar av, kommer inte HIL simuleringen att vara stabil. Slutligen, SPI-kommunikationen som testas introducerade fördröjningar i MY500 reglerloopen, vilket ledde till att systemet enbart kunde beräkna en axel. Slutsatsen som dras är att även om den nuvarande tillämpningen har nackdelar, finns det ändå skäl för att fortsätta arbetet och att göra en bra simulator. De två mest relevanta utvecklingar är: för det första, implementeringen av en extern interrupt borde tillåta ett större tidssteg och även eliminera jitter i modellens output. Sedan, med att flytta SPIkommunikationskoden ur reglerloopen och istället implementera den direkt på en FPGA borde beräkningsfördröjningar, komna från SPI, minimeras och därmed kontroll av mer än en axel möjliggörs.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:kth-183133
Date January 2013
CreatorsÁgústsson, Eiður
PublisherKTH, Maskinkonstruktion (Inst.)
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess
RelationTRITA-MMK, 1400-1179 ; 2013:77 MDA 461

Page generated in 0.0016 seconds