程序設(shè)計方法模擬量控制ppt課件_第1頁
程序設(shè)計方法模擬量控制ppt課件_第2頁
程序設(shè)計方法模擬量控制ppt課件_第3頁
程序設(shè)計方法模擬量控制ppt課件_第4頁
程序設(shè)計方法模擬量控制ppt課件_第5頁
已閱讀5頁,還剩60頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、Date: 2022-5-10File No.: SSP1_03C.1SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation第第7章章 S7-300程序設(shè)計方法程序設(shè)計方法模擬量控制模擬量控制Date: 2022-5-10File No.: SSP1_03C.2SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Au

2、tomation7.1 S7-300的程序構(gòu)造的程序構(gòu)造7.2 系統(tǒng)設(shè)計的原那么系統(tǒng)設(shè)計的原那么7.3 系統(tǒng)設(shè)計的內(nèi)容系統(tǒng)設(shè)計的內(nèi)容7.4 程序設(shè)計的方法與過程程序設(shè)計的方法與過程7.5 開關(guān)量控制系統(tǒng)的設(shè)計開關(guān)量控制系統(tǒng)的設(shè)計7.6 關(guān)于模擬量關(guān)于模擬量I/O模塊模塊7.7 模擬量控制系統(tǒng)的設(shè)計模擬量控制系統(tǒng)的設(shè)計7.8 關(guān)于乒乓控制關(guān)于乒乓控制7.9 關(guān)于關(guān)于PID控制控制Date: 2022-5-10File No.: SSP1_03C.3SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training Cen

3、terKnowledge for Automation7.6 關(guān)于模擬量關(guān)于模擬量I/O模塊模塊消費(fèi)過程消費(fèi)過程物理量規(guī)范的模擬信號傳感器變送器 壓力 溫度 流量 速度 pH 值 粘性 等 500mV 1V 5V 10V 20mA4.20mA等DACPQW .PQW .:PQW .模擬量輸出模塊模擬量輸出模塊MR模塊ADC結(jié)果存儲器PIW .PIW .:PIW .模擬量輸入模塊模擬量輸入模塊CPU:L PIW 304T PQW 320:模擬執(zhí)行器 物理量.量程卡量程卡Date: 2022-5-10File No.: SSP1_03C.4SIMATIC S7Siemens AG 2000. Al

4、l rights reserved.Information and Training CenterKnowledge for Automation1 量程卡量程卡Date: 2022-5-10File No.: SSP1_03C.5SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation2 S7-300模擬量模塊的尋址模擬量模塊的尋址IM256 to270336 to350352 to366368 to382304 to318320 to33427

5、2 to286288 to302 (發(fā)送) 槽口號 2 3 4 5 6 7 8 9 10 11 384 to398400 to414432 to446448 to462464 to478480 to494496 to510416 to430機(jī)架機(jī)架 1R0電源模塊IM(接納) 電源模塊CPU512 to526528 to542544 to558560 to574576 to590592 to606608 to622624 to638機(jī)架機(jī)架 2IM(接納) 電源模塊機(jī)架機(jī)架 3640to654656to670672to686688 to702704 to718720 to734736 to75

6、0752 to766IM(接納) 電源模塊Date: 2022-5-10File No.: SSP1_03C.6SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation3 模擬量模塊模擬量模塊SM335 (輸入輸入)Date: 2022-5-10File No.: SSP1_03C.7SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowl

7、edge for Automation4 模擬模塊模擬模塊SM335 (輸出輸出)Date: 2022-5-10File No.: SSP1_03C.8SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation5 5 模擬輸入模塊模擬輸入模塊 SM331 SM331Date: 2022-5-10File No.: SSP1_03C.9SIMATIC S7Siemens AG 2000. All rights reserved.Information

8、and Training CenterKnowledge for Automation6 模擬量的表達(dá)方式和丈量值的分辨率模擬量的表達(dá)方式和丈量值的分辨率20212223242526272829210211212213214VZ16進(jìn)制.位值十進(jìn)制0123456789101112131415位的序號單位位的分辨率+ 符號111*15*= 0 或 18000000001128*8402010840000000000000000000002164132116181412*91011121314Date: 2022-5-10File No.: SSP1_03C.10SIMATIC S7Siemens

