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

조회 수: 4 (최근 30일)
Amar
Amar 2013년 4월 12일
댓글: Komal Khuwaja 2018년 3월 29일
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???
avneet kumar
avneet kumar 2015년 5월 23일
Thank you

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by