這裡是TOM對控制系統與馬達驅動控制技術的總複習
我們都知道,一般來說閉迴路系統會優於開迴路系統,但實際上兩者各有其優缺點,以下根據控制系統中的穩定度、靈敏度、輸入干擾和輸出雜訊等因素,對兩者的優缺點進行討論。
首先定義開路閉路系統與其靈敏度。
系統轉移函數 T = G(s),系統元件也是G(s)。可得
系統轉移函數
系統元件有G(s)和H(s)可分別求得
討論:
(一)根據靈敏度的概念,靈敏度的絕對值應該越小越好。
(二)閉迴路轉移函數較不受到受控廠元件的變動而改變
(三)在閉迴路系統中對感測器的靈敏度極高
新增電子學中的範例
對一個系統工程師而言,看懂BODE圖是基礎中的基礎,這邊會介紹筆者對於BODE圖原理與物理意義的理解。
想理解BODE PLOT首先需要知道什麼是系統的頻率響應,當系統運作在不同頻率的時候會發生什麼事?
先來看看wiki的解釋
In signal processing and electronics, the frequency response of a system is the quantitative measure of the magnitude and phase of the output as a function of input frequency.[1] The frequency response is widely used in the design and analysis of systems, such as audio and control systems, where they simplify mathematical analysis by converting governing differential equations into algebraic equations. In control systems, such as a vehicle's cruise control, it may be used to assess system stability, often through the use of Bode plots. Systems with a specific frequency response can be designed using analog and digital filters.
簡單來說頻率響應就是在探討弦波訊號輸入系統後,當時間趨近於無窮大的時候(穩態)系統的輸出行為。另外若為LTI系統輸入與輸出之間訊號的振幅與相位角會變而頻率不變如下圖。
所以若針對一個標準二階系統
若我們根據系統的振幅對頻率和相角對頻率去畫圖,並且將振幅轉換為db單位頻率則以log10為底表示,就是所謂的bodeplot。
from wiki
而根據系統波德圖我們可以定義兩個性能規格
出個作業
繪製下方轉移函數波德圖
系統轉移函數鑑別是bodeplot的用途之一,可經由實驗的量測結果來決定未知系統的轉移函數。
鑑別步驟
根據共振峰值我們可以對照系統的最大超越量,頻寬則能對照系統的setting time,也可以用來對未知系統進行轉移函數鑑別,但這些其實還不是bodeplot對一個系統工程師最大的用途,bodeplot其實還隱含了一個驚天秘密,就是對一個系統來說最重要的特性"穩定度"。
未完待續
根據Argument principle與Nyquist stability criterion我們可以歸納出簡化版的奈氏準則。
那就是若開路轉移函數GH在s平面的右半面沒有極點,則閉迴路系統是穩定的充分且必要條件是(-1+j0)點落在GH極座標圖沿著頻率增加方向的左邊。
而根據這個簡化版的奈氏準則,我們就能夠在頻域的分析中定義相對穩定度,其中可定義出兩個規格,分別是增益邊限(Gain Margin)與相位邊限(Phase Margin)。
這時候你一定心想幹又是Harry Nyquist在搞,在通訊原理的取樣定理還搞得不夠,控制系統繼續搞,我知道了閉迴路系統的相對穩定規格P.M.和G.M.後,但這跟BODEPLOT到底有甚麼關係呢?
其實簡單看兩張圖你就會懂了。這就是BODEPLOT判斷穩定度的原理,當時在電子學中真的學的霧煞煞,只知道P.M.要設計60度會穩定,到這邊就懂了!
但要特別注意這邊的波德圖是指開路轉移函數的波德圖喔!
除了"穩定度"是系統的一大考量外,許多性能規格的要求,也是一個好的控制系統不可忽略的要素,一般系統會要求時域規格(Overshoot、setting time、rising time、steady state erro)或頻域規格(共陣峰值、bandwidth、P.M.、G.M.),當原來的系統無法滿足這些規格的時候,我們在系統中增加補償器或稱控制器Gc(s),以調整系統達到我們想要的需求,下圖是古典控制系統中最典型的串聯補償架構。
古典控制學中串聯補償架構常見的控制器類型可分為
1.累計過去的錯誤以加速修正系統
2.消除微小的穩態誤差(連續的誤差累積)
可見下列網址迅速了解PID控制器的物理意義,但還是強烈建議閱讀自動控制相關書籍。
http://www.inpharmix.com/jps/PID_Controller_For_Lego_Mindstorms_Robots.html
https://zh.wikipedia.org/wiki/PID控制器
可同時改善暫態與穩態規格,但參數設計不易。
改良版PD控制器
Phase lead仍然與PD相同為高通濾波器,仍然會方大高頻雜訊,大高頻的增益下降所以雜訊抑制能力優於PD,而PD沒有極點故相對穩定度會優於Phase lead。
改良版PI控制器
Phase lag仍會降低相對穩定度,但其極點不再原點,相對穩定度優於PI;但相對的PI有原點上的極點能夠增加低頻增益,消除穩態誤差的能力較佳。
由bode圖設計phaselead or phaselag補償器時,通常會考慮P.M.根穩態誤差。
接下來以馬達驅動來介紹PID控制器,相位控制器先不討論
Intro to Conversion Method using Bilinear Transformation
回想一下
假定現在已經有連續時間的控制器
接著假定取樣時間
這樣的結果會有多好呢?經驗上來說極限是一個 cycle 10 個取樣點。在這個狀況下:
因此:
使用上面的逼近結果大約是 1.3142,而實際上的數字大約是 1.3691。誤差大約 4%。這個誤差看起來說大不大,說小也不小。所以只是一個勉強能用的設計。
Matched pole zero相對簡單運算能保留原本類比控制器的穩定度考量, 但loop dealy或是受控廠參數誤差會導致造成很大的偏差,所以若能精確考量loop delay和參數的系統可以考慮使用,且因為轉換方式只適用於能夠明確定義pole zero的控制器。
Tustin with prewarping 為泰勒逼近的結果且能在cutoff frequency 達到指定的P.M.,但會warped頻率響應,適用於無法明確考慮loop delay和受控廠參數的系統,且因為轉換方式是以泰勒展開近似成線性函數,所以能夠在無法明確定義pole zero的控制器上做數位實現。
In summary, pole-zero matching is a more accurate method that preserves the analog filter's characteristics in the digital domain, while Tustin with prewarping is a simpler method that can be used when the analog filter does not have a well-defined prototype or when the filter specifications are not well-defined.
Direct form and parallel form are two different structures used to implement digital filters in a digital controller. Both structures have their advantages and disadvantages and are suitable for different applications.
The main differences between direct form and parallel form are as follows:
Processing order: In direct form, the input signal is processed sequentially through a series of adders and multipliers. In parallel form, the input signal is split into multiple sub-signals, which are processed independently in parallel by subfilters.
Efficiency: Direct form is generally less efficient than parallel form, as it requires more processing time to generate the filtered output signal. Parallel form, on the other hand, can process the sub-signals in parallel, resulting in faster processing times.
Frequency response: Direct form provides a wider range of frequency response control as the coefficients are applied directly to the input signal. Parallel form, however, can provide better control over the frequency response in specific frequency ranges by processing different sub-signals with different subfilters.
Complexity: Direct form is a simpler structure than parallel form, as it requires fewer adders and multipliers to implement. Parallel form, however, is a more complex structure that requires additional circuitry to split the input signal into sub-signals and to combine the output signals of the subfilters.
In summary, direct form is generally simpler to implement but may have limited frequency response control, while parallel form is more complex but can provide better frequency response control and faster processing times. The choice between the two structures depends on the specific application and the performance requirements of the digital controller.
form chatgpt
fs>2W
古典控制學中的BIBO穩定ai部分分式係數ki重根數pi極點
根據BIBO定理
若透過部分分式表示的極點pi均小於0則g(t)在t無限大時為零,所以可推倒得知閉迴路轉移函數極點都小於0則系統穩定!
羅斯表
可延伸出root locus
現代控制學 漸進穩定
可偵測系統內部不穩定(右半邊極零點對消情形)
當系統之採樣頻率較低時,例如馬達速度迴路控制,此時系統中電子零件的運算延遲會對系統穩定度造成影響。在設計控制器時需要將此時間延遲納入考量。
根據傅立葉轉換當對f(t-T)進行傅立葉,可得
若分別對其Phase和大小進行分析可得
若繪製波德圖
可觀察出系統的GAIN不受影響,但PHASE在系統操作高頻時會嚴重影響P.M.降低系統相對穩定度。
根據開迴路的大小和相位關係,可得到閉迴路轉移函數在s平面上的軌跡,稱為根軌跡。根據大小跟相位關係可以歸納出7步驟,進行根軌跡的繪製。
可由根軌跡 訂定settling time overshooting