All discrete sample times in your model must be an integer multiple of the local solver sample time.

조회 수: 14 (최근 30일)
Anyone solve my Error:
All discrete sample times in your model must be an integer multiple of the local solver sample time.
  댓글 수: 1
Mathieu NOE
Mathieu NOE 2020년 10월 22일
Hi
If you do discrete steps simulation , simulink work at the highest sampling rate specified in your model.
You can have slower tasks, but those tasks time stamps must coincide with the time stamps of the higher sampling rate.
That's why all tasks must be running at nteger multiple of the local solver sample time.
example : fast task requires dt = 1e-3 , slower task 1 runs at dt1 = 10*dt, even slower task 2 runs at dt2 = 100*dt, etc...
look at the help for task rate transition between blocks running at different rates

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

답변 (1개)

Nitin Kapgate
Nitin Kapgate 2020년 10월 28일
Simulating a discrete system requires that the simulator take a simulation step at every sample time hit. For a multirate discrete system (a system whose blocks Simulink samples at different rates) the steps must occur at integer multiples of each of the system sample times. Otherwise, the simulator might miss key transitions in the states of the system.
You can resolve the error by setting the sample times of different blocks as integer multiples of solver’s sample time.
Refer the documentation to learn more about sample times in systems.

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by