9、 AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation7 在不同丈量范圍下模擬量的表達(dá)方式在不同丈量范圍下模擬量的表達(dá)方式范圍超上限超上界額定范圍超下界超下限丈量范圍 10V電壓例如:= 11.75911.7589 :10.000410.00 7.50 :-7.5-10.00- 10.0004 :- 11.759= 22.81522.810 :20.000520.00016.000 : :4.0003.9995 :1.1852= 1000.11000.0 :850.1850.0

10、: : :-200.0- 200.1 :- 243.0=352.778352.767 :300.011300.000225.000 : :0.000不允許負(fù)值單位3276732511 :276492764820736 : :0- 32768- 1 :- 4864Date: 2022-5-10File No.: SSP1_03C.11SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation8 模擬輸入量的規(guī)范化模擬輸入量的規(guī)范化(可隨模塊帶的軟件塊可

11、隨模塊帶的軟件塊 FC105 )500,00,0027648Date: 2022-5-10File No.: SSP1_03C.12SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation9 模擬量輸出的規(guī)范化模擬量輸出的規(guī)范化(可隨模塊帶的軟件塊可隨模塊帶的軟件塊 FC106 )276480 0,0100,0Date: 2022-5-10File No.: SSP1_03C.13SIMATIC S7Siemens AG 2000. All rig

12、hts reserved.Information and Training CenterKnowledge for Automation10 模擬輸出量的表達(dá)方式模擬輸出量的表達(dá)方式范圍超上限超上界額定范圍超下界超下限單位=3276732511 :2764927648 :0 :- 6912- 6913 : : :- 27648- 27649 :- 32512=- 32513 輸出范圍:電壓011.7589 :10.000410.0000 : 00 to 10V1 to 5V05.8794 :5.00025.0000 :1.0000011.7589 :10.000410.0000 : 0 : :

13、 : : : : :-10.0000- 10.0004 :- 11.75890 10V 00.99990 0 輸出范圍: 電流023.515 :20.000720.000 : 00 to 20mA4 to 20mA022.81 :20.00520.000 :4.000023.515 :20.000720.000 : 0 : : : : : : :-20.000- 20.007 :- 23.5150 20mA 03.99950 0Date: 2022-5-10File No.: SSP1_03C.14SIMATIC S7Siemens AG 2000. All rights reserved.I

14、nformation and Training CenterKnowledge for Automation11 配置模擬量模塊配置模擬量模塊SM335Date: 2022-5-10File No.: SSP1_03C.15SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation12 12 配置模擬量模塊配置模擬量模塊 SM331 SM331Date: 2022-5-10File No.: SSP1_03C.16SIMATIC S7Siemens

15、AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation13 構(gòu)造化的極限監(jiān)視功能(可隨模塊帶的軟件塊 FB120 )FB120ACTVHLLLHYSQH QL LIMIT模擬變量的實(shí)踐值HLLLHYSHYSQH QL t功能 符號LO_LIMHI_LIMDate: 2022-5-10File No.: SSP1_03C.17SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKn

16、owledge for Automation7.7 模擬量控制系統(tǒng)的設(shè)計模擬量控制系統(tǒng)的設(shè)計1. 關(guān)于模擬量控制系統(tǒng)關(guān)于模擬量控制系統(tǒng) 模擬量控制系統(tǒng)是指輸入信號為模擬量的控制系統(tǒng)。控制系統(tǒng)的模擬量控制系統(tǒng)是指輸入信號為模擬量的控制系統(tǒng)??刂葡到y(tǒng)的控制方式上可分為開環(huán)控制和閉環(huán)控制??刂品绞缴峡煞譃殚_環(huán)控制和閉環(huán)控制。 閉環(huán)控制根據(jù)其設(shè)定值的不同,又可分為調(diào)理系統(tǒng)和隨動系統(tǒng)兩閉環(huán)控制根據(jù)其設(shè)定值的不同,又可分為調(diào)理系統(tǒng)和隨動系統(tǒng)兩種。調(diào)理系統(tǒng)的設(shè)種。調(diào)理系統(tǒng)的設(shè) 定值是由控制系統(tǒng)的控制器給出,控制器的作定值是由控制系統(tǒng)的控制器給出,控制器的作用就是使反響值向給定值接近,以反響值對設(shè)定值的偏向最

