流量是一个普通而又重要的物理量,在许多领域里人们需对它进行测量和控制。本系对流量控制采用PID算法,它具有结构简单、易于理解和实现,且一些高级控制都是以PID为基础改进的。在工业过程控制中90%以上的控制系统回路具有PID结构,图2PID控制原理框图PID控制方式的具体流程是计算误差和流量的变化速度进行PID计算,先以P参数和误差计算出基础输出量,在根据误差的累积值和I参数计算出修正量,最终找出控制点和流量设定点之间的平衡状态,最后在通过流量的变化速率与D参数控制流量的变化速度以防止流量的剧烈变化。进行整定时先进行P调节,使I和D作用无效,观察流量变化曲线,若变化曲线多次出现波形则应该放大比例(P)参数,若变化曲线非常平缓,则应该缩小比例(P)参数。比例(P)参数设定好后,设定积分(I)参数,积分(I)正好与P参数相反,曲线平缓则需要放大积分(I),出现多次波形则需要缩小积分(I)。比例(P)和积分(I)都设定好以后设定微分(D)参数,微分(D)参数与比例(P)参数的设定方法是一样的。PID控制器传递函数的标准式是G(s)=Kp(1+1/Tis+Tds)电气优创0702班蒋宏彦毕业设计比例电磁阀驱动电源设计(主电路)2011/6/1920:23:22D:\lianxi\PCB\1\主电路.SchDocTitleSize:Number:Date:File:Revision:SheetofTime:A4U6TLP521-1510ΩR20U72SK23311KR115KR251.5ΩR1912P2Header2VCCVCCPWMOUTPWMOUT2314865748U8LM358VCC0.1uFC1199KR271KR261KR28ADC3INADC3INVCC100pFC90.1uFC8100uFC1010KR33VCCVCC1KR22L7L6L9L5L81KR241KR301KR171KR10VCCXTAL2XTAL1RESTRESTL4P6KE27ACLKOUT2/ADC0/P1.01ADC1/P1.12RxD2/ECI/ADC2/P1.23TxD2/CPP0/ADC3/P1.34SS/CPP1/ADC4/P1.45MOSI/ADC5/P1.56MISO/ADC6/P1.67SCLK/ADC7/P1.78P4.7/RST9INT/RxD/P3.010TxD/P3.111INT0/P3.212INT1/P3.313CLKOUT0/INT/T0/P3.414CLKOUT1/INT/T1/P3.515WR/P3.616RD/P3.717XTAL218XTAL119GND20P2.0/A821P2.1/A922P2.2/A1023P2.3/A1124P2.4/A1225P2.5/A1326P2.6/A1427P2.7/A1528NA/P4.429ALE/P4.530EX_LVD/P4.6/RST231P0.732P0.633P0.534P0.435P0.336P0.237P0.138P0.039Vcc40u5STC12C5A60S212Y111.0592M30pFC1230pFC13XTAL2XTAL1123456P1INPUT1KR51KR25KR110VADIN5VADINCURRENTADIN0.1uFC40.1uFC50.1uFC6ADC0ADC1ADC2ADC0ADC1ADC21234567891110J1DConnector9C1+1V+2C1-3C2+4C2-5V-6T2OUT7R2IN8R2OUT9T2IN10T1IN11R1OUT12R1IN13T1OUT14GND15VCC16U3MAX232VCC0.1uFC1Cap0.1uFC20.1uFC70.1uFC3L3L2L1L101KR91KR71KR61KR32NC1A12A23GND4SDA5SCL6WP7VCC8U4K24C25610KR310KR4VCCVCCI2CSCLI2CSDALED0LED1LED2LED3LED4LED5LED6LED7LS1SpeakerQ12N39061KR8SpeakerLED0LED1LED2LED3LED4LED5LED6LED7VCCS3SW-PBS4SW-PBS5SW-PBS2SW-PBS1SW-PB1KR181KR211KR231KR291KR3110KR13VCC10KR1410KR1510KR1610KR12VCCKEY1KEY2KEY3KEY4KEY5RXDTXDRXDTXDKEY1KEY2KEY3KEY4KEY5SpeakercurrentvoltagefrequencedutyminmaxothersystempowerD1D2D3D4D5D6D7D8DLOCKWLOCKI2CSDAI2CSCL