【正文】
。 if((int)fT != siTlast){ //判斷溫度的整數(shù)值是否變化 temperature_speech_index(guiLED_Value)。 iAddrSpeech = speech_start_address(iaSpeech_index[0])。 // 設(shè)置 PID 比例值 = 。 // PID計(jì)算 active()。 采樣數(shù)據(jù)中斷程序流程 其中繼電器是與 61 單片機(jī)的 IOA4 口相連的,繼電器的開斷完全在于 IOA4口的輸出結(jié)果,也就是 PID 計(jì)算的結(jié)果。 void active() { if(fOut=0){ turn_off_relay()。SP_INT_TIMEB()} 。在采樣時(shí)刻 t=iT(T 為采樣周期 )。 = 0。 // 偏差 ppSumError += Error。 return (ppProportion * Error // 比例項(xiàng) + ppIntegral * ppSumError // 積分項(xiàng) + ppDerivative * dError // 微分項(xiàng) )。 調(diào)試 給通電源,以及電源及接地部分,通過凌陽單片機(jī)自帶的 suaplus 把程序下載進(jìn)去,進(jìn)行調(diào)試,系統(tǒng)給電自后,數(shù)碼管的全不顯示為零,根據(jù)按 KEY1 次數(shù),和 KEY2 的次數(shù),來確定開始的初始溫度,然后開始按 KEY3,系統(tǒng)開始測溫,并與采集的溫度進(jìn)行比較,通過軟件的設(shè)定來控制電爐的開關(guān)。 該系統(tǒng)是溫度控制,是通過繼電器控制加熱,可以應(yīng)用在很多的場合,控制的溫度范圍較大,對于室溫,及水溫度的控制有很好的效果,具有好的應(yīng)用意義,以及各個實(shí)驗(yàn)當(dāng)中有很好的模塊作用,在未來的生活中無處不在有著關(guān)于溫度的控制,對于社會的發(fā)展也起一部力,我們相信在未來,溫度控制有著自己一部分輝煌的時(shí)代,對社會有很好的促進(jìn)意義。?????Differential, reflecting the rate of change of the system deviation signal e (t)e (t1), is foreseen to anticipate trends deviation generated ahead of the control action, the deviation is not formed, has been the differential regulation of remove, so you can improve the dynamic performance. However, differential interference to noise amplification role in strengthening differential interference detrimental to the and differential can not work alone and must be proportional control cooperation. 4, the controller of the P, I, D item following rules will be used to control various control features briefly summarized here: 1, the proportional control law P: P control law used to quickly overe the disturbances, which act on the output value of the fast, but not very stable at a desired value, pared with a negative result is to effectively overe the disturbances, but more than a difference appears. It is suitable for the control channel lag is small, little change in the load control is less demanding, controlled parameters within a certain range to allow more than poor occasions. Such as: Jin Biao under the Ministry of Public Works pump house cold, heat pool water level control。s dynamic performance indicators, have a significant effect. Therefore, for the time constant of the control channel or capacity lags larger occasions, in order to improve the stability of the system, reducing the dynamic deviation proportional derivative control law can be used. Such as: heated temperature control, position control. It should be noted that, for those pure lag larger area, the derivative term is powerless, and in the measured signal is noisy or periodic vibration system, you should not use derivative control. Such as: large kiln glass level control. 4, for example, integral derivative control laws (PID): PID control law is an ideal control law, it is based on the introduction of proportional integral, can eliminate residual error, then add the derivative action, but also improve system stability. It is suitable for the control channel or capacity lag time constant is large, the control requirements of the occasion. Such as temperature control, position control.????Given D role of the law, we must also understand the concept of time lag, the time lag including capacity lag and pure lag. Capacity in which they lag usually include: measurement and transmission lag lag. Measurement hysteresis is detecting element in the detection need to establish a balance, such as thermocouples, RTD, pressure, etc. resulting from a slow response lag. The transmission lag is in the sensors, transmitters, actuators and other devices produce a control delay. Pure delay is measured relative lag in industry, most of the time delay caused due to material transport, such as: large kiln glass level, feeding maneuver done in the nuclear level gauge detection requires a very long period of time.????In short, the choice of control law according to the process characteristics and process requirements to select, and never say PID control law in any case, has better control performance, regardless of the occasion are used is unwise. If you do so, it will only add plexity to the other work and give parameter tuning difficult. When using PID controller has not yet reached technological requirements, you need to consider other control scheme. If cascade control, feedforward control, large hysteresis control. 5the problem. Kp, Ti, Td setting the three parameters of the PID control algorithm key issues. Generally they can only be set when programming the approximate value and the system is running through repeated testing to determine the best value. Therefore, the program must apply for the missioning phase and memory can be modified at any of these three the parameter selftuning. In some applications, such as generic instrumentation industry, systems work object is uncertain, different objects have different parameter values, can not set parameters for the user, on the introduction of the concept of selftuning parameters . Essence is the first time, through the N measurements is looking for a new job object parameters, and remembered as a basis for future PID 控制算法 1, PID 是一個閉環(huán)控制算法。但并不是必須同時(shí)具備這三種算法,也可以是 PD,PI,甚至只有 P 算法控制。但是微分對噪聲干擾有放大作用,加強(qiáng)微分對系統(tǒng)抗干擾不利。它適用于控制通道滯后較小、負(fù)荷變化不大、控制要求不高、被控參數(shù)允許在一定范圍內(nèi)有余差的場合。如:在主線窯頭 重油換向室中 F1401到 F1419 號槍的重油流量控制系統(tǒng);油泵房供油管流量控制系統(tǒng);退火窯各區(qū)溫 度調(diào)節(jié)系統(tǒng)等。需要說明一點(diǎn),對于那些純滯后較大的區(qū)域里,微分項(xiàng)是無能為力,而在測量信號有噪聲或周期性振動 的系統(tǒng),則也不宜采用微分控制。如溫度控制、成分控制等。而傳送滯后則是在傳感器、變送器、執(zhí)行機(jī)構(gòu)等設(shè)備產(chǎn)生的一種控制滯后。當(dāng)采用 PID控制器還達(dá)不到工藝要求,則需要考慮其它的控制方案。一般說來編程時(shí)只能設(shè)定他們的大概數(shù)值,并在系統(tǒng)運(yùn)行時(shí)通過反復(fù)調(diào)試來確定最佳值。實(shí)質(zhì)就是在首次使用時(shí),通過 N次測量為新的工作對象尋找一套參 數(shù),并記憶下來作為以后工作的依據(jù)。在本課題的完成和試驗(yàn)過程中,均給予了我多方面的指導(dǎo)和幫助,使得課題的實(shí)驗(yàn)工作得以順利進(jìn)行,在此深表謝意! 同時(shí)感謝一起學(xué)習(xí)和工作過的同學(xué)等。