How to calculate step response of an differential equation SYMBOLICALLY?
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a differential equation as follows:
Here the C_2 is output and C_i is input.
I have to calculate a step response SYMBOLICALLY from this system described by the equation. I'm able to do this with step(transfer function) but this time I want to calculate is symbolically.
Here's what I've made:
syms y t u
syms y(t)
% For prettier results I mark: C_1 = y & C_i = u
% equ = equation in time domain:
equ = (diff(diff(y,t),t))+(7*diff(y,t))+10*y-10*u;
% Let's laplace transform the equation:
EQU = laplace(equ,t,s)
% Calculate step response by multiplying with (1/s) in s-domain:
EQU_step = EQU*(1/s)
% inverse transform:
equ = ilaplace(EQU,s,t)
How ever I have a feeling that there must be more elegant way to do this symbolically. Furthermore I'm not sure if my code is working correctly. Have I done right?
Important part: How do I plot the result in time domain in order to compare the results with the figure that I've got with built-in function: step(transfer function object)?
Thank you of any kind of help!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!