Derivative of state 'X? in block 'integrator' at time Y is not finite

1 回表示 (過去 30 日間)
Giuseppe
Giuseppe 2023 年 11 月 6 日
回答済み: Shreeya 2024 年 7 月 4 日
hello. i have a problem in a simulink model. i'm modelling the bycicle dynamics. i made a matlab fuction where i derivate my equations. my problem is that i have the sideslip angle (steering-(v+a1*yaw_rate)/u) and in same time, the u (longitudinal velocity) is 0 so in sideslip angle' s calculation there is a division for 0 that take the solutions not finite. i must use Ode4 fixed step so i can't change the solver type. how can resolve it?
thanks

回答 (1 件)

Shreeya
Shreeya 2024 年 7 月 4 日
Hello
A quick glance sugests that you want to handle a division by 0 in your Simulink Model. Here are a few workarounds for it:
  1. Add a conditional block in the model which deals with the edge case of u being equal to 0.
  2. You can also add a very small threshold to u, which can prevent a division by 0.
You can also refer to the answer linked below for more help:;
Let me know if this helps.

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by