필터 지우기
필터 지우기

DAE Problem : cannot understand how to find the problem in my code

조회 수: 1 (최근 30일)
Urvi
Urvi 2012년 9월 28일
This is code to solve 6 ode's and 12 algebraic equations. All of them are interdependent. How do I go about it? I keep getting errors but I am unable to solve it.
**M file**
*M file* function f=ncs1_dae(t,x)
%Input parameters
global alpha A AH AI AO AV ACS beta CPH CPI CPIN CPO CPV dB g hB hI hO hH hV Hmax k M MH min Pset qein R rhol rhov ri ro TIN TR vB lambda;
input()
%Variables
TI=x(1);
........
..........
=x(16);
%f(1) to f(6) are ODEs
f(1)=
f(2)=
f(3)=
f(4)=
f(5)=
f(6)=
%f(7) to f(18) are Algebraic Equations
f(7)=
f(8)=
f(9)=
f(10)=
f(11)=
f(12)=
f(13)=
f(14)=
f(15)=
f(16)=
f(17)=
f(18)=
f=f';
This is what I enter in the command window:
>> x0=[298 298 298 298 1 0.3 0 373 0 0 0 0 0 0 0 0.0013 0.0041 0.0056];
>> tspan=[0 1200];
>> M=[eye(6,18);zeros(12,18)];
>> options=odeset('Mass',M);
>> [t1,x1]=ode15s(f,[0,1200],x0,options);
The warning msg I get is : Warning: Failure at t=3.014342e-01. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (8.881784e-16) at time t. > In ode15s at 753 >> if true
% code
end
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 9월 28일
What if the equations are inconsistent?
Urvi
Urvi 2012년 10월 1일
Inconsistent as in? I have 18 variables and 18 equations. All of which are interdependent.

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

답변 (1개)

Jan
Jan 2012년 10월 1일
편집: Jan 2012년 10월 1일
You can define an DAE such that there is no feasible point. If the mass matrix is singular, as in your case, the initial slope M(t0, y0) * y'(0) = f(t0, y0) must exist.
Imagine a DAE which describes a point sliding on a circulare wire. If you start the integration with a point apart from the wire, there is no valid first step of the integration, because it is impossible to keep the trajectory on the feasible path.

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by