17、小為用就是使反響值向給定值接近,以反響值對設(shè)定值的偏向最小為目的。隨動系統(tǒng)的設(shè)定值是由被控制對象給出的,控制器的作用目的。隨動系統(tǒng)的設(shè)定值是由被控制對象給出的,控制器的作用就是使控制目的不斷地向被控對象接近。各種跟蹤系統(tǒng)都是隨動就是使控制目的不斷地向被控對象接近。各種跟蹤系統(tǒng)都是隨動系統(tǒng)。系統(tǒng)。 模擬量控制系統(tǒng)設(shè)計中應(yīng)該留意抗干擾問題。處理干擾的方法有模擬量控制系統(tǒng)設(shè)計中應(yīng)該留意抗干擾問題。處理干擾的方法有4個。個。 其一是接地問題。這里包括其一是接地問題。這里包括PLC接地端的接地,要真接地不要假接地端的接地,要真接地不要假接地。這里所說的接地就是接大地。接地。這里所說的接地就是接大地。 其

18、二是模擬信號線的屏蔽向題,屏蔽線的始端和終端都要接地。其二是模擬信號線的屏蔽向題,屏蔽線的始端和終端都要接地。信號線的屏蔽是防止干擾的重要措施。信號線的屏蔽是防止干擾的重要措施。 其三是對某些高頻信號要處理匹配問題。假設(shè)不匹配很容易在信其三是對某些高頻信號要處理匹配問題。假設(shè)不匹配很容易在信號傳送中引進(jìn)干擾,使信息失真。號傳送中引進(jìn)干擾,使信息失真。 其四是對信號進(jìn)展濾波。其四是對信號進(jìn)展濾波。Date: 2022-5-10File No.: SSP1_03C.18SIMATIC S7Siemens AG 2000. All rights reserved.Information and Tr

19、aining CenterKnowledge for Automation2.2.模擬量控制系統(tǒng)設(shè)計舉例模擬量控制系統(tǒng)設(shè)計舉例 1 1攪拌控制系統(tǒng)線性程序設(shè)計攪拌控制系統(tǒng)線性程序設(shè)計S7-PRO111S7-PRO111 初始形狀及初始形狀及 操作工藝操作工藝 硬件設(shè)計硬件設(shè)計 軟件系統(tǒng)構(gòu)造軟件系統(tǒng)構(gòu)造Date: 2022-5-10File No.: SSP1_03C.19SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationOB1塊塊Date:

20、2022-5-10File No.: SSP1_03C.20SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationOB1續(xù)續(xù)Date: 2022-5-10File No.: SSP1_03C.21SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationOB1續(xù)續(xù)Date: 2022-5-10File

21、No.: SSP1_03C.22SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationOB1續(xù)續(xù)Date: 2022-5-10File No.: SSP1_03C.23SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation OB100塊塊Date: 2022-5-10File No.: SSP1_0

22、3C.24SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation 系統(tǒng)仿真系統(tǒng)仿真I0.0=ONI0.0=ONPIW256100 Q4.0=ONPIW256=100 Q4.0=OFF Q4.1=ONPIW256=100 Q4.0=OFF Q4.1=ONPIW256=200 Q4.1=OFF Q4.2=OFF T1PIW256=200 Q4.1=OFF Q4.2=OFF T1T1=ON Q4.2=OFF Q4.3=ON PIW256=0 T2T1=

23、ON Q4.2=OFF Q4.3=ON PIW256=0 T2T2=ON Q4.3=OFFT2=ON Q4.3=OFFDate: 2022-5-10File No.: SSP1_03C.25SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation3 3構(gòu)造化軟件設(shè)計構(gòu)造化軟件設(shè)計S7-PRO112S7-PRO112 系統(tǒng)構(gòu)造系統(tǒng)構(gòu)造OB1OB1塊塊Date: 2022-5-10File No.: SSP1_03C.26SIMATIC S7Sieme

24、ns AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationOB1續(xù)續(xù)Date: 2022-5-10File No.: SSP1_03C.27SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationOB1續(xù)續(xù)Date: 2022-5-10File No.: SSP1_03C.28SIMATIC S7Siemens AG 2000. Al

