Digitaalisen anturipiirin emulointi FPGA:lla
Ikonen, Joonas (2025)
Ikonen, Joonas
2025
Tietotekniikan DI-ohjelma - Master's Programme in Information Technology
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2025-02-18
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202502062061
https://urn.fi/URN:NBN:fi:tuni-202502062061
Tiivistelmä
Suuri osa taajuusmuuttajan kehityksen testauksesta tehdään kustannusten, ajan ja tilan vuoksi emulointijärjestelmällä. Danfossin Drive Emulator -järjestelmä emuloi sähkömoottorin, sähköverkon ja taajuusmuuttajaan liitettyjen oheislaitteiden toimintaa. Emuloidulla ympäristöllä pyritään mallintamaan tarkasti oikeaa käyttöympäristöä reaaliajassa. Testijärjestelmän tavoite on löytää virheet mahdollisimman aikaisessa vaiheessa emuloimalla ennen kuin taajuusmuuttaja testataan oikeassa käyttöympäristössä. Testien säätämä emuloitu ympäristö varmistaa taajuusmuuttajan osien yhteistoiminnan erilaisissa tilanteissa. Eräässä taajuusmuuttajassa käytetty oheislaite on digitaalinen lämpötila- ja ilmankosteusanturi HDC1080, joka täytyy emuloida testijärjestelmässä.
Tämän työn tavoite on kehittää kattava ja luotettava anturipiirin emulointi taajuusmuuttajan jatkuvan integroinnin testijärjestelmään. Toteutusta varten anturipiirin toiminta selvitettiin kattavasti ja emuloitavat ominaisuudet määriteltiin. Emulaatio toteutettiin FPGA:lla. Toteutetun anturiemulaation toiminta testattiin simulaatiolla ja integraatiolla testijärjestelmään. Simulointiin käytettiin emulaatiolle asetettujen määritysten perusteella kehitettyä UVVM-testipenkkiä. Emulaation tarkkuus ja laajuus varmistettiin vertaamalla sen toimintaa emuloitavaan anturipiiriin. Löydettyjen erojen vaikutus testijärjestelmään arvioitiin, joiden perustella ehdotettiin mahdolliset korjaukset. Toteutetun anturiemulaation perusteella arvioitiin vastaavien oheislaitteiden emuloinnin toteutusmahdollisuuksia ja kannattavuutta.
Lopullinen anturiemulaatio täyttää sille asetetut tavoitteet. Lähes kaikki emuloitavan piirin toiminnallisuuksista on emuloitu ja niiden toiminta on varmistettu simuloimalla. Integroitu anturiemulaatio välittää testijärjestelmän asettamat mittausarvot taajuusmuuttajalle ilman virheitä. Puutuvat ominaisuudet todettiin tarpeettomiksi, koska niillä ei ole vaikutusta anturipiirin käyttöön taajuusmuuttajassa. Oskilloskooppimittauksilla löydettiin eroja HDC1080-piirin ja anturiemulaation välillä mittaustiedot välittävän I2C-väylän ajoituksista. Löydetyt erot arvioitiin. Ne eivät vaikuta testijärjestelmän toimintaan merkittävästi. Emulointi FPGA:lla todettiin olevan erittäin hyvin soveltuva tähän käyttötarkoitukseen. Työ antaa pohjan vastaavien oheislaitteiden emulaation toteutukseen, tuntemattomien ominaisuuksien selvittämiseen, määrittelyyn ja testaamiseen. Toteutettu anturiemulaatio tulee käyttöön Danfossin taajuusmuuttajaohjelmiston jatkuvan integraation järjestelmään osana testilaitteistoa. A large part of testing in development of a frequency converter is done with an emulator system due to its cost, time, and space benefits. The Danfoss Drive Emulator system emulates an electric motor, power grid and peripherals connected to the frequency converter. The objective of an emulated environment is to create an accurate real-time representation of the actual use environment. Software developers use the test system to find errors in the earliest phase of development possible. The emulated environment controlled by the tests ensures integration of various parts of the frequency converter under test in different conditions. A certain frequency converter measures humidity and temperature with a HDC1080 digital sensor peripheral, which will be emulated in the test system.
The goal of this thesis is to develop a comprehensive and reliable sensor emulation for a frequency converters continuous integration test system. Study of functionality of the digital sensor clarified and defined the requirements for a comprehensive emulation. The emulation was implemented on an FPGA. Testing of the implemented design was done with simulation and integration into the test system. A UVVM-testbench for simulation was developed based on the defined requirements. The accuracy and scope of emulation was verified by comparing the functionality to the digital sensor. Effects to the test system, caused by any differences between the emulation design and the digital sensor, were found. Recommendations on how to mitigate the effects were given. Based on the implementation of the emulation, viability and options of implementing similar peripheral simulations were assessed.
The implemented design fulfills the set requirements. Nearly all the functionality of the digital sensor was implemented and verified. Verification through simulation was complemented with testing the integration into the test system, where the measurement values set through the test system were visible to the frequency converter. Any features of the digital sensor not implemented in the emulation were considered unnecessary, because they do not have any effect on the use of the digital sensor in a frequency converter. Differences in the timings of the I2C-bus, that is used by the sensor, were measured with an oscilloscope. Found differences were assessed to not affect any functionality of the test system. Emulation on an FPGA was found to be very suitable for this use case. This thesis provides a basis for implementing emulation of other peripherals, studying unknown functionality of integrated circuits, specifying the functionality of the emulation and testing its accuracy. The implemented sensor emulation will be used at Danfoss in a continuous integration system for testing frequency converter software.
Tämän työn tavoite on kehittää kattava ja luotettava anturipiirin emulointi taajuusmuuttajan jatkuvan integroinnin testijärjestelmään. Toteutusta varten anturipiirin toiminta selvitettiin kattavasti ja emuloitavat ominaisuudet määriteltiin. Emulaatio toteutettiin FPGA:lla. Toteutetun anturiemulaation toiminta testattiin simulaatiolla ja integraatiolla testijärjestelmään. Simulointiin käytettiin emulaatiolle asetettujen määritysten perusteella kehitettyä UVVM-testipenkkiä. Emulaation tarkkuus ja laajuus varmistettiin vertaamalla sen toimintaa emuloitavaan anturipiiriin. Löydettyjen erojen vaikutus testijärjestelmään arvioitiin, joiden perustella ehdotettiin mahdolliset korjaukset. Toteutetun anturiemulaation perusteella arvioitiin vastaavien oheislaitteiden emuloinnin toteutusmahdollisuuksia ja kannattavuutta.
Lopullinen anturiemulaatio täyttää sille asetetut tavoitteet. Lähes kaikki emuloitavan piirin toiminnallisuuksista on emuloitu ja niiden toiminta on varmistettu simuloimalla. Integroitu anturiemulaatio välittää testijärjestelmän asettamat mittausarvot taajuusmuuttajalle ilman virheitä. Puutuvat ominaisuudet todettiin tarpeettomiksi, koska niillä ei ole vaikutusta anturipiirin käyttöön taajuusmuuttajassa. Oskilloskooppimittauksilla löydettiin eroja HDC1080-piirin ja anturiemulaation välillä mittaustiedot välittävän I2C-väylän ajoituksista. Löydetyt erot arvioitiin. Ne eivät vaikuta testijärjestelmän toimintaan merkittävästi. Emulointi FPGA:lla todettiin olevan erittäin hyvin soveltuva tähän käyttötarkoitukseen. Työ antaa pohjan vastaavien oheislaitteiden emulaation toteutukseen, tuntemattomien ominaisuuksien selvittämiseen, määrittelyyn ja testaamiseen. Toteutettu anturiemulaatio tulee käyttöön Danfossin taajuusmuuttajaohjelmiston jatkuvan integraation järjestelmään osana testilaitteistoa.
The goal of this thesis is to develop a comprehensive and reliable sensor emulation for a frequency converters continuous integration test system. Study of functionality of the digital sensor clarified and defined the requirements for a comprehensive emulation. The emulation was implemented on an FPGA. Testing of the implemented design was done with simulation and integration into the test system. A UVVM-testbench for simulation was developed based on the defined requirements. The accuracy and scope of emulation was verified by comparing the functionality to the digital sensor. Effects to the test system, caused by any differences between the emulation design and the digital sensor, were found. Recommendations on how to mitigate the effects were given. Based on the implementation of the emulation, viability and options of implementing similar peripheral simulations were assessed.
The implemented design fulfills the set requirements. Nearly all the functionality of the digital sensor was implemented and verified. Verification through simulation was complemented with testing the integration into the test system, where the measurement values set through the test system were visible to the frequency converter. Any features of the digital sensor not implemented in the emulation were considered unnecessary, because they do not have any effect on the use of the digital sensor in a frequency converter. Differences in the timings of the I2C-bus, that is used by the sensor, were measured with an oscilloscope. Found differences were assessed to not affect any functionality of the test system. Emulation on an FPGA was found to be very suitable for this use case. This thesis provides a basis for implementing emulation of other peripherals, studying unknown functionality of integrated circuits, specifying the functionality of the emulation and testing its accuracy. The implemented sensor emulation will be used at Danfoss in a continuous integration system for testing frequency converter software.