201019596 六、發明說明: 【發明所屬之技術領域】 本發明是有關於一種數位微分器之設計方法,且特別是 有關於一種利用微分演化(differentiai eV〇luti〇n,DE)演算 - 法’設計具有分數階微分功能的分數階數位微分器之設計 方法。 【先前技術】 ® 分數階數位微分器的主要目的是對數位輸入訊號做分 數階次的微分運算。關於分數階數位微分器設計的先前技 術大部分都在時域(time domain)下作分析探討,例如將輸 入訊號先以泰勒級數展開’並使用此輸入訊號解出范德蒙 (Vandermonde)線性方程式進而得到數位微分器的脈衝響 應,在這樣的條件下所設計出來的數位據波器可以近似分 數階的數位微分器。另外一種時域設計分數階微分器的方 ❾ 法疋採用最小平方法來5又计無限脈衝響應(infinite impulse response,IIR)濾波器’使其能近似於分數階的微分器。 然’尚有其它問題仍需解決,由於一般分數階數位微 分器於設計時多半會進行冗長的運算,因此難以縮減設計 的時間與成本。 【發明内容】 有鑑於此,本發明所欲解決之問題係在於提供一種透 過一微分演化(differential evolution,DE)演算法來完成分 數階數位微分器之設計方法。 201019596 為解決上述方法問題,本發明所揭露之技術係在於提供一 種分數階數位微分器之設計方法,其係先利用一數位滤波 器建構-分數階數位微分器模型,計算分數階數位微分器 .模^'之頻率響應參數,設定分數階數位微分器模型之一 理想頻率響應參數。接著,依據頻率響應參數與理想頻率 響應參數為條件,利用—微分演化演算法經過突變、交配 2擇演化後,以取得分數階數位微分賴型之—目標微 © ^係數。最後,將目標微分器係數導人分數階數位微分 器模型,以完成分數階數位微分器的設計。 本發明可達成之功效在於: 其一’由於微分演化演算法包含突變(mutati〇n)、交配 (crossover)與選擇(selecti〇n)等演化式運算,且數值運算是 以實數表示式進行,所以能更有效地解決數位濾波器設計 的問題。 、 其二’由於微分演化演算法具有優異的搜尋能力與快 ❹&收敛等特點’使得所設計出來的數位濾、波器頻率響應能 夠滿足任意給定的分數階微分器的頻率響應。 【實施方式】 ^為期許對本發明之構造、特徵、功效及目的能夠有更 詳盡的瞭解’兹配合圖式將本發明相關實施例詳細說明如 下。 ^ μ參閱圖1所示,圖1係本發明分數階數位微分器之設 十方法的流程圖。由圖丨可知,分數階數位微分器之設計方法其 步驟說明如下: 201019596 ^•先’本發明係利用有限脈衝響應(FIR)數位遽、波器的架構, 建構出分數階數位微分器模型(步禪s册),所述有限脈衝響應 位滤波器義構可使肋下縣分相式來完成: +]=Φ]ΦΜι]ψ-1]+卿卜 2]+…+咖池 _ ^ ^ 公式(1) 其中a:是公式⑴的數位輸入訊號,少是公式⑴的數位輪 ❹ ❿ 號為公式⑴的階數(Grder)’A為公式⑴的單位脈衝也 impulse response) ° 本發明分數階餘微分賴㈣技鋪在賴下 因此須將公式(1)取z轉換,而得到下式: °、 Y[z] = Y,h[k^C[zYk k=Q 公式(2) 其中分數階數位微分器模型的轉移函數响進一步可以表示 成··201019596 VI. Description of the Invention: [Technical Field] The present invention relates to a method for designing a digital differentiator, and in particular to a method for utilizing differential evolution (differentiai eV〇luti〇n, DE) calculus-method A design method of fractional order differentiator with fractional differential function. [Prior Art] The main purpose of the fractional-order digital differentiator is to perform fractional-order differential operations on digital input signals. Most of the prior art techniques for fractional-order-bit differentiator design are analyzed in the time domain, such as expanding the input signal first in Taylor series' and using this input signal to solve the Vandermonde linear equation. The impulse response of the digital differentiator is obtained. Under such conditions, the digital data generator designed can approximate the fractional-order digital differentiator. Another method of designing a fractional-order differentiator in the time domain uses the least squares method to calculate the infinite impulse response (IIR) filter to approximate the fractional-order differentiator. However, there are still other problems that still need to be solved. Since the general fractional-order digitizers are often designed to be lengthy, it is difficult to reduce the design time and cost. SUMMARY OF THE INVENTION In view of the above, the problem to be solved by the present invention is to provide a method for designing a fractional-order digital differentiator by a differential evolution (DE) algorithm. 201019596 In order to solve the above method problem, the technology disclosed in the present invention is to provide a method for designing a fractional-order digital differentiator, which first constructs a fractional-order digital differentiator model by using a digital-bit filter to calculate a fractional-order digital differentiator. The frequency response parameter of the modulo ^' sets the ideal frequency response parameter of one of the fractional-order-bit differentiator models. Then, based on the frequency response parameters and the ideal frequency response parameters, the differential-derivative evolution algorithm is used to obtain the fractional-order differential-type-target micro-mechanism by mutation and mating. Finally, the target differentiator coefficient is introduced into the fractional-order-digit differentiator model to complete the design of the fractional-order digital differentiator. The achievable effects of the present invention are as follows: The 'difference evolution algorithm includes evolutionary operations such as mutation (mutati〇n), crossover and selection (selecti〇n), and numerical operations are performed in real numbers. Therefore, the problem of digital filter design can be solved more effectively. The second is because the differential evolution algorithm has excellent search ability and fast convergence & convergence, so that the designed digital filter and wave frequency response can meet the frequency response of any given fractional differentiator. [Embodiment] It is to be understood that the structure, features, functions and objects of the present invention will be more fully understood. The embodiments of the present invention are described in detail below. ^ μ is shown in Fig. 1, which is a flow chart of the method for setting the fractional bit differentiator of the present invention. It can be seen from the figure that the design method of the fractional-order digital differentiator is as follows: 201019596 ^•First' The invention uses a finite impulse response (FIR) digital 遽, waver architecture to construct a fractional-order digital differentiator model ( Step Zen s book), the finite impulse response bit filter semantic structure can be completed by the rib sub-division phase: +]=Φ]ΦΜι]ψ-1]+卿卜2]+...+咖池_ ^ ^ Formula (1) where a: is the digit input signal of equation (1), and less is the digit rim of equation (1). The ❿ is the order of formula (1) (Grder) 'A is the unit pulse of equation (1) and also impulse response) ° The fractional order differential differential (4) technique is laid down. Therefore, the formula (1) must be converted into z, and the following formula is obtained: °, Y[z] = Y, h[k^C[zYk k=Q formula (2) The transfer function of the fractional-order digital differentiator model can further be expressed as...
训㈣ 公式G 且為了計算分數階數位微分器模型之頻率響應參數,因此 z Y,其抑代絲位鮮’據此細麟分簡數位微八 模型之鮮㈣錄(倾制),此_響應錄麵方式如^ 丑(Ω) = |>[Αφ-师Training (4) Formula G and in order to calculate the frequency response parameters of the fractional-order-digit differentiator model, so z Y, which suppresses the silk position freshly, according to this, the fine-branched simple-digit micro-eight model is fresh (four) recorded (dipping), this _ Responsive recording method such as ^ ugly (Ω) = |>[Αφ-师
k=0 公式C f者,為1方便在微分演化演算法中使用,在此 丑未ν、Μ=_μ[ιΐ·.·]]為—具㈣個^素的參數 201019596 量 (Pr〇t〇ty==—個理想分數階數位微分賴型的原型 率響應參數數階數位微分卿之一理想頻 ^(Ω) = 〇Ώ)β, 其中1設計餘意給糾分數_分階:欠。 公式⑸ ❹ ❹ 為條與理想頻率響應參數雄) 辑卿目祕繼(步驟 器模型之晴峨雜位微分 程圖請同時參_ 2,圖2係本發分演化演算法的工作流 係隨機產生複數個參數向量以形成一族 S200),每-參數向量包含複數個微分器係數。 上/ί ί每一參數向量之—價值函數(步驟S21〇)。如 述,為滿足公式⑸之需求,因此,根據 ==數·)定義出一價值函數之關係式= ^十异出各參數向量的價值函數。此價值函數之關係式係表示如 下·k=0 Formula C f, which is convenient for use in the differential evolution algorithm. In this case, ugly ν, Μ = _μ[ιΐ·.·]] is the parameter of (4) 素素 201019596 (Pr〇t 〇ty==—Prototype of the ideal fractional order differential lag type Probability rate response parameter number order digits differential ambiguity one ideal frequency ^(Ω) = 〇Ώ)β, where 1 design is intended to give the score _ step: owe . Formula (5) ❹ ❹ is the bar and the ideal frequency response parameter.) The syllabus is the secret of the step-by-step model. Please refer to _ 2, Figure 2 is the workflow of the distributed evolution algorithm. A plurality of parameter vectors are generated to form a family S200), and each-parameter vector includes a plurality of differentiator coefficients. Up / ί ί - each value vector - value function (step S21 〇). As described above, in order to satisfy the requirement of the formula (5), a relation function of a value function is defined according to == number·), and the value function of each parameter vector is different. The relationship of this value function is expressed as follows.
CF 公式(6) 設計的其要中求。⑶為價值函數’ #價值練愈小時,即代表越滿足 依據所有的價值函數,從中選出一目標參數向量,並 201019596 將此目標參數向量的價值函數當作族群之 (步驟S22G)。目標參數向量即指,族群中,^值函數 價值函數的參數向量,即此參數向量包含的佳之 .可使分數階數位微分器模型之頻率響應參數最刀人八、數’ 之要求。 付0么式(5) 判斷是否達到一終止條件(步驟S23〇)。在此,故 條件包含有二:一者為此族群已達到一迭代次數,此二止 ❹^係指微分演化演算法最高可執行次數,或指族群$ 行凟化次數,此迭代次數需預先設定。另一者為目枳俨值 函數已收敛至最小,或達到一目標值’此目標值需 定。 當終止條件未成立時’即進行族群的演化(步餘 S250)。此演化過程係具有突變、交配以及選擇三個運算步 驟。 首先’突變演化的方式如下,在此以公式(7)稱之: 〇 y-Ha+F\Hp-HY) 公式(7) 其中F = [vQ,'.·.,%]稱為捐贈向量(donor vector),向量 、gg和开r是從分數階數位微分器模型中的頻率響應參數 丑(Ω)中所隨機產生的三個參數向量,i?稱為是突變因子 (mutation factor),是決定突變大小的參數。 請同時參閱圖3,圖3係本發明突變演化中,說明突 變的方式以及如何得到捐贈向量的過程。從圖3中可清楚 地看出+厂(丑〃-尽)突變的方式以及如何得到捐贈 向量F的過程。 201019596 當得到捐贈向量F後,即進入微分演化演算的交配演 化步驟。於此交配步驟中,假設i/ =[办。,\…,\ ]為族群中的 一個目標向量(target vector)。之後’將此目標向置與上述 . 突變過程中所得到的捐贈向量厂進行向量内的元素 , (element)交換,亦即將捐贈向量F中的v。,^···,、與目標向 量好中的…,心元素作交換,交配完後所得到向量 ^ =[从。,1^ ...,νι^]稱為測試向量(trial vector)。其中此交換條 ❹ 件之過程如下: 首先,產生一組介於(0,1)之間的隨機亂數,…,〜}, 然後依下列公式獲得一达的數值:CF formula (6) is designed to be sought. (3) is a value function' #Value training is small, that is, the more satisfied the representative is based on all the value functions, a target parameter vector is selected therefrom, and 201019596 considers the value function of the target parameter vector as a group (step S22G). The target parameter vector refers to the parameter vector of the value function of the ^ value function in the group, that is, the parameter vector contains better. The frequency response parameter of the fractional-order differentiator model can be the most versatile. (0) It is judged whether or not a termination condition is reached (step S23〇). Here, the condition includes two: one has reached the number of iterations for this group, and the second is the maximum number of executables of the differential evolution algorithm, or the number of populations of the population. set up. The other is the target value function has converged to a minimum, or reaches a target value 'this target value needs to be determined. When the termination condition is not established, the evolution of the group is performed (step S250). This evolutionary process has three operational steps: mutation, mating, and selection. First, the way of mutation evolution is as follows, which is referred to here by formula (7): 〇y-Ha+F\Hp-HY) Equation (7) where F = [vQ, '.·., %] is called the donation vector. (donor vector), vector, gg, and open r are three parameter vectors randomly generated from the frequency response parameter ugly (Ω) in the fractional-order digital differentiator model, i? is called a mutation factor. It is a parameter that determines the size of the mutation. Please also refer to FIG. 3, which is a process of mutation evolution in the present invention, illustrating the manner of mutation and how to obtain a donation vector. It can be clearly seen from Figure 3 that the +factory (ugly-dip) mutations and how to get the donation vector F. 201019596 When the donation vector F is obtained, it enters the mating evolution step of the differential evolution calculus. In this mating step, assume i/ = [do. , \..., \ ] is a target vector in the group. Then, the target is placed in the above direction. The donation vector factory obtained in the mutation process carries out the elemental exchange in the vector, and will also donate the v in the vector F. , ^···,, and the target vector are good..., the heart element is exchanged, and the vector obtained after mating is ^^[from. , 1^ ..., νι^] is called a trial vector. The process of this exchange bar is as follows: First, generate a set of random random numbers between (0, 1), ..., ~}, and then obtain a value according to the following formula:
ifrk<C otherwise’Ifrk<C otherwise’
k = QA,..,,N 公式(8) 其中Ce(0,l)為交配率(crossover rate),通常設為0.5。 測試向量酽進一步由下面的式子所產生: 〇k = QA,..,,N Equation (8) where Ce(0,l) is the crossover rate, usually set to 0.5. The test vector is further generated by the following equation:
tfbk=l if bk=° 公式(9) 當\=1,則以目標向量\的元素當作測試向量%的元 素;當4 = 0則以捐贈向量 '的元素當作測試向量的元 素’如此便完成交配的過程。因此測試向量酽是由捐贈向 量厂與目標向量丑二者之元素所充分交配而得到的結果。 當測試向量酽被決定後,即進入選擇演化步驟。依據 此公式(6),係將上述測試向量與目標向量兩個頻率響應參數 的參數向量之價值函數CF算出,並同時進行比較。 當測試向量所得到的價值函數小於目標向量的價值函 201019596 數時,則在下一代 摒除目標向量,、…犬變、交配與選擇.演化)的族群中 續保留,所得_ = ί量遞補之;反之’目標向量則繼 當完成突變、:向:則摒除不用。 以重複步騾S210又己、選擇流程後,即返回步驟S210, 至終止條件成立為^驟S22Q、步驟S23G、步驟S250,直 田〜止條件成立時,即 ❹ 目標價值函數已收 =相—迭代次數,或者’ 即蔣日拇細艰主敢小或達到一目標值。 目標參數向函數所屬之目標參數向量取出,此時, 數向量包含標龍錄必已_至最小,而目標參 S240)。 器係數即為目標微分器係數(步驟 型中到的目標微分11係鱗人分數階數錄分器模 t中的a式⑴’使頻率響應參數难)能夠献理想分數階數位 微分器模型之理想頻率響應參數雄)=(蹲,使得所設計出來 ❹的數位遽波器頻率響應能夠滿足任意給定的分數階微分器 的頻率響應,而完成整個設計流程 ° 綜上所述,乃僅記載本發明為呈現解決問題所採用的 技術手段之較佳實施方式或實施例而已,並非用來限定本 發明專利實施之範圍。即凡與本發明專利申請範圍文義相 符,或依本發明專利範圍所做的均等變化與修飾,皆2 發明專利範圍所涵蓋。 ^" 【圖式簡單說明】 圖1係本發明分數階數位微分器之設計方法的流程圖. 201019596 圖2係本發明微分演化演算法的工作流程圖;以及 圖3係本發明突變演化中,說明突變的方式以及如何得到 捐贈向量的過程。 【主要元件符號說明】Tfbk=l if bk=° Equation (9) When \=1, the element with the target vector\ is treated as the element of the test vector %; when 4 = 0, the element of the donation vector is used as the element of the test vector' The process of mating is completed. Therefore, the test vector 酽 is the result of mating the elements of both the donor and the target vector ugly. When the test vector is determined, it enters the selection evolution step. According to the formula (6), the value function CF of the parameter vector of the two frequency response parameters of the above test vector and the target vector is calculated and compared at the same time. When the value function obtained by the test vector is smaller than the value of the target vector 201019596, it is retained in the next generation of the target vector, dog, mate, mating, and selection. The resulting _ = ί quantity Conversely, the 'target vector is followed by the completion of the mutation,: to: then eliminate. After repeating the step S210 and selecting the flow, the process returns to step S210, and the termination condition is established as S22Q, step S23G, and step S250. When the direct field is terminated, the target value function is received = phase-iteration The number of times, or 'that is, Jiang Qi’s hard-working masters dare to reach a target value. The target parameter is taken out to the target parameter vector to which the function belongs. At this time, the number vector contains the standard dragon record _ to the minimum, and the target parameter S240). The coefficient of the target is the target differentiator coefficient (the a-point (1) in the target differential 11-scale scale fractional order scorer module t in the step type makes the frequency response parameter difficult) can be provided by the ideal fractional-order digitizer model. The ideal frequency response parameter is male) = (蹲, so that the designed digital chopper frequency response can satisfy the frequency response of any given fractional differentiator, and complete the entire design flow. The present invention is intended to provide a preferred embodiment or embodiment of the technical means for solving the problem, and is not intended to limit the scope of the present invention, which is to be consistent with the scope of the patent application of the present invention, or in accordance with the scope of the present invention. The equal variation and modification are all covered by the scope of the invention patent. ^" [Simple description of the schema] Figure 1 is a flow chart of the design method of the fractional-order digitizer of the present invention. 201019596 Figure 2 is a differential evolution calculus of the present invention. The working flow chart of the method; and Fig. 3 is the process of the mutation evolution of the present invention, illustrating the manner of mutation and how to obtain the donation vector. No description]