25、l rights reserved.Information and Training CenterKnowledge for AutomationOB1續(xù)續(xù)Date: 2022-5-10File No.: SSP1_03C.29SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationFB1FC1Date: 2022-5-10File No.: SSP1_03C.30SIMATIC S7Siemens AG 2000. All rights rese

26、rved.Information and Training CenterKnowledge for AutomationFC2Date: 2022-5-10File No.: SSP1_03C.31SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationOB100Date: 2022-5-10File No.: SSP1_03C.32SIMATIC S7Siemens AG 2000. All rights reserved.Information

27、 and Training CenterKnowledge for AutomationDB1DB2Date: 2022-5-10File No.: SSP1_03C.33SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation 系統(tǒng)仿真系統(tǒng)仿真I0.0=ONI0.0=ONPIW256100 Q4.0=ONPIW256=100 Q4.0=OFF Q4.1=ONPIW256=100 Q4.0=OFF Q4.1=ONPIW256=200 Q4.1=OF

28、F Q4.2=OFF T1PIW256=200 Q4.1=OFF Q4.2=OFF T1T1=ON Q4.2=OFF Q4.3=ON PIW256=0 T2T1=ON Q4.2=OFF Q4.3=ON PIW256=0 T2T2=ON Q4.3=OFFT2=ON Q4.3=OFFDate: 2022-5-10File No.: SSP1_03C.34SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation7.8 關(guān)于乒乓控制關(guān)于乒乓控制1 乒乓控制

29、算法乒乓控制算法2 乒乓控制算法的實(shí)現(xiàn)乒乓控制算法的實(shí)現(xiàn)S7_PRO113FC1塊塊Date: 2022-5-10File No.: SSP1_03C.35SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationFC1續(xù)續(xù)Date: 2022-5-10File No.: SSP1_03C.36SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterK

30、nowledge for AutomationDB1塊塊OB1塊塊Date: 2022-5-10File No.: SSP1_03C.37SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation 仿真仿真 檢測值小于低限,輸出為檢測值小于低限,輸出為ON。 檢測值大于低限,輸出為檢測值大于低限,輸出為OFF。Date: 2022-5-10File No.: SSP1_03C.38SIMATIC S7Siemens AG 2000. All righ

31、ts reserved.Information and Training CenterKnowledge for Automation7.9 關(guān)于關(guān)于PID控制控制1 閉環(huán)閉環(huán)PID控制控制 PID控制器管理輸出數(shù)值,以便將偏向控制器管理輸出數(shù)值,以便將偏向(e)為零,使系統(tǒng)到達(dá)穩(wěn)定為零,使系統(tǒng)到達(dá)穩(wěn)定形狀。偏向是給定值形狀。偏向是給定值SP和過程變量和過程變量PV的差。的差。 Date: 2022-5-10File No.: SSP1_03C.39SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training C

32、enterKnowledge for Automation2 PID算法算法 PID控制原那么以以下公式為根底,其中將輸出控制原那么以以下公式為根底,其中將輸出M(t)表示成比例表示成比例項(xiàng)、積分項(xiàng)和微分項(xiàng)的函數(shù):項(xiàng)、積分項(xiàng)和微分項(xiàng)的函數(shù): 其中其中 M(t) 為為PID運(yùn)算的輸出,是時間的函數(shù)運(yùn)算的輸出,是時間的函數(shù) Kp 為為 PID回路的比例系數(shù)回路的比例系數(shù) Ki 為為 PID回路的積分系數(shù)回路的積分系數(shù) Kd 為為PID回路的微分系數(shù)回路的微分系數(shù) e 為為PID回路的偏向給定值和過程變量之差回路的偏向給定值和過程變量之差 Minital 為為PID回路輸出的初始值回路輸出的初始值D

33、ate: 2022-5-10File No.: SSP1_03C.40SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation 為了在數(shù)字計算機(jī)內(nèi)運(yùn)轉(zhuǎn)此控制函數(shù),必需將延續(xù)函數(shù)化成為偏向?yàn)榱嗽跀?shù)字計算機(jī)內(nèi)運(yùn)轉(zhuǎn)此控制函數(shù),必需將延續(xù)函數(shù)化成為偏向值的延續(xù)采樣。數(shù)字計算機(jī)運(yùn)用以下相應(yīng)公式為根底的離散化值的延續(xù)采樣。數(shù)字計算機(jī)運(yùn)用以下相應(yīng)公式為根底的離散化PIDPID運(yùn)算模型。運(yùn)算模型。其中其中: Mn : Mn 為采樣時辰為采樣時辰n n的的PIDPI

