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
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
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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!