フィルターのクリア

impulse response with the commande lsim

10 ビュー (過去 30 日間)
babou babi
babou babi 2022 年 4 月 23 日
回答済み: Mathieu NOE 2022 年 4 月 25 日
hello everyone
i try to get the impulse response of first order transfert function with the commande lsim
sys = tf(1,[0.5,1]);
t = [0:0.1:3];
input = zeros(size(t));
input(1)=inf ;% when t=0 the input is inf
output = lsim(sys,input,t);
plot(t,output)
that lines of commandes dont give me same result as
>> sys = tf (1,[0.5 1])
>> impulse(sys)
why????????????

採用された回答

Mathieu NOE
Mathieu NOE 2022 年 4 月 25 日
hello
your first implementation is a discrete time impulse
For discrete-time systems, the impulse response is the response to a unit area pulse of length Ts and height 1/Ts, where Ts is the sample time of the system.
so the "dirac" area" must remain = 1 , that is the amplitude is not inf but the inverse of the time increment (0.1 s in your code)
further reducing the time increment makes the code getting closer to the "true" impulse response
try with dt = 0.01 like below :
sys = tf(1,[0.5,1]);
dt = 0.01;
t = [0:dt:3];
input = zeros(size(t));
input(1)=1/dt ;% dirac area = 1
output = lsim(sys,input,t);
plot(t,output)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSystem Identification Toolbox についてさらに検索

製品


リリース

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by