sample code for PID controller

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

sample code for PID controller

ソリューションへジャンプ
6,942件の閲覧回数
koka
Contributor I
hello everyone.
i'm working on MC9S08QD2 8-bit and 8-pin microcontroller, so i have to implement PID control for output current in my application. so can anyone tell me how to calculate Kp,Ki and Kd values. and if anyone provide me the sample code for PID control, i wll be so much thankfull. and also if any application notes and reference for PID for this microcontroller is there , please send the link , i will download.

so if anyone know please send me as early as possible.
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
2,266件の閲覧回数
Kopone
Contributor IV

Hi,

 

there are plenty of application notes out there on how to implement PID compensation.

E.g. Freescale offers AN1215 for download. Get it here

For more, just use Google.

If you really want to calculate Kp, Ki, Kd, you need to get into control theory, set up the closed loop equation for your particular application (which implies having a suitable model of the response characteristic of each component), define your requirements for speed, accuracy and stability range of your control and then go from there.

You might be better off  by simply setting up a lab experiment and find suitable values by trial and error. Start with P (keep D and I set to zero first).

 

Regards,

 Sven

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,267件の閲覧回数
Kopone
Contributor IV

Hi,

 

there are plenty of application notes out there on how to implement PID compensation.

E.g. Freescale offers AN1215 for download. Get it here

For more, just use Google.

If you really want to calculate Kp, Ki, Kd, you need to get into control theory, set up the closed loop equation for your particular application (which implies having a suitable model of the response characteristic of each component), define your requirements for speed, accuracy and stability range of your control and then go from there.

You might be better off  by simply setting up a lab experiment and find suitable values by trial and error. Start with P (keep D and I set to zero first).

 

Regards,

 Sven

0 件の賞賛
返信
2,266件の閲覧回数
Thyristercontro
Contributor I

Hello Sir,

 

i am using MCF51CN128 microcontroller.

i want ot impliment PID controller using this microcontroller.

my feedback is current (DC) and using is current i vl control voltage. do you have any idea? please tell me

0 件の賞賛
返信