Return to search

Hardware-in-the-loop Simulation of a Pumping Station : Design and implementation of a Python-based simulation program / Hardware-in-the-loop-simulering av en Pumpstation : Design och implementering av ett Python-baserat simuleringsprogram

The use of simulation enables testing of a system without the need for a complete physical system, while also having the advantages of lower cost and fewer practical limits compared to field tests. Hardware may be integrated into the simulation loop, such a simulation is defined as a Hardware-in-the-loop (HIL) simulation. The pump is the most energy-consuming part of a pumping station, thus improvement and assessment of the pump controller are two of the main considerations in the development of pumping stations. Nevertheless, the developers do not always have access to a real pumping station to run tests on. A HIL simulator that imitates parts of a pumping station while including a real controller in the simulation is therefore desirable for the development of pump controllers.In this thesis, a mathematical model of a pumping station was built based on the physical features of different components, and a HIL simulation was implemented with the programming language Python, in which a real controller was integrated into the simulation loop. Through a three-hour-long simulation run, the functionality of the simulator has been analyzed, and the simulation accuracy was evaluated by comparing simulated results to real data. The results showed that among the 10 800 simulated data points of the water level, there were \(43\) (\(\approx 0.39\%\)) that had a relative change larger than \(30\%\) or less than \(-30\%\) with respect to the field data. This thesis contributes to the field of Python-based simulation of a pumping station, and serves as a foundation for future improvement for the host company. / Användningen av simulering möjliggör testning av ett system utan ett komplett fysiskt system, till en lägre kostnad och färre praktiska begränsningar jämfört med fälttester. Hårdvara kan integreras i simuleringsloopen, en sådan simulering kallas för en hardware-in-the-loop (HIL) simulering. Pumpen är den mest energikrävande delen i en pumpstation, därför är förbättring och utvärdering av pumpstyrningen två av de viktigaste faktorerna vid utvecklingen av pumpstationer. Dock har utvecklarna inte alltid tillgång till en fysisk pumpstation att köra tester på. En HIL-simulator som imiterar delar av en pumpstation, till vilken en pumpstyrning kan kopplas, är därför önskvärd för utvecklingen av pumpstyrningar.I detta examensarbete konstruerades en matematisk modell av en pumpstation utifrån de fysiska egenskaperna hos olika komponenter. En HIL-simulator var sedan implementerad i programmeringsspråket Python, där en riktig pumpstyrning integrerades i simuleringsloopen. Genom en tre timmar lång körning har simulatorns funktionalitet analyserat, och simuleringsnoggrannheten utvärderades genom att jämföra simulerade resultat med verkliga data. Resultaten visade att \(43\) av de 10 800 (\(\approx 0,39\%\)) simulerade datapunkterna för vattennivån hade en relativ förändring större än \(30\%\) eller mindre än \(-30\%\) med avseende på fältdata. Detta arbete bidrar till området inom Python-baserad simulering av en pumpstation och agerar som en grund för framtida utvecklingar hos värdföretaget.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:kth-315066
Date January 2022
CreatorsLiang, Katrina
PublisherKTH, Skolan för elektroteknik och datavetenskap (EECS), Stockholm : KTH Royal Institute of Technology
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-EECS-EX ; 2021:274

Page generated in 0.0124 seconds