A Phase Compensation Method Based on Improved Genetic Algorithm
By improving the combination of genetic algorithm and all-pass filter, the problem of phase deviation between subband channels in FI-DAC is solved, and efficient phase compensation for arbitrary waveform generators is achieved, and signal quality is improved.
Patent Information
- Application Number
- CN202211209239.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When using a band interleaved digital-to-analog converter (FI-DAC) to increase the sampling rate and output bandwidth of an arbitrary waveform generator, the phase deviation between subband channels causes serious errors during signal splicing, affecting the quality of the composite signal.
The phase compensation method based on an improved genetic algorithm is adopted, and the all-pass filter with a cascaded second-order section structure is used as the phase compensation filter to solve its parameters, so that its phase function approximates the phase response required by the waveform synthesis system, thereby achieving compensation for the phase deviation between subband channels in FI-DAC.
Effectively reduces phase distortion and improves signal quality, so that any waveform generator can output a purer signal under high sampling rate and high output bandwidth conditions.
Smart Images

Figure CN115499005B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of waveform generators, and more specifically, relates to a phase compensation method based on an improved genetic algorithm. Background Art
[0002] As a signal source widely used in the development, production and maintenance of electronic equipment and equipment, arbitrary waveform generators can solve problems such as the difficulty in reproducing real signal scenes or extremely high risk costs. For example, the whole machine debugging and performance evaluation of radars all use real targets (such as aircraft) to provide test signals to the radar, which not only requires a lot of manpower and material resources, but also sometimes affects the development progress, and even cannot be achieved in some cases (such as bad weather). Broadband arbitrary waveform generators are ideal tools to solve these problems. With the rapid development of modern communications, aerospace detection, artificial intelligence, radar reconnaissance and other related electronic information fields, electronic systems are becoming more and more large, and the complexity of electronic signals is also increasing. In particular, the frequency range of signals is constantly widening, which requires arbitrary waveform generators as test equipment to have higher sampling rates and output bandwidths. The use of frequency-interleaved digital-to-analog converters (FI-DAC) can effectively improve the sampling rate and output bandwidth of arbitrary waveform generators. However, the phase deviation between sub-band channels in FI-DAC will cause serious errors in the overlapping band when the sub-band signals are spliced, making it difficult to ensure the quality of the final synthesized signal. Summary of the invention
[0003] The purpose of the present invention is to provide a phase compensation method based on an improved genetic algorithm to overcome the phase deviation problem between sub-band channels in FI-DAC when using FI-DAC to improve the sampling rate and output bandwidth of an arbitrary waveform generator.
[0004] To achieve the above object, the present invention adopts the following technical solution:
[0005] A phase compensation method based on an improved genetic algorithm uses an all-pass filter with a cascaded second-order section structure as a phase compensation filter. By solving the parameters of the phase compensation filter, its phase function is close to the phase response required by the waveform synthesis system, thereby realizing the phase deviation compensation between sub-band channels in FI-DAC; the method comprises the following steps:
[0006] S1, measure the phase response function θ(ω) of the FI-DAC waveform synthesis system;
[0007] S2, calculate the phase response function θ of the phase compensation filter based on the phase response function θ(ω) measured by S1 1 (ω);
[0008] S3, θ obtained based on S2 1 (ω), the group delay decomposition method is used to determine the compensation filter order and initial solution; the initial solution is denoted as [r 1 ,r 2 ,r 3 ,…,r N ,θ 1 ,θ 2 ,θ 3 ,…,θ N ];
[0009] S4. Using improved genetic algorithm to solve the phase compensation filter parameters, the process is as follows:
[0010] S4.1, determine the chromosome encoding method, determine the fitness function, and set the parameters of the improved genetic algorithm;
[0011] The encoding method is gen=[gen 1 ,gen 2 ,gen 3 , …, gen 2N ], where gen 1 ~gen N is the radius of the pole, gen N+1 ~gen 2N is the phase of the pole;
[0012] The root mean square error of phase approximation is used as the fitness function, and the pole radius is constrained in [0,1);
[0013]
[0014] Where f(i) represents the fitness of the i-th chromosome in the population, E(ω,r,θ) is the error vector, and ω is divided into l equal parts in [0,π] and is denoted as ω=[ω 1 ,ω 2 ,…,ω l ], G = [gen(1), gen(2), gen(3), ..., gen(n)] is the chromosome population, G(i) is the i-th chromosome gen(i) in the population; where,
[0015] Ε(ω,G(i))=[e(ω 1 ,G(i)),e(ω 2 ,G(i)),…,e(ω l ,G(i))]
[0016] e(ω,G(i))=θ ap (ω,gen(i))-θ 1 (ω)
[0017] The parameters for setting the improved genetic algorithm include: population size G size , the number of iterations G n , direct duplication in chromosome evolution 1 , the new chromosome ratio R 2 , the pole radius variation coefficient λ r , pole phase variation coefficient λ θ ;
[0018] S4.2, the initial decoded chromosome obtained in S3 is used as the ancestral chromosome, and then the initial population G is generated based on the ancestral chromosome. 1 , population iteration number k = 1;
[0019] S4.3. Evolve the initial population to obtain a new population G 2 , the new population G 2 The chromosomes are obtained as follows:
[0020] S4.3.1. Use the fitness function in S4.1 to calculate the fitness value of each chromosome in the initial population; according to R 1 The proportion of chromosomes with high fitness is selected and directly copied to the next generation population to retain excellent chromosomes;
[0021] S4.3.2. Evolve the ancestral chromosome to generate R 2 The new chromosomes of the same proportion are copied into the next generation population; the generation mode of the new chromosomes is: gen = gen ancestor +[λ r rand(1,N)λ θ ·π·rand(1,N)];
[0022] S4.3.4, the remaining chromosomes are added to the initial population G according to the crossover strategy. 1 New chromosomes are randomly generated and copied to the next generation population;
[0023] S4.3, again use the fitness function in S4.1 to calculate the fitness value of each chromosome of the initial population;
[0024] S4.4, determine whether the number of iterations has been reached, if k < G n , execute k=k+1 and return to S4.3 to regenerate a new population. If k=G n , execute S4.5;
[0025] S4.5. Output the optimal solution in the current population.
[0026] Furthermore, the process of measuring the phase response function θ(ω) of the FI-DAC waveform synthesis system in S1 is:
[0027] S1.1. Set the FI-DAC waveform synthesis system to output a frequency of ω in The square wave signal is obtained by using an oscilloscope to collect the output square wave signal to obtain a discrete waveform sequence x[n];
[0028] S1.2, perform discrete fast Fourier transform calculation on x[n] to obtain the frequency domain expression F[ω] of the output signal, and calculate the phase angle(F[ω]);
[0029] S1.3. The frequency components of the square wave signal in the frequency domain are only at odd multiples of the fundamental signal frequency, that is, F[ω] is only at ω=[ω in ,3ω in ,5ω in ,…,(2k-1)ω in ,…], k = non-zero positive integer; then the phase response function of the waveform synthesis system can be approximately expressed by a number of equally spaced discrete points as follows:
[0030] θ(ω)=angle(F[ω]),ω=[ω in ,3ω in ,5ω in ,…,(2k-1)ω in ,…], k = non-zero positive integer
[0031] Furthermore, the process of determining the order and initial solution of the phase compensation filter by using the group delay decomposition method in step S3 is as follows:
[0032] Determine the phase compensation filter order: See Figure 1 , for θ 1 (ω) is derived to obtain the group delay curve of the phase compensation filter as D(ω); add a fixed delay value d to the group delay curve D(ω) so that the area enclosed by the group delay curve D(ω) and the horizontal and vertical coordinates is an integer multiple N of 2π, and obtain a new group delay curve D 1 (ω)=D(ω)+d, then the order of the phase compensation filter is 2N;
[0033] Find the initial solution: See Figure 2 , the new group delay curve D 1 (ω) is divided into N equal-area regions of 2π, then the phase of the pth pole is:
[0034]
[0035] The modulus of the pth pole is:
[0036]
[0037] The initial solution of the phase compensation filter can be calculated according to the phases of the p poles and the modulus values of the p poles.
[0038] Furthermore, the crossover strategy in S4.3.4 is uniform crossover, cyclic crossover or multi-point crossover.
[0039] In principle:
[0040] The phase compensation method based on the improved genetic algorithm provided by the present invention compensates the nonlinear phase response of the FI-DAC waveform synthesis system so that the system after phase compensation is a linear phase system. An all-pass filter with a cascaded second-order section structure is usually used as a phase compensation filter. The transfer function of the all-pass filter with a cascaded second-order section structure is:
[0041]
[0042] Where P represents the filter order, p is the number of the second-order section, r p is the modulus of the pth pole of the filter, θ p is the phase value of the pth pole, and the phase function of the all-pass filter is:
[0043]
[0044] Therefore, the essence of the present invention is to solve the parameters of the all-pass filter so that its phase function approaches the required phase response.
[0045] After adopting the above technical solution, the present invention has the following beneficial effects:
[0046] (1) The present invention introduces the concept of ancestral chromosomes on the basis of traditional genetic algorithms, obtains a group of initial solutions as the ancestral chromosomes of the population in the genetic algorithm through the group delay decomposition method, and realizes the generation and evolution of the population on this basis, narrows the scope of the solution space, and achieves the purpose of rapid convergence;
[0047] (2) The present invention randomly generates a certain proportion of new chromosomes during the population update process, thereby avoiding the situation where the population matures prematurely and falls into a local optimum. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A group delay curve diagram after adding a fixed delay value to the embodiment;
[0049] Figure 2 A new group delay curve is divided into N equal-area regions for display purposes of the embodiment;
[0050] Figure 3 A flow chart of a phase compensation filter design based on an improved genetic algorithm according to the present invention;
[0051] Figure 4 The relationship diagram between the number of iterations and the root mean square error of the improved genetic algorithm of the embodiment;
[0052] Figure 5 It is the relationship between the number of iterations and the root mean square error of the traditional genetic algorithm;
[0053] Figure 6 The square wave signal of the embodiment is set to have a period of 100 sample points, and a signal waveform diagram is output without phase distortion;
[0054] Figure 7 The output signal waveform diagram of the embodiment without phase compensation and with phase distortion;
[0055] Figure 8 This is the output waveform of the phase compensation filter designed by the traditional genetic algorithm after phase compensation;
[0056] Fig. 9 This is the output waveform after phase compensation of the phase compensation filter designed by the group delay decomposition method;
[0057] Fig.10 This is an output waveform diagram after phase compensation is performed on the phase compensation filter designed using the improved genetic algorithm of this embodiment. DETAILED DESCRIPTION
[0058] The present invention is described below in conjunction with the accompanying drawings and embodiments so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
[0059] In this embodiment, we verify the effectiveness of the above technical solution through simulation experiments. Figure 3 , including the following steps:
[0060] S1. Because the simulation experiment is used and there is no real waveform synthesis system, the phase response function of the phase compensation filter is assumed to be: θ 1 (ω)=4π(cosω-1)-52ω
[0061] S2, based on the phase response function obtained in S1, the group delay decomposition method is used to determine the filter order and obtain the initial solution:
[0062] First, we need to determine the order of the filter. The area formed by the group delay curve and the coordinate axis can be expressed as its integral in the range [0,π]. The result is as follows:
[0063]
[0064] Therefore, the area of the region formed by the group delay curve and the coordinate axis is exactly an integer multiple of 2π, and there is no need to adjust the group delay, and the order of the filter is 60. According to the above phase formula of p poles and the modulus formula of p poles, the initial solution is obtained as follows:
[0065] Phase θ of 30 poles [0.0595589259165969 0.177067278583121 0.2915103960340460.403189882765390 0.512393909056855 0.619397506940966 0.7244608741237360.827829900211272 0.929737000989857 1.03040135365561 1.13003219853371 1.22882983813904 1.32698723666147 1.42469114947085 1.52212453184743 1.61946812174236 1.71690150411895 1.81460541692832 1.91276281545075 2.01156045505608 2.11119129993418 2.21185565259994 2.31376275337852 2.41713177946606 2.52219514664883 2.62919874453294 2.73840277082440 2.85008225755575 2.96452537500667 3.08203372767320];
[0074] The radius r of the 30 poles [0.867934331988413 0.871256524216711 0.8742727279820340.876991869713982 0.879426685058401 0.881586441450876 0.8834883224862140.885141294046911 0.886561527301334 0.887758109470560 0.8887408061462690.889517046598458 0.890093613445395 0.890475891862262 0.890665874853892 0.890665874853892 0.890475891862262 0.890093613445395 0.8895170465984580.888740806146269 0.887758109470560 0.886561527301339 0.8851412940469110.883488322486214 0.881586441450876 0.879426685058401 0.8769918697139820.874272727982034 0.871256524216711 0.867934331988418];
[0083] S3. Use improved genetic algorithm to solve the phase compensation filter parameters. Specifically:
[0084] S3.1 Determine the chromosome encoding method, determine the fitness function, and set the parameters of the improved genetic algorithm;
[0085] The encoding method is gen=[gen 1 ,gen 2 ,gen 3 , …, gen 2N ], where gen 1 ~gen N is the radius of the pole, gen N+1 ~gen 2N is the phase of the pole;
[0086] The root mean square error of phase approximation is used as the fitness function, and the pole radius is constrained in [0,1);
[0087]
[0088] Where f(i) represents the fitness of the i-th chromosome in the population, E(ω,r,θ) is the error vector, and ω is divided into l equal parts in [0,π] and is denoted as ω=[ω 1 ,ω 2 ,…,ω l], G = [gen(1), gen(2), gen(3), ..., gen(n)] is the chromosome population, G(i) is the i-th chromosome gen(i) in the population; where,
[0089] Ε(ω,G(i))=[e(ω 1 ,G(i)),e(ω 2 ,G(i)),…,e(ω l ,G(i))]
[0090] e(ω,G(i))=θ ap (ω,gen(i))-θ 1 (ω)
[0091] Improved genetic algorithm parameters include population size G size , the number of iterations G n , direct duplication in chromosome evolution 1 , the new chromosome ratio R 2 , the pole radius variation coefficient λ r , the pole phase variation coefficient λ θ ;
[0092] In this embodiment, the improved genetic algorithm parameters are set as shown in Table 1:
[0093] Table 1 Evolution parameter settings
[0094] <![CDATA[Population size G size > 100 <![CDATA[Number of iterations G n > 1000 <![CDATA[Chromosome evolution direct replication ratio R 1 > 0.1 <![CDATA[The evolved new chromosome is longer than R 2 > 0.3 <![CDATA[Pole radius change coefficient λ r > 0.01 <![CDATA[Pole phase change coefficient λ θ > 0.01
[0095] S3.2, the initial decoded chromosome obtained in S2 is converted into a chromosome as the ancestral chromosome, and the parameters set in Table 1 are substituted into the improved genetic algorithm to start iteration. The ancestral chromosome in this embodiment is According to the evolution coefficient λ r and λ θ Generate the initial population G 1 :gen=gen ancestor +[0.01·rand(1,30)0.01·π·rand(1,30)]
[0096] S3.3. Evolutionary upgrade of the population according to the evolutionary strategy. The process is as follows:
[0097] S3.3.1. Use the fitness function in S3.1 to calculate the fitness value of each chromosome in the initial population; according to R 1 The proportion of chromosomes with high fitness is selected and directly copied to the next generation population to retain excellent chromosomes;
[0098] S3.3.2. Evolve the ancestral chromosome to generate R 2The new chromosomes of the same proportion are copied into the next generation population; the generation mode of the new chromosomes is: gen = gen ancestor +[λ r rand(1,N)λ θ ·π·rand(1,N)];
[0099] S3.3.4, the remaining chromosomes are added to the initial population G according to the crossover strategy. 1 New chromosomes are randomly generated and copied to the next generation population;
[0100] S3.4. Use the fitness function in S3.1 again to calculate the fitness value of each chromosome in the initial population; continue to evolve and iterate until the number of evolutionary iterations reaches 1000. Figure 4 It can be seen that in the improved genetic algorithm, the RMS of the optimal solution in the current population after each update iteration, when the number of iterations reaches about 200 times, the RMS of the optimal solution of the current population is less than 0.01rad.
[0101] In order to compare the superiority of the proposed algorithm, we use the traditional genetic algorithm to solve this embodiment, that is, there is no ancestral chromosome, and the population is generated randomly in the solution space. Figure 5 It can be seen that the population of the traditional genetic algorithm matures only after the 600th iteration, and the RMS value is about 0.1 rad. Therefore, the proposed improved genetic algorithm can not only solve the compensation filter faster, but also has a much better solution accuracy than the traditional genetic algorithm.
[0102] We set a square wave signal to illustrate the improvement of the waveform quality of the proposed algorithm. The square wave signal is set to have a period of 100 samples. The output signal without phase distortion is shown in Figure 6 , the output signal without phase compensation and with phase distortion refers to Figure 7 . Figure 8 , Fig. 9 , Fig.10 The output waveforms after the phase compensation filter designed by the traditional genetic algorithm, the group delay decomposition method and the improved genetic algorithm are shown respectively. It can be seen that after the square wave signal passes through the system with phase distortion, the output waveform is severely distorted, and the rise / fall time of the signal is slow. After the phase compensation filter designed by the genetic algorithm, the rise / fall time is improved, but the high and low level jitter of the signal is large. After the phase compensation filter designed by the graphical method, the signal quality has been greatly improved, but there is a large overshoot at the edge of the signal. Finally, after the compensation filter designed by the proposed improved genetic algorithm, the output signal is almost the same as the case without phase distortion.
[0103] In summary, the present invention can effectively solve the phase distortion caused by the nonlinear characteristics of analog devices when using FI-DAC to widen the sampling rate and bandwidth of the arbitrary waveform generator.
Claims
1. A phase compensation method based on an improved genetic algorithm, wherein the method uses an all-pass filter of a cascaded second-order section structure as a phase compensation filter, and by solving the parameters of the all-pass filter, the phase function of the all-pass filter is close to the phase response required by the waveform synthesis system, thereby realizing the phase deviation compensation between sub-band channels in FI-DAC; the characteristics are: The steps include: S1, measure the phase response function θ(ω) of the FI-DAC waveform synthesis system; S2, calculating the phase response function θ1(ω) of the phase compensation filter according to θ(ω); S3, based on S2, θ1(ω) is obtained, and the compensation filter order and initial solution are determined by group delay decomposition method; the initial solution is recorded as [r1, r2, r3, ..., r N ,θ1,θ2,θ3,…,θ N ] S4. Using improved genetic algorithm to solve the phase compensation filter parameters, the process is as follows: S4.1, determine the chromosome encoding method, determine the fitness function, and set the parameters of the improved genetic algorithm; The encoding method is gen = [gen1, gen2, gen3, ..., gen 2N ], where gen1~gen N is the radius of the pole, gen N+1 ~gen 2N is the phase of the pole; The root mean square error of phase approximation is used as the fitness function, and the pole radius is constrained in [0,1); Where f(i) represents the fitness of the i-th chromosome in the population, E(ω,r,θ) is the error vector, and ω is divided into l equal parts in [0,π] and is recorded as ω=[ω1,ω2,…,ω l ], G = [gen(1), gen(2), gen(3), ..., gen(n)] is the chromosome population, G(i) is the i-th chromosome gen(i) in the population; where, E(ω,G(i))=[e(ω1,G(i)),e(ω2,G(i)),…,e(ω l ,G(i))] e(ω,G(i))=θ ap (ω,gen(i))-θ1(ω) The parameters for setting the improved genetic algorithm include: population size G size , the number of iterations G n , direct replication ratio R1, new chromosome ratio R2, pole radius variation coefficient λ in chromosome evolution r , pole phase variation coefficient λ θ ; S4.2, the initial decoded chromosome obtained in S3 is converted into a chromosome as the ancestral chromosome, and then the initial population G1 is generated based on the ancestral chromosome, and the population iteration number k=1; S4.
3. Evolve the initial population to obtain a new population G2. The chromosomes of the new population G2 are obtained as follows: S4.3.
1. Calculate the fitness value of each chromosome in the initial population using the fitness function in S4.1; select chromosomes with high fitness according to the ratio of R1 and directly copy them to the next generation population to retain excellent chromosomes; S4.3.2, Evolving the ancestral chromosome, generating a new chromosome with R2 ratio and replicating it to the next generation population; the new chromosome is generated in the following way: gen = gen ancestor +[λ r rand(1,N)λ θ ·π·rand(1,N)]; S4.3.4, the remaining chromosomes are randomly generated in the initial population G1 according to the crossover strategy and copied to the next generation population; S4.3, again use the fitness function in S4.1 to calculate the fitness value of each chromosome of the initial population; S4.4, determine whether the number of iterations has been reached, if k < G n , execute k=k+1 and return to S4.3 to regenerate a new population. If k=G n , execute S4.5; S4.
5. Output the optimal solution in the current population.
2. The phase compensation method based on improved genetic algorithm according to claim 1, characterized in that: The process of measuring the phase response function θ(ω) of the FI-DAC waveform synthesis system in S1 is: S1.
1. Set the FI-DAC waveform synthesis system to output a frequency of ω in The square wave signal is obtained by using an oscilloscope to collect the output square wave signal to obtain a discrete waveform sequence x[n]; S1.2, perform discrete fast Fourier transform calculation on x[n] to obtain the frequency domain expression F[ω] of the output signal, and calculate the phase angle(F[ω]); S1.
3. The frequency components of the square wave signal in the frequency domain are only at odd multiples of the fundamental signal frequency, that is, F[ω] is only at ω=[ω in ,3ω in ,5ω in ,…,(2k-1)ω in ,…], k = non-zero positive integer; then the phase response function of the waveform synthesis system is approximately expressed by a number of equally spaced discrete points: θ(ω) = angle(F[ω]), ω = [ω in , 3ω in , 5ω in , …, (2k - 1)ω in , …], k = non - zero positive integer.
3. The phase compensation method based on improved genetic algorithm according to claim 1, characterized in that: The process of determining the order and initial solution of the phase compensation filter by using the group delay decomposition method in step S3 is as follows: S3.1, the group delay curve of the phase compensation filter is obtained by taking the derivative of θ1(ω) as D(ω); S3.2, add a fixed delay value d to the group delay curve D(ω) so that the area enclosed by the group delay curve D(ω) and the horizontal and vertical coordinates is an integer multiple N of 2π, and obtain a new group delay curve D1(ω)=D(ω)+d, then the order of the phase compensation filter is 2N; S3.
3. Divide the new group delay curve D1(ω) into N equal-area regions of 2π, then the phase of the pth pole is: Then the modulus of the pth pole is: S3.
4. The initial solution of the phase compensation filter can be calculated based on the phases of the p poles and the moduli of the p poles.
4. The phase compensation method based on improved genetic algorithm according to claim 1, characterized in that: The crossover strategy in S4.3.4 is uniform crossover, cyclic crossover or multi-point crossover.
Citation Information
Patent Citations
Phase noise compensation method and system
CN111325238A
Multi-objective optimization array directional diagram synthesis method based on improved genetic algorithm
CN114386270A