ERA SystemID and Compare() function
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
Tianyu
on 7 Aug 2024
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 Comments
Tianyu
on 7 Aug 2024
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.
See Also
Categories
Find more on Linear Model Identification in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!