Linearization error "NaN's cannot be converted to logicals"
古いコメントを表示
I get the error. " NaN's cannot be converted to Logicals" when trying to linearize my model. The model runs actually with no problem. the problem arises only when linearizing the model in control design. I don't know what exactly simulink does during linearazation that causes this error.
採用された回答
その他の回答 (3 件)
Barton Bacon
2023 年 10 月 24 日
1 投票
This just happened to me and the culprit was a square root block I had recently added to a simulation.... believe it or not. Changing the square root block to a power block and using .5 as the exponent for some reason allowed the linearization to proceed without the "NaN's cannot be converted into logicals" error. MATHWORKS what the heck is going on in the square root and reciprocal square block that would produces this problem in linearization? Those blocks linearize fine by themshelves in a their own block diagram. In a complicated simulation, not so much apparently.
Welid Benchouche
2019 年 1 月 4 日
0 投票
hello guys, can you please help me , i get the same error on model predictive control when linearizing Rc=0.15
2 件のコメント
Hossein Rezazadeh
2019 年 1 月 4 日
編集済み: Hossein Rezazadeh
2019 年 1 月 4 日
Apicha Kittirattanachai
2020 年 8 月 21 日
please kindly explain "integrators in your model they should be responsible for "NaNs" "
How are integrators setting for response the NaN value ?
My problem is appear in mpc toolbox when linearize of toolbox.
Thankyou.
Ahmed Elgohary
2022 年 3 月 5 日
編集済み: Ahmed Elgohary
2022 年 3 月 5 日
0 投票
Well, i got the same error with model predictive control during linearization and i could solve the problem by changing the range of simulink operating point as shown at the figure. So it was from [0 1] and i made it from [0.1 1] for example as you want for the upper limit but the main problem was related to using zero for lower limit during the linearization.

カテゴリ
ヘルプ センター および File Exchange で Controller Creation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!