Need Instantaneous PID Value

1 回表示 (過去 30 日間)
Mohsina Zafar
Mohsina Zafar 2019 年 7 月 11 日
コメント済み: Mohsina Zafar 2019 年 7 月 11 日
I am using PID controller and the input is 3x1. The output I am getting is in 3x1 tf format. But I need it to be 3x1 double at a single time instant.
(I will use a for loop later in which T_x will vary. At this moment, I am initializing T_x as [0;0;0])
Following is the code:
T_x=[0;0;0];
T_d=[0;0;0]; %desired value
T_e=T_d-T_x;
C_PD = pid(100,0,10,100);
T_u=T_e*C_PD

採用された回答

Raj
Raj 2019 年 7 月 11 日
"The output I am getting is in 3x1 tf format" - This is correct because as per definition 'pid' command creates a continuous-time pid controller in parallel form. Basically you get a transfer function as a controller. When you multiply a constant (your input) to this transfer function, you get another transfer function.
"I need it to be 3x1 double at a single time instant"- One way is to convert the output from s domain to time domain using ilaplace or you can use the file exchange function given here. You will get your outputs as function of time from which you can easily substitute and get value of outputs at a particular time instant.
  1 件のコメント
Mohsina Zafar
Mohsina Zafar 2019 年 7 月 11 日
Thanks, it helped.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePID Controller Tuning についてさらに検索

タグ

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by