ERA SystemID and Compare() function

6 次查看(过去 30 天)
Marcus
Marcus 2024-8-7
评论: Tianyu 2024-8-7
I am attempting to use era() to identify a state space realization of my system and validate it using the compare() function. The system I am trying to identify is a steel cube with a heater attached to one side. The system starts at a equilibrium of 0C and then the heater applies an impulsive flux to distrube the system.
When I use the compare() function to validate my system I see a good fit, but weird initial conditons. I am exspecting the inital conditons to be equal to 0 since all the data starts and is measured from steady state = 0C, however the compare() function estimates non-zeros initial conditions. Why is this happening?
Attached is my code and estiamtion / validation data sets.
Thanks in advance.

回答(1 个)

Tianyu
Tianyu 2024-8-7
Hi Marcus,
Compare() by default uses the estimated initial condition to minimize the fitting error.
To use zero initial condition. Try setting up the compareOptions.
opt = compareOptions(InitialCondition='z');
compare(data,sys,opt)
In your case, since you know the initial condition is zero, then simply use it. No need to rely on the estimated value.
More details here
https://www.mathworks.com/help/ident/ref/compareoptions.html#btcx0d2-1-InitialCondition
  2 个评论
Marcus
Marcus 2024-8-7
When I set the inital conditions to zero the fit to the data become extreamly poor.
My only guess to why this is happening is due to the system being a black box and the states losing any phyical meaning becuase of its black box nature. Since the system starts from an equilibrium value of 0C I exspect the inital states to be 0. Could the value of the inital state change from zero if Im estimating a state space model of order 8 for a siso system since the estimated system states don't have phyical meaning?
Tianyu
Tianyu 2024-8-7
I checked your data. The initial value of the your data is not the same as the initial value of the state. It has to be estimated unless you are able to measure the state directly, i.e. y = x, then it will be physically meaningful.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Linear Model Identification 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by