Transfer function from non linear ode

Functions seem to be fine in laplace domain. Don't know how to obtain numerator and denominator for a single transfer function for requency response?
Thanks :)
clc
clear
syms a b c d y(t) Y(s) x(t) X(s) s t E(t)
assume([a b c d] > 0);
%assume(X(s) ~=0)
E(t) = 5*sin(t) ;
a = 1;
b = 2;
c = 3;
d = 4;
yp = diff(y,t);
ypp = diff(y,t,2);
eqn = (y*a)*ypp*E + b*yp^2 + c*yp + d == 0 ; % the ode
V = odeToVectorField(eqn); % to get two first order linear odes
M = matlabFunction(V,{'t','Y'});
eqn1 = V(1);
eqn2 = V(2);
eqn1LT = laplace(eqn1,t,s);
eqn2LT = laplace(eqn2,t,s);
eqn1LT = subs(eqn1LT,{laplace(y,t,s), subs(diff(y(t),t),t,0),laplace(x(t),t,s),y(0)},{Y(s), 0, X(s), 0})
eqn1LT = 
eqn2LT = subs(eqn2LT,{laplace(y,t,s), subs(diff(y(t),t),t,0),laplace(x(t),t,s),y(0)},{Y(s), 0, X(s), 0})
eqn2LT = 

1 个评论

Functions seem to be fine in laplace domain.
They are not, really. If I remember correctly, Laplace transforms are only defined on linear differential equations with constant coefficients. Yours are nonlinear.
Probably the only way to approach this is to integrate it numerically with the input defined at specific times (use the ‘tspan’ input to define that as a vector) with the integrated result as the output.

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

产品

版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by