how to handle state space model where stats are multiplied by inputs ?
13 次查看(过去 30 天)
显示 更早的评论
I am having trouble modelling a state space model where the states and inputs are multiplied together.
Consider this example:
Xdot = X*sin(u)
This is a simplified example but it covers my problem. Here X represents the state and u the input. They are multiplied together.
How can I separate them into
Xdot= Ax+Bu
My approach was to linearize the model by taking partial derivative with respect to U. But this way the equation will be a constant multiplied by U.
Xdot = Bu
But this way it will not depend on X which I find intuitively not correct.
Can someone give me help ?
回答(1 个)
Ameer Hamza
2020-4-11
"But this way it will not depend on X which I find intuitively not correct."
It is possible for a linearized model to depend only on its input, and it does make sense. Note that the linearized model is not equivalent to the nonlinear model. It is just its approximation in a small region around the linearization point. The linear model you have written in the question is not calculated correctly. You need to take partial derivative w.r.t. both X and U to get a linearized model. Suppose you want to linearize your system around
,
, then linear model is calculated like this



Drop δ to simplify the notation

As you can see, the coefficient A and B of the linearized system are not constant. They are themself dependent on the current value of
and
. You need to calculate A repeatedly at each time-step to get a good linear approximation



Now suppose you linearize the system around
and
. The linearized model will become



This is exactly the situation you mentioned in your question. But remeber that since this is a linearized model, so if you have a finite value for input u, then
will be finite and after one time-step you will have a different linearization point, (
,
) and you will re-calculate A and B.



How to handle such models in MATLAB:
MATLAB provides tools to handle such a nonlinear state-space model using a generic ODE solver, e.g., ode45. It will automatically linearize the model. The following shows an example
ode45(@f, [0 10], 0.1); % 0.1 is the initial condition for the value of x
function dxdt = f(t, x)
u = 1; % constant input
dxdt = x*sin(u)
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Particle & Nuclear Physics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!