Transcript 19953025

Tuning of Fuzzy PID
Controllers
自動控制原理及設計
教授:曾慶耀 博士
學生:電研一 鄒長維 19953025
簡介:
• 本文研究Tuned Nonlinear Fuzzy PID、
Linear Fuzzy PID、PID 並如何依序逐級由
最容易設定gain之Linear PID經Linear
Fuzzy PID而達Tuned Nonlinear Fuzzy PID,
本來基於非線性致Rise time、Overshoot、
Settling time 之Gain factor 原則上設定困難,
期望藉Tuning of Fuzzy PID Controllers之
後續發展能對 Auto-tuned Fuzzy PID
Controllers 打下基礎。
2
Tuned Nonlinear Fuzzy PID
設計方向依序分四段:
• 1.先Tune a PID Controller
• 2.其次Equivalent Linear Fuzzy Controller
• 3.再其次Make the Fuzzy controller
nonlinear
• 4.最後 Fine tune it 。
3
Figure: Proportional controller with
load (L) and noise (n)
4
noise
Load
ref
kp
u
kp controller
proportional
controller
with load(L) and noise(n)
-Cprocess
x
1st step : Tuning a PID controller
• U= Kp (e +l/ Ti∫0t e*dτ + Td(de/dt))
Kp=Proportional gain, U: controller output
Ti :integral time Td: the derivative time , e: error
(ref-Y) y: Process output Ts: sampling period
• 若in discrete approximation則上式Un= Kp (en +l/
Ti ΣnJ=1 ej* Ts + Td(en-en-1)/ Ts)
• n: time instant tuning items : Kp 、Ti 、 Td ,當
純Propotional controller (P) 時
• Td=0 、1/ Ti=0 則Un= Kp(en)
5
上圖 proportional gain Kp ,
process 在steady state gain =K,
process output =X
• X= Kp K(Ref-n)/(1+ Kp K) + KL/(1+ Kp K)
• 當n、 L =0時 調高Kp 使X接近Ref 當L高值
則使系統不夠靈敏因應L,遇n 非零則適調
Kp 以免系統靈敏過度反而使干擾影響大
• 若考慮Process動態,當Kp 調整過高,系
統將不穩定,因此Kp 之最佳設定在於穩定
度、干擾靈敏度及負載調整等取得平衡。
6
Hand-tuning:
•
•
•
•
•
PID經驗法
Action Rise time Overshoot
Kp 增
變快
增加
Td 增
變慢
減少
1/ Ti增
變快
增加
Stability
變差
改善
變差
7
Hand-tuning程序 :
•
•
•
•
•
•
1.設定Td =0,1/ Ti =0
2.調整Kp 使輸出值如預定
3.再增加Kp及調Td 使Overshoot 變小
4.調整1/ Ti 使不偏離目標值
5.重複上述使Kp 越大越好
8
以上PID
• 優點:容易感覺此系統變化之掌握
• 缺點: 調整費時且很難確定最佳值
•
9
2nd step
進入Linear fuzzy
controller
• 將前述PID之結論改以本階段Linear fuzzy
controller去建構而取得同樣之輸出。
•
10
3rd step:
• transfer gains from PID to fuzzy controller
• (1)Fuzzy proportional controller (FP)
•
11
12
• 由上圖FPD∴E=GE*e
• controller output Un=f(GE*en)*GU≒
(GE*en)*GU=GE*GU* en 又∵GE*GU=kp
• 如果選﹝-100, 100﹞俱為input output universe
則上述近似最佳
• Max.en=1 ( 當ref=step 1 ) 則GE=100 已固定
• ∴GU=Kp/100
• 同理FPD(proportional and derivative control)、
FPD+I 如下
•
13
14
15
• FPD之 Change in error
• Cen≒ (en-en-1)/Ts
Un=f(GE*en,GCE*Cen)GU≒
(GE*en+GCE*Cen)*GU
• =GE*GU*(en+GCE*cen/GE)
• 其中GE*GU=Kp
• GCE/GE=Td
16
17
• 在FInc:經推算
•
Un=GCE*GCU*﹝GE/GCE Σi=1nei
*Ts+en﹞
• 而 GCE*GCU=Kp GE/GCE=1/Ti
• FPD+I
Un≒GE*GU*﹝en+(GCE*cen/GE)+ien*GIE/
GE﹞,而比較知
GE*GU=Kp,GCE/GE=Td,GIE/GE=1/Ti
比較
•
•
•
•
•
•
•
Controller advantage
disadvantage
FP
simple
Maybe too simple
FPD
Less overshoot Noise sensitive,
derivative kick
FInc removes steady
slow
state error
smooth control signal
18
• FPD+I All in one Windup,derivative kick
• 結論:
• 1.為了儘快穩定且減少overshoot之最佳選
擇是FPD
2.考慮穩態誤差則FInc ,FPD+I 是最佳選擇。
19
PID gain 與FUZZY 關係
•
•
•
•
•
•
Controller
Kp
1/Ti
Td
FP
GE*GU
FInc
GCE*GCU GE/GCE
FPD
GE*GU
GCE/GE
FPD+I GE*GU GIE/GE GCE/GE
20
4th-5th step :
• 4th step :本階段把前步驟之線性前提在本
階段改為非線性,實務上Rule base 採 3
input terms * 3 input terms=9 Rules
• 5th step : 本階段細調(Fine-tuning the nonlinear fuzzy controller),如何選擇GAIN傳統
憑直覺及經驗,
•
21
一般經驗守則如下:
•
•
1.the sample period: .the sample period 取值太
短則Cen 計算值對雜訊太敏感,一旦sample
period改變則gain factor也隨之調整使各增益值
完好不變
2.GE:GE值太大時因為Ki integral gain 太高致
FInc 較不穩定;就FPD言,GE影響
proportional gain(Kp) 、derivative gain(Kd),
一般使GE儘量大以減少雜訊又同時保持高值
proportional gain(Kp)﹔FPD+I而言,一般使GE
儘量大寧願犧牲integral gain(Ki)、derivative
gain(Kd)以保持高值proportional gain(Kp) 22
•
3.GCE:同上述,一般就FPD言,GCE較
大是使derivative gain(Kd)變大而不影響
到proportional gain(Kp),為減少雜訊
GCE儘量小。就FInc而言: GCE較大使
proportional gain(Kp)變大而減少integral
gain(Ki),因此一般使GCE儘量大以保穩
定。就FPD+I 而言,GCE較大則使
derivative gain(Kd)增加,因此一般使
GCE儘量小。
23
•
GCU或GU:此二者皆影響proportional
gain(Kp),因此一般使GCU、GU儘量大
又不致使overshoot太大,如果大過頭將
導致系統不穩,若太小則使系統反應慢。
•
24
摘要及結論
1.Insert a crisp PID and tune it
2.Insert a linear FPD+I
3.Transfer Kp、Td and l/Ti to GE、GCE、GIE
and GU
4.Insert a nonlinear rule base
5.Fine-tune using hand-tuning :use GE to
improve the rise time ,GCE to dampen
overshoot ,and GIE to remove any steady
state error
25
•
•
•
•
報告完畢
謝謝
26