Digital twin for Battery

3 Ansichten (letzte 30 Tage)
Nalla Muthu
Nalla Muthu am 9 Mär. 2023
Beantwortet: Amith am 20 Aug. 2024
We are doing digital twin for Lithium ion battery.I have done simulation for constant current source in simulink. But I need current source value can be given from physical model by arduino. I have to compare both simulation and hardware results. Let me know it is possible?

Antworten (1)

Amith
Amith am 20 Aug. 2024
Hi Nalla,
To compare simulation data from Simulink with hardware results from Arduino, you can try these steps:
1. Run the simulation in Simulink and log the necessary data.
2. Use Arduino to collect data of the same type as your Simulink model.
3. Import the Arduino data into MATLAB. If the data is logged in a CSV file, you can import it into MATLAB from the CSV file or directly from the serial port.
For guidance on reading data from CSV, you can use "readtable" function. To learn more about this function refer to this documentation: https://www.mathworks.com/help/matlab/ref/readtable.html
For guidance on reading streaming data from Arduino using serial port communication, refer to this documentation: https://www.mathworks.com/help/instrument/read-streaming-data-from-arduino.html
4. Compare the data in MATLAB: You can use the Simulink Data Inspector to compare the simulation data with the data imported from Arduino. For more information on the Simulink Data Inspector, refer to this documentation: https://www.mathworks.com/help/simulink/slref/simulationdatainspector.html
Hope this helps!

Kategorien

Mehr zu Arduino Hardware finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by