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

4 次查看(过去 30 天)
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 个评论
Komal Khuwaja
Komal Khuwaja 2018-3-29
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

请先登录,再进行评论。

回答(1 个)

Yao Li
Yao Li 2013-4-12
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 个评论
Amar
Amar 2013-4-12
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???

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Schedule Model Components 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by