필터 지우기
필터 지우기

How can I integrate symbolically a coupled vector function?

조회 수: 1 (최근 30일)
JXT119
JXT119 2023년 4월 13일
댓글: Walter Roberson 2023년 4월 13일
Hello,
I am trying to get a symbolic expression for the integration of a vector function arrising from a coupled differential equation, given that I want a symbolic result, I can't use ode45 and the int()m function is not working for me. My code is the following, if anyone could give me a hint about how to integrate it, it would be really appreciated.
syms v1 m u1 rho_0 beta y1 s cd g Tmax delta_u delta_v delta_y
F = [v1+delta_v;(1/m)*(Tmax*u1+(rho_0/2)*exp(-beta*y1)*(v1^2)*s*cd+rho_0*exp(-beta*y1)*v1*s*cd*delta_v-(beta/2)*rho_0*exp(-beta*y1)*(v1^2)*s*cd*delta_y)-g+(Tmax/m)*delta_u];
% F = [v1+x(2);(1/m)*(Tmax*u1+(rho_0/2)*exp(-beta*y1)*(v1^2)*s*cd+rho_0*exp(-beta*y1)*v1*s*cd*X(2)-(beta/2)*rho_0*exp(-beta*y1)*(v1^2)*s*cd*X(1))-g+(Tmax/m)*delta_u]; (Expression for ode45)
  댓글 수: 5
JXT119
JXT119 2023년 4월 13일
My solution variables are delta_v and delta_y.
y1 and v1 are nominal values around which I have linearized a non linear problem.
Walter Roberson
Walter Roberson 2023년 4월 13일
It is not clear to me what is to be integrated and what the variable of integration is and what the bounds of integration are.
syms v1 m u1 rho_0 beta y1 s cd g Tmax delta_u delta_v delta_y
F = [v1+delta_v;(1/m)*(Tmax*u1+(rho_0/2)*exp(-beta*y1)*(v1^2)*s*cd+rho_0*exp(-beta*y1)*v1*s*cd*delta_v-(beta/2)*rho_0*exp(-beta*y1)*(v1^2)*s*cd*delta_y)-g+(Tmax/m)*delta_u]
F = 
syms LB UB
int(F, delta_v, LB, UB)
ans = 
int(F, delta_y, LB, UB)
ans = 
Those look valid to me.

댓글을 달려면 로그인하십시오.

답변 (1개)

Torsten
Torsten 2023년 4월 13일
이동: Torsten 2023년 4월 13일
So your equations are
d(delta_v)/dt = v1 + delta_v
d(delta_y)/dt = (1/m)*(Tmax*u1+(rho_0/2)*exp(-beta*y1)*(v1^2)*s*cd+rho_0*exp(-beta*y1)*v1*s*cd*delta_v-(beta/2)*rho_0*exp(-beta*y1)*(v1^2)*s*cd*delta_y)-g+(Tmax/m)*delta_u
with all parameters except delta_v and delta_y known values ?
Then the following approach should work. Look at your equations to see how a, b, c and d have to be set.
syms t x(t) y(t)
syms a b c d real
eqn1 = diff(x,t) == a + x;
eqn2 = diff(y,t) == b*x + c*y + d
eqn2(t) = 
dsolve([eqn1,eqn2])
ans = struct with fields:
y: exp(t)*(C1 + (a*b*exp(-t))/(c - 1)) + exp(c*t)*(C2 - (exp(-c*t)*(d - (d - a*b)/c))/(c - 1)) x: -(exp(t)*(C1 + (a*b*exp(-t))/(c - 1))*(c - 1))/b

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by