Hybrid times, subsystems and model referencing

조회 수: 2 (최근 30일)
Ubaldo Tiberi
Ubaldo Tiberi 2012년 4월 3일
Hi all,
I created a Simulink model where a first-order process is controlled by a PI controller. The process is continuous-time, while the PI controller is discrete-time with a certain period (=0.05). By including both the process and the PI controller in two distinct subsystems, I do not get any warning or error, even when it is used the ODE45 Solver.
I tried to do the same by using model referencing, namely the process and the PI controller are saved in different models. However, in this case, I get the following warnings:
Warning: Inconsistent sample times. Sample time ([0, 1]) of signal driving input port 1 of 'ModRefDT/Model1' differs from the expected sample time ([0.05, 0]) at this input port.
Warning: Inconsistent sample times. Sample time ([0, 1]) of signal driving input port 2 of 'ModRefDT/Model1' differs from the expected sample time ([0.05, 0]) at this input port.
Warning: Inconsistent sample times. Sample time ([0.05, 0]) of signal driving input port 1 of 'ModRefDT/Model' differs from the expected sample time ([0, 0]) at this input port.
Such warnings can be avoided if using a fixed-step solver. Now I wonder why ODE45 works fine if I use subsystems, and it doesn't ( I get warnings) when using model referencing. Could you help me, please? Thanks
Ubaldo
--

채택된 답변

Nirmal Gunaseelan
Nirmal Gunaseelan 2012년 4월 4일
The model reference instances have to be compatible with the solver type specified in the top model. Take a look at these requirements that might help configuring your top model and references.
  댓글 수: 1
Ubaldo Tiberi
Ubaldo Tiberi 2012년 4월 4일
That's right. The problem seems also to be solved by using Rate Transition blocks at the input and at the output of the PI controller block.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Create Large-Scale Model Components에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by