ERA SystemID and Compare() function
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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 个评论
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 Center 和 File Exchange 中查找有关 Linear Model Identification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!