Test Manager external input file (Excel) defines input and expected output, but the test result Boolean type comes is off by a step.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Using Test Manager, I am defining external test script using Excel file. The test file contains input signal and expected output fault flag (Boolean). The time for both input and output is defined with step size of 0.5 sec. The model is also set to run with a fixed step size of 0.5 sec. However the result shows the model Boolean flag is set and clear 0.5 sec earlier than expected result. I wonder if there is a time synchronization issue I have to worry about when setting input and expected output data in Excel file.
0 Kommentare
Antworten (1)
Suman
am 17 Jun. 2024
Hi Solomon,
This is not a synchronization issue but most likely a round-off error that can happen when passing discrete time inputs to the model. You can refer to this article to read more about this issue: https://blogs.mathworks.com/simulink/2012/02/09/using-discrete-data-as-an-input-to-your-simulink-model/
Since you are passing inputs using an excel file, I'm assuming you are using a "From SpreadSheet Block". In such case, one of the workarounds could be to ignore time inputs from the excel file, and rather let Simulink use value from one row from the data column at each time step. Please refer to this article to know the steps for the above workaround: https://blogs.mathworks.com/simulink/2019/03/15/importing-data-from-excel/
I hope this was helpful!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Inputs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!