34、D運(yùn)算輸出值運(yùn)算輸出值 Kp Kp 為為 PIDPID回路的比例系數(shù)回路的比例系數(shù) Ki Ki 為為 PIDPID回路的積分系數(shù)回路的積分系數(shù) Kd Kd 為為PIDPID回路的微分系數(shù)回路的微分系數(shù) en en 為采樣時辰為采樣時辰n n的的PIDPID回路的偏向回路的偏向 en-1 en-1 為采樣時辰為采樣時辰n-1n-1的的PIDPID回路的偏向回路的偏向 el el 為采樣時辰為采樣時辰l l的的PIDPID回路的偏向回路的偏向 Minital Minital 為為PIDPID回路輸出的初始值回路輸出的初始值Date: 2022-5-10File No.: SSP1_03C.41SI

35、MATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation 在此公式中,第一項(xiàng)叫做比例項(xiàng),第二項(xiàng)由兩項(xiàng)的和構(gòu)成,叫積在此公式中,第一項(xiàng)叫做比例項(xiàng),第二項(xiàng)由兩項(xiàng)的和構(gòu)成,叫積分項(xiàng),最后一項(xiàng)叫微分項(xiàng)。比例項(xiàng)是當(dāng)前采樣的函數(shù),積分項(xiàng)是分項(xiàng),最后一項(xiàng)叫微分項(xiàng)。比例項(xiàng)是當(dāng)前采樣的函數(shù),積分項(xiàng)是從第一采樣至當(dāng)前采樣的函數(shù),微分項(xiàng)是當(dāng)前采樣及前一采樣的從第一采樣至當(dāng)前采樣的函數(shù),微分項(xiàng)是當(dāng)前采樣及前一采樣的函數(shù)。在數(shù)字計算機(jī)內(nèi),這里既不能夠也沒有必要存儲全部偏向函數(shù)。

36、在數(shù)字計算機(jī)內(nèi),這里既不能夠也沒有必要存儲全部偏向項(xiàng)的采樣。由于從第一采樣開場,每次對偏向采樣時都必需計算項(xiàng)的采樣。由于從第一采樣開場,每次對偏向采樣時都必需計算其輸出數(shù)值,因此,只需求存儲前一次的偏向值及前一次的積分其輸出數(shù)值,因此,只需求存儲前一次的偏向值及前一次的積分項(xiàng)數(shù)值。利用計算機(jī)處置的反復(fù)性,可對上述計算公式進(jìn)展簡化項(xiàng)數(shù)值。利用計算機(jī)處置的反復(fù)性,可對上述計算公式進(jìn)展簡化。簡化后的公式為:。簡化后的公式為:其中其中: Mn : Mn 為采樣時辰為采樣時辰n n的的PIDPID運(yùn)算輸出值運(yùn)算輸出值 Kp Kp 為為 PIDPID回路的比例系數(shù)回路的比例系數(shù) Ki Ki 為為 PIDP

37、ID回路的積分系回路的積分系數(shù)數(shù) Kd Kd 為為PIDPID回路的微分系數(shù)回路的微分系數(shù) en en 為采樣時辰為采樣時辰n n的的PIDPID回路的偏向回路的偏向 en-1 en-1 為采樣時辰為采樣時辰n-1n-1的的PIDPID回路的偏向回路的偏向 MX MX 為積分項(xiàng)前值為積分項(xiàng)前值Date: 2022-5-10File No.: SSP1_03C.42SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation 計算回路輸出值計算回路輸出值

