




本發明係關於一種以溫度變化趨勢來控制風扇的方法,尤其是指一種透過發熱元件的三個時刻之溫度值變化而用控制器來控制風扇的方法。The present invention relates to a method for controlling a fan by using a temperature change trend, and more particularly to a method for controlling a fan by using a controller through the temperature value changes of a heating element at three moments.
一般來說,在現有技術當中,為了能夠保障伺服器(server)內部元件的溫度在各種環境溫度和負載(loading)加壓條件之下均能滿足其自身規格書的要求,通常會為伺服器制定三種溫度和風扇控制策略:(1) inlet控速的模式、(2) PID控速的模式、以及(3) 異常控速的模式,選擇這三種風扇控速策略的邏輯關係請參考第一圖的流程圖所示。Generally speaking, in the prior art, in order to ensure that the temperature of the internal components of the server can meet the requirements of its own specifications under various ambient temperature and loading pressure conditions, three temperature and fan control strategies are usually formulated for the server: (1) inlet speed control mode, (2) PID speed control mode, and (3) abnormal speed control mode. The logical relationship of selecting these three fan speed control strategies is shown in the flow chart in the first figure.
開始(步驟S001)進行測試,檢查元件是否存在?溫度的讀值是否正常?(步驟S002),此處所謂的元件通常是指會產生熱量的發熱元件,例如是中央處理器(central processing unit,簡稱CPU),或者是圖形處理器(graphic processing unit,簡稱GPU)等。若是元件不存在、或者是溫度的讀值異常(步驟S003)時,則選擇為異常控速(步驟S004)的模式。Start (step S001) to test whether the component exists and whether the temperature reading is normal (step S002). The component here usually refers to a heat generating component that generates heat, such as a central processing unit (CPU) or a graphic processing unit (GPU). If the component does not exist or the temperature reading is abnormal (step S003), the abnormal speed control mode (step S004) is selected.
當步驟S002判斷為皆正常時,進行讀取元件的Tsp、PID值和風扇之環境的脈波寬度調變值PWM(inlet)(步驟S005)。其中,所謂SP為setpoint之簡稱,Tsp是元件安全工作的臨界溫度;PID值為進行PID控速時的三個參數(稍後說明);而脈波寬度調變值英文為pulse-width modulation,以下簡稱為PWM。接著,再進行讀取元件的當前溫度T(i)和風扇的現在脈波寬度調變值PWM(i)(步驟S006)。之後,比較T(i)與Tsp,以及PWM(i)與PWM(inlet)(步驟S007)。當T(i)<Tsp,以及PWM(i)=PWM(inlet)時,則選擇為inlet控速(步驟S008)的模式。而所謂的inlet控速,是指基於環境溫度來進行控制風扇轉速的策略。When step S002 determines that everything is normal, read the component's Tsp, PID value, and the pulse width modulation value PWM(inlet) of the fan environment (step S005). Among them, the so-called SP is the abbreviation of setpoint, Tsp is the critical temperature for the safe operation of the component; the PID value is the three parameters when performing PID speed control (explained later); and the pulse width modulation value is pulse-width modulation in English, hereinafter referred to as PWM. Then, read the current temperature T(i) of the component and the current pulse width modulation value PWM(i) of the fan (step S006). After that, compare T(i) with Tsp, and PWM(i) with PWM(inlet) (step S007). When T(i)<Tsp, and PWM(i)=PWM(inlet), the inlet speed control (step S008) mode is selected. The so-called inlet speed control refers to a strategy for controlling the fan speed based on the ambient temperature.
當T(i)>Tsp時,或者是T(i)<Tsp,但PWM(i)>PWM(inlet)時,則選擇為PID控速(步驟S009)的模式。而所謂的PID控速,全稱為「比例、積分、微分控制」,其所具有的PID控制值包含有Kp、Ki和Kd的比例係數、積分係數、以及微分係數,這是一般常使用的風扇控制策略,通常在負載加壓測試中啟動,目的是在於快速調整出合適的風扇轉速以滿足元件的控溫要求。而一般常用之PID控速策略之流程圖則如第二圖中所示。When T(i)>Tsp, or T(i)<Tsp, but PWM(i)>PWM(inlet), the PID speed control (step S009) mode is selected. The so-called PID speed control is called "proportional, integral, and differential control". The PID control value includes the proportional coefficient, integral coefficient, and differential coefficient of Kp, Ki, and Kd. This is a commonly used fan control strategy, which is usually started in a load pressure test. The purpose is to quickly adjust the appropriate fan speed to meet the temperature control requirements of the component. The flow chart of the commonly used PID speed control strategy is shown in the second figure.
於此時PID控速的模式當中,先讀取元件的當前溫度T(i)和風扇的現在脈波寬度調變值PWM(i)(步驟S0091)。再比較T(i)與Tsp,以及PWM(i)與PWM(inlet)(步驟S0092)。當T(i)>Tsp時,則計算脈波寬度調變差值ΔPWM(i)會大於0(步驟S0093),且PWM(i)=PWM(i-1)+ΔPWM(i),此時會升高風扇轉速(步驟S0094),其中,PWM(i-1)為風扇的前一刻脈波寬度調變值。In the PID speed control mode at this time, first read the current temperature T(i) of the component and the current pulse width modulation value PWM(i) of the fan (step S0091). Then compare T(i) with Tsp, and PWM(i) with PWM(inlet) (step S0092). When T(i)>Tsp, the calculated pulse width modulation difference ΔPWM(i) will be greater than 0 (step S0093), and PWM(i)=PWM(i-1)+ΔPWM(i), then the fan speed will be increased (step S0094), where PWM(i-1) is the pulse width modulation value of the fan at the previous moment.
當T(i)<Tsp,但PWM(i)>PWM(inlet)時,則計算脈波寬度調變差值ΔPWM(i)會小於0(步驟S0095),且PWM(i)=PWM(i-1)+ΔPWM(i),此時會降低風扇轉速(步驟S0096)。When T(i)<Tsp, but PWM(i)>PWM(inlet), the calculated pulse width modulation difference ΔPWM(i) will be less than 0 (step S0095), and PWM(i)=PWM(i-1)+ΔPWM(i), and the fan speed will be reduced (step S0096).
其中,脈波寬度調變差值ΔPWM(i)的計算方式如下:PWM(i)=Kp*[e(i)–e(i-1)]+Ki*e(i)+Kd*[T(i)–2*T(i-1)+T(i-2)]。其中,e(i)=T(i)-Tsp,T(i)為元件在i時刻、也就是當前時刻的溫度;Tsp是元件安全工作的臨界溫度;而Kp、Ki和Kd則分別是比例係數、積分係數、以及微分係數。The pulse width modulation difference ΔPWM(i) is calculated as follows: PWM(i)=Kp*[e(i)–e(i-1)]+Ki*e(i)+Kd*[T(i)–2*T(i-1)+T(i-2)]. Among them, e(i)=T(i)-Tsp, T(i) is the temperature of the component at time i, which is the current time; Tsp is the critical temperature for safe operation of the component; and Kp, Ki and Kd are the proportional coefficient, integral coefficient, and differential coefficient respectively.
最後,無論是選擇為異常控速(步驟S004)、inlet控速(步驟S008)、或者是PID控速(步驟S009)的模式,最後都還是要輸出風扇的現在脈波寬度調變值PWM(i)(步驟S010)。Finally, no matter the selected mode is abnormal speed control (step S004), inlet speed control (step S008), or PID speed control (step S009), the current pulse width modulation value PWM(i) of the fan must be output in the end (step S010).
由於上述PID控速策略係以溫度為基準,風扇之脈波寬度調變值直接隨元件溫度變化而變化,雖然回應速度快,但實際應用中存在一定問題。除元件本身可能存在一定範圍的溫度波動外,伺服器內部的氣流組織也可能導致元件溫度不斷變化,導致風扇轉速無法穩定,並反作用於元件本身,導致元件溫度的變化更加的波動。Since the above PID speed control strategy is based on temperature, the pulse width modulation value of the fan changes directly with the temperature of the component. Although the response speed is fast, there are certain problems in actual application. In addition to the temperature fluctuation of the component itself within a certain range, the airflow organization inside the server may also cause the component temperature to change continuously, resulting in the fan speed being unstable and reacting to the component itself, causing the component temperature to fluctuate more.
於實際進行的元件測試過程當中,前述的發熱元件將決定了風扇的轉速,而在環境溫度及負載加壓條件均未發生變化的一段時間內,發熱元件的溫度會於一個範圍內不斷變化,而風扇轉速也會在一個範圍內上下波動。由於風扇轉速的不斷波動不僅將會拉大風扇之功耗,會造成整體系統的功耗增加,也表示對於風扇的控速方面不足夠。因此,解決風扇轉速波動的問題極其重要,也極其必要。In the actual component testing process, the aforementioned heating element will determine the speed of the fan. During a period of time when the ambient temperature and load pressure conditions do not change, the temperature of the heating element will continue to change within a range, and the fan speed will also fluctuate within a range. The constant fluctuation of the fan speed will not only increase the power consumption of the fan, but also increase the power consumption of the entire system, and also indicate that the speed control of the fan is insufficient. Therefore, solving the problem of fan speed fluctuation is extremely important and necessary.
有鑒於在先前技術當中,需要針對風扇來進行控速以解決其所造成的轉速波動以及產生功耗問題,也是一個亟需要解決的課題。In view of the fact that in the prior art, it is necessary to control the speed of the fan to solve the speed fluctuation and power consumption problem caused by it, which is also an issue that needs to be solved urgently.
本發明為解決先前技術之問題,所採用的必要技術手段是提供一種以溫度變化趨勢來控制風扇的方法,係透過一控制器來控制一風扇之轉速升高或降低,用以確保一發熱元件之溫度,本方法包含:讀取發熱元件之一現在溫度值T(i)、一前一刻溫度值T(i-1)、以及一前二刻溫度值T(i-2);讀取風扇之一前一刻脈波寬度調變值PWM(i-1);藉由現在溫度值T(i)、前一刻溫度值T(i-1)、以及前二刻溫度值T(i-2)以判斷是否具有一明顯的溫度趨勢,(a) 當具有明顯的溫度趨勢時,以現在溫度值T(i)來計算出一脈波寬度調變差值PWM(i),而(b) 當不具有明顯的溫度趨勢時,設定脈波寬度調變差值PWM(i)為零;計算出一現在脈波寬度調變值PWM(i),係依據前一刻脈波寬度調變值PWM(i-1)、以及脈波寬度調變差值PWM(i)而得出;以及依據現在脈波寬度調變值PWM(i)來控制風扇之轉速。The present invention solves the problems of the prior art. The necessary technical means adopted is to provide a method for controlling a fan by temperature change trend. The method uses a controller to control the speed of a fan to increase or decrease so as to ensure the temperature of a heating element. The method comprises: reading a current temperature value T(i), a temperature value T(i-1) of the previous moment, and a temperature value T(i-2) of the previous moment of the heating element; reading a pulse width modulation value PWM(i-1) of the previous moment of the fan; judging whether there is an obvious temperature trend by the current temperature value T(i), the temperature value T(i-1) of the previous moment, and the temperature value T(i-2) of the previous moment; (a) When there is a clear temperature trend, a pulse width modulation difference is calculated based on the current temperature value T(i). PWM (i), and (b) when there is no obvious temperature trend, set the pulse width modulation difference PWM(i) is zero; the current pulse width modulation value PWM(i) is calculated based on the previous pulse width modulation value PWM(i-1) and the pulse width modulation difference PWM(i); and controlling the speed of the fan according to the current pulse width modulation value PWM(i).
在上述必要技術手段所衍生之一附屬技術手段中,於判斷是否具有明顯的溫度趨勢的步驟之前,更包含有一步驟:藉由現在溫度值T(i)與前一刻溫度值T(i-1)以判斷是否具有一溫度趨勢,(1) 當具有溫度趨勢時,以現在溫度值T(i)來計算出脈波寬度調變差值PWM(i),而(2) 當不具有溫度趨勢時,再比較現在溫度值T(i)、前一刻溫度值T(i-1)、以及前二刻溫度值T(i-2)以判斷是否具有明顯的溫度趨勢。In an auxiliary technical means derived from the above necessary technical means, before the step of determining whether there is an obvious temperature trend, there is a further step: determining whether there is a temperature trend by using the current temperature value T(i) and the previous temperature value T(i-1), (1) when there is a temperature trend, calculating the pulse width modulation difference value by using the current temperature value T(i) PWM(i), and (2) when there is no temperature trend, compare the current temperature value T(i), the temperature value of the previous moment T(i-1), and the temperature value of the previous two moments T(i-2) to determine whether there is an obvious temperature trend.
在上述必要技術手段所衍生之一附屬技術手段中,發熱元件具有一臨界溫度值Tsp,控制器具有一PID控制值,分別為一比例係數Kp、一積分係數Ki、以及一微分係數Kd,且於判斷出具有明顯的溫度趨勢之步驟時,脈波寬度調變差值PWM(i)係依據以下公式計算得出:PWM(i)=Kp*[e(i)–e(i-1)]+Ki*e(i)+Kd*[T(i)–2*T(i-1)+T(i-2)],其中,e(i)=T(i)–Tsp。In an auxiliary technical means derived from the above necessary technical means, the heating element has a critical temperature value Tsp, the controller has a PID control value, which is a proportional coefficient Kp, an integral coefficient Ki, and a differential coefficient Kd, and when a step with a significant temperature trend is determined, the pulse width modulation difference PWM(i) is calculated according to the following formula: PWM(i)=Kp*[e(i)–e(i-1)]+Ki*e(i)+Kd*[T(i)–2*T(i-1)+T(i-2)], where e(i)=T(i)–Tsp.
如上所述,由於本發明之以溫度變化趨勢來控制風扇的方法是透過發熱元件的三個時刻之溫度值變化而用PID控制器來控制風扇的方法,藉此,本發明確實可以有效的提高風扇控速的穩定性,以及避免風扇長時間波動所造成的功耗浪費。As described above, since the method of controlling the fan by temperature change trend of the present invention is a method of controlling the fan by a PID controller through the temperature value changes of the heating element at three moments, the present invention can effectively improve the stability of the fan speed control and avoid power consumption waste caused by long-term fluctuations of the fan.
本發明所採用的具體實施例,將藉由以下之實施例及圖式作進一步之說明。The specific embodiments of the present invention will be further described by the following embodiments and drawings.
請參閱第三圖,係顯示本發明較佳實施例所提供之以溫度變化趨勢來控制風扇的方法之流程圖。而第四圖與第五圖係顯示本發明較佳實施例所提供之以溫度變化趨勢來控制風扇的方法之第一種與第二種實施結構示意圖,也請一併參閱。Please refer to the third figure, which is a flow chart showing the method of controlling the fan by temperature change trend provided by the preferred embodiment of the present invention. The fourth and fifth figures are schematic diagrams showing the first and second implementation structures of the method of controlling the fan by temperature change trend provided by the preferred embodiment of the present invention, and please refer to them together.
如第三圖所示,本發明所揭露之一種以溫度變化趨勢來控制風扇40, 40’的方法,係透過一控制器來控制一風扇40, 40’之轉速升高或降低,用以確保一發熱元件之溫度。其中,控制器可以例如是一基板管理控制器(baseboard management controller,簡稱BMC)20, 20’,其內含有PID控制器,或者是具有一PID控制值儲存於其儲存單元22, 22’內來透過計算單元23, 23’進行計算。其中,發熱元件可以是如圖上所示的元件10, 10’,通常是指會產生熱量的發熱元件,例如是中央處理器(central processing unit,簡稱CPU),或者是圖形處理器(graphic processing unit,簡稱GPU)等。As shown in the third figure, the method disclosed in the present invention for controlling a
本發明之方法包含:讀取元件10, 10’之一現在溫度值T(i)、一前一刻溫度值T(i-1)、以及一前二刻溫度值T(i-2),以及讀取風扇40, 40’之一前一刻脈波寬度調變值PWM(i-1)(步驟S1091)。The method of the present invention includes: reading a current temperature value T(i), a temperature value T(i-1) one minute before, and a temperature value T(i-2) two minutes before of the
接著,本發明藉由現在溫度值T(i)與前一刻溫度值T(i-1)以判斷是否具有一溫度趨勢。其中,判斷是否具有該溫度趨勢之步驟係透過計算現在溫度值T(i)與前一刻溫度值T(i-1)之差值的絕對值,亦即判斷是否|T(i)-T(i-1)|<3(步驟S1092),當差值的絕對值不小於3時,亦即|T(i)-T(i-1)|≥3時,判斷為具有溫度趨勢,當具有溫度趨勢時,則以第i時刻的溫度值亦即現在溫度值T(i)來計算出風扇40, 40’的脈波寬度調變差值ΔPWM(i)(步驟S1095)。而當差值的絕對值小於3時,判斷為不具有溫度趨勢,此時,再比較現在溫度值T(i)、前一刻溫度值T(i-1)、以及前二刻溫度值T(i-2)以判斷是否具有明顯的溫度趨勢(步驟S1093)。Next, the present invention determines whether there is a temperature trend by using the current temperature value T(i) and the previous temperature value T(i-1). The step of determining whether there is a temperature trend is performed by calculating the absolute value of the difference between the current temperature value T(i) and the temperature value T(i-1) at the previous moment, that is, determining whether |T(i)-T(i-1)|<3 (step S1092). When the absolute value of the difference is not less than 3, that is, |T(i)-T(i-1)|≥3, it is determined that there is a temperature trend. When there is a temperature trend, the pulse width modulation difference ΔPWM(i) of the
其中,此處關於溫度相差3度的計算方式和影響因素如下:判斷是否|T(i)-T(i-1)|<3時,表示判斷第i時刻的溫度值T(i)與第i-1時刻的溫度值T(i-1)的溫差在3度以內,由於在實際進行測試時可能會有脈衝形式的負載加壓方式,則元件10, 10’於一段時間內的功耗將從滿功耗降低至一半功耗再升至滿功耗,導致元件10, 10’在短時間內的功耗和溫度發生較大改變,此時需要風扇40, 40’轉速快速回應這種劇烈變化,而溫度趨勢的判斷又需要時間,因此,設置溫差大於或等於3度就判斷為具有溫度趨勢,就直接以第i時刻的現在溫度值T(i)來計算脈波寬度調變差值ΔPWM(i),既是為了避免風扇40, 40’因元件10, 10’的溫度偶然波動帶來的干擾,使風扇40, 40’轉速更加穩定,也是為了在溫度突變條件下能快速回應元件10, 10’的控溫需求,避免元件10, 10’的溫度過高,保護元件10, 10’安全。The calculation method and influencing factors of the temperature difference of 3 degrees are as follows: when judging whether |T(i)-T(i-1)|<3, it means that the temperature difference between the temperature value T(i) at the i-th moment and the temperature value T(i-1) at the i-1-th moment is within 3 degrees. Since there may be a pulse load pressure method during the actual test, the power consumption of the
另外,由於本發明在PID控速方面有所改進,為使風扇40, 40’的轉速能夠快速回應元件10, 10’的散熱要求,並考慮到可能出現的異常風險點,現對基板管理控制器20, 20’的PID控速之計算過程提出以下要求和改進:基板管理控制器20, 20’所讀取的元件10, 10’之現在溫度值T(i)、前一刻溫度值T(i-1)、以及前二刻溫度值T(i-2)皆為帶有小數位的浮點型資料,並以該資料參與基板管理控制器20, 20’的PID控速運算。In addition, since the present invention has made some improvements in PID speed control, in order to enable the rotation speed of the
其中,關於浮點型資料所造成的改進和優點如下,現在基板管理控制器20, 20’所保存和參與PID控速計算的資料類型為整數型,例如,所讀取的元件10, 10’之溫度為23.4和22.6,而此資料將通過四捨五入、向下或向上取整的方式調整為整數,即基板管理控制器20, 20’輸出和用以計算的溫度值都是調整後的整數值,這將導致PID控速計算出的脈波寬度調變差值ΔPWM(i)與實際需要的脈波寬度調變差值ΔPWM(i)存在有一定的差距,將造成風扇40, 40’調控過低或者過量。因此本發明採用浮點型資料,參與PID控速計算的溫度值為實際帶小數點的資料,所計算得出的脈波寬度調變差值ΔPWM(i)為元件10, 10’所真實需要的值,有利於風扇40, 40’之快速和準確回應。Among them, the improvements and advantages brought about by the floating-point data are as follows: the data type stored by the
再來,則是需要進行識別和判斷溫度趨勢。如前所述之比較現在溫度值T(i)、前一刻溫度值T(i-1)、以及前二刻溫度值T(i-2)以判斷是否具有明顯的溫度趨勢(步驟S1093)。首先,需要先明確說明的是,不管環境溫度的高低,通常在不加壓負載,或者是以穩定功率形式的加壓負載情況之下,伺服器內部各個元件的溫度在較短時間內的變化均是連續的且具有規律的,其溫度或保持不變,或逐漸上升,或逐漸下降,不會存在有類似正弦形式或者是其他無規律形式波動的情況。基於此認識,可闡述溫度趨勢的識別和判斷。Next, it is necessary to identify and judge the temperature trend. As mentioned above, compare the current temperature value T(i), the temperature value T(i-1) of the previous moment, and the temperature value T(i-2) of the previous two moments to determine whether there is an obvious temperature trend (step S1093). First of all, it needs to be made clear that regardless of the ambient temperature, usually under no pressure load or under pressure load in the form of stable power, the temperature of each component inside the server changes continuously and regularly in a short period of time. The temperature may remain unchanged, gradually increase, or gradually decrease. There will be no sine-like or other irregular fluctuations. Based on this understanding, the identification and judgment of temperature trends can be explained.
於第i時刻所讀取到的元件10, 10’之溫度值為T(i),而為了獲取元件10, 10’之溫度的變化依據,本發明更引入了讀取第i-2時刻和第i-1時刻的溫度值T(i-2)和T(i-1)。而關於溫度值T(i-2)、T(i-1)和T(i)的大小關係可能有以下幾種情況:The temperature value of the
1. 當T(i-2)=T(i-1)時,有如下三種情況:(i) T(i)=T(i-1),三個時刻的溫度值相等,無變化趨勢;(ii) T(i)>T(i-1),初顯增長趨勢,但溫度變化趨勢還需比較下一時刻的溫度值才能明確;(iii) T(i)<T(i-1),初顯下降趨勢,但溫度變化趨勢還需比較下一時刻的溫度值才能明確。1. When T(i-2)=T(i-1), there are three situations: (i) T(i)=T(i-1), the temperature values at the three moments are equal, and there is no change trend; (ii) T(i)>T(i-1), an increasing trend is initially shown, but the temperature change trend needs to be compared with the temperature value at the next moment to be clear; (iii) T(i)<T(i-1), a decreasing trend is initially shown, but the temperature change trend needs to be compared with the temperature value at the next moment to be clear.
2. 當T(i-2)<T(i-1)時,有以下四種情況:(i) T(i)=T(i-1),具有明顯的溫度增長趨勢;(ii) T(i)>T(i-1),具有明顯的溫度增長趨勢;(iii) T(i)=T(i-2)<T(i-1),不具有明顯的溫度增長趨勢;(iv) T(i)<T(i-2)<T(i-1),不具有明顯的溫度增長趨勢。2. When T(i-2)<T(i-1), there are four situations: (i) T(i)=T(i-1), with an obvious temperature increase trend; (ii) T(i)>T(i-1), with an obvious temperature increase trend; (iii) T(i)=T(i-2)<T(i-1), with no obvious temperature increase trend; (iv) T(i)<T(i-2)<T(i-1), with no obvious temperature increase trend.
3. 當T(i-2)>T(i-1)時,有以下四種情況:(i) T(i)=T(i-1),具有明顯的溫度下降趨勢;(ii) T(i)<T(i-1),具有明顯的溫度下降趨勢;(iii) T(i)=T(i-2)>T(i-1),不具有明顯的溫度變化趨勢;(iv) T(i)>T(i-2)>T(i-1),不具有明顯的溫度變化趨勢。3. When T(i-2)>T(i-1), there are four situations: (i) T(i)=T(i-1), with an obvious temperature decrease trend; (ii) T(i)<T(i-1), with an obvious temperature decrease trend; (iii) T(i)=T(i-2)>T(i-1), with no obvious temperature change trend; (iv) T(i)>T(i-2)>T(i-1), with no obvious temperature change trend.
由上所述共計有11種可能的溫度值大小關係,但具有明顯的溫度變化趨勢的只有以下4種情況:T(i-2)<T(i-1)且T(i)=T(i-1)、T(i-2)<T(i-1)且T(i)>T(i-1)、T(i-2)>T(i-1)且T(i)=T(i-1)和T(i-2)>T(i-1)且T(i)<T(i-1),而其他的7種情況均未能表現出具有明顯的溫度變化趨勢。From the above, there are a total of 11 possible temperature value relationships, but only the following four situations have obvious temperature change trends: T(i-2)<T(i-1) and T(i)=T(i-1), T(i-2)<T(i-1) and T(i)>T(i-1), T(i-2)>T(i-1) and T(i)=T(i-1) and T(i-2)>T(i-1) and T(i)<T(i-1), while the other 7 situations fail to show obvious temperature change trends.
因此,當判斷為具有該明顯的溫度趨勢時,亦即有趨勢時,以該現在溫度值T(i)來計算出一脈波寬度調變差值ΔPWM(i)(步驟S1095)。Therefore, when it is determined that there is an obvious temperature trend, that is, when there is a trend, a pulse width modulation difference ΔPWM(i) is calculated using the current temperature value T(i) (step S1095).
而當判斷為不具有明顯的溫度趨勢時,亦即無趨勢時,則維持第i-1時刻的前一刻脈波寬度調變值PWM(i-1)不變,亦即設定脈波寬度調變差值ΔPWM(i)為零(步驟S1094)。When it is determined that there is no obvious temperature trend, that is, when there is no trend, the pulse width modulation value PWM(i-1) of the previous moment before the i-1th moment is maintained unchanged, that is, the pulse width modulation difference ΔPWM(i) is set to zero (step S1094).
再依據前一刻脈波寬度調變值PWM(i-1)、以及脈波寬度調變差值ΔPWM(i)而得出現在脈波寬度調變值PWM(i),亦即依據以下公式計算得出:PWM(i)=PWM(i-1)+ΔPWM(i)(步驟S1096)。而最後,依據所計算出之現在脈波寬度調變值PWM(i)來控制風扇40, 40’之轉速。Then, the current pulse width modulation value PWM(i) is obtained according to the previous pulse width modulation value PWM(i-1) and the pulse width modulation difference value ΔPWM(i), that is, it is calculated according to the following formula: PWM(i)=PWM(i-1)+ΔPWM(i) (step S1096). Finally, the speed of the
其中,本發明於判斷出具有明顯的溫度趨勢時,風扇40, 40’的脈波寬度調變差值ΔPWM(i)的具體計算方式請參考如前所述的說明,亦即依據如下所示的公式來進行計算所得出:ΔPWM(i)=Kp*[e(i)–e(i-1)]+Ki*e(i)+Kd*[T(i)–2*T(i-1)+T(i-2)]。其中,e(i)=T(i)-Tsp,T(i)為元件10, 10’在第i時刻、也就是當前時刻的溫度;Tsp是元件10, 10’安全工作的臨界溫度;而Kp、Ki和Kd則是基板管理控制器20, 20’內所儲存具有的PID控制值,分別為比例係數、積分係數、以及微分係數。Among them, when the present invention determines that there is an obvious temperature trend, the specific calculation method of the pulse width modulation difference ΔPWM(i) of the
另外,特別需要說明的是,於本發明當中透過PID控速計算後所得之脈波寬度調變差值ΔPWM(i)係向下取整數值,力求以最低的風扇功耗來滿足元件10, 10’的散熱需求。In addition, it is particularly important to explain that in the present invention, the pulse width modulation difference ΔPWM(i) obtained after the PID speed control calculation is rounded down to an integer value, in an effort to meet the heat dissipation requirements of the
因此,本發明的以溫度變化趨勢為判斷依據的PID控速策略如前所述。在此還需要特別加以說明的是,本發明所揭露的控速方式係用以取代如第二圖中所示的PID控速策略,而可將本發明與第一圖中的三種風扇的控速策略中之PID控速(步驟S009)取代後再相結合,達成一個完整的選擇三種風扇的控速策略之方法。Therefore, the PID speed control strategy based on the temperature change trend of the present invention is as described above. It is also necessary to explain that the speed control method disclosed by the present invention is used to replace the PID speed control strategy shown in the second figure, and the present invention can be combined with the PID speed control (step S009) in the three fan speed control strategies in the first figure to achieve a complete method for selecting three fan speed control strategies.
請參考第四圖,係顯示本發明較佳實施例所提供之以溫度變化趨勢來控制風扇40的方法之第一種實施結構示意圖。以上所述本發明的PID控速策略係通過程式的方式寫入基板管理控制器20當中,其具體的控制邏輯如下:基板管理控制器20與元件10和複雜可程式化邏輯裝置(complex programmable logic device,簡稱CPLD)30進行通訊,基板管理控制器20之輸入單元21讀取到元件10的溫度、以及風扇40的轉速等資訊,基板管理控制器20之儲存單元22中的散熱策略(包含PID控速策略)與輸入單元21所讀取到的前述資訊共同傳送到基板管理控制器20之計算單元23內,計算單元23判斷整體機台是否處於正常工作狀態,用以決定是否需要啟動PID控速,以及啟動PID控速的計算方式等,並將計算出的風扇40之脈波寬度調變差值ΔPWM(i)作為一風扇控制指令由基板管理控制器20之輸出單元24傳送到複雜可程式化邏輯裝置30,複雜可程式化邏輯裝置30再將基板管理控制器20所傳送的風扇控制指令傳送至風扇40,風扇40將依據複雜可程式化邏輯裝置30傳送的風扇控制指令決定是否調整和如何調整風扇40的轉速,最終完成基板管理控制器20對風扇40之控制。另外,風扇40亦將一風扇訊號,包含例如有轉速等資訊先傳送給複雜可程式化邏輯裝置30,複雜可程式化邏輯裝置30再將其回饋傳送至輸入單元21內。因此,風扇40轉速的變化將造成元件10之溫度發生改變,進而反作用於基板管理控制器20內的控制,實現了元件10的溫度與風扇40的轉速的雙向作用。Please refer to the fourth figure, which is a schematic diagram showing the first implementation structure of the method of controlling the
另外,請再參考第五圖,係顯示本發明較佳實施例所提供之以溫度變化趨勢來控制風扇40’的方法之第二種實施結構示意圖。此時,對於基板管理控制器20’係採取間接控制的元件10’,其風扇40’的控制方式如下所示:在此種條件之下,基板管理控制器20’與複雜可程式化邏輯裝置30’之間需要另外通過一協力元件來實現通訊,例如通過一擴充器(expender)50間接與複雜可程式化邏輯裝置30’來進行通訊。元件10’的溫度資訊傳送給擴充器50,而風扇40’之一風扇訊號,包含例如有轉速等資訊,亦先傳送給複雜可程式化邏輯裝置30’,再傳送給擴充器50,最後擴充器50再將該等資訊傳送給基板管理控制器20’。而基板管理控制器20’之輸出單元24’將其計算單元23’所得出的風扇40’之脈波寬度調變差值ΔPWM(i)作為一風扇控制指令傳送到擴充器50,而擴充器50先傳送到複雜可程式化邏輯裝置30’,再傳送到風扇40’,風扇40’將依據複雜可程式化邏輯裝置30’傳送的風扇控制指令決定是否調整和如何調整風扇40’的轉速,最終完成基板管理控制器20’對風扇40’之控制。至於其餘的部分就請參考如前的第四圖之說明內容。In addition, please refer to the fifth figure, which is a schematic diagram showing the second implementation structure of the method of controlling the fan 40' by temperature change trend provided by the preferred embodiment of the present invention. At this time, the baseboard management controller 20' adopts the indirect control element 10', and the control method of the fan 40' is as follows: Under this condition, the baseboard management controller 20' and the complex programmable logic device 30' need to communicate through another cooperation element, such as an expander (expender) 50 to communicate indirectly with the complex programmable logic device 30'. The temperature information of the component 10' is transmitted to the
針對傳統的直接將溫度作為判斷依據的PID控速策略所存在的抗干擾能力差和風扇40, 40’控速不穩定的問題,本發明提出了一種以溫度變化趨勢為判斷依據的PID控速策略,該策略具有如下的數項優點:In view of the problems of poor anti-interference ability and unstable speed control of
1. 根據當前的元件溫度來控制風扇40, 40’的轉速,其回應速度快,且控制精度高。1. The speed of the
2. 自動排除溫度噪點,避免溫度的偶然波動而造成風扇40, 40’轉速的劇烈波動和由此產生的長時間不穩定狀態,實現穩定控速。2. Automatically eliminate temperature noise, avoid accidental temperature fluctuations that cause drastic fluctuations in the fan speed of 40, 40' and the resulting long-term unstable state, and achieve stable speed control.
3. 增強了風扇40, 40’控速的穩定性,延長了風扇40, 40’的使用壽命。3. The speed control stability of
4. 通過降低風扇40, 40’轉速波動和延長風扇40, 40’壽命的方式,降低了系統運行和維護費用。4. Reduce system operation and maintenance costs by reducing
綜上所述,由於本發明之以溫度變化趨勢來控制風扇40, 40’的方法,相比較於傳統的直接將溫度作為判斷依據的PID控速策略來相比,本發明以溫度變化趨勢為判斷依據的PID控速策略,除了能夠快速回應元件10, 10’的控溫需求之外,其突出的特點為抗干擾能力強,能自動排除偶然出現的資料噪點,提高風扇40, 40’控速的穩定性,避免風扇40, 40’長時間波動所造成的功耗浪費,同時也能夠延長風扇40, 40’的使用壽命,極大節省系統的運行和維護費用。In summary, compared with the traditional PID speed control strategy that directly uses temperature as the basis for judgment, the PID speed control strategy based on the temperature change trend of the present invention to control the
藉由以上較佳具體實施例之詳述,係希望能更加清楚描述本發明之特徵與精神,而並非以上述所揭露的較佳具體實施例來對本發明之範疇加以限制。相反地,其目的是希望能涵蓋各種改變及具相等性的安排於本發明所欲申請之專利範圍的範疇內。The above detailed description of the preferred specific embodiments is intended to more clearly describe the features and spirit of the present invention, but is not intended to limit the scope of the present invention by the preferred specific embodiments disclosed above. On the contrary, the purpose is to cover various changes and arrangements with equivalents within the scope of the patent application for the present invention.
10, 10’:元件10, 10’: Component
20, 20’:基板管理控制器20, 20’: Baseboard Management Controller
21, 21’:輸入單元21, 21’: Input unit
22, 22’:儲存單元22, 22’: Storage unit
23, 23’:計算單元23, 23’: Calculation unit
24, 24’:輸出單元24, 24’: Output unit
30, 30’:複雜可程式化邏輯裝置30, 30’: Complex Programmable Logic Devices
40, 40’:風扇40, 40’: Fan
50:擴充器50: Expander
S001~S010:步驟S001~S010: Steps
S0091~S0096:步驟S0091~S0096: Steps
S1091~S1096:步驟S1091~S1096: Steps
第一圖係顯示一般常用之選擇三種風扇的控速策略之流程圖; 第二圖係顯示一般常用之PID控速策略之流程圖; 第三圖係顯示本發明較佳實施例所提供之以溫度變化趨勢來控制風扇的方法之流程圖; 第四圖係顯示本發明較佳實施例所提供之以溫度變化趨勢來控制風扇的方法之第一種實施結構示意圖;以及 第五圖係顯示本發明較佳實施例所提供之以溫度變化趨勢來控制風扇的方法之第二種實施結構示意圖。The first figure is a flow chart showing the commonly used speed control strategies for selecting three types of fans;The second figure is a flow chart showing the commonly used PID speed control strategy;The third figure is a flow chart showing the method for controlling the fan by temperature change trend provided by the preferred embodiment of the present invention;The fourth figure is a schematic diagram showing the first implementation structure of the method for controlling the fan by temperature change trend provided by the preferred embodiment of the present invention; andThe fifth figure is a schematic diagram showing the second implementation structure of the method for controlling the fan by temperature change trend provided by the preferred embodiment of the present invention.
S1091~S1096:步驟S1091~S1096: Steps
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112121621ATWI858763B (en) | 2023-06-09 | 2023-06-09 | Method for controlling a fan via temperature trend |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112121621ATWI858763B (en) | 2023-06-09 | 2023-06-09 | Method for controlling a fan via temperature trend |
| Publication Number | Publication Date |
|---|---|
| TWI858763Btrue TWI858763B (en) | 2024-10-11 |
| TW202449531A TW202449531A (en) | 2024-12-16 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW112121621ATWI858763B (en) | 2023-06-09 | 2023-06-09 | Method for controlling a fan via temperature trend |
| Country | Link |
|---|---|
| TW (1) | TWI858763B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1547122A (en)* | 2003-12-08 | 2004-11-17 | 谦 李 | Automatic control system based on computer hardware monitoring circuit |
| TW200736865A (en)* | 2006-03-31 | 2007-10-01 | Tyan Computer Corp | Universal driver for different fans |
| US20170331899A1 (en)* | 2012-01-09 | 2017-11-16 | May Patents Ltd. | System and method for server-based control |
| CN110725806A (en)* | 2018-07-16 | 2020-01-24 | 研祥智能科技股份有限公司 | Fan rotating speed control method and device and server |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1547122A (en)* | 2003-12-08 | 2004-11-17 | 谦 李 | Automatic control system based on computer hardware monitoring circuit |
| TW200736865A (en)* | 2006-03-31 | 2007-10-01 | Tyan Computer Corp | Universal driver for different fans |
| US20170331899A1 (en)* | 2012-01-09 | 2017-11-16 | May Patents Ltd. | System and method for server-based control |
| CN110725806A (en)* | 2018-07-16 | 2020-01-24 | 研祥智能科技股份有限公司 | Fan rotating speed control method and device and server |
| Publication number | Publication date |
|---|---|
| TW202449531A (en) | 2024-12-16 |
| Publication | Publication Date | Title |
|---|---|---|
| TWI430081B (en) | Method, apparatus and system for intervention of independent self-regulation of power consumption devices | |
| US20110270451A1 (en) | Control device for exhaust heat recovery system | |
| CN101551595A (en) | Temperature control method for projection objective of photoetching machine | |
| JPH09317404A (en) | Steam turbine start-up control device | |
| TWI858763B (en) | Method for controlling a fan via temperature trend | |
| US20240407141A1 (en) | Method for controlling fan based on temperature variation trend | |
| CN112944576B (en) | Frequency control method, device and air conditioner of air conditioner compressor | |
| US12158789B1 (en) | Method for controlling total power consumption of system by setting controller parameters based on phases | |
| CN116394709A (en) | Thermal management method and system, vehicle and storage medium | |
| CN112068691B (en) | Fan rotating speed regulation and control method and system introducing power algorithm | |
| US20250169026A1 (en) | Fan speed control method | |
| TWI845339B (en) | Method for controlling a system's total power consumption by setting parameters in a controller according to the temperature difference | |
| CN115406119B (en) | Temperature abnormality processing method, system, water heater and medium for water heater | |
| CN118242180A (en) | A method for controlling the speed of a gas turbine | |
| CN118012159A (en) | Heat dissipation control method and system, electronic equipment, storage medium and vehicle | |
| US20240402775A1 (en) | Method for controlling total power consumption of system by setting controller parameters based on temperature difference | |
| CN115788671B (en) | Model-based downtime calculation method and sensor drift fault detection method | |
| CN118219859A (en) | Motor control method and device, motor controller, vehicle and storage medium | |
| CN113944979B (en) | Expansion valve control method, device, multi-connected air conditioner, computer storage medium | |
| CN113028575B (en) | Target exhaust gas temperature correction method, target exhaust gas temperature correction device, electronic apparatus, and storage medium | |
| TW202449563A (en) | Method for controlling a system’s total power consumption by setting parameters in a controller according to the phases | |
| TW202449296A (en) | Method for controlling a system’s total power consumption by setting a fan’s maximum rotating speed | |
| US20240402774A1 (en) | Method for controlling total power consumption of system by setting maximum rotation speed of fan | |
| CN118979800A (en) | Application of a steam pump recirculation automatic control method in unit wide load peak regulation | |
| CN118669991A (en) | Thermal load control method, device, heating stove, storage medium and program product |