Prev: How to auto tune my PID?
Next: system of pde
From: Marton Buda on 15 Mar 2010 07:48 Hey everyone. I am currently solving a set of ODE's for a biological system with an oscillatory behavior. The first model runs perfectly with the ode45 command, however the second one which is slightly different gives the following error: [t, y] = ode45(@dact, [0 20], [0 0]) Warning: Failure at t=4.828591e-03. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.387779e-17) at time t. > In ode45 at 371 I checked many times wether the equation was implemented correctly in the m file so it should not be the problem. I also tried to reduce the step size by decreasing the abstol/reltol options but the same error message occured. Any ideas? Many thanks in advance, Marton
From: Torsten Hennig on 15 Mar 2010 04:25 > Hey everyone. > > I am currently solving a set of ODE's for a > biological system with an oscillatory behavior. The > first model runs perfectly with the ode45 command, > however the second one which is slightly different > gives the following error: > > [t, y] = ode45(@dact, [0 20], [0 0]) > Warning: Failure at t=4.828591e-03. Unable to meet > integration tolerances > without reducing the step size below the smallest > value allowed > (1.387779e-17) at time t. > > In ode45 at 371 > > I checked many times wether the equation was > implemented correctly in the m file so it should not > be the problem. > > I also tried to reduce the step size by decreasing > the abstol/reltol options but the same error message > occured. > > Any ideas? > > Many thanks in advance, > > Marton How can we tell if we don't see what you have programmed in MATLAB ? Best wishes Torsten.
From: Marton Buda on 15 Mar 2010 08:54 True.. Here is the file: [t, y] = ode45(@dact, [0 20], [0 0]) % ------------------------------ Nested Function -------------------------------- function dydt = dact(t, y) % solve Design II. equations dydt = zeros(size(y)); % parameters ea = 1.58; eb = 0.079; d = 30; p = 50; A = y(1); B = y(2); % evaluate expressions dydt(1) =d*(ea*((1+(p*A^2) )/(1+B^2))-(A*B+A)); dydt(2) = d*eb*((1+p*A^2)/(1+A^2))-B; ------ Marton
From: Torsten Hennig on 15 Mar 2010 05:34 > Hey everyone. > > I am currently solving a set of ODE's for a > biological system with an oscillatory behavior. The > first model runs perfectly with the ode45 command, > however the second one which is slightly different > gives the following error: > > [t, y] = ode45(@dact, [0 20], [0 0]) > Warning: Failure at t=4.828591e-03. Unable to meet > integration tolerances > without reducing the step size below the smallest > value allowed > (1.387779e-17) at time t. > > In ode45 at 371 > > I checked many times wether the equation was > implemented correctly in the m file so it should not > be the problem. > > I also tried to reduce the step size by decreasing > the abstol/reltol options but the same error message > occured. > > Any ideas? > > Many thanks in advance, > > Marton y(1) becomes arbitrarily large as t approaches 4.828591e-3. The reason for the solver to quit lies in your model equations. Best wishes Torsten.
From: Marton Buda on 15 Mar 2010 10:08
> y(1) becomes arbitrarily large as t approaches > 4.828591e-3. > The reason for the solver to quit lies in your model > equations. > > Best wishes > Torsten. Dear Torsten, It makes sence. However, the equation works in mathematica and was copied from an official research paper with tested parameters. See the picture below with the set of ODE's: http://jutas.eet.bme.hu/~exi/soton/ODE.png Thank you for your help. Regards, Marton |