Digital twin for Battery

3 次查看(过去 30 天)
Nalla Muthu
Nalla Muthu 2023-3-9
回答: Amith 2024-8-20
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?

回答(1 个)

Amith
Amith 2024-8-20
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!

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by