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

1 visualización (últimos 30 días)
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?

Respuestas (2)

Xiangchun
Xiangchun el 30 de Nov. de 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 el 1 de Dic. de 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.

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by