Technical background
Digital filter is the very important part of digital information processing system, is a kind of basic processing unit in the application such as voice and image processing, pattern recognition, Radar Signal Processing, spectrum analysis.The transfer function H (z) of a given N rank digital filter can be expressed as:
(formula 1)
In application in real time, a digital filter designing 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, compared with floating-point operation, has the 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 at the higher occasion of requirement of real-time (as automobile, robot, radar, alternating current machine etc.), 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 finite word length effect problem seems.
The advantage of Direct-type structure maximum is that it is simple in structure, the N rank digital filter designing is directly being realized in II transposition type structure, every calculating is once exported and only need to be done 2N+1 multiplication and N sub-addition, but described structure is very responsive on the impact of limited wordlength, thereby has limited its application.Although can reduce significantly finite word length effect and realize as optimum state space, this implementation structure is what to have improved the complexity of filter construction be cost.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 the contradiction how solving between structural complexity and performance is design of filter and realizes the focus in field always.
Lattice filter structure is widely used in a lot of real-time systems because 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 is proposed, please refer in detail document " Digital lattice and ladder filter synthesis " (A.H.Gray, 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 after each delayer node of the tapped lattice filter structure of described molecule is inhomogeneous, especially in the time that the bandwidth of filter is narrower, Lim has proposed the pouring-in lattice filter of molecule in 1984, the defect of its existence is had to 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 research shows, once 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 be for specific performance requirement (as sensitivity transfer function, 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 with the degree of freedom is proposed in, this structure assembly the advantage of described two kinds of traditional lattice filter structure, simple in structure and there is very low parametric sensitivity.But from above-mentioned document, the optimal design of this filter adopts global search, in the time that each injection parameter selects 2 powers (signpowers of two-SPT) that have a symbol to represent, the design optimization space of described filter comprises 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 efficiency is low, especially, in the time that N is larger, may cause optimal design failure.Be off-line design although optimize, 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 being optimized given performance requirement, under the prerequisite that is met described performance requirement, improve the lattice digital filter based on genetic algorithm of the design efficiency of filter.
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 rear primary unit fl transmission operate portions that primary unit transmits forward with by backward signal b
m(n) the past primary unit backward transmission operate portions of primary unit transmission backward;
It is characterized in that: described fl transmission operate portions comprises first adder, second adder and multiplier, described backward transmission operate portions comprises gets up the signal storage of inputting in it for delayer and the 3rd adder of next moment calculating;
Described forward signal f
m(n) input respectively in first adder and second adder the backward signal b of previous stage unit output
m-1(n) be temporary in described delayer;
Forward signal with subtract each other in first adder from the time delayed signal of delayer after the cut signal that forms, in described cut signal input multiplier with Proportional coefficient K
mmultiply each other, form scaling signal, described scaling signal is inputted in described second adder, is added and forms the forward direction output signal f that works as prime with forward signal
m-1(n), described scaling signal is inputted in the 3rd described adder, is added and forms the backward output signal b that works as prime with described time delayed signal
m(n);
The forward direction output signal of primary unit is injected the input signal θ of a weighting backward
mafter u (n), form the forward direction input signal of this rear primary unit;
The backward output signal b of every one-level
k(n) tap coefficient ψ of weighting
kform weighting output signal ψ
kb
k(n), the weighting output signal of all fundamental mesh type unit is added to the output signal of shaping filter
In described filter, be also provided with and can generate injection ratio collection [θ
0, θ
1, Λ, θ
m, Λ, θ
n], wherein θ
mrepresent the coefficient generation module of 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) produce at random N
pindividual injection ratio collection, by this N
pindividual injection ratio collection is as current population;
(2) performance that need to optimize according to filter is determined fitness function, calculates the fitness value of each injection ratio collection;
(3), according to fitness value, adopt roulette wheel selection to reselect N
pindividual injection ratio collection, then further intersects, makes a variation it, forms new progeny population;
(4) judge whether the current generation reach maximum genetic algebra, if so, enter step (5), otherwise the progeny population forming using step (3) is as current population, repeated execution of steps (2)-(3);
(5) export as optimum injection ratio collection using the injection ratio collection of fitness value maximum.
Further, the forward signal of described fundamental mesh type unit and backward signal are the signal after 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, after it, also export to tap coefficient of input signal place weighting, what it needs to be noted described final stage fundamental mesh type unit is input as 0, and output signal place is equally also through weighting output.Then utilize genetic algorithm to be optimized for specific performance: first, to require to determine the target function of optimizing according to specific performance, determine fitness function with this; Secondly, the injection parameter of structure described in initialization, and necessary index in definite genetic process; Then, fitness evaluation is also carried out a series of genetic manipulation (select, intersect, variation), judges the hereditary condition finishing until heredity completes in genetic process; Finally, the optimum structure obtaining according to heredity draws the tap coefficient of described structure.
Beneficial effect of the present invention is mainly manifested in:
1. the present invention is in conjunction with the advantage of described lattice filter structure, utilize N the weighting injection ratio with the degree of freedom, require this filter construction to optimize according to specific performance, adopt genetic algorithm to save a large amount of search times and design the optimum implementation structure parameter under described performance requirement, very large 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 be shifted and just can realize the weighting to input signal with add operation input signal thus, 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 in, genetic algorithm has solved described structure and is not suitable for designing the shortcoming of High Order IIR Filter for Fix-Point, and this algorithm plays crucial effect to the high order system application of this structure.
Embodiment
With reference to accompanying drawing, further illustrate 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 rear primary unit fl transmission operate portions that primary unit transmits forward with by backward signal b
m(n) the past primary unit backward transmission operate portions of primary unit transmission backward;
Described fl transmission operate portions comprises first adder, second adder and multiplier, and described backward transmission operate portions comprises gets up the signal storage of inputting in it for delayer and the 3rd adder of next moment calculating;
Described forward signal f
m(n) input respectively in first adder and second adder the backward signal b of previous stage unit output
m-1(n) be temporary in described delayer;
Forward signal with subtract each other in first adder from the time delayed signal of delayer after the cut signal that forms, in described cut signal input multiplier with Proportional coefficient K
mmultiply each other, form scaling signal, described scaling signal is inputted in described second adder, is added and forms the forward direction output signal f that works as prime with forward signal
m-1(n), described scaling signal is inputted in the 3rd described adder, is added and forms the backward output signal b that works as prime with described time delayed signal
m(n);
The forward direction output signal of primary unit is injected the input signal θ of a weighting backward
mafter u (n), form the forward direction input signal of this rear primary unit;
The backward output signal b of every one-level
k(n) tap coefficient ψ of weighting
kform weighting output signal ψ
kb
k(n), the weighting output signal of all fundamental mesh type unit is added to the output signal of shaping filter
In described filter, be also provided with and can generate injection ratio collection [θ
0, θ
1, Λ, θ
m, Λ, θ
n], wherein θ
mrepresent the coefficient generation module of 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) produce at random N
pindividual injection ratio collection, by this N
pindividual injection ratio collection is as current population;
(2) performance that need to optimize according to filter is determined fitness function, calculates the fitness value of each injection ratio collection;
(3), according to fitness value, adopt roulette wheel selection to reselect N
pindividual injection ratio collection, then further intersects, makes a variation it, forms new progeny population;
(4) judge whether the current generation reach maximum genetic algebra, if so, enter step (5), otherwise the progeny population forming using step (3) is as current population, repeated execution of steps (2)-(3);
(5) export as optimum injection ratio collection using the injection ratio collection of fitness value maximum.
The forward signal of described fundamental mesh type unit and backward signal are the signal after 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, after it, also export to tap coefficient of input signal place weighting, what it needs to be noted described final stage fundamental mesh type unit is input as 0, and output signal place is equally also through weighting output.Then utilize genetic algorithm to be optimized for specific performance: first, to require to determine the target function of optimizing according to specific performance, determine fitness function with this; Secondly, the injection parameter of structure described in initialization, and necessary index in definite genetic process; Then, fitness evaluation is also carried out a series of genetic manipulation (select, intersect, variation), judges the hereditary condition finishing until heredity completes in genetic process; Finally, the optimum structure obtaining 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), backward transmission operate portions input B
m-1and fl transmission operate portions output F (z)
m-1and backward transmission operate portions B (z)
m(z).Often carry out a clock signal, signal F
m(z) (be the forward direction output signal of m+1 level fundamental mesh type unit) and be stored in z with previous moment
-1in signal B
m-1(z) subtract each other again through multiplier K
mthe signal obtaining, on the one hand this signal and original F
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) be added and obtain B
m(z) signal.As calculated, described signal F
m-1(z), F
m(z), B
m-1and B (z)
m(z) meet 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 the forward, backward signal of described novel lattice structure, their z conversion is expressed as F
m(z), B
m(z).The main part of described novel lattice structure, by unit cascaded the forming of fundamental mesh type shown in N Fig. 1, meanwhile, is injected the input signal θ of weighting at the forward direction output signal place of each described fundamental mesh type unit
iu (n), after it 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 is equally also 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.
The backward input signal b of each fundamental mesh type unit
m(n) being stored when calculating for next moment, is to be also used to and weight coefficient ψ
msynthetic output y (n) multiplies each other.The structural representation of Fig. 2 is further analyzed to decomposition, and Fig. 3 has provided the structural representation that is calculated each state node signal by the Injection Signal of any single position.Suppose input signal u (n) and b
m(n) transfer function between is
from linear relationship:
(formula 5)
Wherein, m=1,2, L, N,
for 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 respectively b
mand f (n)
m(n) value, and:
(formula 7)
Wherein, p=0,1, L, N,
as described in formula 3 define.T in Fig. 3
a(z), T
band T (z)
c(z) be respectively:
1) in the time of 0≤i≤m≤N-1,
(formula 8)
2) in the time of 0≤m < i≤N-1,
(formula 9)
For 0≤i≤m≤N-1, can be obtained by Fig. 3:
It needs to be noted afterbody input
Definition
(formula 11)
Wherein, four of the matrix of formula 11 element T
x(z) be all the function about z, in order to simplify expression, in article, the z of these four elements does not write omission in the whole text.
Bring described formula 11 into described formula 10, can obtain through deriving:
Wherein, T
d(z) T
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 analytic explanation of Fig. 2 and Fig. 3, can draw the relation between the parameter of described novel lattice structure and calculate thus it.
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]
t.Can obtain in conjunction with described formula 15:
(formula 16)
Because M
bby described { K
land described { θ
kdetermine, when given H (z), described { ψ
monly about described { θ
kfunction, i.e. described { ψ
mby described { θ
kunique definite, in the time of the given performance requirement that needs optimal design, Fig. 4 has provided the flow chart of the genetic algorithm of described structure optimization.Detailed step is as follows:
Step 1: initialization population-----produces N at random
pindividual population, wherein each parameter θ
kuse N
bbits coding, now, the initialization population of generation represents with matrix Θ, its dimension is N
p× (N
b× N);
Step 2: fitness assessment-----determines that according to the performance requirement of optimizing fitness function is, and calculates corresponding fitness value, be called for short just when;
Step 3: genetic manipulation-----completes selection, intersection, the variation part in genetic process, now, adopts the most conventional roulette wheel selection to select, the cross method of multiple spot and homogeneous phase combination, and then variation;
Step 4: judgement-----judges whether to reach maximum genetic algebra, if so, goes to step 5, and if not, population upgrades and goes to step 2;
Step 5: stop evolving, the optimum structure obtaining according to heredity draws the tap coefficient of described structure.
Simulation example
For 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 filter
-1be used for storing next required signal data of clock cycle.The amplitude of input signal must be normalized so that the word length utilization of all delayers maximize, but to prevent simultaneously its excessive and produce overflow.Ideally, in all delayers, the amplitude of signal should equate, otherwise in delayer, important small amplitude signal just can not effectively be represented and lose, and this will reduce the output performance of this filter.Therefore, status signal power ratio minimizes important practical significance.This example is using the main performance index as structure optimization each status signal power ratio of filter construction.
From analyzing, 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 transpose operator, and status signal power ratio mean-square value is:
(formula 17)
Wherein,
m state variable b while representing the input signal as white Gaussian noise
m(n) variance.Ideally,
mean that all state variables can represent by identical figure place.
Described in noticing
for u (n) and b
m(n) transfer function between, order
Can obtain according to described formula 6:
(formula 19)
Wherein,
Can find out, in the time of given filter transfer function, described in
only depend on { θ
kvalue.
In order to reduce the implementation complexity of described lattice filter structure, θ
kadopt SPT to represent, this convention is determined Ξ=3, and the space of SPT is: { ± 2
-3, ± 2
-2, ± 2
-1, 0, ± 1}, then stipulate that maximum available two SPT of each parameter represent, the multiplier of each parameter representative just can substitute by displacement and an adder, so just can reduce greatly the implementation complexity of described filter construction.Optimum
can obtain by following target function search:
(formula 21)
Given ideal filter can be by MATLAB instruction ellip (N, r
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, variation Probability p
m=0.1, Ξ=3 and maximum recurrence times N
r=200, process genetic algorithm optimization obtains the optimum injection parameter of described lattice structure, then can calculate tap coefficient { ψ according to described formula 16
m, as shown in table 2.
The parameter of table 1 ideal filter
The system parameters of lattice structure described in table 2
In order to verify the optimization efficiency of GA, the global optimization method that we propose Li has equally carried out emulation.For the optimization feature of described structure, total optimal design time depends primarily on the time of calculating formula 17 each time, namely depends on the size of search volume Θ.Suppose every calculating once
the time needing 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 Ratio
Method |
R |
TIME |
Global optimization |
3.9404 |
N(2Ξ+3)
N-1t
0 |
Genetic algorithm |
3.9594 |
N
pN
rt
0 |
Can find out from this example, 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 there is the free parameter unique advantage that requirement is optimized to different performance with it, effectively solve the contradiction between structural complexity and performance, system for real-time signal processing has been had great practical value.
Content described in this specification embodiment is only enumerating of way of realization to 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 and conceive the equivalent technologies means that can expect according to the present invention in those skilled in the art.