When creating Simulation models, it is often required to validate the performance of the model in transient. This requires imposing boundary conditions to the model and comparing the results with the available test data.
Setting up a model to perform these tests can be time consuming and introduce errors which can have a detrimental effect on the evaluation of the model suitability but can also cause problems with both traceability and reusability.
Luckily LMS Imagine.Lab Amesim has a high level of scripting capability to help support some of the more tedious tasks.
LMS Amesim has scripting interfaces with Python, MATLAB, Scilab and VBA. More detail on these interfaces can be found in the help documentation. For this piece I would like to use the Amesim Python API to demonstrate how time based test data can be easily imported from Excel and integrated into an LMS Amesim model.
We will use a simple model for the example. The model itself is unimportant, it's just to show use-case.
We have an Excel sheet containing the required input step pattern and output displacement and velocity profile to be compared to
The basic process is as follows
The resulting model will look like this. The required variables can be accessed on the BUS for comparison with the Simulation model results
Good luck, I hope it is useful!