當前位置:首頁 » 操作系統 » pid控制演算法的實現

pid控制演算法的實現

發布時間: 2023-02-19 22:54:17

Ⅰ 用PID演算法實現溫度控制

第一步:把器件等各種實物連上...
第二步:開環,對PWM的控溫信號加階躍(改變PWM的占空比),由輸入輸出的結果大致得出加熱器的數學模型
第三部:由理論公式整定出PID參數
第四部:根據實際結果調節PID以達到你想要的指標

Ⅱ pid控制演算法的DSP程序設計與實現

typedef struct PID {

int SetPoint; // 設定目標 Desired value

int Proportion; // 比例常數 Proportional Const
int Integral; // 積分常數 Integral Const
int Derivative; // 微分常數 Derivative Const

unsigned int LastError; // Error[-1]
unsigned int PrevError; // Error[-2]
unsigned int SumError; // Sums of Errors

// double Lastout; //上次輸出
unsigned int E1; // e1>e2
unsigned int E2; //

int Pmax;//上限
int Pmin;//下限

} PID;

/*====================================================================================================
PID計算部分,遇限消弱積分PID防飽和,積分分離演算法實現
=====================================================================================================*/

int PIDCalc( PID *pp, unsigned int NextPoint )
{
int dError,
Error;

Error = pp->SetPoint - NextPoint; //偏差
if (Error<=-pp->E1) return (pp->Pmin); //飽和
else if (Error>=pp->E1)
return (pp->Pmax);
else
{
dError = pp->LastError - pp->PrevError; // 當前微分
pp->PrevError = pp->LastError;
pp->LastError = Error;
if (Error>=pp->E2||Error<=-pp->E2) //分離
return (pp->Proportion * Error // 比例項
+ pp->Derivative * dError );//PD,考慮限幅
else //位置式
{
pp->SumError += Error; // 積分
return (pp->Proportion * Error // 比例項
+ pp->Integral * pp->SumError // 積分項
+ pp->Derivative * dError // 微分項 //PID
);
}
}
}

Ⅲ PID控制器是如何實現的

In the conventional PID control algorithm, the proportional, integral and derivative parts are implemented in the forward loop, thus acting on the error between the set-point and closed-loop response. This PID controller implementation may lead to an undesirable phenomenon, namely the derivative kick. Also, by moving the PD part into an inner feedback loop, an unstable or integrating process can be stabilized and then controlled more effectively by the PI controller in the forward path. 在傳統的 PID 控制演算法中將因此根據之間設置點和閉環響應錯誤的正向循環中實現比例、 積分和衍生金融工具的部件。 此 PID 控制器實現可能會導致一個不良的現象就是衍生的踢。 同時,通過將局部放電的一部分移動到一個內部反饋循環,一個不穩定的或將集成過程可以穩定,然後向前路徑中的 PI 控制器通過更有效地控制。
Therefore, the control structure shown in Fig. 1, which is known as a PI-PD control structure, has been proposed. In this structure, G(s) is the plant transfer function因此,提出控制結構,稱為 PI-PD 控制結構的圖 1 所示。 在這種結構 G(s) 是植物傳遞函數
and GPI(s) and GPD(s) are the PI and PD controller transfer functions, respectively, which have the following ideal forms: 與 GPI(s) 和 GPD(s) PI 和 PD 控制器傳輸功能,分別是,哪有以下的理想形式:

