changing Kp value in a loop for PID tuning

1 回表示 (過去 30 日間)
Almamy KANTE
Almamy KANTE 2020 年 5 月 15 日
回答済み: Fangjun Jiang 2020 年 5 月 15 日
Hello Everyone can someone help me with this error :
The following error occurred converting from pid to double:
Conversion to double from pid is not possible.
Kp = 1;
for i=1:3
C(:,:,i)= pid(Kp);
Kp = Kp + 10;
end
Thank you all

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2020 年 5 月 15 日
pidsys=pid(1) creats a PID controller. pidsys is an object with the class of 'pid'. You can run class(pidsys) or get(pidsys) to find out.
You seem to assign a PID controller to a numerical array C with double data type. That is the error message.

カテゴリ

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