我是靠谱客的博主 疯狂马里奥,最近开发中收集的这篇文章主要介绍Matlab solve a first-order transfer functin using differential equation and step responce simulation,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
Most of the time, we use transfer function to simulate the signal relating to time by using tf() and lsim(). In this paper, I try to use differential equation to solve it.
Main
- Transfer funtion:
0.5 y ˙ + y = F ( t ) 0.5dot{y}+y=F(t) 0.5y˙+y=F(t) - Input :
F ( t ) = 100 ( t > 0 ) F ( t ) = 75 ( t ≤ 0 ) F(t)=100 space (t>0) \ F(t)=75 space (tle0) F(t)=100 (t>0)F(t)=75 (t≤0) - matlab code
syms y(t) inp;
ode = 0.5*diff(y,t)+y== inp;
cond = y(0) == 75;
ySol(t,inp) = dsolve(ode, cond);
x=[0:0.1:10];
result=ySol(x,100);
input=x*0+100;
input(1)=75;
plot(x, result);
hold on;
plot(x, input);
legend({'Output','Input'},'Location','southwest');
xlabel('Time')
ylabel('Amplitude')
hold off;
- result 1
ySol(t, inp) =
inp - exp(-2*t)*(inp - 75)
- result 2
Note
- This method is not suitable for second order system practically. I guess primarily because of its complexcity of the differential equation.
- This method is useful for periodic input.
最后
以上就是疯狂马里奥为你收集整理的Matlab solve a first-order transfer functin using differential equation and step responce simulation的全部内容,希望文章能够帮你解决Matlab solve a first-order transfer functin using differential equation and step responce simulation所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复