How can i get sum of the responses of multi input system?

12 ビュー (過去 30 日間)
Volkan Yangin
Volkan Yangin 2020 年 12 月 2 日
コメント済み: Ameer Hamza 2020 年 12 月 2 日
Hi,
For linear systems, we can implement superposition procedure to obtain result of any state space system for multiple inputs. For example, if there are 2 input (u1 and u2), firstly we can get the result of u1 when u2=0 and result u2 when u1=0. After, sum of these results will be response of state space.
MATLAB has capability to work multiple inputs, but gives multiple outputs for each input seperately. Is there any way to see only one result for multiple inputs?
You can see an example below. I should obtain sum of From:Control 1 and From:Control 2 for each temperature.
Thanks!

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 12 月 2 日
編集済み: Ameer Hamza 2020 年 12 月 2 日
You can call step() with output arguments. See this example
A = rand(2);
B = rand(2);
C = rand(2);
D = zeros(2);
sys = ss(A,B,C,D);
[y, t] = step(sys);
y_sum = sum(y, [2 3]); % sum of all outputs
plot(t, y_sum)
  2 件のコメント
Volkan Yangin
Volkan Yangin 2020 年 12 月 2 日
Thanks a lot Ameer Hamza
Ameer Hamza
Ameer Hamza 2020 年 12 月 2 日
I am glad to be of help!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by