# Constraints on initial condition in system identification

2 次查看（过去 30 天）
Sophie Wang 2022-8-21

I'm trying to estimate a dyamic model with nonzero initial condition. The data is one dimensional physiological signal collected from a group of subjects. After experimenting with different models in the system identification toolbox, tfest (distrete time using time domain data) seems to have the best fit.
The assumptions of our proposed dynamic model requires the estimated free response (obtained from the initial condition) to be above zero and below the measurement. I'm wondering if it is possible to add constraints to the estimation of initial condition?

### 回答（1 个）

Nithin Kumar 2023-9-8
Hi Sophie,
I understand that you want to add constraints on initial conditions to estimate a dynamic model.
To add constraints on the initial condition, use the “tfest” function to create an options object and set the desired constraints. Specifically, you can use the “InitialState” property of the options object to specify the constraints on the initial condition as shown in the following code snippet -
% Create options object and specify constraints
opt = tfestOptions;
opt.InitialCondition = 'Estimate'; % Specify to estimate the initial condition
opt.SearchOptions.InitialCondition = 'Nonzero'; % Specify nonzero initial condition
opt.SearchOptions.InitialConditionLowerBound = 0; % Set lower bound constraint
opt.SearchOptions.InitialConditionUpperBound = max(data); % Set upper bound constraint
% Estimate the model
sys = tfest(data, n, m, opt); % Provide your data, model order (n, m), and options
% Display the estimated model
disp(sys);
For more information regarding "tfest" function, kindly refer to the following documentation:
I hope this provides you with the required information regarding your query.
Regards,
Nithin Kumar.

### 类别

Help CenterFile Exchange 中查找有关 Transfer Function Models 的更多信息

### Community Treasure Hunt

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

Start Hunting!

Translated by