Running main model with fixed step solver and subsystem with variable step solver
    5 次查看(过去 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.
0 个评论
采纳的回答
  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.
0 个评论
更多回答(1 个)
  Torsten
      
      
 2024-4-28
        
      移动:Torsten
      
      
 2024-4-28
  
                Given: Results for both models at time t.
- Call the variable step solver for a time period of 1 ms (maybe using the inputs of the fixed step solver at time t).
- Call the fixed step solver for a time period of 1 ms (maybe using the inputs of the variable step solver at time t).
- Set t = t + 1ms.
- Goto 1.
1 个评论
  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 Center 和 File Exchange 中查找有关 General Applications 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


