Effacer les filtres
Effacer les filtres

How can I integrate symbolically a coupled vector function?

1 vue (au cours des 30 derniers jours)
JXT119
JXT119 le 13 Avr 2023
Commenté : Walter Roberson le 13 Avr 2023
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 commentaires
JXT119
JXT119 le 13 Avr 2023
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 le 13 Avr 2023
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.

Connectez-vous pour commenter.

Réponses (1)

Torsten
Torsten le 13 Avr 2023
Déplacé(e) : Torsten le 13 Avr 2023
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

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by