38、 CPU實(shí)踐運(yùn)用對上述簡化公式略微修正的格式。修正后的公式為:實(shí)踐運(yùn)用對上述簡化公式略微修正的格式。修正后的公式為: 其中其中: Mn 為采樣時辰為采樣時辰n的回路輸出計算值的回路輸出計算值 MPn 為采樣時辰為采樣時辰n的回路輸出比例項(xiàng)的回路輸出比例項(xiàng) MIn 為采樣時辰為采樣時辰n的回路輸出積分項(xiàng)的回路輸出積分項(xiàng) MDn 為采樣時辰為采樣時辰n的回路輸出微分項(xiàng)的回路輸出微分項(xiàng) 比例項(xiàng)比例項(xiàng) 比例項(xiàng)比例項(xiàng)MP是是PID回路的比例系數(shù)回路的比例系數(shù)(Kp)及偏向及偏向(e)的乘積,為了方便的乘積,為了方便計算取計算取Kp= Kc 。CPU采用的計算比例項(xiàng)的公式為:采用的計算比例項(xiàng)的公式為: 其

39、中其中: MPn 為采樣時辰為采樣時辰n的輸出比例項(xiàng)的值的輸出比例項(xiàng)的值 Kc 為回路的增益為回路的增益 SPn 為采樣時辰為采樣時辰n的設(shè)定值的設(shè)定值 PVn 為采樣時辰為采樣時辰n的過程變量值的過程變量值Date: 2022-5-10File No.: SSP1_03C.43SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation 積分項(xiàng)積分項(xiàng) 積分項(xiàng)積分項(xiàng)MI與偏向和成比例。為了方便計算取。與偏向和成比例。為了方便計算取。CPU采用的積分項(xiàng)公

