フィルターのクリア

i gain of PID controller has nan value.(simulink)

12 ビュー (過去 30 日間)
Daehee Lim
Daehee Lim 2020 年 5 月 20 日
コメント済み: 勇刚 张 2022 年 5 月 19 日
I'm controlling a segway with PID controller and I have a problem about PID controller block.
From the pic above, input of PID controller block(PI controller is in the picture, however, all controllers which contains integral gain have the same problem) is non nan value, however, the output of PID controller is nan.
I checked all data types and there are no problems.
Two inputs of Pitch controller is from the attitude of my hardware and they are also normal integer.
I don't know why the output of PID controller is nan value.
Also, when I change the input of pitch_angle into constant block(e.g. 0.1318), PID has normal value.
How can I solve my problem?
  1 件のコメント
Arkadiy Turevskiy
Arkadiy Turevskiy 2020 年 10 月 7 日
Strange. Hard to troubleshoot without your model. Can you please contact tech support?

サインインしてコメントする。

回答 (1 件)

Ankur Bose
Ankur Bose 2021 年 9 月 28 日
This can be happening if for an initial brief period of time, any one of the inputs to PID was NaN. Even though the input values might have been fixed to some proper values, the PID block stores the states and hence you still see NaN.
Couple of ways to fix this
  1. Ensure that initial inputs are not NaN. in PX4 thing might happen when you are trying to read from vehicle attitude connected to rotation block. Initially the estimator might not have started which caues attitude not to be published and hence uORB block retutns [0 0 0 0] as quat which are invalid and hence rotation block computes NaN and passes to PID. Eventually this might be fixed but PID will still store NaN.
  2. Reset the PID block using and external signal when values are stored
  1 件のコメント
勇刚 张
勇刚 张 2022 年 5 月 19 日
your answer is good for me!
Out of PID is normal.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePID Controller Tuning についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by