Running main model with fixed step solver and subsystem with variable step solver

조회 수: 1 (최근 30일)
My aim is to integrate a Simulink protected model which runs on variable step solver with our vehicle plant model which runs on Fixed step solver ode1 with a time step of 1ms. I would like to know if it is possible to do the same. Any ideas would be appreciated.

채택된 답변

Paul
Paul 2024년 4월 28일
R2022a introduced the concept of a "Local Solver" when using referenced models, which might be what you're looking for. This blog post, and the comments, along with the current, relevant doc pages might be of interest.

추가 답변 (1개)

Torsten
Torsten 2024년 4월 28일
이동: Torsten 2024년 4월 28일
Given: Results for both models at time t.
  1. Call the variable step solver for a time period of 1 ms (maybe using the inputs of the fixed step solver at time t).
  2. Call the fixed step solver for a time period of 1 ms (maybe using the inputs of the variable step solver at time t).
  3. Set t = t + 1ms.
  4. Goto 1.
  댓글 수: 1
Paul
Paul 2024년 4월 28일
편집: Paul 2024년 4월 29일
My initial reaction to this answer was "that's not how Simulink works, at least not easily." But, with R2024a Simulink implemented a new feature called Simulation Objects that may make this approach workable, especially if the protected model and the vehicle plant model only interact with each other at well-defined times. I haven't yet tried Simulation Objects. See this blog post and the doc page(s) linked from there for more information.

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

카테고리

Help CenterFile Exchange에서 Configure Simulation Conditions에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by