Clear Filters
Clear Filters

Battery State-of-Charge Estimation Study: Addressing Errors Encountered After Saving

3 views (last 30 days)
Hello, I am working on a study called Battery State-of-Charge Estimation. When I save it to my computer and want to work on it again later, I receive an error saying: 'Error evaluating 'PreLoadFcn' callback of block_diagram 'BatterySOCEstimation'. Callback string is 'BatterySOCEstimationData;' Caused by: Unrecognized function or variable 'BatterySOCEstimationData'.' How can I work on it again after saving without encountering this error?

Answers (2)

Xiangchun
Xiangchun on 30 Nov 2023
Hi Eren,
The PreLoadFcn runs BatterySOCEstimationData.m script to parameterize certain variables that are required to run the plant model and the "SOC Estimator (Kalman Filter)" block. To solve the error message, please make sure that "BatterySOCEstimationData.m" file provided by the example is included in the active MATLAB search path.
Best wishes,
Xiangchun

Vidip
Vidip on 1 Dec 2023
I understand that you are facing the error "Unrecognized function or variable 'BatterySOCEstimationData'" which indicates that the MATLAB Simulink model is unable to find the function or variable named "BatterySOCEstimationData" when attempting to execute the PreLoadFcn callback. This error typically occurs when the model is saved to a different location or when the workspace is cleared, causing the model to lose reference to the function or variable.

Categories

Find more on Battery Pack Modeling in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!