How can i test interface signals between subsystems?

I will explain with simple example:
There is a interface signal between Subsystem1 and Subsystem2. Both subsystems are Model reference subsystems.
Now, I want to test this interface signal in such a way that values of this signal at the both the the subsystems are same.
I can check values of singnal by putting scopes/sinks but i want some kind of automation approach to test these signals.
Also i want to test if the complete range of signal is coveraed and if is there any range voilation of signals?
Any ideas to do this?

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2019년 3월 14일

0 개 추천

If the signal goes directly from Subsystem1 to Subsystem2, then by definition their values are the same. Why would you still want to verify, even though the two subsystems are model reference.
To check the range, you can use the "check static range" block in Simulink->Model Verificaiton. Or, resolve the signal to a Simulink.Signal object, specify the Min and Max value, set the "Simulation range checking" to be warning or error in Configuration Parameters->Diagnostics->Data Validity->Signals

댓글 수: 7

Sai
Sai 2019년 3월 15일
Thank you for your reply.
Yes if signal goes directly from Subsystem1 to Subsystem2, then by definition their values are the same but there are some cases signals are not going directly. There are blocks like merge/delay/conversion/some operations etc.. exist between the connections.
So, i want to compare/test value of the signals at the ouput port of the subsystem1 and at the input port of Subsystem2.
Then you need to log these two places and do post-processing, or add a RelationOperator block to compare them in the model.
Sai
Sai 2019년 3월 25일
Thank you for your reply.
Actually i want to test value of the signals at the ouput port of the subsystem1 and at the input port of Subsystem2 in both MIL and SIL by executing some test cases. Basically this is a check to ensure both values are same during MIL and SIL.
Is there any ideas to do this and i want to automate this process using script as well.
If you logged the data for two simulations (one for MIL and one for SIL), you can always do some post-processing to compare them.
Or you can use the Simulink Test Toolbox.
Sai
Sai 2019년 3월 27일
Thank you. I am able to save MIL simulation data by logging the signals but how to save SIL simulation data by logging?
Deb
Deb 2024년 9월 24일
For the link in Fangjun's comment on 25 March 2019, see this documention instead:

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Test Execution에 대해 자세히 알아보기

제품

릴리스

R2016b

태그

질문:

Sai
2019년 3월 14일

댓글:

Deb
2024년 9월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by