40、采用的積分項(xiàng)公式為:式為: 其中其中: MIn 為為 采用時辰采用時辰n的輸出積分項(xiàng)的值的輸出積分項(xiàng)的值 Kc 為回路的增益為回路的增益 Ts 為采樣的時間間隔為采樣的時間間隔 Ti 為積分時間為積分時間 SPn 為采樣時辰為采樣時辰n的設(shè)定值的設(shè)定值 PVn 為采樣時辰為采樣時辰n的過程變量值的過程變量值 MX 為采樣時辰為采樣時辰n-1的積分項(xiàng)的積分項(xiàng)(又稱為積分前項(xiàng)又稱為積分前項(xiàng)) 積分項(xiàng)積分項(xiàng)(MX)是積分項(xiàng)全部先前數(shù)值的和。每次計算出是積分項(xiàng)全部先前數(shù)值的和。每次計算出MIn以后,都以后,都要用要用MIn去更新去更新MX。其中。其中MIn可以被調(diào)整或被限定??梢员徽{(diào)整或被限定。MX的

41、初值的初值通常在第一次計算出輸出之前被置為通常在第一次計算出輸出之前被置為Minitai初值。初值。 其它幾個常量也是積分項(xiàng)的一部分,如增益、采樣時辰其它幾個常量也是積分項(xiàng)的一部分,如增益、采樣時辰 (PID循環(huán)重循環(huán)重新計算輸出數(shù)值的循環(huán)時間新計算輸出數(shù)值的循環(huán)時間)、以及積分時間、以及積分時間(用于控制積分項(xiàng)對輸用于控制積分項(xiàng)對輸出計算影響的時間出計算影響的時間)。 Date: 2022-5-10File No.: SSP1_03C.44SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training Cente

42、rKnowledge for Automation 微分項(xiàng)微分項(xiàng) 微分項(xiàng)微分項(xiàng)MD與偏向的改動成比例,方便計算取與偏向的改動成比例,方便計算取 。 計算微分項(xiàng)的公式計算微分項(xiàng)的公式為:為: 為了防止步驟改動或由于對設(shè)定值求導(dǎo)而帶來的輸出變化,對此公為了防止步驟改動或由于對設(shè)定值求導(dǎo)而帶來的輸出變化,對此公式進(jìn)展修正,假定設(shè)定值為常量式進(jìn)展修正,假定設(shè)定值為常量(SPn=SPn-1),因此將計算過程變,因此將計算過程變量的改動,而不計算偏向的改動,計算公式可以改良為:量的改動,而不計算偏向的改動,計算公式可以改良為: 其中:其中: MDn 為為 采用時辰采用時辰n的輸出微分項(xiàng)的值的輸出微分項(xiàng)的值

43、 Kc 為回路的增益為回路的增益 Ts 為采樣的時間間隔為采樣的時間間隔 Td 為微分時間為微分時間 SPn 為采樣時辰為采樣時辰n的設(shè)定值的設(shè)定值 SPn-1 為采樣時辰為采樣時辰n-1的設(shè)定值的設(shè)定值 PVn 為采樣時辰為采樣時辰n的過程變量值的過程變量值 PVn-1 為采樣時辰為采樣時辰n-1的過程變量值的過程變量值 Date: 2022-5-10File No.: SSP1_03C.45SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automatio

44、n 回路控制的選擇回路控制的選擇 假設(shè)不需求積分運(yùn)算假設(shè)不需求積分運(yùn)算(即在即在PID計算中不需求積分運(yùn)算計算中不需求積分運(yùn)算),那么應(yīng)將積,那么應(yīng)將積分時間分時間(Ti)指定為無限大,由于積分和指定為無限大,由于積分和MX的初始值,即使沒有積的初始值,即使沒有積分運(yùn)算,積分項(xiàng)的數(shù)值也能夠不為零。分運(yùn)算,積分項(xiàng)的數(shù)值也能夠不為零。 這時積分系數(shù)這時積分系數(shù) Ki=0.0假設(shè)不需求求導(dǎo)運(yùn)算假設(shè)不需求求導(dǎo)運(yùn)算(即在即在PID計算中不需求微分運(yùn)算計算中不需求微分運(yùn)算),那么應(yīng)將求,那么應(yīng)將求導(dǎo)時間導(dǎo)時間(Td)指定為零。指定為零。 這時微分系數(shù)這時微分系數(shù) Kd=0.0假設(shè)不需求比例運(yùn)算假設(shè)不需求比

45、例運(yùn)算(即在即在PID計算中不需求比例運(yùn)算計算中不需求比例運(yùn)算),而需求積分,而需求積分(I)或積分微分或積分微分(ID)控制,那么應(yīng)將回路增益數(shù)值控制,那么應(yīng)將回路增益數(shù)值(Kc)指定為指定為0.0,這時比例系數(shù)這時比例系數(shù)Kp=0.0。由于回路增益。由于回路增益(Kc)是計算積分及微分項(xiàng)公是計算積分及微分項(xiàng)公式內(nèi)的系數(shù),將回路增益設(shè)定為式內(nèi)的系數(shù),將回路增益設(shè)定為0.0,將影響積分及微分項(xiàng)的計算,將影響積分及微分項(xiàng)的計算。因此,當(dāng)回路增益取為。因此,當(dāng)回路增益取為0.0時,在時,在PID算法中,系統(tǒng)自動地把在算法中,系統(tǒng)自動地把在積分和微分運(yùn)算中的回路增益取為積分和微分運(yùn)算中的回路增益取為

46、1.0 , 此時此時 Date: 2022-5-10File No.: SSP1_03C.46SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation3 PID算法的實(shí)現(xiàn)算法的實(shí)現(xiàn)運(yùn)算框圖運(yùn)算框圖Date: 2022-5-10File No.: SSP1_03C.47SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for

47、Automation PID控制軟件控制軟件S7_Pro4 OB1Date: 2022-5-10File No.: SSP1_03C.48SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation OB35Date: 2022-5-10File No.: SSP1_03C.49SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge

48、for Automation FB1Date: 2022-5-10File No.: SSP1_03C.50SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationFB1續(xù)續(xù)Date: 2022-5-10File No.: SSP1_03C.51SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationF

49、B1續(xù)續(xù)Date: 2022-5-10File No.: SSP1_03C.52SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationFB1續(xù)續(xù)Date: 2022-5-10File No.: SSP1_03C.53SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation DB2Date: 2022-

50、5-10File No.: SSP1_03C.54SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation仿真仿真 : 察看過程量察看過程量PIW256的變化,的變化,PID輸出控制輸出控制PQW350的改動的改動Date: 2022-5-10File No.: SSP1_03C.55SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowl

51、edge for Automation4 PID控制模塊控制模塊1 PID模塊的任務(wù)原理模塊的任務(wù)原理Date: 2022-5-10File No.: SSP1_03C.56SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation2PID模塊模塊 FM355:4路閉環(huán)控制路閉環(huán)控制模塊內(nèi)含:模塊內(nèi)含:4AI+8DI+4DIDate: 2022-5-10File No.: SSP1_03C.57SIMATIC S7Siemens AG 2000. A

52、ll rights reserved.Information and Training CenterKnowledge for AutomationFM355FM355續(xù):續(xù):輸入地址輸入地址PIW256-257PIW256-257輸出地址輸出地址PQW256-257PQW256-257Date: 2022-5-10File No.: SSP1_03C.58SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for AutomationFM355FM355續(xù):續(xù):根本參數(shù)

53、根本參數(shù)有無中斷有無中斷中斷類型中斷類型任務(wù)方式任務(wù)方式Date: 2022-5-10File No.: SSP1_03C.59SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation3 3PIDPID參數(shù)參數(shù) 比例項(xiàng):稱號比例項(xiàng):稱號 數(shù)據(jù)類型數(shù)據(jù)類型 默許值默許值 功能功能 P_SEL BOOL TRUE P_SEL BOOL TRUE 比例項(xiàng)使能控制比例項(xiàng)使能控制 GAIN REAL 2.0 GAIN REAL 2.0 放大倍數(shù)放大倍數(shù) 積分

54、項(xiàng):稱號積分項(xiàng):稱號 數(shù)據(jù)類型數(shù)據(jù)類型 默許值默許值 功能功能 I_SEL BOOL TRUE I_SEL BOOL TRUE 積分項(xiàng)使能控制積分項(xiàng)使能控制 TI TIME T#20S TI TIME T#20S 積分時間積分時間 INT_HOLD BOOL FALSE INT_HOLD BOOL FALSE 積分輸積分輸出堅持控制出堅持控制 I_ITL_ON BOOL - I_ITL_ON BOOL - 積分輸出再輸入允許積分輸出再輸入允許 I_ITLVAL REAL 0.0 I_ITLVAL REAL 0.0 積分初值積分初值 微分項(xiàng):稱號微分項(xiàng):稱號 數(shù)據(jù)類型數(shù)據(jù)類型 默許值默許值 功能

55、功能 D_SEL BOOL TRUE D_SEL BOOL TRUE 微分項(xiàng)使能控制微分項(xiàng)使能控制 TD TIME T#10S TD TIME T#10S 微分時間微分時間 TM_LAG TIME T#2S TM_LAG TIME T#2S 微分滯后時間微分滯后時間 過程參數(shù)過程參數(shù) Date: 2022-5-10File No.: SSP1_03C.60SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation4模板初始化功能SFC塊 SFC 50

56、: 稱號 功能 WR_PARM 將動態(tài)參數(shù)寫入模板 SFC 56: 稱號 功能 WR_DPARM 將預(yù)定參數(shù)寫入模板 SFC 57: 稱號 功能 PARM_MOD 賦模板的參數(shù) SFC 58 稱號 功能 WR_REC 寫模板公用的數(shù)據(jù)記錄 SFC 59 稱號 功能 RD_REC 讀模板公用的數(shù)據(jù)記錄5模板初始化功能的調(diào)用例:調(diào)用SFC 50 CALL RD_LGADR“ SFC 50 的形參Date: 2022-5-10File No.: SSP1_03C.61SIMATIC S7Siemens AG 2000. All rights reserved.Information and Trai

57、ning CenterKnowledge for Automation6利用利用PID模塊設(shè)計的過程模塊設(shè)計的過程Date: 2022-5-10File No.: SSP1_03C.62SIMATIC S7Siemens AG 2000. All rights reserved.Information and Training CenterKnowledge for Automation5 閉環(huán)控制系統(tǒng)功能塊閉環(huán)控制系統(tǒng)功能塊 系統(tǒng)功能塊系統(tǒng)功能塊SFB 41用于延續(xù)控制用于延續(xù)控制SFB 42用于步進(jìn)控制用于步進(jìn)控制SFB 43用于脈沖寬度控制用于脈沖寬度控制 SFB 41 SFB 43的調(diào)用的調(diào)用指令樹指令樹 LIBRARY STANDARD LIBRARY SYSTEM FUNCTION BLOCKS 6 閉環(huán)控制軟件包閉環(huán)控制軟件包功能塊功能塊FB 41 FB 42 FB 43 與與SF41 SF42 SF43兼容,兼容, 用用于于PID控制??刂?。 FB 41 FB 43的調(diào)用的調(diào)用 STANDARD LIBRARY PID CONTROL BLOCKS Date: 2022-5-10File No.:

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論