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!