Hi Jesus Rico!
First question, what kind of Mathematica object is the result of
NonlinearStateSpaceModel?
It is an expression of the type "NonlinearStateSpaceModel" so it is a unique type of object. I'll use the first model from the documentation:
In[1]:= nsys = NonlinearStateSpaceModel[{{u - Subscript[x, 1] Subscript[x, 2], u Subscript[x, 2] + 1},
{Subscript[x, 1]}}, {Subscript[x,1], Subscript[x, 2]}, u];
In[2]:= Head[nsys]
Out[2]:= NonlinearStateSpaceModel
You can extract parts of the expression by taking different parts using the double bracket notation or Part[] function:
In[3]:= nsys[[1]]
Out[3]:= {{u - Subscript[x, 1] Subscript[x, 2], 1 + u Subscript[x, 2]}, {Subscript[x, 1]}}
is if there is a way to recover the different parts of the model for instance: the state variables and the inputs?.
The model is normally specified like this:
NonlinearStateSpaceModel[{f,g},x,u]
Hence, the first part will be a list of the the (set of) functions f and g where x'(t)==f(x(t) and y(t)==g(x(t)). To find the equation for the first state variable x1, you would write:
nsys[[1,1,1]]
Part 2 is a list of the states and part 3 is a list of the input variables!
Hope that helps!
Patrik