Third Order ODE with unit step input

8 ビュー (過去 30 日間)
Parveen Ayoubi
Parveen Ayoubi 2021 年 11 月 27 日
コメント済み: Walter Roberson 2021 年 11 月 28 日
I have been trying to solve this differential equation for two days now. I do not know what to do with the right hand side of the ODE. The only way I have seen to solve it does not include the derivative of the input as well. Would really appreaciate some help atleast to know how to start it up.
y^''' (t)+6y^'' (t)+11y^'(t) +6y(t)=u^'' (t)+2u^' (t)+3u(t)
y’’(0) = 1 ; y’(0) = -1; y(0) = 1
where u=Unit step Us(t).
Ive tried to do it in simulink but the answers there havent been coming out right either.
  10 件のコメント
Parveen Ayoubi
Parveen Ayoubi 2021 年 11 月 28 日
Wouldnt you be missing the initial conditions of U when changing from time domain to frequency? I think that is the difference, Because if we have unit step for the input then u(0)=1 u'(0) is equal to one as well. If you can show me how i would add those conditions to the code you did it would be great. Or atleast a hint
Parveen Ayoubi
Parveen Ayoubi 2021 年 11 月 28 日
Nevermind im incorrect, which makes all my work wrong and im at another wall. Because if im assuming that t>0 like walter robinson had in his code it wouldnt be the correct answer

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

採用された回答

Walter Roberson
Walter Roberson 2021 年 11 月 27 日
sympref('HeavisideAtOrigin', 0);
syms y(t)
assume(t > 0)
Dy = diff(y,t);
D2y = diff(y,t,2);
u(t) = heaviside(t); %// I saw online that this is unit step
Du = diff(u,t);
ode = diff(y,t,3) + 6*diff(y,t,2)+11*diff(y,t)+6*y == diff(u,t,2)+2*diff(u,t)+3*u;
cond1 = Dy(0) == -1;
cond2 = D2y(0) == 1;
cond3 = y(0) == 1;
conds = [cond1 cond2 cond3];
sol = dsolve(ode,conds)
sol = 
The assumption that t > 0 is not strictly valid, but if you use t >= 0 you get sign(t) and heaviside() in the equations, and you would have to break it into two cases. You could continue on with
assume(t == 0)
sol0 = dsolve(ode,conds)
sol0 = 
... which happens to give the same result.
  2 件のコメント
Walter Roberson
Walter Roberson 2021 年 11 月 28 日
sympref('HeavisideAtOrigin', 0);
syms y(t)
assume(t,'real');
Dy = diff(y,t);
D2y = diff(y,t,2);
u(t) = heaviside(t); %// I saw online that this is unit step
Du = diff(u,t);
ode = diff(y,t,3) + 6*diff(y,t,2)+11*diff(y,t)+6*y == diff(u,t,2)+2*diff(u,t)+3*u;
cond1 = Dy(0) == -1;
cond2 = D2y(0) == 1;
cond3 = y(0) == 1;
conds = [cond1 cond2 cond3];
sol = simplify(dsolve(ode,conds))
sol = 
sol0 = limit(sol, t, 0)
sol0 = 
1
syms tpos tneg
assume(tpos > 0)
assume(tneg < 0)
solpos = subs(simplify(subs(sol, t, tpos)),tpos,t)
solpos = 
solneg = subs(simplify(subs(sol, t, tneg)),tneg,t)
solneg = 
Walter Roberson
Walter Roberson 2021 年 11 月 28 日
However, if you take the laplace transform approach, then those are typically only valid for non-negative time.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEquation Solving についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by