How to remove NaN values from the model????

4 visualizaciones (últimos 30 días)
Amar
Amar el 12 de Abr. de 2013
Comentada: Komal Khuwaja el 29 de Mzo. de 2018
I built up a simulink vehicle model. After running the model i am getting this error...Derivative input 1 of 'new_model_1/Subsystem4/Integrator' at time 0.03 is Inf or NaN. Stopping simulation. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances).
and following warning in matlab command window :
Warning: Division by zero in 'new_model_1/Divide3'
Warning: Division by zero in 'new_model_1/Divide4'
Warning: Division by zero in 'new_model_1/Divide3'
Warning: Division by zero in 'new_model_1/Divide4'
Warning: Division by zero in 'new_model_1/Divide3'
Warning: Division by zero in 'new_model_1/Divide4'
Warning: Division by zero in 'new_model_1/Divide4'
Warning: Division by zero in 'new_model_1/Divide4'
Warning: Division by zero in 'new_model_1/Divide4'
after initializing with value = 0.01 also it is showing the same error i tried alot to get rid of this error.
Please please somebody help me out.... in the workspace i am getting following variables with values as follows:
tout :
0
0.0100000000000000
0.0200000000000000
0.0300000000000000
yout :(4*5 matrix)
4.51647315837420e-07 0 0 -3.56700000000000e-07 0
0 0 4.51647315837420e-09 0 0
0 6.61011659905245e-08 4.51647315837420e-09 5.54475248504930e-09 6.67882167960779e-09
NaN 6.61011659905245e-08 4.51647315837420e-09 NaN NaN
I want to know what is this yout??? and why this NAN values are coming??? Please help me...i am desperately need help.....
  1 comentario
Komal Khuwaja
Komal Khuwaja el 29 de Mzo. de 2018
Hi, did you solved this problem if yes please tell me how? because I had the same problem I want correct this problem. and I think there is no problem in our model. my model is quadcopter I am giving input from joystick its working but at the same time when I give input from other controller its appear error like you show above.
Thanks

Iniciar sesión para comentar.

Respuestas (1)

Yao Li
Yao Li el 12 de Abr. de 2013
yout is the output value
make sure the denominators will never be zero
Check if there are algebraic loops in the model. Add the block memory if exists
  2 comentarios
Amar
Amar el 12 de Abr. de 2013
Thank You... There are no algebric loops and i assure it by make use of ashow command. I have a small query regarding checking of denominators , and how to change its value from zero to some other logical value without much altering the output. Please help me... I took only 3 outputs namely lateral velocity, lateral acceleration and yaw rate as output while yout is a 4*5 matrix where 4 corresponds to simulation time step and what does the 5 represents??? and how will i correlate which output corresponds to the outport which i have used in my model???
avneet kumar
avneet kumar el 23 de Mayo de 2015
Thank you

Iniciar sesión para comentar.

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by