Technical background
Digital filter is the very important part of digital information processing system, is a kind of basic processing parts during voice and image processing, pattern recognition, Radar Signal Processing, spectrum analysis etc. are used.The transfer function H (z) of a given N exponent number character filter can be expressed as:
(formula 1)
In using in real time, a digital filter that designs finally will be realized on the digital device of a limited precision, and finite word length effect will reduce the performance of filter greatly.As everyone knows, fixed-point computation is compared with floating-point operation, has advantages such as speed is fast, memory capacity is low.The long digital filter of short word means low cost, but precision is not high, can make system performance degradation.Therefore, especially the occasion of having relatively high expectations (as automobile, robot, radar, alternating current machine etc.) in real-time, and adopting the production in enormous quantities industry of special chip at mp4 player, digital sound, digital colour TV etc., it is particularly outstanding that the finite word length effect problem seems.
Directly the advantage of type structure maximum is that it is simple in structure, the N exponent number character filter that designs is directly being realized on the II transposition type structure, then every calculating is once exported and only need be done 2N+1 multiplication and N sub-addition, but described structure is very responsive to the influence of limited wordlength, thereby has limited its application.Though and realize reducing finite word length effect significantly as the optimum state space, this implementation structure is to be cost with the complexity that has improved filter construction.In fact, the every calculating of this structure is once exported general needs and is done (N+1)
2Inferior multiplication and N (N+1) sub-addition.So, how to solve contradiction between structural complexity and the performance and be always the focus in Design of Filter and the realization field.
Lattice filter structure is widely used in a lot of real-time systems owing to it has very strong robustness to finite word length effect.At first to trace back to 1973 to the research of lattice filter, by Gray and Markel the tapped lattice filter structure of classical molecule has been proposed, detailed document " Digital lattice and ladder filter the synthesis " (A.H.Gray that please refer to, Jr.and J.D.Markrl, IEEE Trans.Audio Electroacoust, vol.AU-21, pp.491-500, Dec.1973), this structure Gray-Markel structure that is otherwise known as.Because the energy level behind each delayer node of the tapped lattice filter structure of described molecule is inhomogeneous, especially when the bandwidth of filter is narrower, Lim has proposed the pouring-in lattice filter of molecule in 1984, defective to its existence has great improvement, see document " On the synthesis of IIRdigital filters derived from single channel AR lattice network " (IEEETrans.Acoust., Speech, Signal Processing, vol.ASSP-32, no.4, pp.741-749, Aug., 1984).
But studies show that, in case the given transfer function of digital filter, described two kinds of traditional lattice filter structure parameters all rely on structure and directly decide, often can not require (as the sensitivity transfer function at specific performance properties, noise gain etc.) optimize, in the recent period, Li is at document " Very robust low complexity lattice filters " (G.Li, Y.C.Lim, and C.G.Huang, IEEE Trans.Signal Processing.vol.58, no.12, pp.6093-6104, Dec., 2010) a kind of new and effective succinct lattice filter structure of middle proposition with degree of freedom, the advantage of described two kinds of traditional lattice filter structure that this structure is integrated, simple in structure and have a very low parametric sensitivity.But by above-mentioned document as can be known, the optimal design of this filter adopts global search, and when each injection parameter was selected 2 powers (signpowers of two-SPT) expression that symbol arranged for use, described Filter Design was optimized the space and comprised N (2 Ξ+3)
N-1Individual element, wherein positive integer Ξ represents that the minimum resolution that parameter value can be got is 2
-ΞThe search volume of this method for designing is exponential increase with the growth of exponent number N, and optimal design efficient is low, especially when N is big, may cause the optimal design failure.Though optimize is the off-line design, and long design time has equally also restricted the practical application of described filter.
Summary of the invention
For overcoming the above-mentioned shortcoming of prior art, the invention provides a kind of can given performance requirement being optimized, be met under the prerequisite of described performance requirement, improve the lattice digital filter based on genetic algorithm of Filter Design efficient.
Based on the lattice digital filter of genetic algorithm, described filter is by unit cascaded the forming of a series of fundamental mesh type, and the fundamental mesh type unit of m level comprises forward signal f
m(n) from the back primary unit forward primary unit transmission the fl transmission operate portions and with backward signal b
m(n) in the past primary unit primary unit transmission back backward to the transmission operate portions;
It is characterized in that: described fl transmission operate portions comprises first adder, second adder and multiplier, and described back comprises to the transmission operate portions gets up to be used for next delayer that calculates constantly and the 3rd adder with the signal storage of importing in it;
Described forward signal f
m(n) import in first adder and the second adder backward signal b of previous stage unit output respectively
M-1(n) be temporary in the described delayer;
Forward signal with in first adder, subtract each other the cut signal that the back forms from the time delayed signal of delayer, in the described cut signal input multiplier with proportionality coefficient K
mMultiply each other, form scaling signal, described scaling signal is imported in the described second adder, is formed the forward direction output signal f that works as prime with the forward signal addition
M-1(n), described scaling signal is imported in described the 3rd adder, is formed after prime to output signal b with described time delayed signal addition
m(n);
The forward direction output signal of primary unit is injected the input signal θ of a weighting backward
mU (n) back forms the forward direction input signal of this back primary unit;
Each grade back to output signal b
k(n) tap coefficient ψ of weighting
kForm weighting output signal ψ
kb
k(n), the weighting output signal addition of all fundamental mesh type unit is formed the output signal of filter
Also be provided with in the described filter and can generate injection ratio collection [θ
0, θ
1, Λ, θ
m, Λ, θ
N], θ wherein
mThe coefficient generation module of representing the injection ratio corresponding with m level fundamental mesh type unit; Described coefficient generation module obtains optimum injection ratio collection by genetic algorithm, and concrete steps are as follows:
(1) produces N at random
pIndividual injection ratio collection is with this N
pIndividual injection ratio collection is as current population;
(2) determine fitness function according to the performance of filter needs optimization, calculate the fitness value of each injection ratio collection;
(3), adopt the roulette back-and-forth method to reselect N according to fitness value
pIndividual injection ratio collection further intersects, makes a variation it then, forms new progeny population;
(4) judge whether the current generation reach maximum genetic algebra, if then enter step (5), otherwise the progeny population that forms with step (3) is as current population, repeated execution of steps (2)-(3);
(5) export as optimum injection ratio collection with the injection ratio collection of fitness value maximum.
Further, the forward signal of described fundamental mesh type unit and backward signal are through the signal after the z conversion, wherein: forward signal f
m(n) z map table is shown F
m(z), backward signal b
m(n) z map table is shown B
m(z); The transfer function of described m level fundamental mesh type unit is:
Described filter table is shown:
Wherein: m=1,2, L, N, and θ
N=0.
Technical conceive of the present invention is: N of the present invention rank elementary cell lattice digital filter comprises 3N+1 multiplier, 5N+1 adder, N delayer.More particularly, this structure is by N unit cascaded the forming of fundamental mesh type, simultaneously, inject the input signal of weighting at the forward direction output signal place of each described fundamental mesh type unit, to an input signal place weighting tap coefficient also exporting thereafter, what it needs to be noted described final stage fundamental mesh type unit is input as 0, and the output signal place is equally also through weighting and output.Utilize genetic algorithm to be optimized then: at first, to require definite target function of optimizing, determine fitness function with this according to specific performance at specific performance properties; Secondly, the injection parameter of the described structure of initialization, and necessary index in definite genetic process; Then, fitness evaluation is also carried out a series of genetic manipulation (select, intersect, variation), and the condition that judgement heredity finishes in the genetic process is finished up to heredity; At last, the optimum structure that obtains according to heredity draws the tap coefficient of described structure.
Beneficial effect of the present invention mainly shows:
1. the present invention is in conjunction with the advantage of described lattice filter structure, utilize N weighting injection ratio with degree of freedom, require this filter construction is optimized according to specific performance, adopt genetic algorithm to save a large amount of search times to design the optimum implementation structure parameter under the described performance requirement, very big effect is played in this application to described structure;
2. be the implementation complexity that further reduces described lattice filter structure, described weighting injection ratio can adopt SPT to represent, only need thus input signal is shifted and add operation just can realize weighting to input signal, then every calculating is once exported and just can be reduced N time multiplication, and this will reduce the implementation complexity of described lattice structure greatly;
3. described genetic algorithm has solved the shortcoming that described structure is not suitable for designing the high-order iir filter, and this algorithm is used the crucial effect of playing to the high order system of this structure.
Embodiment
With reference to accompanying drawing, further specify the present invention:
Based on the lattice digital filter of genetic algorithm, described filter is by unit cascaded the forming of a series of fundamental mesh type, and the fundamental mesh type unit of m level comprises forward signal f
m(n) from the back primary unit forward primary unit transmission the fl transmission operate portions and with backward signal b
m(n) in the past primary unit primary unit transmission back backward to the transmission operate portions;
Described fl transmission operate portions comprises first adder, second adder and multiplier, and described back comprises to the transmission operate portions gets up to be used for next delayer that calculates constantly and the 3rd adder with the signal storage of importing in it;
Described forward signal f
m(n) import in first adder and the second adder backward signal b of previous stage unit output respectively
M-1(n) be temporary in the described delayer;
Forward signal with in first adder, subtract each other the cut signal that the back forms from the time delayed signal of delayer, in the described cut signal input multiplier with proportionality coefficient K
mMultiply each other, form scaling signal, described scaling signal is imported in the described second adder, is formed the forward direction output signal f that works as prime with the forward signal addition
M-1(n), described scaling signal is imported in described the 3rd adder, is formed after prime to output signal b with described time delayed signal addition
m(n);
The forward direction output signal of primary unit is injected the input signal θ of a weighting backward
mU (n) back forms the forward direction input signal of this back primary unit;
Each grade back to output signal b
k(n) tap coefficient ψ of weighting
kForm weighting output signal ψ
kb
k(n), the weighting output signal addition of all fundamental mesh type unit is formed the output signal of filter
Also be provided with in the described filter and can generate injection ratio collection [θ
0, θ
1, Λ, θ
m, Λ, θ
N], θ wherein
mThe coefficient generation module of representing the injection ratio corresponding with m level fundamental mesh type unit; Described coefficient generation module obtains optimum injection ratio collection by genetic algorithm, and concrete steps are as follows:
(1) produces N at random
pIndividual injection ratio collection is with this N
pIndividual injection ratio collection is as current population;
(2) determine fitness function according to the performance of filter needs optimization, calculate the fitness value of each injection ratio collection;
(3), adopt the roulette back-and-forth method to reselect N according to fitness value
pIndividual injection ratio collection further intersects, makes a variation it then, forms new progeny population;
(4) judge whether the current generation reach maximum genetic algebra, if then enter step (5), otherwise the progeny population that forms with step (3) is as current population, repeated execution of steps (2)-(3);
(5) export as optimum injection ratio collection with the injection ratio collection of fitness value maximum.
The forward signal of described fundamental mesh type unit and backward signal are through the signal after the z conversion, wherein: forward signal f
m(n) z map table is shown F
m(z), backward signal b
m(n) z map table is shown B
m(z); The transfer function of described m level fundamental mesh type unit is:
Described filter table is shown:
Wherein: m=1,2, L, N, and θ
N=0.
Technical conceive of the present invention is: N of the present invention rank elementary cell lattice digital filter comprises 3N+1 multiplier, 5N+1 adder, N delayer.More particularly, this structure is by N unit cascaded the forming of fundamental mesh type, simultaneously, inject the input signal of weighting at the forward direction output signal place of each described fundamental mesh type unit, to an input signal place weighting tap coefficient also exporting thereafter, what it needs to be noted described final stage fundamental mesh type unit is input as 0, and the output signal place is equally also through weighting and output.Utilize genetic algorithm to be optimized then: at first, to require definite target function of optimizing, determine fitness function with this according to specific performance at specific performance properties; Secondly, the injection parameter of the described structure of initialization, and necessary index in definite genetic process; Then, fitness evaluation is also carried out a series of genetic manipulation (select, intersect, variation), and the condition that judgement heredity finishes in the genetic process is finished up to heredity; At last, the optimum structure that obtains according to heredity draws the tap coefficient of described structure.
As shown in Figure 1, fundamental mesh type of the present invention unit comprises a multiplier, three adders and a delayer.As shown in Figure 1, for the fundamental mesh type unit of m level, it comprises fl transmission operate portions input F
m(z), the back is to transmission operate portions input B
M-1(z) and fl transmission operate portions output F
M-1(z), reach the back to transmission operate portions B
m(z).Each clock signal, signal F
m(z) (be the forward direction output signal of m+1 level fundamental mesh type unit) with previous moment be stored in z
-1In signal B
M-1(z) subtract each other again through multiplier K
mResulting signal, this signal and original F on the one hand
m(z) signal plus obtains F
M-1(z) signal, this signal and described previous moment are stored in z on the other hand
-1In signal B
M-1(z) addition obtains B
m(z) signal.As calculated, described signal F
M-1(z), F
m(z), B
M-1(z) and B
m(z) satisfy following relation:
(formula 2)
Here, the transfer function of remembering described m level fundamental mesh type unit is:
(formula 3)
As shown in Figure 2, f
m(n), b
m(n) be respectively forward direction, the backward signal of described novel lattice structure, their z conversion is expressed as F respectively
m(z), B
m(z).The main part of described novel lattice structure simultaneously, is injected the input signal θ of weighting by N unit cascaded the forming of fundamental mesh type shown in Figure 1 at the forward direction output signal place of each described fundamental mesh type unit
iU (n) is thereafter to tap coefficient ψ of input signal place weighting
kAnd output, what it needs to be noted described final stage fundamental mesh type unit is input as 0, and output equally also is to pass through weighting.Thus, lattice digital filter of the present invention can be used following The Representation Equation:
(formula 4)
Here, m=1,2, L, N and θ
N=0.
Each fundamental mesh type unit back to input signal b
m(n) being stored when being used for next and calculating constantly, also is to be used to and weight coefficient ψ
mSynthetic output y (n) multiplies each other.Structural representation to Fig. 2 is further analyzed decomposition, and Fig. 3 has provided the structural representation by each state node signal of injection calculated signals of any single position.Suppose input signal u (n) and b
m(n) transfer function between is
By linear relationship as can be known:
(formula 5)
Wherein, m=1,2, L, N,
Be w
i(n) @ θ
iU (n) and b
m(n) transfer function (θ between
l=0,
).Obviously,
(formula 6)
Next consider how to calculate according to Fig. 3
If
With
Represent b respectively
m(n) and f
m(n) value, and:
(formula 7)
Wherein, p=0,1, L, N,
Formula 3 definition as described.T among Fig. 3
A(z), T
B(z) and T
C(z) be respectively:
1) when 0≤i≤m≤N-1,
(formula 8)
2) when 0≤m<i≤N-1,
(formula 9)
For 0≤i≤m≤N-1, can obtain by Fig. 3:
It needs to be noted the afterbody input
Definition
(formula 11)
Wherein, four of the matrix of formula 11 element T
X(z) all be function about z, in order to simplify expression, the z of these four elements will omit and not write in the article in the whole text.
Bring described formula 11 into described formula 10, can get through deriving:
Wherein, T
D() @T z
A(z) T
C(z), therefore,
(formula 13)
Similarly, for 0≤m<i≤N-1, can obtain:
(formula 14)
Wherein, T
E(z)=T
B(z) T
A(z).
According to Fig. 1, the analysis of Fig. 2 and Fig. 3 explanation can draw the relation between the parameter of described novel lattice structure and calculate it thus.
Described B
m(z) can be expressed as:
And
Because
So,
(formula 15)
Suppose V
b=[b
0L b
kL b
N]
T, V
ψ=[ψ
0L ψ
kL ψ
N]
T, V
m=[v
M, 0L v
M, kL v
M, N]
T, M
b=[V
0L V
mL V
N]
TCan obtain in conjunction with described formula 15:
(formula 16)
Because M
bBy described { K
lAnd described { θ
kDecision, when given H (z), described { ψ
mBe only about described { θ
kFunction, promptly described { ψ
mBy described { θ
kUniquely determine that when needing the performance requirement of optimal design, Fig. 4 has provided the flow chart of described Genetic Algorithm for Structure Optimization when given.Detailed step is as follows:
Step 1: initialization population-----at random produces N
pIndividual population, wherein each parameter θ
kUse N
bThe bits coding, at this moment, the initialization population of generation represents that with matrix Θ its dimension is N
p* (N
b* N);
Step 2: fitness assessment-----determine that according to the performance requirement of optimizing fitness function is, and calculate corresponding fitness value, be called for short just when;
Step 3: genetic manipulation-----finish selection, intersection, variation part in the genetic process at this moment, adopts roulette back-and-forth method the most commonly used to select, the cross method of multiple spot and homogeneous phase combination, and then variation;
Step 4: judge-----judge whether to reach maximum genetic algebra, if, then go to step 5, if not, then population upgrades and goes to step 2;
Step 5: stop to evolve, the optimum structure that obtains according to heredity draws the tap coefficient of described structure.
Simulation example
At the structure and the method for above introduction, optimize described lattice structure for an example with regard to a given performance requirement below.
As everyone knows, the delayer z in the filter
-1Be used for storing next required signal data of clock cycle.The amplitude of input signal must be carried out normalization, so that the word length utilization of all delayers maximization, but will prevent simultaneously that it is excessive and produces and overflow.Ideally, the amplitude of signal should equate in all delayers, otherwise important small amplitude signal just can not be represented effectively and lose that this will reduce the output performance of this filter in the delayer.Therefore, the status signal power ratio has minimized important and practical meanings.This example will be the main performance index of each status signal power ratio of filter construction as structure optimization.
By analyzing as can be known described state variable b
m(n) be about free parameter θ
kFunction.Therefore, can be by the suitable { θ of search
k, make b
m(n) (the minimax signal power of 0≤m<N) is than minimum.If
Wherein T is a transpose operator, and then status signal power ratio mean-square value is:
(formula 17)
Wherein,
M state variable b when representing the input signal as white Gaussian noise
m(n) variance.Ideally,
Mean that promptly all state variables can represent with identical figure place.
Notice described
Be u (n) and b
m(n) transfer function between, order
Then
(formula 18)
Can get according to described formula 6:
(formula 19)
Wherein,
As can be seen, when given filter transfer function, described
Only depend on { θ
kValue.
In order to reduce the implementation complexity of described lattice filter structure, θ
kAdopt SPT to represent that this convention is decided Ξ=3, then the space of SPT is: { ± 2
-3, ± 2
-2, ± 2
-1, 0, ± 1} stipulates that more maximum available two SPT of each parameter represent, then the multiplier of each parameter representative just can substitute with displacement and an adder, so just can reduce the implementation complexity of described filter construction greatly.Optimum
Can obtain by following target function search:
(formula 21)
Given ideal filter can instruct ellip (N, r by MATLAB
p, r
s, ω
n) obtain, this instruction produces the low pass elliptic filter on N rank, wherein, and r
p=0.5 (dB) is passband ripple, r
s=60 (dB) are stopband attenuations, ω
nThe/2nd, normalized frequency.Table 1 has provided the parameter of described ideal filter.
Set initialization population N
p=100, crossover probability p
c=0.8, the variation Probability p
m=0.1, Ξ=3 and maximum recurrence times N
r=200, the process genetic algorithm optimization obtains the optimum injection parameter of described lattice structure, can calculate tap coefficient { ψ according to described formula 16 then
m, as shown in table 2.
The parameter of table 1 ideal filter
The system parameters of the described lattice structure of table 2
In order to verify the optimization efficiency of GA, we have carried out emulation to the global optimization method that Li proposes equally.At the optimization characteristics of described structure, total optimal design time depends primarily on the time of calculating formula 17 each time, just depends on the size of search volume Θ.Suppose every calculating once
The time that needs is t
0, table 3 has provided the design total time TIME of two kinds of methods, and has provided the mean-square value R of the status signal minimax power ratio of corresponding method.
Table 3 performance relatively
Method |
R |
TIME |
Global optimization |
3.9404 |
N(2Ξ+3)
N-1t
0 |
Genetic algorithm |
3.9594 |
N
pN
rt
0 |
From this example as can be seen, the present invention has lower status signal power ratio, this means that it has the ability of stronger anti-finite word length effect.The realization of described invention only needs 2N+1 multiplier, and has the free parameter unique advantage that requirement is optimized to different performance with it, effectively solved the contradiction between structural complexity and the performance, system for real-time signal processing has been had great practical value.
The described content of this specification embodiment only is enumerating the way of realization of inventive concept; protection scope of the present invention should not be regarded as only limiting to the concrete form that embodiment states, protection scope of the present invention also reach in those skilled in the art conceive according to the present invention the equivalent technologies means that can expect.