Well-identified fitted process model does not behave like data on simulink

조회 수: 3 (최근 30일)
Hello, and thanks for taking your time to read my question.
I have a set of experiments that I am trying to identify using the system identification tool, and I succesfully obtained a process model (2nd order transfer function, 2 inputs 1 output + delay each) and a state-space model (order 2). The fits in the identification tool (model output window) are almost perfect but when I try to simulate the same data with the process model (idmodel) block in simulink the output is completely messed up. I used the exact same simulink model with the state-space fitted model and the output is congruent with the toolbox model output window. I think the reason is because I can't set initial values for transfer function identified models like I can do for state-space models .
Is there a way to set initial values for transfer function models on simulink? I already tried converting the process model to a state space model with ss() and use a state space block but it didn't work, I assume because in the model options I selected a first order disturbance term. Also I tried fitting the model with zero initial conditions but the results were the same (bad). I posted this question here as well.
My objective is to simulate the identified process model just as it appears in the system identification tool (model output) window, maybe the current approach is not the correct one so it would be absolute beneficial to me if anyone knows how to do so and is kind enough to set me on the right path.
Figure 1. Model output window. Yellow is SS model, blue is process model
Figure 2. Process model parameter window. Fit options are as displayed, everything else is on default values.
Figure 3. Simulation of process model with simulink. It can be observed the fit (blue) does not correspond to data (yellow)
Figure 4. Simulation of state space model with simulink.It is coherent with the model output window of figure 1
Figure 5. Simulink idmodel block parameters. Left: state space model, it allows to enter initial conditions. Right: process model. Can't set initial conditions.
  댓글 수: 1
julian navas
julian navas 2020년 7월 20일
Update
I can compare the models and the data using [y,fit, x0]=compare(sys, data) but still can't figure out how to do this in simulink. Please any help is greatly welcome.

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

채택된 답변

Rajiv Singh
Rajiv Singh 2020년 7월 21일
You are almost there. Convert the model into state-space form and use it for simulation. For initial conditions, you will need to run FINDSTATES command on the dataset whose output you are trying to match. See:
  댓글 수: 7
Rajiv Singh
Rajiv Singh 2020년 7월 21일
OK, thanks. Call FINDSTATES with Inf horizon, as in
x0 = findstates(sys, data, Inf)
since you are after simulation worthiness.
julian navas
julian navas 2020년 7월 21일
That fixes it. Thank you very much again for your valuable help.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Time Series Analysis에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by