Disturbance Rejection with PID turner

1 回表示 (過去 30 日間)
Esin Derin
Esin Derin 2022 年 6 月 25 日
コメント済み: Esin Derin 2022 年 6 月 25 日
I'm trying to do a disturbance rejection with PID tuner.I'm trying to do it but it keeps giving error.Could you help me?
G=tf([1],[0.1 1]);
G.InputName='yzad';
G.Output='ys';
yzad={1,10,100}
K={-100,-10,1,5,3}
Sum=sumbkl('++','yzad','ys')
ISAPID=connect('-100','Sum','G')
tf(ISAPID)
You can find my diagram attached .Thanks

採用された回答

Sam Chak
Sam Chak 2022 年 6 月 25 日
For simplicity, you can do something straightforward and plot the time responses like this.
Case 1a: , rad/s
% sin(omega*t) = sin((2π*Freq)*t) = sin((2π/τ)*t)
omega = 1; % angular frequency {1, 10, 100} rad/s
tau = 2*pi/omega; % time period of a wave
Tf = 2*tau; % wave duration of Tf seconds
[u, t] = gensig("sine", tau, Tf); % generates a signal where t runs from 0 to Tf seconds
G = tf(1, [0.1 1]); % plant transfer function
K = -100; % feedback gain {-100, -10, -1, 5, 3}
H = -K;
Gcl = feedback(G, H) % closed-loop system subjected to a disturbance Y(s)/D(s)
Gcl = 1 ----------- 0.1 s + 101 Continuous-time transfer function.
lsim(Gcl, u, t)
grid on
Case 1b: , rad/s
% sin(omega*t) = sin((2π*Freq)*t) = sin((2π/τ)*t)
omega = 10; % angular frequency {1, 10, 100} rad/s
tau = 2*pi/omega; % time period of a wave
Tf = 2*tau; % wave duration of Tf seconds
[u, t] = gensig("sine", tau, Tf); % generates a signal where t runs from 0 to Tf seconds
G = tf(1, [0.1 1]); % plant transfer function
K = -100; % feedback gain {-100, -10, -1, 5, 3}
H = -K;
Gcl = feedback(G, H) % closed-loop system subjected to a disturbance Y(s)/D(s)
Gcl = 1 ----------- 0.1 s + 101 Continuous-time transfer function.
lsim(Gcl, u, t)
grid on
Case 1c: , rad/s
% sin(omega*t) = sin((2π*Freq)*t) = sin((2π/τ)*t)
omega = 100; % angular frequency {1, 10, 100} rad/s
tau = 2*pi/omega; % time period of a wave
Tf = 2*tau; % wave duration of Tf seconds
[u, t] = gensig("sine", tau, Tf); % generates a signal where t runs from 0 to Tf seconds
G = tf(1, [0.1 1]); % plant transfer function
K = -100; % feedback gain {-100, -10, -1, 5, 3}
H = -K;
Gcl = feedback(G, H) % closed-loop system subjected to a disturbance Y(s)/D(s)
Gcl = 1 ----------- 0.1 s + 101 Continuous-time transfer function.
lsim(Gcl, u, t)
grid on
Case 2a: , rad/s
% sin(omega*t) = sin((2π*Freq)*t) = sin((2π/τ)*t)
omega = 1; % angular frequency {1, 10, 100} rad/s
tau = 2*pi/omega; % time period of a wave
Tf = 2*tau; % wave duration of Tf seconds
[u, t] = gensig("sine", tau, Tf); % generates a signal where t runs from 0 to Tf seconds
G = tf(1, [0.1 1]); % plant transfer function
K = -10; % feedback gain {-100, -10, -1, 5, 3}
H = -K;
Gcl = feedback(G, H) % closed-loop system subjected to a disturbance Y(s)/D(s)
Gcl = 1 ---------- 0.1 s + 11 Continuous-time transfer function.
lsim(Gcl, u, t)
grid on
  1 件のコメント
Esin Derin
Esin Derin 2022 年 6 月 25 日
thank you

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by