This structure, which uses an inner feedback loop, is not a totally new concept. Benouarets [11] was the first to mention the PI-PD controller structure. Unfortunately, its true potential was not recognized there as it was used to control plants with simple stable real pole transfer functions where its advantages are relatively minor. Later, Kwak et al. [6] and Park et al. [2] used a PID-P control structure for controlling integrating and unstable processes, respectively. However, as they still use the derivative term, D, in the forward path, the structure這種結構,使用一個內反饋循環,不是一種全新的概念。 Benouarets [11] 率先提 PI-PD 控制器結構。 不幸的是,它的真正潛力未被識別存在,它用來控制植物與真正的簡單穩定桿傳遞函數,其優點是相對較小。 稍後,郭 et al.[6] 和 [2] 公園 et al.,分別控制集成和不穩定的進程使用-P PID 控制結構。 但是,作為他們仍使用該結構正向的路徑中的衍生金融工具的術語 D,
may result in a derivative kick. Also, they use a gain only controller to alter the open-loop unstable or integrating processes to open-loop stable processes and then可能會導致衍生的踢。 他們還,改變開環穩定進程的開環不穩定或集成過程使用增益唯一控制器,然後
use the PID controller for an effective control of the overall system. It is better to use an inner feedback loop with a PD controller rather than a P-only controller, as this not only converts the open-loop unstable or integrating processes to open-loop stable processes but also guarantees more suitable pole locations. To clarify this better, consider the PD controller of the form given by
Eq. 2 and a general plant transfer function of 使用一個有效的控制整個系統的 PID 控制器。 最好 PD 控制器,而不是一個只 P 的控制器使用一個內反饋循環,因為這不僅能將開環不穩定或集成流程轉換為開環穩定進程,也保證了更適合桿位置。 若要更好地闡明這,考慮給予式 2 和一個總廠傳遞函數的窗體的 PD 控制器The closed-loop transfer function for the inner loop, 在內部的循環的閉環傳遞函數
with G(s) given by Eq. 3, is獲式 3 G(s),是

provided that n>m+2. The modification in the last two erms of the denominator of Eq. 4, e to the insertion f the PD controller used in the feedback loop, is clear. 提供該 n > m + 2。 由於到使用反饋及時插入 f 規劃署控制器的式 4,分母的最後兩個條款的修改是清晰
Let us assume that the coefficients a0 and a1 take suitable alues to make the plant transfer function given in Eq. 3 unstable, integrating or a resonant plant transfer讓我們假定您與系數 a0 a1 採取適當 alues 進行傳遞函數方程 3 不穩定,集成中給出的植物或共振的植物傳輸
function. The PD controller used in the inner feedback loop can be used to convert it to an open-loop stable plant transfer function for the PI controller used in the函數。 內反饋循環中使用的 PD 控制器可用來將其轉換為一個開環穩定植物傳遞函數中使用的 PI 控制器,
forward loop, which can then be used for a more satisfactory closed-loop performance. Another point, which should be pointed out, is that the use of the PI-PD controller gives more flexibility than a PID-P controller to locate the poles of open-loop plant transfer function Gil(s) in more desired locations, with the simultaneous轉發,然後可用於更令人滿意的閉環性能的循環。 應該指出,另一點是 PI-PD 控制器的使用提供更大的靈活性,比在更多所需的位置,同時與找到的開環植物傳遞函數 Gil(s) 桿將-P PID 控制器
use of Kf and Td rather than a gain-only parameter Kf. 使用的 Kf 和 Td 而不是只增益參數 Kf
呵呵,在線翻譯的。

Ⅳ PID控制演算法應用

一個直接輸出控制量,一個輸出控制量的增量可通過累加得到控制量,應用場合不同,有些比如步進電機進給控制位移,適合用增量式,被控對象本身有積分功能,電機速度控制可以選擇位置式,直接輸出控制電壓。但也不絕對,看應用需要

熱點內容
sqlifnotexists 發布:2025-08-02 02:02:14 瀏覽:127
如何製作伺服器的懸空標題字 發布:2025-08-02 01:57:49 瀏覽:843
唱吧上傳撤銷 發布:2025-08-02 01:48:11 瀏覽:693
區域網伺服器不能用ip訪問 發布:2025-08-02 01:47:20 瀏覽:540
c語言日誌 發布:2025-08-02 01:39:14 瀏覽:489
詳細編程 發布:2025-08-02 01:17:13 瀏覽:349
怎麼查看wifi的密碼 發布:2025-08-02 00:46:24 瀏覽:928
linux工具開發 發布:2025-08-02 00:44:52 瀏覽:688
c語言編程我愛你 發布:2025-08-02 00:40:12 瀏覽:946
車銑復合加工編程 發布:2025-08-02 00:39:21 瀏覽:49