ERA SystemID and Compare() function

1 visualización (últimos 30 días)
Marcus
Marcus el 7 de Ag. de 2024
Comentada: Tianyu el 7 de Ag. de 2024
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.

Respuestas (1)

Tianyu
Tianyu el 7 de Ag. de 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 comentarios
Marcus
Marcus el 7 de Ag. de 2024
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 el 7 de Ag. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Linear Model Identification en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by