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

3 vues (au cours des 30 derniers jours)
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 commentaire
julian navas
julian navas le 20 Juil 2020
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.

Connectez-vous pour commenter.

Réponse acceptée

Rajiv Singh
Rajiv Singh le 21 Juil 2020
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 commentaires
Rajiv Singh
Rajiv Singh le 21 Juil 2020
OK, thanks. Call FINDSTATES with Inf horizon, as in
x0 = findstates(sys, data, Inf)
since you are after simulation worthiness.
julian navas
julian navas le 21 Juil 2020
That fixes it. Thank you very much again for your valuable help.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Time Series Analysis dans Help Center et File Exchange

Produits


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by