This DAE appears to be of index greater than 1 but det(M + lambda*dF/dx) isn't zero
3 views (last 30 days)
Show older comments
Hi everyone i'm trying to solve a DAE of the form M*y'(t) = F(y,t), with M a singular square matrix. Just for the context, my DAE comes from the equation of the dynamic response of a beam
when the space derivatives are transformed into finite difference.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1713521/image.png)
F is defined as follow : F(y,t) = A.y(t) - b(t) with A a square matrix non singular and b a vector. A and M are defined bellow :
A = zeros(9,9);
a = EI/(m*h);
A(1,:) = [h 0 -1 0 0 0 0 0 0];
A(2,:) = [1 0 0 -1 0 0 0 0 0];
A(3,:) = [0 h 0 0 -1 0 0 0 0];
A(4,:) = [0 a 0 0 0 -a 0 0 0];
A(5,:) = [0 0 1 h 0 0 0 0 0];
A(6,:) = [0 0 0 1 h 0 0 0 0];
A(7,:) = [0 0 0 0 1 h 0 0 0];
A(8,:) = [0 0 0 0 0 0 1 0 0];
A(9,:) = [0 0 0 0 0 a 0 0 -a];
M = zeros(9,9);
M(8,2) = 1;
M(9,7) = 1;
The function for the DAE system is :
function F = Vect4(t,y,w,P,m,A)
ligne = length(A);
% Création de b
b = zeros(ligne,1);
b(4) = -P/m;
b(9) = -P/m;
% Calcul de la DAE
F = A*y - b;
end
w isn'nt used because i simplified the equation by removing the cosine term in b(t).
And finally the output :
n = 2; % Number of nodes
ligne = 4 + 5*(n-1); % Nombre de lignes (Nombre d'équations)
w = 2*pi * 5; % Pulsation
P = 100;
tspan = [0 2];
y0 = zeros(14,1);
opt = odeset('Mass',M);
[t,y] = ode23t(@(t,y) Vect4(t,y,w,P,m,A), tspan, y0,opt);
But here comes the problem, i get the classical error :
Error using daeic12 (line 78)
This DAE appears to be of index greater than 1.
Error in ode23t (line 282)
[y,yp,f0,dfdy,nFE,nPD,Jfac] = daeic12(odeFcn,odeArgs,t,ICtype,Mt,y,yp0,f0,...
Error in Script_Dyna_vrai (line 114)
[t,y] = ode23t(@(t,y) Vect4(t,y,w,P,m,A), tspan, y0,opt);
I don't really understand because firstly there are only first derivatives. Secondly, i belive that the index is greater than 1 when the matrix
(M +
) is singular, which is not the case here for every lambda. I tried using other ODE solvers like ODE15i for example but the problem persists.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1713526/image.png)
If someone has any clues, i would apreciate. Thank you very much.
3 Comments
Torsten
on 11 Jun 2024
This is your DAE system written out. There is no equation from which y(8) and y(9) could be deduced.
h*y(1) - y(3) = 0
y(1) - y(4) = 0
h*y(2) - y(5) = 0
a*y(2) - a*y(6) + P/m = 0
y(3) + h*y(4) = 0
y(4) + h*y(5) = 0
y(5) + h*y(6) = 0
dy2/dt = y(7)
dy7/dt = a*y(6) - a*y(9) + P/m
Answers (1)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!