How to estimate the inital state with an ssest output model?

P
Patrick · Nov 20, 2020 · 2.1K views
Question
I am trying to linearize a model arround a certain operating point, the model is highly non linear so things like small angle approximation or Taylor-Series dont really work. For this is used ssest. The model has a total of 5 states but ssest suggests to linearize with 8 states, so it is creating transitional states. This concept is not completely new to me but i have never worked with it. The compare function shows a very good fit, but I dont know how the inital state is created since in the iddata the original inital state has 5 values and the linearized model demands 8. Compare outputs an Initial state which I tried to recreate but couldnt. Can anybody explain to me how to translate the original nonlinear state to the new states of the estimatete SS-Model?
Expert Answer
Profile picture of John Williams
John Williams PhD Expert
Answered Aug 11, 2026

To estimate the initial state with an ssest output model in MATLAB, you can use the following approach:

  1. Estimate the State-Space Model: Use the ssest function to estimate the state-space model from your data. This function returns the estimated model and, optionally, the initial state.

  2. Return Initial States: Use the syntax [sys, x0] = ssest(data, nx) to get the initial state x0 along with the estimated model sys.

Here's an example:

matlab
% Load your data
load iddata1 % Replace with your actual data

% Define the model order
nx = 4; % Example model order

% Estimate the state-space model and initial state
[sys, x0] = ssest(z1, nx);

% Display the initial state
disp('Initial State:');
disp(x0);

In this example, z1 is your data, and nx is the order of the state-space model you want to estimate. The ssest function will return the estimated model sys and the initial state x0

Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!