how do i plot step response of a system using fourier transform?

1 回表示 (過去 30 日間)
AAYUSH MARU
AAYUSH MARU 2020 年 4 月 3 日
コメント済み: AAYUSH MARU 2020 年 4 月 4 日
how do i plot step response here?
clc;
clear all;
syms t;
t= 0:0.001:10
G = tf([1], [1 0.9 5]);
[num,den] = tfdata(G);
syms s
G_sym = poly2sym(cell2mat(num),s)/poly2sym(cell2mat(den),s)
Y_four_sym = G_sym/s; % U(s) = 1/s for the unit step
y_time_sym = ifourier(Y_four_sym);
y_n = double(y_time_sym);
subplot(2,1,1)
plot(t,y_time_sym); % i am getting error over.. here tried using ezplot etc

回答 (1 件)

Birdman
Birdman 2020 年 4 月 3 日
編集済み: Birdman 2020 年 4 月 3 日
If you are dealing with s domain, you need to use ilaplace. Try this:
syms t;
G = tf([1], [1 0.9 5]);
[num,den] = tfdata(G);
syms s
G_sym = poly2sym(cell2mat(num),s)/poly2sym(cell2mat(den),s)
Y_four_sym = G_sym/s; % U(s) = 1/s for the unit step
y_time_sym(t) = ilaplace(Y_four_sym,t);
t=0:0.001:10;
plot(t,y_time_sym(t));
  2 件のコメント
AAYUSH MARU
AAYUSH MARU 2020 年 4 月 4 日
i want the answer in fourier domain as i am dealing with fourier domain!pls help
AAYUSH MARU
AAYUSH MARU 2020 年 4 月 4 日
clc;
clear all;
syms t;
G = tf([1], [1 0.9 5]);
[num,den] = tfdata(G);
syms s
G_sym = poly2sym(cell2mat(num),s)/poly2sym(cell2mat(den),s)
G_sym=subs(G_sym,s,0.1*1i)
Y_four_sym = G_sym/s; % U(s) = 1/s for the unit step
y_time_sym(t) = ilaplace(Y_four_sym,t);
t=0:0.001:10;
plot(t,y_time_sym(t));
i tried using this code! but it is not working i am getting straight line as output

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by