Initial condition first order system identification

14 views (last 30 days)
Dear Matlab Community,
I am trying to estimate a first order transfer function from a known step response.
For that, I have a dataset (iddata object) containing the measurement of the input and the output of the sytem.
I have succesfully used the tfest function to estimate the first order transfer function, and here is the following simulation result ( red is the simulation, blue is the output).
But as you can see the response of the transfer function starts at 0 instead of the initial value of the output. How can I set the initial condition ?
Here is my code :
opt = tfestOptions('InitialCondition','Estimate');
estimated_tf = tfest(data,1,0,opt);
figure
plot([0:1:(numel(data.y)-1)]*1/23.6,data.y)
hold on
lsim(estimated_tf,data.u,[0:1:(numel(data.u)-1)]*1/23.6,'--r')
grid
Thank you for your time !

Answers (1)

Martynas Gabalis
Martynas Gabalis on 11 Feb 2021
Its not initial condition, your data has offset (model output = first order system output + 13.8E+4).
I guess the quickest way would be to subtract average of the first 35 seconds from all the data and then estimate the model.
Also it looks like there is overshoot in the data, maybe 2nd order model will be more appropriate.
Also there seems to be dead-time - system starts responding only at 35 seconds mark - you will have to use first order plus dead time system. If you dont want to use dead-time - eliminate data corresponding to the first 35 seconds.

Products

Community Treasure Hunt

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

Start Hunting!