简体   繁体   English

在 simulink idmodel 块中为已识别进程设置初始值 model

[英]Set initial values in simulink idmodel block for an identified process model

I used system identification tool to obtain a state space (order 2) and a process model (2 inputs, 1 output, 2nd order transfer function + delay each) of some data.我使用系统识别工具获得了一些数据的一个state空间(顺序2)和一个过程model(2个输入,1个output,二阶传输function +延迟每个)。 The models show very nice fit to experimental data in the system identification model output window [Figure 1] but when I use the idmodel block in simulink to simulate the same data it does not look at all like it was on the tool.这些模型在系统识别 model output window [图 1] 中显示非常适合实验数据,但是当我在 simulink 中使用 idmodel 块来模拟相同的数据时,它看起来根本不像在工具上。

I have used exactly the same block diagram with both fitted models.我对两种拟合模型都使用了完全相同的框图。 With the state-space fitted model the results are coherent with the system identification tool [Figures 2-3], meanwhile the process model it's totally different [Figures 4-5].状态空间拟合 model 结果与系统识别工具一致 [图 2-3],同时过程 model 完全不同 [图 4-5]。

The state-space model only works well with certain experimental conditions, while the process model gives a good fit for all my experiments, that's the reason why I try to use it.状态空间 model 仅适用于某些实验条件,而过程 model 非常适合我的所有实验,这就是我尝试使用它的原因。 The pictures below correspond to only 1 experiment.下面的图片仅对应于 1 个实验。

I think the problem resides in that I can't set initial conditions to the idmodel block when using a process model instead of a state space model. I can get the initial conditions for the process model using findstates(model, data) , but I don't know how to apply them.我认为问题在于,当使用进程 model 而不是 state 空间 model 时,我无法为 idmodel 块设置初始条件。我可以使用findstates(model, data)获取进程 model 的初始条件,但我不知道如何应用它们。 Any hints on how to set initial conditions for identified transfer function/process models in simulink?关于如何在 simulink 中为已识别的传递函数/过程模型设置初始条件的任何提示? Maybe a possible workaround without simulink?也许没有 simulink 的可能解决方法? I'm open to any solution or ideas.我对任何解决方案或想法持开放态度。

Thank you.谢谢你。

Figure 1. System identification tool output for both state-space and process model图 1. 状态空间和过程的系统识别工具 output model 状态空间和过程模型的系统识别工具输出

Figure 2. Simulink output of state-space model图 2. 状态空间 model 的 Simulink output 状态空间模型的 Simulink 输出

Figure 3. idmodel block with state-space model: initial conditions parameter available图 3. 状态空间为 model 的 idmodel 模块:初始条件参数可用带有状态空间模型的 idmodel 块:可用的初始条件参数

Figure 4. idmodel block with process model: initial conditions parameter NOT available图 4. 进程为 model 的 idmodel 块:初始条件参数不可用带有过程模型的 idmodel 块:初始条件参数不可用

Figure 5. Simulink output of state-space model图 5. 状态空间 model 的 Simulink output 状态空间模型的 Simulink 输出

After reaching matlab central and pointing me in the right direction I came up with a solution .在到达 matlab central 并为我指明正确的方向后,我想出了一个解决方案 Thanks to Rajiv Singh.感谢拉吉夫·辛格。

I first needed to convert the process model from idproc to idss using idss() instead of ss() -See this article -, then use compare() instead of findstates() to obtain the initial conditions and feed the initial conditions to the idmodel block in simulink.我首先需要使用 idss() 而不是 ss() 将进程 model 从 idproc 转换为 idss - 请参阅本文-,然后使用 compare() 而不是 findstates() 来获取初始条件并将初始条件提供给 idmodel在 simulink 中阻止。 Graphically:图形化:

model=idss(T3s_2d);
[y,fit,x0]=compare(run_data_s{8}, model);
%T3s_2d is the identified process model (idproc) from system identification toolbox
%run_data_s is the iddata object with the experimental runs

在此处输入图像描述 在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM