Return to search

Migrering av en State of Charge-algoritm : Migrering och optimering av State of Charge algoritmen för Nickel-metallhydridbatterier

Följande studie är utförd på uppdrag av företaget Nilar som tillverkar Nickel-Metallhydridbatterier (NiMH-batterier) vid sin produktionanläggning i Gävle. Den nuvarande beräkningen av State of Charge (SoC) sker på deras Battery Management Unit (BMU) och är implementerad i Structured Text i exekveringsmiljön CODESYS. Nilar vill flytta SoC-beräkningen från BMU:n så att den kan exekveras på en Interface Control Unit (ICU). Motiveringen till detta är för att distribuera SoC-beräkningen då ett flertal ICU:er finns tillgängliga per Battery Management System (BMS) men även för att i framtiden helt byta ut CODESY. Syftet med denna studie är att migrera implementationen av SoC-algoritmen till programmeringsspråket C så att algoritmen senare kan exekveras på ICU:n. Därefter optimeras algoritmen för att sänka exekveringstiden. Studien utforskar kodstrukturella och funktionella skillnader mellan implementationerna samt metoder för att optimera SoC-algoritmen. Migreringen av algoritmen fullföljdes utan större inverkan på noggrannheten. Algoritmen optimerades genom att skapa en variant av en LU-faktorisering som var specifikt anpassad för det aktuella problemet. Optimeringen av algoritmen resulterade i en minskning på 25% av den totala exekveringstiden för algoritmen. De nya implementationerna tar markant längre tid att exekvera då batteriet befinner sig under laddning jämfört när det befinner sig under urladdning, någonting som inte kan noteras för den gamla implementationen. / The following study was carried out on the behalf of Nilar, which manufactures Nickel–metal hydride batteries at its production site in Gävle. The current State of Charge (SoC) calculation is done on their Battery Manegment Unit (BMU) and is implemented in Structured Text for the CODESYS runtime. Nilar wants to move the SoC calculation from the BMU so that its executed on a Interface Control Unit (ICU). The reasoning behind this is to distribute the SoC computation as several ICUs are available per Battery Management System (BMS) but also to remove the CODESYS dependency in the future. The purpose of this study is to migrate the implementation of the SoC-algorithm to the programming language C so that the algorithm can be executed on an ICU in the future. Furthermore this study aims to optimize the the algorithm to lower the execution time. The study explores differences in code structure and functionallity between the implementations as well as methods to optimize the SoC algorithm. The migration of the algorithm was completed without major impact on the accuracy. The algorithm was optimized by creating a variant of a LU factorization that was specifically suited to LU factorize the given problem. The optimization of the algorithm resulted in a 25% lower total execution time. The new implementations suffers from a longer total execution time when the battery is charging compared to when it’s discharging, something that’s not prevalent for the old implementation.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:hig-42382
Date January 2023
CreatorsJansson, Christoffer, Pettersson, Malte
PublisherHögskolan i Gävle, Avdelningen för datavetenskap och samhällsbyggnad
Source SetsDiVA Archive at Upsalla University
LanguageSwedish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.002 seconds