Method and device for obtaining FIR filter design solution
By using the particle swarm optimization algorithm CL-PSO in the FIR filter design and using the model FIR for learning, the problem of the traditional FIR filter being unable to correct group delay fluctuations is solved, achieving better design solutions and automated design processes, improving Improve signal accuracy and design efficiency.
Patent Information
- Application Number
- CN201811150919.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-09-29
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2039-08-23
AI Technical Summary
Traditional FIR filter design cannot effectively correct the signal distortion caused by group delay fluctuations, and the frequency characteristics are limited by the classic model. The parameter adjustment process is time-consuming and labor-intensive, and the design process is not automated.
The finite-length unit impulse response FIR is used as the particle to establish a particle swarm. Each FIR learns from different canonical FIRs in each dimension of the design solution space. The comprehensive learning particle swarm optimization algorithm CL-PSO is used to find the particle swarm that satisfies the preset A better design solution to the index requirements to reduce group delay fluctuations.
It achieves effective correction of group delay fluctuations, improves signal accuracy and stability, greatly saves design and parameter adjustment time, automates the design process, and overcomes the premature convergence problem of the original particle swarm optimization algorithm.
Smart Images

Figure CN110287502B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method and device for obtaining a design solution of an FIR filter. Background Art
[0002] In related technologies, the non-baseband part of a communication system often has many analog filters, which are filter circuits constructed of resistors, capacitors, and inductors. Limited by the material level and the accuracy of electronic components, they cannot easily meet the strict linear phase requirements like the digital filters in the baseband part, which leads to the widespread existence of group delay distortion.
[0003] In order to meet the needs of the exponentially growing communication services, especially digital services, the bandwidth of the communication system has been continuously increased. For example, the maximum bandwidth of the E-band in the microwave system has reached 2G; and the maximum bandwidth planned for the 5th generation mobile communication system 5G system has reached 80M. The wider the bandwidth, the higher the order of the filter is required to overcome the inevitable frequency selective fading; and the higher the order of the analog filter, the more difficult it is to ensure the consistency of the group delay at each frequency point in theory; in other words, the more significant the fluctuation of the group delay; which leads to the more serious distortion or distortion of the superimposed signal from the original synthetic signal, which becomes the key bottleneck restricting the performance of the communication system.
[0004] Considering that once the circuit structure of the analog filter at the receiving and transmitting ends of the communication system (RLC circuit, which can be called a resistor (R) inductor (L) capacitor (C) circuit) is determined, its group delay fluctuation characteristics are also determined; in other words, the signal distortion caused by this fluctuation characteristic is also determined and will not change in real time. There are still many such stable signal distortions caused by devices in the communication system; therefore, it is very necessary to design various finite impulse response filters (Finite Impulse Response, referred to as FIR) filters to correct such distortions.
[0005] However, traditional FIR filter design usually only focuses on the amplitude-frequency characteristics of the passband and stopband; for example: the amplitude-frequency characteristics of the passband are designed based on the equal ripple criterion, and the amplitude-frequency characteristics of the stopband are designed based on the minimum mean square error criterion; and the few design methods that add phase-frequency response constraints or even consider group delay characteristic constraints can only design FIRs with the same constant group delay characteristics at each frequency point, and cannot correct the signal distortion caused by group delay fluctuations.
[0006] In addition, traditional FIR designs are mostly obtained from classical models, relying on continuous adjustment of parameters to achieve the required frequency characteristics, so they are inherently limited by the inherent characteristics of the classical model itself; and the exploration and debugging of multiple parameters is itself a very time-consuming and labor-intensive non-automated process. In summary, various previous FIR filter design methods basically cannot meet new design needs and requirements.
[0007] There is currently no effective solution to the problem that the FIR filter designed in the related art cannot correct the signal distortion caused by group delay fluctuations. Summary of the invention
[0008] The embodiment of the present invention provides a method and device for obtaining a design solution of an FIR filter, so as to at least solve the problem that the designed FIR filter in the related art cannot correct the signal distortion caused by the group delay fluctuation.
[0009] According to one embodiment of the present invention, a method for obtaining a design solution of an FIR filter is provided, comprising: establishing a particle swarm using a finite-length unit impulse response (FIR) as a particle, wherein the particle swarm includes at least N particles; setting each FIR to learn from a different canonical FIR in each dimension of a design solution space, wherein the design solution space is composed of a plurality of tap coefficients, each tap coefficient represents one dimension, and the canonical FIR is M FIRs in the particle swarm that meet a preset condition, where M is less than or equal to N; M and N are positive integers; and determining a design solution of the FIR filter according to a learning result.
[0010] According to another embodiment of the present invention, there is also provided a device for acquiring a design solution of an FIR filter, comprising: an establishment module, used to establish a particle group using a finite-length unit impulse response FIR as a particle, wherein the particle group includes at least N particles; a setting module, used to set each FIR to learn from a different model FIR in each dimension of the design solution space, wherein the design solution space is composed of multiple tap coefficients, each tap coefficient represents one dimension, and the model FIR is M FIRs in the particle group that meet preset conditions, where M is less than or equal to N; M and N are positive integers; and a determination module, used to determine the design solution of the FIR filter based on the learning result.
[0011] According to another embodiment of the present invention, a storage medium is provided, wherein the storage medium includes a stored program, wherein the program executes the method described in any one of the above embodiments when it is run.
[0012] According to another embodiment of the present invention, a processor is provided, and the processor is used to run a program, wherein the program executes the method described in any one of the above embodiments when running.
[0013] According to another embodiment of the present invention, there is further provided an FIR filter, wherein the FIR filter is a filter designed by using the FIR filter design solution obtained by the method described in any one of the above embodiments.
[0014] Through the present invention, a particle swarm is established with a finite-length unit impulse response FIR as a particle, wherein the particle swarm includes at least N particles; each FIR is set to learn from a different canonical FIR in each dimension of a design solution space, wherein the design solution space is composed of a plurality of tap coefficients, each tap coefficient represents one dimension, and the canonical FIR is M FIRs in the particle swarm that meet preset conditions, where M is less than or equal to N; M and N are positive integers; based on the learning result, a design solution of the FIR filter is determined, which solves the problem that the designed FIR filter in the related art cannot correct the signal distortion caused by the group delay fluctuation, makes full use of the search space of CL-PSO, finds a better design solution that meets the preset index requirements, and the FIR filter designed subsequently greatly reduces the group delay fluctuation. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0016] Figure 1 is a flow chart of a method for obtaining a FIR filter design solution according to an embodiment of the present invention;
[0017] Figure 2 is a flow chart of another method for obtaining a FIR filter design solution according to an embodiment of the present invention;
[0018] Figure 3 An automatic design device for FIR filter based on CL-PSO according to a preferred embodiment of the present invention;
[0019] Figure 4 is a flow chart of automated design of an FIR filter according to a preferred embodiment of the present invention;
[0020] Figure 5 is a flowchart of sub-steps of initialization preparation in the automation design flowchart according to a preferred embodiment of the present invention;
[0021] Figure 6 It is a schematic diagram of a link structure applied to group delay distortion correction of a microwave E-band system according to a preferred embodiment of the present invention;
[0022] Figure 7 2 is a schematic diagram of the structure of a group delay distortion correction FIR filter according to a preferred embodiment of the present invention;
[0023] Figure 8 is a constellation diagram before group delay distortion correction according to a preferred embodiment of the present invention;
[0024] Fig. 9 4 is a constellation diagram after group delay distortion correction according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0025] Embodiment 1
[0026] In this embodiment, a method for obtaining a FIR filter design solution is provided. Figure 1 is a flow chart of a method for obtaining a FIR filter design solution according to an embodiment of the present invention, such as Figure 1 As shown, the process includes the following steps:
[0027] Step S102, establishing a particle swarm using a finite length unit impulse response FIR as a particle, wherein the particle swarm includes at least N particles;
[0028] Step S104, setting each FIR to learn from a different model FIR in each dimension of the design solution space, wherein the design solution space is composed of multiple tap coefficients, each tap coefficient represents one dimension, and the model FIR is M FIRs in the particle swarm that meet the preset conditions, M is less than or equal to N; M, N are positive integers;
[0029] Step S106: Determine the design solution of the FIR filter according to the learning result.
[0030] Through step S106 in the above step S102, a particle swarm is established with a finite-length unit impulse response FIR as a particle; each FIR is set to learn from a different model FIR in each dimension of the design solution space; based on the learning result, the design solution of the FIR filter is determined, which solves the problem that the designed FIR filter in the related technology cannot correct the signal distortion caused by the group delay fluctuation, makes full use of the search space of CL-PSO, finds a better design solution that meets the preset index requirements, and the FIR filter designed subsequently greatly reduces the group delay fluctuation.
[0031] Optionally, before setting each FIR to learn from different canonical FIRs in each dimension of the design solution space, the method further includes: setting the number of consecutive no-improvement times of the historical best fitness for each FIR; and reselecting the canonical FIR when the number of consecutive no-improvement times is greater than a preset threshold.
[0032] Optionally, before setting each FIR to learn from a different canonical FIR in each dimension of the design solution space, the method further includes: setting a differentiated learning capability P for each FIR C (n), where PC (n) is determined by the following formula:
[0033] Wherein, n is a positive integer.
[0034] Optionally, the reselection of the exemplary FIR includes repeatedly performing the following steps until all taps of the nth FIR are processed: in the nth FIR, generating a random number uniformly distributed in [0, 1] tap by tap, and averaging the random number with the learning capacity P assigned to the nth FIR. C (n) compare; if the random number is less than the learning capacity P assigned to the nth FIR C (n), then select another first FIR with non-index n from the canonical FIR and use the historical best tap coefficient vector of the other first FIR The d-th tap coefficient p d (k) Replace the historical best tap coefficient vector of the nth FIR The d-th tap coefficient p d (n).
[0035] Optionally, the method further comprises: if all tap coefficients of the nth FIR If no replacement occurs, then select another second FIR with non-index n from the model FIR, and select a tap d in the other second FIR * , use the tap d * The coefficients replace the historical best tap coefficient vector of the nth FIR The d * The coefficient of the tap.
[0036] Optionally, according to the learning result, determining the design solution of the FIR filter comprises the following steps:
[0037] Step 1: Generate N FIR tap coefficient vectors through the comprehensive learning particle swarm optimization algorithm CL-PSO algorithm
[0038] Step 2, setting N all-zero element vectors as update speed vectors of the tap coefficient vectors of the N FIRs;
[0039] Step 3, allocating learning capabilities to the N FIRs according to a first preset rule;
[0040] Step 4, obtaining the fitness value fitness(n) of the N FIRs according to the tap coefficient vector;
[0041] Step 5: Among the N tap coefficient vectors, the tap coefficient vector of the nth FIR Assign the best historical tap coefficient vector to the nth FIR Assign the fitness(n) to the variable pBestFit(n) recording the historical best fitness value of the nth FIR; set the counter intv(n) of the number of consecutive times that the historical best fitness of each FIR has not been improved to 0, where n is an integer from 1 to N;
[0042] Step 6: Select the best historical tap coefficient vectors of the top M FIRs sorted from largest to smallest in the fitness value and list them in the model FIR. Assign the global optimal FIR tap coefficient vector to the record variable The Corresponding fitness(n * ) is assigned to the fitness record variable gBestFit of the global optimal FIR;
[0043] Step 7: After determining that the number of times t that the model FIR has been learned does not exceed the threshold, and the current global optimal FIR fitness value gBestFit meets the preset index requirements, confirm the current global optimal FIR tap coefficient vector Design a FIR solution; when gBestFit does not meet the preset indicator requirement, calculate the t-th search inertia weight;
[0044] Step 8: When it is determined that the value of the counter of the current nth FIR exceeds the threshold, in each of the N FIRs, the historical best tap coefficient vector of the nth FIR is updated according to the FIR in the model FIR.
[0045] Step 9, in each of the N FIRs, tap by tap, obtain the update speed v of the dth tap of the nth FIR according to the second preset rule. d (n), updating the dth tap coefficient of the nth FIR according to the update speed;
[0046] Step ten, when it is determined that the new historical best fitness value is greater than the global optimal fitness value, the new historical best fitness value is determined to be the new global optimal fitness value, and the tap coefficient vector corresponding to the new global optimal fitness value is determined to be the FIR design solution.
[0047] Optionally, step eight includes: when it is determined that the value of the counter of the current nth FIR exceeds a threshold value, generating a random number uniformly distributed within [0, 1] corresponding to each tap d of the nth FIR, wherein the counter is used to indicate the number of times that the historical best fitness value of the nth FIR has not been continuously improved during the process of repeatedly executing steps eight to nine; when it is determined that the random number is less than the learning ability preset for the particle, selecting a non-index n FIR in a typical FIR, and using the dth tap coefficient p of the historical best tap coefficient vector of the non-index n FIR d (k) Replace the historical best tap coefficient vector of the nth FIR The d-th tap coefficient p d (n), forming a new historical optimal tap coefficient vector of the nth FIR; when it is determined that the random numbers of all particles in the nth FIR are greater than the learning ability corresponding to the particle, select a non-index n FIR in the canonical FIR, and use the dth FIR in the non-index n FIR * The tap coefficient replaces the dth tap coefficient vector of the best tap coefficient vector in the history of the nth FIR. * tap coefficients; set the counter of the nth FIR to zero.
[0048] Optionally, step nine includes: updating the update speed v of the d-th tap coefficient of the n-th FIR by the following method: d (n):
[0049] v d (n)′=ω t ·v d (n)+c1·rnd1·[p d (n)-w d (n)]+c2·rnd2·[g d -w d (n)]; where v d (n) is the update speed before this update, v d (n)′ is the update speed after this update, c1 and c2 are respectively the preset acceleration factors approaching the historical optimal tap coefficient and the global optimal tap coefficient of the nth FIR; rnd1 and rnd2 are both random numbers uniformly distributed in [0, 1]; ω t is the preset search inertia weight of the current t-th learning; wherein the update speed does not exceed the preset update speed limit range [V min , V max ]; the initial value of t is 1, the number of times step eight to step nine is repeated increases by 1, and t increases by 1; the d-th tap coefficient w of the n-th FIR is updated by the following formula d (n): w d(n)′=w d (n)+v d (n), where w d (n) is the tap coefficient before this update, w d (n)′ is the tap coefficient after this update.
[0050] Optionally, the method further comprises: determining the historical best tap coefficient vector updated in step eight The corresponding second best historical fitness value; when it is determined that the fitness value corresponding to the nth FIR updated in step nine is less than or equal to the second best historical fitness value, the counter of the nth FIR is increased by 1 and the process goes to step eight.
[0051] Optionally, after executing step nine, the method further includes one of the following: sorting the N current historical best fitness of all N FIRs from large to small, selecting the index of the top M FIRs to update the canonical FIR; increasing the value of t by 1.
[0052] Optionally, step 1 includes the following steps: using CL-PSO according to a preset tap coefficient range [W min , W max ] randomly generates N FIR tap coefficient vectors, where CL-PSO is used according to [W min , W max ]Get the update speed limit range of FIR tap coefficients [V min , V max ].
[0053] Optionally, the nth FIR tap coefficient vector includes the tap coefficients of all its taps.
[0054] Optionally, step 2 includes: setting N all-zero element vectors as the tap coefficient update speed vectors of the N FIR filters Among them, the tap coefficient update speed vector of the nth FIR for Among them, the v d (n) represents the d-th tap of the n-th FIR.
[0055] Optionally, step three includes: allocating learning capabilities to N FIRs through CL-PSO, wherein the learning capabilities of any two FIRs are different, and the value range of the learning capabilities is [0.05, 0.5].
[0056] Optionally, step 4 includes obtaining the fitness value of the nth FIR in the N FIRs by: the nth FIR uses the current tap coefficient vector For input distorted signal Filter and obtain the output correction signal Get the correction signal Learn symbols with presets The error measure is converted into the fitness value of the nth FIR.
[0057] Optionally, step seven includes determining the search inertia weight according to one of the following methods: setting the parameter mode of the search inertia weight to an adaptive mode, and determining the current t-th search inertia weight according to the following formula: Wherein, mod(t, T) represents the remainder operation of t with respect to T; the parameter mode of setting the search inertia weight ω is a fixed mode.
[0058] It should be noted that the value of ω includes but is not limited to: ω=0.4444.
[0059] Optionally, step nine includes: after determining that the update speed exceeds [V min , V max ], the update speed v is calculated by the following method d (n) Clamping:
[0060]
[0061] Optionally, determine the updated w in step nine d (n)′ exceeds the preset tap coefficient range [W min , W max ], the updated w is re-determined by the following method d (n)′:
[0062] w d (n)′=w d (n)-v d (n).
[0063] In this embodiment, a method for obtaining a FIR filter design solution is also provided. Figure 2 FIG. 4 is a flow chart of another method for obtaining a FIR filter design solution according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0064] Step S202, determining the preset index requirements of the FIR filter to be designed;
[0065] Step S204, obtaining a FIR filter design solution that meets the preset index requirement through a comprehensive learning particle swarm optimization algorithm CL-PSO.
[0066] Through the above steps S202 to S204, the preset index requirements of the FIR filter to be designed are determined; the FIR filter design solution that meets the preset index requirements is obtained through the comprehensive learning particle swarm optimization algorithm CL-PSO, which solves the problem of signal distortion in the designed FIR filter in the related technology, and makes full use of the search space of CL-PSO to find a better design solution that meets the preset index requirements. The FIR filter designed subsequently greatly reduces the group delay fluctuation.
[0067] Optionally, the execution order of step S202 and step S204 can be interchanged, that is, step S204 can be executed first, and then step S202.
[0068] Optionally, a FIR filter design solution that meets the preset index requirement is obtained through a comprehensive learning particle swarm optimization algorithm CL-PSO, including: generating N FIRs through CL-PSO; determining the tap coefficient vector of the optimal FIR among the N FIRs as the FIR filter design solution; wherein each FIR learns from the canonical FIR in each dimension of the preset design solution space, wherein each FIR has a number of learning canons corresponding to the number of taps in parallel, and N is a positive integer. It should be added that each dimension of the FIR can be equivalent to each tap in the subsequent embodiments. The canonical FIR is the FIR with a higher fitness value among all FIRs, and the tap coefficients of the remaining FIRs learn from the tap coefficients of the canonical FIR, that is, they approach the tap coefficients of the canonical FIR at a certain update speed.
[0069] Optionally, it further includes: generating N FIRs by CL-PSO;
[0070] Determine the tap coefficient vector of the optimal FIR among the N FIRs as the FIR filter design solution, wherein a differentiated learning ability P is set for each FIR. C (n), the learning ability of each FIR is determined by the following formula:
[0071]
[0072] Wherein, N is the total number of FIRs, and n is the serial index of the FIR whose learning ability is currently to be calculated among the N FIRs.
[0073] Optionally, it also includes: generating N FIRs through CL-PSO; determining the tap coefficient vector of the best FIR among the N FIRs as the FIR filter design solution, wherein the number of consecutive no-improvements of the historical best fitness is preset for each FIR, wherein when the number of consecutive no-improvements of the historical best fitness of any FIR is greater than a set value, reselecting a model FIR for each dimension of the FIR. In each learning process, if the historical best fitness value is not modified, the number of consecutive no-improvements of the historical best fitness is increased by 1; in a certain learning, if the historical best fitness value is modified, the number is set to 0.
[0074] Optionally, in the process of determining the tap coefficient vector of the optimal FIR among the N FIRs, the method further comprises the following steps:
[0075] Step 1, determine that the counter intv(n) of the number of times the historical best fitness of the nth FIR has not been improved continuously exceeds the set value INTV;
[0076] Step 2: In the nth FIR, a random number uniformly distributed in [0, 1] is first generated tap by tap, and the learning ability P assigned to the nth FIR is calculated. C (n) is compared. If the former is smaller than the latter, a non-index n FIR-k is randomly selected from the preset index sequence TOP-M, and the best tap coefficient vector of FIR-k is used. The d-th tap coefficient (i.e., p d (k)), replace the historical best tap coefficient vector of the nth FIR The d-th tap coefficient p d (n);
[0077] Step 3: Repeat the above step 2 until all taps of the nth FIR are processed.
[0078] Optionally, it also includes:
[0079] If all tap coefficients of the nth FIR If no replacement occurs, a FIR-k other than index n is randomly selected from the preset index sequence TOP-M, and a tap d is randomly selected from the FIR-k * , replace the historical best tap coefficient vector of the nth FIR with its coefficients The d * The coefficient of the tap.
[0080] Optionally, a FIR filter design solution that meets the preset index requirement is obtained by using a comprehensive learning particle swarm optimization algorithm CL-PSO, including:
[0081] Generate N FIRs through CL-PSO and set the tap coefficients corresponding to each FIR Wherein, n is an integer from 1 to N;
[0082] According to the tap coefficient Determine the fitness value fitness(n) corresponding to each FIR;
[0083] Determine the global optimal tap coefficients in the N FIRs according to the fitness values of the N FIRs;
[0084] The global optimal tap coefficient is used as the design solution of the FIR filter.
[0085] Optionally, set the tap coefficients corresponding to each FIR include:
[0086] For each FIR, set the tap coefficients of the FIR Its historical optimal tap coefficient Set the fitness value fitness(n) of the FIR to its historical optimal fitness value pBestFit(n).
[0087] Optionally, determining the global optimal tap coefficients in the N FIRs according to the fitness of the N FIRs includes:
[0088] Sort the historical optimal fitness values pBestFit(n) corresponding to N FIRs from large to small;
[0089] The tap coefficient of the FIR corresponding to the first-ranked historical optimal fitness value is determined as the temporary global optimal tap coefficient.
[0090] Optionally, the tap coefficient of the FIR corresponding to the first-ranked historical optimal fitness is determined as the global optimal tap coefficient Afterwards, the method further comprises:
[0091] Step 1: According to the first preset rule, the tap coefficient corresponding to the nth FIR Update and use the updated tap coefficients Generate updated fitness value fitness(n)new;
[0092] According to the second preset rule, the historical optimal tap coefficient corresponding to the nth FIR Update and use the updated historical optimal tap coefficient Generate an updated historical optimal fitness value pBestFit(n)new;
[0093] Step 2: When the fitness(n)new is less than or equal to the pBestFit(n)new, the counter of the nth FIR is incremented by 1, and the process of step 1 is executed;
[0094] When the fitness(n)new is greater than the pBestFit(n)new, the historical optimal tap coefficient corresponding to the nth FIR is Update to this
[0095] Step 3: Compare the fitness(n)new with the historical optimal fitness value of the first ranking; when the fitness(n)new is greater than the historical optimal fitness value of the first ranking, update the temporary global optimal tap coefficient to the tap coefficient of the nth FIR.
[0096] Optionally, after the historical best fitness values pBestFit(n) corresponding to the N FIRs are numerically sorted from large to small, the method further comprises: selecting the first M FIRs in the sorting as an index set; and selecting the historical best tap coefficient corresponding to the nth FIR according to the second preset rule. The updating includes: when the value of the counter of the nth FIR exceeds the threshold, selecting the mth FIR from the index set, and updating the historical optimal tap coefficient of the nth FIR Update to the tap coefficient of the mth FIR The historical optimal tap coefficients of the nth FIR If no change occurs, select the mth FIR from the index set and select any tap d of the mth FIR * , the nth FIR The d * The tap coefficients are updated to the mth FIR The d * The coefficient of the tap.
[0097] Optionally, the tap coefficient corresponding to the nth FIR is The update includes: determining the tap coefficient update speed v corresponding to the nth FIR d (n); According to the v d (n) Update the tap coefficients corresponding to the nth FIR
[0098] Optionally, the method further includes: completing the historical optimal tap coefficients of the N FIRs according to step 1 to step 2. After the historical best fitness value pBestFit(n) is updated, the historical best fitness values of the N FIRs are numerically sorted from large to small; the top M FIRs are selected to update the current index set.
[0099] Optionally, the method also includes: adding 1 to the number of learning times t, and determining whether the updated number of learning times is greater than a threshold; if the judgment result is yes, determining the current temporary global optimal tap coefficient as the final global optimal tap coefficient; if the judgment result is no, executing the method of steps 1 to 3.
[0100] Optionally, obtaining a FIR filter design solution that meets the preset index requirement by using a comprehensive learning particle swarm optimization algorithm CL-PSO includes the following steps:
[0101] Step 1: Generate N FIR tap coefficient vectors through the CL-PSO algorithm
[0102] Step 2, setting N all-zero element vectors as update speed vectors of the tap coefficient vectors of the N FIRs;
[0103] Step 3, allocating learning capabilities to the N FIRs according to a third preset rule;
[0104] Step 4, obtaining the fitness value fitness(n) of the N FIRs according to the tap coefficient vector;
[0105] Step 5: Among the N tap coefficient vectors, the tap coefficient vector of the nth FIR Assign the best historical tap coefficient vector to the nth FIR Assign the fitness(n) to the variable pBestFit(n) recording the historical best fitness value of the nth FIR; set the counter intv(n) of the number of consecutive times that the historical best fitness of each FIR has not been improved to 0, where n is an integer from 1 to N;
[0106] Step 6: Select the best historical tap coefficient vectors of the top M FIRs in descending order of fitness values and list them in the TOP-M sequence. Assign the global optimal FIR tap coefficient vector to the record variable The Corresponding fitness(n * ) is assigned to the fitness record variable gBestFit of the global optimal FIR;
[0107] Step 7: After determining that the current number of learning times t does not exceed the threshold, and when the current global optimal FIR fitness value gBestFit reaches the preset index requirement, confirm the current global optimal FIR tap coefficient vector Design a solution for FIR; when gBestFit does not meet the preset index requirement, calculate the t-th search inertia weight, wherein t is used to indicate the number of times an FIR learns from a model FIR, wherein the model FIR is one of the top M FIRs; it should be added that executing steps eight to nine once is called one learning, that is, updating the tap coefficient of the FIR once is called one learning, or one learning, that is, the number of learning times t plus 1.
[0108] Step 8: When it is determined that the value of the counter of the current nth FIR exceeds the threshold, in each of the N FIRs, the historical best tap coefficient vector of the nth FIR is updated according to the FIR in the TOP-M sequence. The counter is used to count the number of times the historical best fitness value has not been improved continuously.
[0109] Step 9, in each of the N FIRs, perform the following steps tap by tap: obtain the update speed v of the dth tap of the nth FIR according to the fourth preset rule d (n), updating the dth tap coefficient of the nth FIR according to the update speed;
[0110] Step 10: In each of the N FIRs, according to the historical best tap coefficient vector updated in step 8 and the fitness value corresponding to the nth FIR updated in step nine, to determine the new historical best fitness value and historical best tap coefficient vector of the nth FIR;
[0111] Step eleven, when it is determined that the new historical best fitness value is greater than the global optimal fitness value, the new historical best fitness value is determined to be the new global optimal fitness value, and the tap coefficient vector corresponding to the new global optimal fitness value is determined to be the FIR design solution.
[0112] Optionally, the step eight includes:
[0113] Determine that the value of the counter of the current nth FIR exceeds a threshold value, and generate a random number uniformly distributed within [0, 1] corresponding to each tap d of the nth FIR, wherein the counter is used to indicate the number of times that the historical best fitness value of the nth FIR has not been improved continuously during the process of repeatedly executing steps eight to ten;
[0114] When it is determined that the random number is less than the learning capacity preset for the tap d, a FIR with a non-index n in the TOP-M sequence is selected, and the d-th tap coefficient p of the historical best tap coefficient vector of the FIR with the non-index n is used. d (k) Replace the historical best tap coefficient vector of the nth FIR The d-th tap coefficient p d (n), forming a new historical optimal tap coefficient vector of the nth FIR;
[0115] When it is determined that the random numbers of all taps d in the nth FIR are greater than the learning ability corresponding to the tap d, a non-index n FIR in the TOP-M sequence is selected, and the dth tap in the non-index n FIR is used. * The tap coefficient replaces the dth tap coefficient vector of the best tap coefficient vector in the history of the nth FIR. * tap coefficients;
[0116] Set the counter of the nth FIR to zero.
[0117] Optionally, the step nine includes:
[0118] The update speed v of the d-th tap coefficient of the n-th FIR is updated by the following method d (n):
[0119] v d (n)′=ω t ·v d (n)+c1·rnd1·[p d (n)-w d (n)]+c2·rnd2·[g d -w d (n)];
[0120] Among them, v d (n) is the update speed before this update, v d (n)′ is the update speed after this update, c1 and c2 are respectively the preset acceleration factors approaching the historical optimal tap coefficient and the global optimal tap coefficient of the nth FIR; rnd1 and rnd2 are both random numbers uniformly distributed in [0, 1]; ω t is the preset search inertia weight of the current t-th learning; wherein, the update speed shall not exceed the preset update speed limit range [V min , V max ]; wherein the initial value of t is 1, and the number of times step 8 to step 10 is repeated increases by 1, and t increases by 1;
[0121] Update the d-th tap coefficient w of the n-th FIR by the following formula d(n): w d (n)′=w d (n)+v d (n), where w d (n) is the tap coefficient before this update, w d (n)′ is the tap coefficient after this update.
[0122] Optionally, the step ten includes:
[0123] Determine the historical best tap coefficient vector updated in step eight The corresponding second best historical fitness value;
[0124] When it is determined that the fitness value corresponding to the nth FIR updated in step nine is less than or equal to the second historical best fitness value, the counter of the nth FIR is increased by 1, and the process goes to step eight.
[0125] Optionally, after executing step ten, the method further includes one of the following:
[0126] According to the N current best historical fitness of all N FIRs, sort them from large to small, select the index of the top M FIRs to update the TOP-M sequence;
[0127] Increase the value of t by 1.
[0128] Optionally, the step 1 includes the following steps:
[0129] Through CL-PSO according to the preset tap coefficient range [W min , W max ] randomly generates N FIR tap coefficient vectors, where CL-PSO is used according to [W min , W max ]Get the update speed limit range of FIR tap coefficients [V min , V max ].
[0130] Optionally, the nth FIR tap coefficient vector includes the tap coefficients of all its taps.
[0131] Optionally, the second step includes:
[0132] Set N all-zero element vectors as the tap coefficient update speed vectors of the N FIR filters Among them, the tap coefficient update speed vector of the nth FIR for Among them, the v d (n) represents the d-th tap of the n-th FIR.
[0133] Optionally, the step three includes:
[0134] The learning capabilities are allocated to N FIRs through CL-PSO, where the learning capabilities of any two FIRs are different and the value range of the learning capabilities is [0.05, 0.5].
[0135] Optionally, step 4 includes: obtaining the fitness value of the nth FIR in the N FIRs by the following method: the nth FIR uses the current tap coefficient vector For input distorted signal Filter and obtain the output correction signal Get the correction signal Learn symbols with presets The error measure is converted into the fitness value of the nth FIR.
[0136] Optionally, step seven includes: determining the search inertia weight according to one of the following methods:
[0137] The parameter mode of setting the search inertia weight is adaptive mode, and the current search inertia weight of the tth time is determined according to the following formula Among them, mod(t, T) represents the remainder operation of t with respect to T;
[0138] The parameter mode of setting the search inertia weight ω is fixed, then ω=0.4444.
[0139] Optionally, the step nine includes:
[0140] After determining that the update rate exceeds [V min , V max ], the update speed v is calculated by the following method d (n) Clamping:
[0141]
[0142] Optionally, determine the updated w in step nine d (n)′ exceeds the preset tap coefficient range [W min , W max ], the updated w is re-determined by the following method d (n)′:
[0143] w d (n)′=w d (n)-v d (n).
[0144] The following is a detailed description with reference to the preferred embodiments of the present invention.
[0145] In the related art, there are also some automated design methods and devices for FIR filters based on the particle swarm optimization algorithm of comprehensive learning (CL-PSO). Although the original particle swarm optimization algorithm (PSO) is used in the related art: but the core point of the related art is: "corresponding the coefficient of each tap of the FIR filter model to the position of a particle in the particle swarm optimization method", and in the feasible solution space, the position of the particle uniquely determines the difference or distinctiveness of each particle, and they are naturally one-to-one corresponding; therefore, in the related art, each tap of the FIR is modeled as a particle, and the FIR has N taps corresponding to N particles. However, the middle tap coefficients of most FIRs are completely different from the tap coefficients on both sides, that is, the final learning goals of each tap coefficient are not consistent; when a tap is modeled as a particle, the mutual reference or learning between particles loses the feasibility premise. The present invention models a particle as an FIR filter, and the particles (i.e., the FIRs) have completely equal status, thus laying the correct premise for mutual reference and learning; under this premise, each particle (i.e., each FIR) can truly achieve parallel optimization iteration, thereby correctly exerting the parallel search advantage of the particle swarm search algorithm.
[0146] Or in the related art, a conventional FIR filter design method is used to design the FIR filter to obtain an initial FIR filter, and its unit impulse response sequence is recorded as [h0(0), h0(1), h0(2)...h0(N-1)]. Each particle randomly selects Ki unit impulse responses from [h0(0), h0(1), h0(2)...h0(N-1)] as the corresponding element of its own position vector, and the remaining elements are randomly set, Ki∈(0, N-1], i=1, 2,..., M. The Ki corresponding to each particle can be the same or different...; From the above content, it can be seen that it first designs an initial FIR filter, which already has N innate coefficients [h0(0), h0(1), h0(2)...h0(N-1)], and then each particle just selects this initial FIR For example, if the initial FIR has three taps numbered ①, ②, and ③, according to the above content, particle 1 can choose the coefficients of taps ① and ③ of the initial FIR filter to initialize its two position components; and particle 2 can choose the coefficient of tap ② of the initial FIR filter to initialize its one position component; however, the middle tap coefficient (② in this example) and the two side coefficients (① and ③) of most FIRs are completely different (generally the middle tap coefficient is close to 1; while the two side tap coefficients are close to 0), that is, the learning objectives of each tap are completely inconsistent; obviously, initializing the particle group in this way, on the one hand, does not conform to the principle of random initialization of each particle with equal status; on the other hand, because the coefficient targets inherently carried by each particle are already differentiated, it is impossible for particles to learn from each other and learn from each other from the beginning.
[0147] The present invention models a particle as an FIR filter, and the particles (i.e., the FIRs) are completely equal, thus satisfying the correct premise of mutual reference and learning; under this premise, each particle (i.e., each FIR) can truly achieve parallel optimization iteration and give play to the parallel search advantage of the particle swarm algorithm.
[0148] The present invention not only makes full use of the parallel search advantage of the particle swarm optimization algorithm, but also the CL-PSO based on it completely overcomes the inherent defects of the original particle swarm algorithm (PSO): when the parameters of PSO are improperly set, especially when solving complex multi-peak problems, it is easy to fall into a local minimum basin and cannot continue to improve, which is commonly known as premature convergence. CL-PSO adopts an innovative learning strategy: unlike the original PSO, no matter which dimension of the feasible solution space, there are only two attractors, pbest and gbest, from beginning to end; CL-PSO learns from possible different paradigms in all dimensions of the particle space position, that is, learns comprehensively or extensively; in other words, in each round of evolution, each particle may have D (the dimension of the particle space position; for example: D is the number of taps when performing FIR design) attractors at the same time. This strategy allows the particles to be evenly pulled by other particles in the world when flying, and the diversity of the particle group position distribution is well maintained, thereby effectively avoiding the premature convergence problem.
[0149] In addition, according to the theoretical analysis of particle swarm algorithm: CL-PSO has a much larger potential search space than the original PSO, which means that CL-PSO is more likely to find the global optimal solution than the original PSO; in other words, the optimization search ability of CL-PSO particles has been greatly improved compared with PSO. On the other hand, the potential search space of CL-PSO for multi-peak problems is more than ten times that for unimodal problems; in other words, when the error surface of the design problem has complex multi-peak characteristics, CL-PSO's ability to solve it is more advantageous than its ability to solve simple unimodal problems. In actual communication systems, signal distortion problems are usually not directly described by simple unimodal functions; this provides a broad field for CL-PSO.
[0150] The present invention provides an automated design method and device for FIR filters based on a comprehensive learning-based particle swarm optimization algorithm (CL-PSO), which solves many problems such as the inability of traditional FIR design to correct signal distortion caused by group delay fluctuations, frequency characteristics being limited by classical models, time-consuming and labor-intensive parameter adjustment, and non-automated design; at the same time, it overcomes the inherent defects of the design method based on the original particle swarm optimization algorithm (PSO), such as weak global optimization ability and easy premature convergence.
[0151] An automatic design method for a FIR filter comprises the following steps:
[0152] Step 1: Initialization preparation.
[0153] Set the allowable value range of FIR tap coefficients: [W min , W max ], and calculate the update speed limit range of FIR tap coefficients according to the following formula (1): [V min , Vmax ]:
[0154]
[0155] In the above, 0<K≤1 is a proportional parameter; different K parameter values can be set for different specific design problems.
[0156] If the parameter mode of setting the search inertia weight ω is fixed, then set: ω = 0.4444; and set the number of learning times: t = 0; the following sub-steps are completed sequentially under each FIR, that is, n = 1:N:
[0157] Step 1.1: CL-PSO is based on [W min , W max ], randomly generate N FIR tap coefficient vectors: Each tap coefficient vector The length of is the number of FIR taps D, that is: The initial coefficient of each tap is generated according to the following formula (2):
[0158] w d (n) = W min +(W max -W min )·rnd (d=1,...,D) (2)
[0159] In the above, rnd represents a random number uniformly distributed within [0, 1].
[0160] Step 1.2: Set N all-zero element vectors as the tap coefficient update speed vector of the FIR filter Each updated velocity vector is also D-dimensional, that is: All zero element settings are: v d (n) = 0 (d = 1, ..., D);
[0161] Step 1.3: CL-PSO calculates the learning ability P assigned to the nth FIR according to formula (3): C (n):
[0162]
[0163] That is, the learning ability of each FIR adopts a differentiated strategy within the numerical range of [0.05, 0.5]; essentially, different learning and optimization capabilities are given to each FIR;
[0164] Step 1.4: The nth FIR uses For input distorted signal Filter and obtain the output correction signal and calculate the correction signal Relative to known learning symbols The error measure is converted into the fitness value fitness(n) of the nth FIR and then passed back to CL-PSO;
[0165] Step 1.5: Set the tap coefficient vector of the nth FIR The best historical tap coefficient vector assigned to the nth FIR: Right now At the same time, the fitness(n) is assigned to the historical best fitness value recording variable pBestFit(n) of the nth FIR, that is, pBestFit(n) = fitness(n); the counter of the number of consecutive times that the historical best fitness of each FIR has not been improved is set to 0, that is, intv(n) = 0 (n = 1, ..., N);
[0166] Step 1.6: The sequence of the historical best fitness values of N FIRs by CL-PSO Sort them in descending order, and then record the indexes of the top M FIRs into the sequence TOP-M; and record the tap coefficient vector of the top-ranked FIR Assign the global optimal FIR tap coefficient vector to the record variable Right now: g d =w d (n * )(d=1,...,D); at the same time, fitness(n * ) is assigned to the fitness record variable gBestFit of the global optimal FIR, that is, gBestFit = fitness (n * ).
[0167] Step 2: Determine the termination condition.
[0168] Determine whether the number of learning times t exceeds the set upper limit G: If yes, terminate the program, and the global optimal tap coefficient vector is the required FIR design solution; if not, then determine whether the global optimal FIR fitness value gBestFit reaches the set index requirement value BestFitness: if the index requirement value is reached, the program is terminated, and the global optimal tap coefficient vector This is the required FIR design solution. If the index requirement is not met, and if the parameter mode of the search inertia weight ω is set in an adaptive mode, the search inertia weight of the current tth generation can be calculated according to the following formula (4); and then proceed to step 3:
[0169]
[0170] In the above, mod(t, T) represents the remainder operation of t with respect to T; that is, the search inertia weight ω changes periodically within the numerical range of [0.25, 0.75] with 200 generations as a cycle.
[0171] Step 3: FIR taps are learned and adjusted.
[0172] The following sub-steps are all completed sequentially under FIR, that is, n=1:N:
[0173] Step 3.1: If the counter intv(n) exceeds the set value INTV, then tap by tap, i.e. d=1:D, for each tap d, generate a random number uniformly distributed in [0, 1] and sum it with the learning capacity P assigned to the nth FIR. C (n) is compared. If the former is smaller than the latter, a non-index n FIR-k (k≠n, k∈TOP-M) is randomly selected from the index sequence TOP-M and its historical best tap coefficient vector is used. The d-th tap coefficient (i.e., p d (k)), replace the learning paradigm of the d-th tap of the n-th FIR (i.e., p d (n)), that is, p d (n) = p d (k); Repeat this step until all D taps are processed;
[0174] Step 3.2: If all tap coefficients of the nth FIR If no replacement occurs, then randomly select another FIR-k (k≠n) with non-index n from the index sequence TOP-M, and randomly select a tap d * , replace the dth coefficient of the nth FIR with its coefficient * The learning paradigm of tapping, i.e.
[0175] Step 3.3: Set the counter intv(n) indicating the number of consecutive times of no improvement in the historical best fitness of the nth FIR to 0;
[0176] Step 4: The FIR tap coefficients are updated tap by tap.
[0177] The following sub-steps are all completed sequentially under FIR-by-FIR (i.e., n=1:N) and tap-by-tap (i.e., d=1:D):
[0178] Step 4.1: Update speed v of the dth tap coefficient of the nth FIR d (n) is updated according to formula (5):
[0179] vd (n) = ω t ·v d (n)+c1·rnd1·[p d (n)-w d (n)]+c2·rnd2·[g d -w d (n)] (5)
[0180] In the above, c1 and c2 are respectively the acceleration factors set toward the historical optimal tap coefficient of the nth FIR and the global optimal tap coefficient; rnd1 and rnd2 are both random numbers uniformly distributed within [0, 1].
[0181] Step 4.2: If the update rate v of the dth tap of the nth FIR d (n) Exceeds the update speed limit determined in step 1.2: [V min , V max ], then clamping is performed according to the following formula (6):
[0182]
[0183] Step 4.3: Complete the d-th tap coefficient w of the n-th FIR according to equation (7) d (n) Update:
[0184] w d (n) = w d (n)+v d (n) (7)
[0185] Step 4.4: If the d-th tap coefficient w of the n-th FIR d (n) exceeds [W min , W max ], the update speed direction is reversed:
[0186] v d (n) = -v d (n) (8)
[0187] The tap coefficients are then calculated using the new update rate.
[0188] Step 5: FIR fitness update.
[0189] The following sub-steps are all completed sequentially under FIR, that is, n=1:N:
[0190] Step 5.1: The nth FIR uses the updated value from step 4.3 The input distortion signal Filter and obtain the output correction signal and calculate the correction signal Relative to known learning symbols The error measure is converted into the fitness value fitness(n) of the nth FIR and then passed back to CL-PSO;
[0191] Step 5.2: The nth FIR uses the historical best tap coefficient vector adjusted in step 3 The input distortion signal Filter and obtain the output correction signal and calculate the correction signal Relative to known learning symbols The error measure is converted into the fitness value pBestFit(n) of the nth FIR and then passed back to CL-PSO;
[0192] Step 5.3: CL-PSO compares the size of fitness(n) and pBestFit(n): If fitness(n)≤pBestFit(n), then add 1 to the counter intv(n) of the nth FIR, that is, intv(n)=intv(n)+1, and jump to step 3; otherwise, use replace Right now: And replace the corresponding fitness value, that is: pBestFit(n) = fitness(n); at the same time, set the counter intv(n) of the nth FIR to 0, and continue with sub-step 5.4:
[0193] Step 5.4: CL-PSO then compares the size of fitness(n) and gBestFit: If fitness(n)>gBestFit, use replace Right now And replace the corresponding fitness value, that is, gBestFit = fitness(n).
[0194] Step 6: Update the TOP-M sequence and learning times.
[0195] For the current historical best fitness value sequence Sort in descending order, then replace the index set of the top M FIRs to update the current index sequence TOP-M; and update the number of learning times: t=t+1; return to step 2.
[0196] The above steps 1 to 6 are the method flow for obtaining the FIR filter design solution in the preferred embodiment of the present invention.
[0197] The present invention also provides an automatic design device for FIR filter based on CL-PSO. Figure 3 To explain, Figure 3 The invention is an automatic design device for FIR filter based on CL-PSO according to a preferred embodiment of the present invention, comprising the following units:
[0198] [200: Parameter configuration unit]: This unit is used to set: the upper limit of the number of optimization iterations G, the number of FIRs N, the FIR correction error accuracy or the FIR fitness requirement BestFitness, the number of FIR taps, and the FIR tap coefficient clamping parameters [W min , W max ], K ratio parameter, parameter selection for searching the inertia weight ω (fixed mode / adaptive mode), and the specific value of M in TOP-M.
[0199] [201: Initialization preparation unit]: This unit is used to complete:
[0200] According to the tap coefficient clamping parameters [W min , W max ] and K ratio parameters, the update speed clamping parameters of FIR tap coefficients are calculated according to formula (1): [V min , V max ]; If the parameter method of searching the inertia weight ω is fixed, set ω=0.4444;
[0201] According to the tap coefficient clamping parameters [W min , W max ], randomly generate N FIR tap coefficient vectors according to formula (2) And construct the tap coefficient update speed vector of N all-zero elements
[0202] The learning capacity P assigned to each FIR is calculated according to formula (3): C (n)(n=1, ..., N);
[0203] Obtain the distortion signal from unit 207 (distortion and correction signal buffer unit) Configuration To unit 208 (FIR filter correction unit), Perform filtering correction to obtain the corrected signal And calculate Relative to known learning symbols The error measure is converted into the fitness value fitness(n) of the nth FIR and then passed back to the 201 unit;
[0204] Unit 201 converts the tap coefficients of each FIR tap by tap. Assign the best historical tap coefficient vector to itself The corresponding tap is: At the same time, the corresponding fitness value {fitness(n)} n=1:N Assign the best historical fitness value register {pBestFit(n)} to each FIR n=1:N , that is: {pBestFit(n)=fitness(n)} n=1:N ; Concatenate intv(n)=0(n=1,...,N);
[0205] The sequence of the best historical fitness values of N FIRs Sort them in descending order, and then record the indexes of the top M FIRs into the sequence TOP-M; and assign the tap coefficient vector of the top-ranked FIR to the global optimal FIR tap coefficient vector register That is: d =w d (n * )} d=1:D ; and the corresponding fitness value fitness(n * ) is assigned to the fitness register gBestFit of the global optimal FIR, that is: gBestFit = fitness (n * ).
[0206] [202: Termination condition judgment unit]: This unit is used to complete: judging whether the current number of learning times t exceeds the upper limit of the number of iterations G configured by the 200 unit: if yes, the automatic design process is terminated; at this time, the 206 unit outputs the global optimal tap coefficient vector (i.e., the required FIR design solution); if not, then determine whether the gBestFit obtained by unit 201 reaches the required index value BestFitness configured by unit 200: if it reaches the required index value, the automatic design process is terminated; at this time, unit 206 outputs the global optimal tap coefficient vector (i.e., the required FIR design solution); if the index requirement is not met, and if the parameter mode of the configured inertia weight ω is an adaptive mode, the search inertia weight of the current tth generation is calculated according to formula (4).
[0207] [203: FIR tap learning model adjustment unit]: This unit is used to complete the following processing sequentially for each FIR:
[0208] If the counter intv(n) exceeds the set value INTV, then the random number generator generates a random number uniformly distributed in [0, 1], tap by tap, d = 1: D, and the learning capacity P assigned by the FIR C (n) is compared. If the former is smaller than the latter, a non-current indexed FIR-k (k≠n, k∈TOP-M) is randomly selected from the index sequence TOP-M and its historical best tap coefficient vector is used. The d-th tap coefficient (i.e., p d (k)), replace the learning paradigm of the d-th tap of the current FIR (i.e., p d (n)), that is, p d (n) = p d (k); Repeat this step until all D taps are processed;
[0209] If all the tap coefficients of the current FIR If no replacement occurs, a non-current index other FIR-k (k≠n) is randomly selected from the index sequence TOP-M, and a tap d is randomly selected. * , replace the dth coefficient of the current FIR with its coefficient * The learning paradigm of taps is
[0210] Set the intv(n) counter of the current FIR to 0.
[0211] [204: FIR tap coefficient update unit]: This unit is used to sequentially complete the following processing on a FIR-by-FIR (i.e., n=1:N) and tap-by-tap (i.e., d=1:D) basis:
[0212] Update the coefficient update speed of each FIR tap according to formula (5) And Perform clamping restriction;
[0213] Complete the update of the coefficients of each FIR tap; and update the updated Determine whether the boundary is crossed and Corresponding update speed Perform inversion processing.
[0214] [205: FIR fitness update unit]: This unit is used to complete the following processing sequentially for each FIR:
[0215] Obtain the distortion signal from unit 207 (distortion and correction signal buffer unit) Configuration 204 units after updating each FIR To Unit 208, yes Perform filtering correction to obtain the corrected signal And calculate Relative to known learning symbols The error measure is converted into the fitness value {fitness(n)} of each FIR n=1:N , and then sent back to unit 205;
[0216] Obtain the distortion signal from unit 207 (distortion and correction signal buffer unit) Configure the FIR of each unit after adjustment in 203 units To Unit 208, yes Perform filtering correction to obtain the corrected signal And calculate Relative to known learning symbols The error measure is converted into the fitness value of each FIR {pBestFit(n)} n=1:N , and then sent back to unit 205;
[0217] Compare the fitness(n) and pBestFit(n) of each FIR: If the fitness(n) of the current FIR is ≤ pBestFit(n), then add 1 to the counter intv(n) of the current FIR, that is, intv(n) = intv(n) + 1, and jump to unit 203; otherwise, use the current FIR's Replace it Right now: And replace the corresponding fitness value, that is: pBestFit(n) = fitness(n); at the same time, set the counter intv(n) of the current FIR to 0, and continue to compare the fitness(n) of each FIR with the current global optimal gBestFit: if fitness(n)>gBestFit, use replace Right now And replace the corresponding fitness value, that is, gBestFit = fitness(n).
[0218] [206: TOP-M update and optimal output unit]: This unit is used to complete: the current historical best fitness value sequence Sort them in descending order, and then replace the index set of the top M FIRs to update the current index sequence TOP-M; and add 1 to the learning times counter: t = t + 1; then turn to unit 202 for judgment; if t reaches the iteration upper limit G, or does not reach it, but meets the configured FIR correction error accuracy or FIR fitness requirement BestFitness, then output the global optimal tap coefficient vector This is the desired FIR design solution.
[0219] The following are specific embodiments of the preferred embodiments of the present invention.
[0220] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0221] Figure 4 FIG. 1 is a flowchart of the automated design of an FIR filter according to a preferred embodiment of the present invention, wherein the specific steps are described as follows:
[0222] [301: Initialization Preparation]: Set the allowable value range of FIR tap coefficients: [W min , W max ]=[-2, 2], and calculate the update speed limit range of FIR tap coefficients according to the following formula (1): [V min , V max ]:
[0223]
[0224] For the group delay distortion correction problem, K is taken as 0.2.
[0225] If the parameter mode of setting the search inertia weight ω is fixed, then set: ω = 0.4444; and set the number of learning times: t = 0; the following sub-steps are completed sequentially under each FIR, that is, n = 1: N, Figure 5 This is a sub-step flowchart of initialization preparation in the automation design flowchart according to a preferred embodiment of the present invention:
[0226] In step 3011, according to the previously set [W min , W max ], randomly generate N FIR tap coefficient vectors: The initial coefficient of each tap is generated according to the following formula (2):
[0227] w d (n) = W min +(W max -W min )·rnd (d=1,...,D) (10)
[0228] rnd is a random number uniformly distributed within [0, 1], for example, it can be generated by the random number generation function provided by Matlab.
[0229] Step 3012, constructing the tap coefficients of the FIR filter with N all-zero elements to update the speed vector
[0230] Step 3013, calculate the learning ability P assigned to each FIR according to the following formula (3): C (n):
[0231]
[0232] Here, the number of FIRs N is 100.
[0233] Step 3014 uses the initial tap coefficient vector of each FIR For input distorted signal Filter and obtain the output correction signal and calculate the correction signal Relative to known learning symbols The mean square error is: (sL is the signal length; represents the square of the 2-norm), and then calculate the FIR fitness value: Then it is passed back to CL-PSO.
[0234] Step 3015: Initial tap coefficient vectors of each FIR Assign the best historical tap coefficient vector Right now: At the same time, the fitness(n) calculated in step 3014 is assigned to the historical best fitness value pBestFit(n) of the corresponding FIR, that is: pBestFit(n) = fitness(n); and the counter of the number of consecutive times that the historical best fitness of each FIR has not improved is set to 0, that is: intv(n) = 0 (n = 1, ..., N).
[0235] Step 3016, the sequence of the best historical fitness values of N FIRs Sort them in descending order, and then record the indexes of the top M FIRs into the sequence TOP-M; and record the tap coefficient vector of the top-ranked FIR Assign to the global optimal FIR tap coefficient vector Right now: At the same time, fitness(n * ) is assigned to the fitness record variable gBestFit of the global optimal FIR, that is: gBestFit = fitness (n * ).
[0236] [302: Termination condition judgment]: Determine whether the number of learning times t exceeds the set upper limit value 1E6: If yes, terminate the program, and the global optimal tap coefficient vector at this time That is, the required FIR design solution; if not, then determine whether the global optimal FIR fitness value gBestFit reaches the set index requirement value If the required value is reached, the program is terminated and the global optimal tap coefficient vector is is the required FIR design solution; if the index requirement is not met, and if the parameter mode of the search inertia weight ω is set in an adaptive mode, the search inertia weight of the current t-th generation can be calculated according to the following formula (4); and continue to step 303:
[0237]
[0238] [303: Adjustment of FIR tap learning paradigm]: The following sub-steps are completed sequentially for each FIR, i.e., n=1:N:
[0239] In step 3031, if the current FIR counter intv(n) exceeds the set value INTV=7, then for each tap d, a uniformly distributed random number in [0, 1] is generated and combined with the learning capacity P assigned in sub-step 3013. C (n) is compared: if the former is less than the latter, then a non-current FIR other FIR-k (k≠n, k∈TOP-M) is randomly selected from the index sequence TOP-M determined in sub-step 3016, and its historical best tap coefficient vector is used The d-th tap coefficient (i.e., p d (k)), replace the learning paradigm of the d-th tap of the current FIR (i.e., p d (n)), that is: p d (n) = p d (k); This step is repeated until all the learning examples of D taps are processed.
[0240] In sub-step 3032, if all tap coefficients of the nth FIR If no replacement occurs, a non-current FIR other than FIR-k (k≠n) is randomly selected from the index sequence TOP-M, and a tap d is randomly selected. * , replace the dth coefficient of the current FIR with its coefficient * The learning paradigm of tapping is:
[0241] Sub-step 3033 sets the counter intv(n) of the current FIR to 0.
[0242] [304: Update FIR tap coefficients tap by tap]: The following sub-steps are completed in sequence on a FIR-by-FIR (i.e., n=1:N) and a tap-by-tap (i.e., d=1:D) basis:
[0243] Sub-step 3041 calculates the update speed v of each tap coefficient of each FIR according to equation (5): d (n):
[0244] v d (n) = ω t ·v d (n)+c1·rnd1·[p d (n)-w d (n)]+c2·rnd2·[g d -w d (n)] (13)
[0245] Here, c1=c2=1.49445; rnd1 and rnd2 are random numbers uniformly distributed within [0, 1], for example, generated by the random number generation function provided by Matlab.
[0246] Sub-step 3042 updates the speed v calculated in step 3041. d (n) Clamp control is performed according to formula (6):
[0247]
[0248] Then, sub-step 3043 completes the tap coefficients w of each FIR according to equation (7): d (n) Update:
[0249] w d (n) = w d (n)+v d (n) (15)
[0250] In sub-step 3044, if any tap coefficient w of any FIR d (n) exceeds [W min , W max ], the direction of the corresponding update speed is reversed:
[0251] v d (n) = -v d (n) (16)
[0252] [305: FIR fitness update]: The following sub-steps are completed sequentially in each FIR, that is, n=1:N:
[0253] Sub-step 3051, using each FIR tap coefficient vector updated in sub-step 3043 The distorted signal of the input Filter and obtain the output correction signal and calculate the correction signal Relative to known learning symbols of And converted to FIR fitness value Then it is passed back to CL-PSO;
[0254] Sub-step 3052, using the adjusted FIR historical best tap coefficient vectors from sub-step 3032 For input distorted signal Filter and obtain the output correction signal and calculate the correction signal Relative to known learning symbols of And converted to FIR fitness value Then it is passed back to CL-PSO;
[0255] Sub-step 3053, compare the sizes of fitness(n) and pBestFit(n): if fitness(n)≤pBestFit(n), then add 1 to the counter intv(n) of the nth FIR, that is, intv(n)=intv(n)+1, and jump to step 303; otherwise, use replace Right now: And replace the corresponding fitness value, that is: pBestFit(n) = fitness(n); at the same time, set the counter intv(n) of the nth FIR to 0, and continue to the following sub-step 3054:
[0256] Sub-step 3054, then compare the size of fitness(n) and gBestFit: if fitness(n)>gBestFit, then use replace Right now And replace the corresponding fitness value, that is, gBestFit = fitness(n).
[0257] [306: TOP-M sequence and learning times update]: Update the current historical best fitness value sequence Sort in descending order, then replace the index set of the top M (=10) FIRs to update the current TOP-10; and update the number of learning times: t=t+1; return to step 302.
[0258] Figure 6 is a schematic diagram of a link structure for group delay distortion correction in a microwave E-band system according to a preferred embodiment of the present invention, such as Figure 6As shown, the FIR filter automatic design module based on CL-PSO corresponds to a specific embodiment of the present invention. It should be noted that, Figure 6 The English sentences or words in the text refer to the link structure of group delay distortion correction of the microwave system in the related art. For example, First Training Frame then Data Frame can be called "first the training frame, then the data frame"; Remaining Reciever can be called "other parts of the receiver"; TX SRRC can be called "root raised cosine filter at the transmitting end"; RX SRRC can be called "root raised cosine filter at the receiving end"; MSE Calc can be called "mean-square error calculation".
[0259] Figure 7 is a schematic diagram of the structure of a group delay distortion correction FIR filter according to a preferred embodiment of the present invention, such as Figure 7 As shown, the internal structure diagram of the FIR filter used for group delay distortion correction in the microwave E-band system; the automated design module provides the configuration of each tap coefficient, X represents input, and Y represents output.
[0260] Figure 8 is a constellation diagram before group delay distortion correction according to a preferred embodiment of the present invention, such as Figure 8 As shown, a constellation comparison diagram of the distorted signal relative to the original undistorted signal after group delay distortion is added in the microwave E-band system is shown;
[0261] Fig. 9 is a constellation diagram after group delay distortion correction according to a preferred embodiment of the present invention, such as Fig. 9 As shown in FIG. 1 , a constellation comparison diagram of a signal after tap coefficient correction provided by a specific embodiment of the present invention relative to an original undistorted signal is shown. By comparing the two diagrams, it is easy to see that the specific embodiment of the present invention achieves a fairly good group delay distortion correction effect.
[0262] The group delay distortion of analog filters in communication systems is ubiquitous, and the problem of group delay fluctuation under increasing bandwidth is becoming a key performance bottleneck; the traditional FIR design has many problems such as the inability to correct the signal distortion caused by group delay fluctuation, the frequency characteristics are limited by the classical model, the parameter adjustment is time-consuming and labor-intensive, and the non-automatic design; and the design method based on the original particle swarm optimization algorithm (PSO) has inherent defects such as weak global optimization ability and easy premature convergence. In the face of new needs and new problems, the present invention has the following three main features:
[0263] Correctly implemented parallelism: Different from modeling a tap of an FIR filter as a particle, due to the inherent inconsistency of the target values of each FIR tap coefficient, mutual reference or learning between particles loses the feasibility premise. Or each particle only selects part of the tap coefficients of an initially designed FIR filter to initialize itself, which violates the principle of random initialization of each particle, and because the coefficient targets initially carried by each particle are already very different, mutual reference and learning between particles lose feasibility from the beginning. The present invention models a particle as an FIR filter, and the particles (i.e., between FIRs) are completely equal, thus satisfying the correct premise of mutual reference and learning; under this premise, each particle (i.e., each FIR) can truly achieve parallel optimization iteration, thereby correctly exerting the parallel search advantage of the particle swarm algorithm.
[0264] Strong global optimization capability: In particle swarm optimization theory, the comprehensive learning particle swarm optimization algorithm (CL-PSO) itself completely overcomes the inherent defect of the original particle swarm algorithm (PSO) that it is easy to mature prematurely; at the same time, CL-PSO has a much larger potential search space than the original PSO, which means that CL-PSO has a much stronger global optimization capability than the original PSO and is more likely to find the global optimal solution; and CL-PSO's ability to solve complex multi-peak problems is more than ten times that of its ability to solve simple single-peak problems. CL-PSO is also better at solving complex signal distortion problems in actual systems.
[0265] Automated design and ease of use: The entire design process is fully automated, which greatly saves the design and parameter adjustment time of the FIR filter and the corresponding manpower. The design method of the present invention does not require the user to have professional knowledge of the classical filter model, nor does it require relevant design and model parameter adjustment experience. It is easy to master and efficiently complete the design of the FIR filter.
[0266] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0267] Embodiment 2
[0268] In the present embodiment, a kind of acquisition device of FIR filter design solution is also provided, and this device is used to realize the above-mentioned embodiment and preferred implementation mode, and what has been described is not repeated here. As used below, the term "module" can realize the combination of software and / or hardware of predetermined function. Although the device described in the following embodiments is preferably realized with software, the realization of hardware, or the combination of software and hardware is also possible and conceived.
[0269] According to another embodiment of the present invention, a device for acquiring a design solution of an FIR filter is also provided, including an establishment module for establishing a particle group using a finite-length unit impulse response FIR as a particle, wherein the particle group includes at least N particles; a setting module for setting each FIR to learn from a different model FIR in each dimension of a design solution space, wherein the design solution space is composed of a plurality of tap coefficients, each tap coefficient represents one dimension, and the model FIR is M FIRs in the particle group that meet preset conditions, where M is less than or equal to N; and M and N are positive integers; and a determination module for determining the design solution of the FIR filter based on the learning result.
[0270] According to another embodiment of the present invention, a device for acquiring an FIR filter design solution is also provided, including: a determination module, used to determine the preset index requirements of the FIR filter to be designed; an acquisition module, used to acquire the FIR filter design solution that meets the preset index requirements through a comprehensive learning particle swarm optimization algorithm CL-PSO.
[0271] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0272] Embodiment 3
[0273] According to another embodiment of the present invention, a storage medium is provided, wherein the storage medium includes a stored program, wherein the program executes the method described in any one of the above embodiments when it is run.
[0274] According to another embodiment of the present invention, a processor is provided, and the processor is used to run a program, wherein the program executes the method described in any one of the above embodiments when running.
[0275] According to another embodiment of the present invention, there is further provided an FIR filter, wherein the FIR filter is a filter designed by using an FIR filter design solution obtained by the method described in any one of the above embodiments.
[0276] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0277] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for obtaining a FIR filter design solution, It is characterized in that include: Establishing a particle swarm using a finite length unit impulse response FIR as a particle, wherein the particle swarm includes at least N particles; Each FIR is set to learn from a different model FIR in each dimension of the design solution space, wherein the design solution space is composed of a plurality of tap coefficients, each tap coefficient represents one dimension, and the model FIR is M FIRs in the particle swarm that meet preset conditions, where M is less than or equal to N; M and N are positive integers; According to the learning result, determining the design solution of the FIR filter comprises the following steps: Step 1: Generate N FIR tap coefficient vectors through the comprehensive learning particle swarm optimization algorithm CL-PSO algorithm Step 2, setting N all-zero element vectors as update speed vectors of the tap coefficient vectors of the N FIRs; Step 3, allocating learning capabilities to the N FIRs according to a first preset rule; Step 4, obtaining the fitness values fitness(n) of the N FIRs according to the tap coefficient vector; Step 5: among the N tap coefficient vectors, the tap coefficient vector of the nth FIR Assign the best historical tap coefficient vector to the nth FIR Assign the fitness(n) to the historical best fitness value recording variable pBestFit(n) of the nth FIR; set the counter intv(n) of the number of consecutive times that the historical best fitness of each FIR has not been improved to 0, where n is an integer from 1 to N; Step 6: Select the best historical tap coefficient vectors of the top M FIRs sorted from largest to smallest in the fitness value and list them in the model FIR. Assign the global optimal FIR tap coefficient vector to the record variable The Corresponding fitness(n * ) is assigned to the fitness record variable gBestFit of the global optimal FIR; Step 7: After determining that the number of times t that has been learned from the model FIR does not exceed the threshold and the current global optimal FIR fitness value gBestFit meets the preset index requirements, confirm the current global optimal FIR tap coefficient vector is a FIR design solution; when the gBestFit does not meet the preset index requirement, the t-th search inertia weight is calculated; Step 8: When it is determined that the value of the counter of the current nth FIR exceeds the threshold, in each of the N FIRs, the historical best tap coefficient vector of the nth FIR is updated according to the FIR in the canonical FIR. Step 9, in each of the N FIRs, tap by tap, obtain the update speed v of the dth tap of the nth FIR according to the second preset rule. d (n), updating the d-th tap coefficient of the n-th FIR according to the update speed; Step ten, when it is determined that the new historical best fitness value is greater than the global optimal fitness value, determining the new historical best fitness value as the new global optimal fitness value, and determining the tap coefficient vector corresponding to the new global optimal fitness value as the FIR design solution; Wherein, the step seven includes determining the search inertia weight according to one of the following methods: The parameter mode of setting the search inertia weight is adaptive mode, and the current search inertia weight of the tth time is determined according to the following formula Among them, mod(t,T) represents the remainder operation of t on T; The parameter mode of setting the search inertia weight ω is a fixed mode.
2. The method according to claim 1, It is characterized in that Before setting each FIR to learn from a different canonical FIR in each dimension of the design solution space, the method further includes: Setting the number of consecutive times of no improvement of the historical best fitness for each FIR; When the number of consecutive times without improvement is greater than a preset threshold, the canonical FIR is reselected.
3. The method according to claim 1, It is characterized in that Before setting each FIR to learn from a different canonical FIR in each dimension of the design solution space, the method further includes: Set a differentiated learning capability P for each FIR C (n), wherein the P C (n) is determined by the following formula: Wherein, n is a positive integer.
4. The method according to claim 2, It is characterized in that The reselecting of the exemplary FIR comprises repeatedly performing the following steps until all taps of the nth FIR are processed: In the nth FIR, a random number uniformly distributed in [0, 1] is generated tap by tap and the learning capacity P assigned to the nth FIR is C (n) to make comparisons; If the random number is less than the learning capacity P of the nth FIR allocation C (n), then select another first FIR with non-index n from the canonical FIR, and use the historical best tap coefficient vector of the other first FIR The d-th tap coefficient p d (k) Replace the historical best tap coefficient vector of the nth FIR The d-th tap coefficient p d (n).
5. The method according to claim 4, It is characterized in that The method further comprises: If all tap coefficients of the nth FIR If no replacement occurs, then select another second FIR with non-index n from the model FIR, and select a tap d in the other second FIR * , with the tap d * The coefficients replace the historical best tap coefficient vector of the nth FIR The d * The coefficient of the tap.
6. The method according to claim 1, It is characterized in that The step eight comprises: When it is determined that the value of the counter of the current nth FIR exceeds the threshold, a random number uniformly distributed within [0, 1] is generated corresponding to each tap d of the nth FIR, wherein the counter is used to indicate the number of times that the historical best fitness value of the nth FIR has not been improved continuously during the process of repeatedly executing steps eight to nine; When it is determined that the random number is less than the learning ability preset for the particle, a non-index n FIR in a typical FIR is selected, and the d-th tap coefficient p of the historical best tap coefficient vector of the non-index n FIR is used. d (k) Replace the historical best tap coefficient vector of the nth FIR The d-th tap coefficient p d (n), forming a new historical optimal tap coefficient vector of the nth FIR; When it is determined that the random numbers of all particles in the nth FIR are greater than the learning ability corresponding to the particle, a non-index n FIR in the canonical FIR is selected and the dth FIR in the non-index n FIR is used. * The tap coefficient replaces the dth tap coefficient vector of the best tap coefficient vector in the history of the nth FIR. * tap coefficients; The counter of the nth FIR is set to zero.
7. The method according to claim 1, It is characterized in that The step nine comprises: The update speed v of the d-th tap coefficient of the n-th FIR is updated by the following method: d (n): v d (n)'=ω t ·v d (n)+c 1 ·rnd 1 ·[p d (n)-w d (n)]+c 2 ·rnd 2 ·[g d -w d (n)]; Among them, v d (n) is the update speed before this update, v d (n)' is the update speed after this update, c 1 and c 2 are respectively the preset acceleration factors approaching the historical best tap coefficient of the nth FIR and the global optimal tap coefficient; rnd 1 andrnd 2 are all random numbers uniformly distributed within [0, 1]; ω t is the preset search inertia weight of the current t-th learning; wherein the update speed does not exceed the preset update speed limit range [V min ,V max ]; the initial value of t is 1, the number of times step eight to step nine is repeated increases by 1, and t increases by 1, p d (n) is the historical best tap coefficient vector of the nth FIR The d-th tap coefficient of d =w d (n * ), w d (n * ) is the nth * The dth tap coefficient of the FIR; Update the d-th tap coefficient w of the n-th FIR by the following formula d (n): w d (n)'=w d (n)+v d (n), where w d (n) is the tap coefficient before this update, w d (n)' is the tap coefficient after this update.
8. The method according to claim 1, It is characterized in that The method further comprises: Determine the historical best tap coefficient vector updated in step eight The corresponding second best historical fitness value; When it is determined that the fitness value corresponding to the nth FIR updated in step nine is less than or equal to the second historical best fitness value, the counter of the nth FIR is increased by 1, and the process goes to step eight.
9. The method according to claim 1, It is characterized in that After executing step nine, the method further includes one of the following: According to the N current best historical fitness of all N FIRs, sorted from large to small, the index of the top M FIRs is selected to update the model FIR; Increase the value of t by 1.
10. The method according to claim 1, It is characterized in that The step 1 comprises the following steps: Through CL-PSO according to the preset tap coefficient range [W min ,W max ] randomly generates N FIR tap coefficient vectors, where CL-PSO is used according to the [W min ,W max ]Get the update speed limit range of FIR tap coefficients [V min ,V max ].
11. The method according to claim 10, It is characterized in that The nth FIR tap coefficient vector includes the tap coefficients of all its taps.
12. The method according to claim 1, It is characterized in that The second step comprises: Set N all-zero element vectors as the tap coefficient update speed vectors of the N FIR filters Among them, the tap coefficient update speed vector of the nth FIR for Among them, the v d (n) represents the d-th tap of the n-th FIR.
13. The method according to claim 1, It is characterized in that The step three comprises: The learning capabilities are allocated to N FIRs by CL-PSO, wherein the learning capabilities of any two FIRs are different, and the value range of the learning capabilities is [0.05, 0.5].
14. The method according to claim 1, It is characterized in that The step 4 includes obtaining the fitness value of the nth FIR in the N FIRs by: The nth FIR uses the current tap coefficient vector For input distorted signal Filter and obtain the output correction signal Obtaining the correction signal Learn symbols with presets The error measure is converted into the fitness value of the nth FIR.
15. The method according to claim 1, It is characterized in that The step nine comprises: After determining that the update rate exceeds [V min ,V max ], the update speed v is adjusted in the following way d (n) Clamping:
16. The method according to claim 1, It is characterized in that Determine the updated w in step nine d (n)' exceeds the preset tap coefficient range [W min ,W max ], the updated w is re-determined by the following method d (n)': w d (n)'=w d (n)-v d (n)。 17. A device for obtaining a FIR filter design solution, It is characterized in that include: An establishing module, used for establishing a particle group using a finite length unit impulse response FIR as a particle, wherein the particle group includes at least N particles; A setting module is used to set each FIR to learn from a different model FIR in each dimension of the design solution space, wherein the design solution space is composed of a plurality of tap coefficients, each tap coefficient represents one dimension, and the model FIR is M FIRs in the particle swarm that meet the preset conditions, where M is less than or equal to N; M and N are positive integers; The determination module is used to determine the design solution of the FIR filter according to the learning result, comprising the following steps: Step 1: Generate N FIR tap coefficient vectors through the comprehensive learning particle swarm optimization algorithm CL-PSO algorithm Step 2, setting N all-zero element vectors as update speed vectors of the tap coefficient vectors of the N FIRs; Step 3, allocating learning capabilities to the N FIRs according to a first preset rule; Step 4, obtaining the fitness values fitness(n) of the N FIRs according to the tap coefficient vector; Step 5: among the N tap coefficient vectors, the tap coefficient vector of the nth FIR Assign the best historical tap coefficient vector to the nth FIR Assign the fitness(n) to the historical best fitness value recording variable pBestFit(n) of the nth FIR; set the counter intv(n) of the number of consecutive times that the historical best fitness of each FIR has not been improved to 0, where n is an integer from 1 to N; Step 6: Select the best historical tap coefficient vectors of the top M FIRs sorted from largest to smallest in the fitness value and list them in the model FIR. Assign the global optimal FIR tap coefficient vector to the record variable The Corresponding fitness(n * ) is assigned to the fitness record variable gBestFit of the global optimal FIR; Step 7: After determining that the number of times t that the model FIR has been learned does not exceed the threshold, and the current global optimal FIR fitness value gBestFit meets the preset index requirements, confirm the current global optimal FIR tap coefficient vector Design a FIR solution; when the gBestFit fails to meet the preset index requirement, calculate the t-th search inertia weight; Step 8: When it is determined that the value of the counter of the current nth FIR exceeds the threshold, in each of the N FIRs, the historical best tap coefficient vector of the nth FIR is updated according to the FIR in the canonical FIR. Step 9, in each of the N FIRs, tap by tap, obtain the update speed v of the dth tap of the nth FIR according to the second preset rule. d (n), updating the d-th tap coefficient of the n-th FIR according to the update speed; Step ten, when it is determined that the new historical best fitness value is greater than the global optimal fitness value, determining the new historical best fitness value as the new global optimal fitness value, and determining the tap coefficient vector corresponding to the new global optimal fitness value as the FIR design solution; Wherein, the step seven includes determining the search inertia weight according to one of the following methods: The parameter mode of setting the search inertia weight is adaptive mode, and the current search inertia weight of the tth time is determined according to the following formula Among them, mod(t,T) represents the remainder operation of t on T; The parameter mode of setting the search inertia weight ω is a fixed mode.
18. A storage medium, It is characterized in that The storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 16 when executed.
19. A processor, It is characterized in that The processor is used to run a program, wherein the program executes the method described in any one of claims 1 to 16 when running.
20. A FIR filter, It is characterized in that The FIR filter is a filter designed by an FIR filter design solution obtained by the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
FIR (Finite Impulse Response) filter design method and equipment thereof
CN102025344A
ISAR (Inverse Synthetic Aperture Radar) imaging method based on particle swarm optimization
CN104330799A
