필터 지우기
필터 지우기

Test Manager external input file (Excel) defines input and expected output, but the test result Boolean type comes is off by a step.

조회 수: 1 (최근 30일)
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.

답변 (1개)

Suman
Suman 2024년 6월 17일
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!

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by