How to write dynamic equations in state-space form?

I'm trying to model a simple vehicle dynamic: Let f_engine,f_brake,f_road be the force of engine, braking force and the road force respectively. For a vehicle that traveled x meters and its mass is m , the longitudinal dynamics is:
where f_road lumps the road forces including aerodynamic drag and rolling resistance.
where C_d is the drag coefficient, μ is the coefficient of rolling resistance and g is the gravitational acceleration.
I want to use [x,v] as state vector, [f_engine, f_brake] as control input and [f_road] as disturbance, How can I write this in state-space form? My goal is to put it together in a model predictive control framework.
My control objective is to minimize the difference between reference speed (v_target) and the output speed, additionally, I am trying to minimize the physical work that has been used for braking.
where w are weight factors and P is the number of prediction steps in the future. Is there's a smart way to write this in the form of standard cost functions? Thanks!

 採用された回答

Torsten
Torsten 2015 年 7 月 20 日

0 投票

y1'=y2
y2'=(f_engine-f_brake-(C_d*y2^2+mu*m*g))/m
Here y1=x, y2=dx/dt.
Best wishes
Torsten.

2 件のコメント

Yunfei Hou
Yunfei Hou 2015 年 7 月 20 日
Thanks, Torsten. I add my control objective in the question, Could you comment on it?
Torsten
Torsten 2015 年 7 月 21 日
What is the form of a "standard cost function" ?
The unknowns (as I interpret your problem formulation) are f_brake(j) and f_engine(j) (j=k,...,k+P-1).
You could use e.g. fmincon together with an ODE integrator to solve.
Best wishes
Torsten.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLinear Plant Specification についてさらに検索

質問済み:

2015 年 7 月 18 日

コメント済み:

2015 年 7 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by