WO2019051841A1 - Method for determining filter coefficient and device therefor, and terminal - Google Patents
Method for determining filter coefficient and device therefor, and terminal Download PDFInfo
- Publication number
- WO2019051841A1 WO2019051841A1 PCT/CN2017/102108 CN2017102108W WO2019051841A1 WO 2019051841 A1 WO2019051841 A1 WO 2019051841A1 CN 2017102108 W CN2017102108 W CN 2017102108W WO 2019051841 A1 WO2019051841 A1 WO 2019051841A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- filter
- filter coefficient
- training
- current
- output
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03H—IMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
- H03H17/00—Networks using digital techniques
- H03H17/02—Frequency selective networks
- H03H17/0294—Variable filters; Programmable filters
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03H—IMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
- H03H17/00—Networks using digital techniques
- H03H17/02—Frequency selective networks
- H03H17/0223—Computation saving measures; Accelerating measures
- H03H17/0227—Measures concerning the coefficients
Definitions
- the embodiments of the present application relate to the field of data processing technologies, and in particular, to a method, device, and terminal for determining filter coefficients.
- ear channel thermometers heart rate headphones and other terminal devices based on audio channel communication have been widely studied and applied.
- the traditional communication method based on the audio channel can achieve a low data transmission rate and cannot meet the application scenario of high-rate data exchange.
- one of the technical problems to be solved by the embodiments of the present invention is to provide a method for determining filter coefficients, a device thereof, and a terminal for overcoming or relieving the above-mentioned defects in the prior art.
- An embodiment of the present application provides a method for determining a filter coefficient, including:
- the current filter coefficient is corrected to determine the filter coefficient at the next moment
- the current filter coefficient is directly used as the filter coefficient of the next time.
- modifying the current filter coefficient to determine a filter coefficient at a next moment includes:
- the current filter coefficient is modified according to the correction amount of the current filter coefficient to determine a filter coefficient at a next moment.
- the method before determining the estimated output of the filter according to the input signal of the current time filter, the method further includes: according to a predetermined training sequence and the filter in the filter coefficient training phase The input signal determines the current filter coefficient used when filtering the input signal at the current moment of the filter.
- determining, according to a predetermined training sequence and an input signal of the filter, a current filter coefficient used when performing filtering processing on an input signal of a current time of the filter includes:
- the method further includes: if training is needed, determining whether the accumulated number of times of training exceeds a predetermined threshold of training times, and if not, jumping to a predetermined training sequence Sampling yields the target output of the filter at the filter coefficient training stage to continue training.
- the training ends.
- the training sequence is a random sequence or a pseudo random sequence.
- the training sequence is selected from a data stream obtained by decoding an estimated output of the filter in a filtering stage.
- whether the current filter coefficient needs to be corrected is indicated by a predetermined correction flag.
- the predetermined training flag is used to indicate whether training is needed to obtain the current filter coefficient.
- An embodiment of the present application provides an apparatus for determining a filter coefficient, including:
- a filter configured to determine an estimated output of the filter according to an input signal of a current moment of the filter
- An output error determining module configured to determine an output error of the filter according to a target output of the filter and an estimated output
- a filter coefficient determining module configured to determine, according to an output error of the filter and a predetermined first threshold, whether the current filter coefficient needs to be corrected, and if it is determined that the current filter coefficient needs to be corrected, the current filtering is performed The coefficient is modified to determine the filter coefficient at the next moment. If it is determined that the current filter coefficient does not need to be corrected, the current filter coefficient is directly used as the filter coefficient of the next moment.
- the filter coefficient determining module includes:
- a revision amount determining unit configured to determine a correction amount of the current filter coefficient
- a correction unit configured to modify the current filter coefficient according to the correction amount of the current filter coefficient to determine a filter coefficient at a next moment.
- the method further includes: a training module, configured to determine, at a filter coefficient training stage, an input signal to a current moment of the filter according to a predetermined training sequence and an input signal of the filter The current filter coefficients used in the filtering process.
- a training module configured to determine, at a filter coefficient training stage, an input signal to a current moment of the filter according to a predetermined training sequence and an input signal of the filter The current filter coefficients used in the filtering process.
- the training module includes:
- a target output determining unit configured to sample a predetermined training sequence to obtain a target output of the filter in a filter coefficient training phase
- An estimated output determining unit configured to determine an estimated output of the filter during a filter coefficient training phase according to an input signal of the filter in a filter coefficient training phase
- An output error determining unit configured to determine an output error of the filter in a filter coefficient training phase according to a target output of the filter in a filter coefficient training phase and an estimated output of the filter in a filter coefficient training phase ;
- a filter coefficient determining unit configured to determine whether training is required according to an output error of the filter in the filter coefficient training phase and a predetermined second threshold, and if so, performing training to obtain an input signal of a current time of the filter The current filter coefficient used in the filtering process.
- the method further includes: a training number determining module, configured to determine, when training is needed, whether the accumulated number of times of training exceeds a predetermined threshold of training times, and if not, the target The output determination unit continues to sample the predetermined training sequence to obtain a target output of the filter during the filter coefficient training phase to continue training.
- a training number determining module configured to determine, when training is needed, whether the accumulated number of times of training exceeds a predetermined threshold of training times, and if not, the target The output determination unit continues to sample the predetermined training sequence to obtain a target output of the filter during the filter coefficient training phase to continue training.
- An embodiment of the present application provides a terminal, including: a processor and a filter, where:
- the filter is configured to determine an estimated output of the filter according to an input signal of the current moment
- the processor is configured to sample the received analog signal to obtain a sampling signal and use it as an input signal of the current moment of the filter;
- the processor is further configured to determine an output error of the filter according to a target output of the filter and an estimated output, and determine whether a current filter is needed according to an output error of the filter and a predetermined first threshold.
- the coefficient is corrected
- the processor is further configured to: when the current filter coefficient needs to be corrected, correct the current filter coefficient to determine a filter coefficient at a next moment;
- the processor is further configured to directly use the current filter coefficient as the filter coefficient of the next moment when it is determined that the current filter coefficient does not need to be corrected.
- the filter is further configured to perform filtering processing on an input signal of the filter at a next moment according to a filter coefficient at a next moment.
- the processor is further configured to perform synchronous frame header detection, Manchester decoding, and cyclic redundancy check processing on the estimated output of the filter.
- the estimated output of the filter is determined according to an input signal of a current moment of the filter; and the determined output is determined according to a target output of the filter and an estimated output.
- An output error of the filter determining, according to the output error of the filter and the predetermined first threshold, whether the current filter coefficient needs to be corrected; if it is determined that the current filter coefficient needs to be corrected, the current filter is The coefficient is modified to determine the filter coefficient at the next moment; if it is determined that the current filter coefficient does not need to be corrected, the current filter coefficient is directly used as the filter coefficient of the next moment, so that the filtering process can be implemented according to
- the change of the data transmission channel adaptively corrects the current filter coefficients to completely filter out the interference or filter out the interference as much as possible, thereby ensuring a high decoding success rate, and finally achieving high-speed, high-reliability communication.
- FIG. 1 is a schematic structural diagram of a communication system according to Embodiment 1 of the present application.
- Embodiment 2 is a schematic flowchart of processing an original signal by a lower computer in Embodiment 2 of the present application;
- FIG. 3 is a schematic diagram of the principle of encoding in the third embodiment of the present application.
- FIG. 4 is a schematic diagram showing the working flow of a second communication terminal as a host computer in Embodiment 4 of the present application;
- FIG. 5 is a schematic diagram of a filtering process in Embodiment 5 of the present application.
- FIG. 6 is a block diagram of filtering in Embodiment 6 of the present application.
- Embodiment 7 is a schematic diagram of a training process in Embodiment 7 of the present application.
- Embodiment 8 is a schematic diagram of determining a filter coefficient according to Embodiment 8 of the present application.
- FIG. 9 is a schematic structural diagram of an apparatus for determining a filter coefficient in Embodiment 9 of the present application.
- FIG. 10 is a schematic structural diagram of a terminal in Embodiment 10 of the present application.
- the estimated output of the filter is determined according to an input signal of a current moment of the filter; and an output error of the filter is determined according to a target output of the filter and an estimated output. And determining, according to the output error of the filter and the predetermined first threshold, whether the current filter coefficient needs to be corrected; if it is determined that the current filter coefficient needs to be corrected, correcting the current filter coefficient to determine The filter coefficient of the next time; if it is determined that the current filter coefficient does not need to be corrected, the current filter coefficient is directly used as the filter coefficient of the next time. For example, when the audio channel changes, the signal-to-noise ratio and channel nonlinearity will change.
- the estimated output of the filter changes, further causing the output error of the filter to change, and then determining whether to correct the current filter coefficient according to the output error of the filter and the predetermined first threshold. Specifically, for example, when the statistical value of the output error of the filter exceeds the first threshold, it is determined that the current filter coefficient needs to be corrected to determine the filter coefficient at the next moment, and the filtering is performed according to the next moment in the filtering phase.
- the coefficients are filtered to achieve complete filtering of interference or to filter out interference as much as possible, so that the target output of the filter is as consistent as possible with the estimated output, ensuring a high decoding success rate, and finally achieving high-speed, high-reliability communication. .
- the heart rate earphone is used as the first communication terminal
- the smart phone is the second communication terminal
- the original signal is the original heart rate signal as an example for description.
- the first communication terminal and the second communication terminal transmit signals through the audio channel.
- the audio channel may specifically include an audio interface and an audio line.
- the filter coefficients are adaptively modified, thereby improving the demodulation success rate and achieving the required filtering requirements. Thorough filtering of interference.
- the technical solution of the present application can be applied to any occasion requiring data processing, such as an ear thermometer and a smart terminal.
- a specific communication system to which the filter coefficient adjustment method of the present application is applied is first briefly described as an example.
- filtering is only part of the process, and the analog signal is obtained after sampling, encoding, etc. before filtering, and after decoding, decoding is performed to obtain the decoded bit stream for use by the application. See the example description below.
- the communication system includes: a first communication terminal, a second communication terminal, and a filter.
- the first communication terminal 101 is illustratively a heart rate.
- the earphone in a specific application, the heart rate earphone as the lower computer, the second communication terminal 102 is illustratively an intelligent terminal, and the heart rate earphone cooperates with the intelligent terminal to achieve the purpose of heart rate detection, wherein the smart terminal is configured with a filter, see the figure 1.
- the first communication terminal is configured to acquire an original signal, process the original signal to obtain an analog signal, and transmit the analog signal to the second communication terminal; as described above, since the first communication terminal is a heart rate earphone Therefore, in this embodiment, the original signal is specifically a heart rate original signal, and the analog signal is specifically a heart rate analog signal.
- the first communication terminal ie, the heart rate earphone
- the first communication terminal processes the heart rate original signal to obtain a heart rate analog signal
- FIG. 2 which is the lower machine pair original signal in the second embodiment of the present application.
- Schematic diagram of the processing flow as shown in Figure 2, it specifically includes:
- each data packet when the first communication terminal performs group packet processing on the original signal, each data packet includes a synchronization frame header, a data field, and a cyclic redundancy check bit.
- the synchronization frame header is used as a smart phone of the upper computer to detect a data packet.
- the host computer When the sync frame header is detected, it is considered that a new data packet is detected before the subsequent decoding process can be started.
- the data fields may vary in different application environments, and may include data types, data lengths, packet serial numbers, and actual data.
- the first communication terminal uses the Manchester code to encode the original signal after the packet processing.
- FIG. 3 is a schematic diagram of the principle of coding in the third embodiment of the present application.
- the original signal "0" after the packet processing is mapped to "10", and the original signal "1” is mapped to "01".
- the transmission time occupied by the corresponding bit of each original signal is T, and the bit time corresponding to each original signal after encoding is T/2, and the data transmission rate is 1/T bps.
- the bit “0" corresponds to the first analog level
- the bit “1” corresponds to the second analog level.
- the first analog level is -V
- the second analog level is +V
- V represents the level of the level.
- Processing by the second communication terminal samples the analog signal to obtain a sampling signal and transmits the sampling signal to a filter as an input signal of the filter; the filter is configured to determine the filtering according to an input signal of the filter.
- the estimated output of the second communications terminal is further configured to determine an output error of the filter based on a target output of the filter and an estimated output, and further based on an output error of the filter and a predetermined a first threshold, determining whether correction of the current filter coefficient is needed; if yes, correcting the current filter coefficient to determine a filter coefficient at a next moment;
- the filter is configured to filter the input signal of the filter at the next moment according to the filter coefficient at the next moment.
- FIG. 4 it is a schematic diagram of a working process of a second communication terminal as a host computer in Embodiment 4 of the present application; as shown in FIG. 4, it includes:
- the sampling parameters such as the sampling frequency and the data bit width are different depending on the application scenario.
- the filter performs filtering processing on the sampling signal.
- the filter is an FIR band-pass filter. If the current filter needs to be corrected during filtering, the host computer corrects the current filter coefficient to obtain the filter coefficient at the next moment, and the filter is based on the next filter. The filter coefficient at a moment filters the input signal at the next moment of the filter.
- the detailed filtering process can be seen in Figure 5 below.
- step S404 it is determined whether the synchronization frame header is detected, and if so, step S405 is performed, and if not, then the process proceeds to step S401;
- the data of a certain length after the synchronization frame header is transmitted to the processing of step S405.
- a certain length should be sufficient to cover the entire packet, especially the data field. If the sync frame header is not detected, it jumps to step S401 to perform the next round of processing.
- this step S405 performs the processing process opposite to the above encoding, from The decoded bit stream is obtained.
- the cyclic redundancy check process performs error detection on the decoded bit stream.
- the application program may refer to an application installed on the electronic terminal in conjunction with the ear thermometer and the heart rate earphone.
- the estimated output of the filter is the signal actually output by the filter after the filtering process.
- the application determines the heart rate value calculation and the like based on the cyclic redundancy check result and the decoded bit stream.
- FIG. 5 it is a schematic diagram of a filtering process in Embodiment 5 of the present application; as shown in FIG. 6, is a block diagram of filtering in Embodiment 6 of the present application; as shown in FIG. 5 and FIG. 6, the following S501- S504 is a method for determining a filter coefficient or a correction algorithm.
- the current filter coefficient can be continuously trained according to a predetermined training sequence and an input signal of the filter. For details, refer to the following.
- Figure 7 shows.
- the current filter coefficient may be obtained by real-time training the initial filter coefficients according to a predetermined training sequence and an input signal of the filter, or may be obtained by using a training process before use.
- Existing current filter coefficients For example, in a scenario, after the application restarts, the audio channel changes. If the filtering process is to be started, the initial filter coefficients need to be trained in real time to obtain the current filter coefficients; if only the application is paused, the audio is The channel does not change, and the initial filter coefficients need not be trained in real time to obtain the current filter, but only continue to use the current filter coefficients existing before the pause.
- the specific filtering process is as follows:
- S501 Determine an estimated output of the filter according to a current filter coefficient and an input signal of the filter.
- the input signal x(n) at time n includes the target output d(n) of the filter and the interference noise v(n), as shown in the formula (1):
- W n represents the coefficient of the p-th order filter
- the formula (2) represents the filter coefficient of the p-th order filter:
- W n [ ⁇ n (0), ⁇ n (1), ..., ⁇ n (P)] T (2).
- X(n) [x(n), x(n-1), ..., x n (np)] T .
- the output error e(n) of the filter is the difference between its target output and the estimated output, ie, as in equation (4):
- the magnitude of the output error e(n) reflects the proximity of the estimated output to the target output.
- the degree for example, in a specific application scenario, if e(n) is smaller, it indicates that the estimated output is closer to the target output.
- the target output d(n) can be obtained by pseudo-sampling the input signal x(n).
- step S503 Determine, according to the output error of the filter and the predetermined first threshold, whether the current filter coefficient needs to be corrected; if yes, execute step S504; if not, execute step S506: directly use the current filter coefficient as The filter coefficient of the next moment determines whether the communication between the upper computer and the lower computer ends. If not, the process goes to step S501 to continue processing the next input signal;
- the filter coefficient when it is determined whether the current filter coefficient needs to be corrected, whether the statistical value of the output error of the filter exceeds a predetermined first threshold is determined, and if yes, the current filter coefficient needs to be performed. Corrected.
- the size of the first threshold may be adjusted according to the filtering accuracy requirement. If the estimated output is to be as consistent as possible with the target output, the first threshold may be smaller, otherwise the first threshold may be larger.
- a cost function ⁇ (n) may be defined according to the following formula (5).
- the value of the cost function is used as a statistical value of the output error. The smaller the statistical value, the closer the estimated output is to the target output.
- the statistical value of the output error is obtained by performing a square sum of the output errors.
- the sum of the absolute values of the output errors may also be statistically derived to obtain a statistical value of the output error.
- the least squares method is taken as an example for description. In other embodiments, a least mean square (LMS) and a lattice algorithm may also be used.
- LMS least mean square
- lattice algorithm may also be used.
- the correction amount ⁇ W n of the current filter coefficient may be specifically calculated according to the input signal X(n) and the output error e(n), and is calculated according to the input signal X(n) and the output error e(n).
- the technical processing of the correction amount ⁇ W n is already in the prior art and will not be described here.
- the filter performs filtering processing on the input signal of the filter at the next moment according to the filter coefficient at the next moment.
- the input signal is used for filtering.
- step S501 to step S504 in this embodiment can also be understood as a flow of adaptively correcting the filter coefficients.
- the filter coefficients of the next time are determined as a whole according to the above steps S503 and S504.
- the process of training the initial filter coefficients to obtain the current filter coefficients can be as shown in FIG.
- FIG. 7 it is a schematic diagram of a training process in the seventh embodiment of the present application.
- the initial filter coefficients are trained according to a predetermined training sequence and an input signal of the filter in the training phase to obtain a current filter coefficient. Specifically, it includes the following steps:
- a specific value is directly given to the current filter coefficient to complete initialization, and an initial filter coefficient is obtained.
- the predetermined training sequence is sampled and the predetermined training sequence is sampled to obtain a target output of the filter in the training phase.
- the training sequence is a random sequence or a pseudo random sequence.
- the training sequence is selected from a data stream obtained by decoding an estimated output of the filter during a filtering phase. For example, the decoded bit stream obtained by the synchronization frame header detection and decoding is processed for the previous filtering loop.
- the target output D(n) for the training process is obtained by pseudo-sampling the modulated signal of the training sequence S(n).
- the sampling frequency used may be the same as the actual sampling frequency of the upper computer.
- the host computer samples the received analog signal to obtain a sampling signal and uses it as an input signal of the filter in the training phase;
- the sampling frequency of the upper computer is the same as the sampling frequency used for the target signal of the filter obtained in the above step S702.
- S704. Determine an estimated output of the filter in a training phase according to an initial filter coefficient of the filter and an input signal of the filter in a filter coefficient training phase.
- the estimated output of the filter is obtained by referring to the following formula (6).
- S705. Determine an output error of the filter in a filter coefficient training phase according to a target output of the filter in a filter coefficient training phase and an estimated output of the filter in a filter coefficient training phase.
- the initial filter coefficient when it is determined whether the initial filter coefficient needs to be trained, whether the statistical value of the output error of the filter exceeds a predetermined second threshold according to the training phase is determined, and if yes, the initial filter is needed.
- the coefficients are trained.
- the size of the second threshold may be determined according to historical empirical data, or may be flexibly adjusted according to the requirements of filtering accuracy.
- the second threshold may be the same as or different from the first threshold.
- the second threshold is specifically smaller than the first threshold.
- the correction amount ⁇ W n ' of the initial filter coefficient may be specifically calculated according to the input signal x(n) of the filter and the output error E(n), for example, the input signal X(n) and the output.
- the error E(n) applies a least mean square (LMS) or a recursive least square (RLS) to calculate the correction amount ⁇ W n '.
- LMS least mean square
- RLS recursive least square
- the initial filter coefficient W n ' refers to the initializing filter coefficient obtained at the time of initial initialization, and after at least one training process, refers to the modified initializing filter coefficient.
- step S709 Determine whether the accumulated number of times of training exceeds a predetermined threshold of training times. If not, go to step S702 to continue to correct the initial filter coefficients; if the accumulated number of times of training exceeds a predetermined threshold of training times, Then the training of the initial filter coefficients is ended.
- the training process shown in FIG. 7 above can also be understood as a process of continuously correcting the initial filter coefficients to obtain the current filter coefficients before the filter performs filtering.
- FIG. 8 is a schematic diagram of determining filter coefficients in the eighth embodiment of the present application.
- the training flag If the value of the training flag is set to 1, it indicates that the training process needs to be performed. If the value of the training flag is set to 0, the training process does not need to be performed;
- the training flag is 1, and when the application is paused, the training flag is 0.
- step S802 determining, according to the training flag, whether the training process needs to be performed, for example, the value of the training flag is 1, and performing the step S803 after performing the training process of the above steps S701-S709; otherwise, directly performing step S803;
- sampling signal obtained by sampling the analog signal is used as an input signal of the filter
- the filtered signal is the estimated output of the filter.
- step S804 determining an output error of the filter and determining whether a statistical value of an output error of the filter exceeds a predetermined first threshold; if not, executing step S805; if yes, setting a correction flag flag to 1 And performing the above step S504, after which, go to step S805 again;
- the value of the application flag bit can be specifically obtained and the communication between the upper computer and the lower computer is terminated according to the value of the application flag. For example, if the application flag bit is 1, the end is indicated.
- a training flag bit and a correction flag bit are set.
- the training flag bit is used to indicate whether the initial filter coefficient needs to be trained during the training process, and the correction flag bit is used to indicate whether it needs to be current in the filtering process.
- the filter coefficients are corrected.
- the training flag bits may also be multiplexed to indicate whether the current filter coefficients need to be corrected during the filtering process, that is, the training flag bits are simultaneously multiplexed into the modified flag bits.
- the first communication terminal is a host computer
- the second communication terminal is a lower computer
- the first communication terminal includes the filter
- the detailed communication process is similar to the embodiment shown in FIG. 1 above. .
- the filter may be a digital filter.
- FIG. 9 is a schematic structural diagram of an apparatus for determining a filter coefficient according to Embodiment 9 of the present application; as shown in FIG. 9, an estimated output of the filter is determined by a filter 901 according to an input signal of a current moment of a filter; and a filter coefficient is determined.
- the output error determination module 902 and the filter coefficient determination module 903 included in the apparatus are as follows:
- An output error determining module 902 configured to determine an output error of the filter according to a target output of the filter and an estimated output;
- the filter coefficient determining module 903 is configured to determine, according to the output error of the filter and the predetermined first threshold, whether the current filter coefficient needs to be corrected, and if it is determined that the current filter coefficient needs to be corrected, the current The filter coefficients are corrected to determine the filter coefficients at the next moment. If it is determined that the current filter coefficients need not be corrected, the current filter coefficients are directly used as the filter coefficients of the next moment.
- the filter coefficient determining module 903 includes:
- a revision amount determining unit configured to determine a correction amount of the current filter coefficient
- a correction unit configured to modify the current filter coefficient according to the correction amount of the current filter coefficient to determine a filter coefficient at a next moment.
- the method further includes: a training module, configured to determine, according to a predetermined training sequence and an input signal of the filter, a filter processing on an input signal of a current moment of the filter in a filter coefficient training phase The current filter coefficient to use.
- a training module configured to determine, according to a predetermined training sequence and an input signal of the filter, a filter processing on an input signal of a current moment of the filter in a filter coefficient training phase The current filter coefficient to use.
- the training module includes:
- a target output determining unit configured to sample a predetermined training sequence to obtain a target output of the filter in a filter coefficient training phase
- An estimated output determining unit configured to determine an estimated output of the filter during a filter coefficient training phase according to an input signal of the filter
- An output error determining unit configured to determine an output error of the filter in a filter coefficient training phase according to a target output of the filter in a filter coefficient training phase and an estimated output of the filter in a filter coefficient training phase;
- a filter coefficient determining unit configured to determine whether training is required according to an output error of the filter in the filter coefficient training phase and a predetermined second threshold, and if so, performing training to obtain an input signal of a current time of the filter The current filter coefficient used in the filtering process.
- the estimated output determining unit may reuse the above estimation.
- the output output determining unit may multiplex the output error determining module, and the filter coefficient determining unit may multiplex the filter coefficient determining unit.
- the method further includes: a training number determining module, configured to determine, when training is needed, whether the accumulated number of times of training exceeds a predetermined threshold of training times, and if not, jump to a predetermined The training sequence is sampled to obtain the target output of the filter during the filter coefficient training phase to continue training.
- a training number determining module configured to determine, when training is needed, whether the accumulated number of times of training exceeds a predetermined threshold of training times, and if not, jump to a predetermined The training sequence is sampled to obtain the target output of the filter during the filter coefficient training phase to continue training.
- FIG. 10 is a schematic structural diagram of a terminal in Embodiment 10 of the present application; as shown in FIG. 10, it includes: a filter 1001 and a processor 1002, where:
- the filter 1001 is configured to determine an estimated output of the filter according to an input signal of a current moment of the filter;
- the processor 1002 is configured to sample the received analog signal to obtain a sampling signal and use it as an input signal of the current moment of the filter;
- the processor 1002 is further configured to determine an output error of the filter according to a target output and an estimated output of the filter, and determine, according to an output error of the filter and a predetermined first threshold, whether current filtering is needed. Correction of the coefficient of the device;
- the processor 1002 is further configured to: when determining that the current filter coefficient needs to be corrected, correct the current filter coefficient to determine a filter coefficient at a next moment;
- the processor 1002 is further configured to directly use the current filter coefficient as the filter coefficient of the next moment when it is determined that the current filter coefficient does not need to be corrected.
- the filter 1001 is further configured to perform filtering processing on an input signal of the filter at a next moment according to a filter coefficient at a next moment.
- the processor 1002 is further configured to perform synchronous frame header detection, Manchester decoding, and cyclic redundancy check processing on the estimated output of the filter.
- the device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, ie may be located A place, or it can be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
- a machine-readable medium includes read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , an infrared signal, a digital signal, etc., etc., the computer software product comprising instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the various embodiments or portions of the embodiments described Methods.
- ROM read only memory
- RAM random access memory
- magnetic disk storage media e.g., magnetic disks, magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , an infrared signal, a digital signal, etc., etc.
- the computer software product comprising instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the various embodiments or portions of the embodiment
- embodiments of the embodiments of the invention may be provided as a method, apparatus (device), or computer program product.
- embodiments of the invention may be in the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
- embodiments of the invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
- Embodiments of the invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
- These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Filters That Use Time-Delay Elements (AREA)
Abstract
Provided are a method for determining a filter coefficient and device therefor, and a terminal. The method for determining a filter coefficient comprises: determining an estimated output of the filter according to an input signal of the filter at the current moment; determining an output error of the filter according to a target output and an estimated output of the filter; determining, according to the output error of the filter and a pre-determined first threshold, whether the current filter coefficient needs to be corrected; if it is determined that the current filter coefficient needs to be corrected, correcting the current filter coefficient to determine the filter coefficient at the next moment; and if it is determined that the current filter coefficient does not need to be corrected, directly using the current filter coefficient as the filter coefficient of the next moment, and thereby completely filtering out the interference or filtering out the interference to the greatest possible extent during filtering.
Description
本申请实施例涉及数据处理技术领域,尤其涉及确定滤波器系数的方法及其装置、终端。The embodiments of the present application relate to the field of data processing technologies, and in particular, to a method, device, and terminal for determining filter coefficients.
随着智能医疗技术的发展,耳式温度计、心率耳机等基于音频通道通讯的终端设备得到广泛的研究和应用。基于音频通道的传统通讯方法能够达到的数据传输速率较低,无法满足高速率数据交换的应用场景。With the development of smart medical technology, ear channel thermometers, heart rate headphones and other terminal devices based on audio channel communication have been widely studied and applied. The traditional communication method based on the audio channel can achieve a low data transmission rate and cannot meet the application scenario of high-rate data exchange.
为此,需要考虑基于音频信道的高速率、高可靠性通讯方法。而为了实现高速率、高可靠性通讯,如何保证较高解码成功率尤为重要,而解码成功率的高低与信道噪声和信道非线性因素导致的干扰相关,信道噪声和信道非线性因素导致的干扰被过滤的越彻底,解码成功率越高。尤其对于不同的音频信道,信号的信噪比和信道非线性也会随之变化,比如在手机上利用音频应用程序播放音乐时选择不同音效播放,会导致音频通道发生变化,如果滤波器系数通常固定不变,则难以实现干扰的彻底过滤,从而难以保证较高的解码成功率,进而难以实现高速率及高可靠性的通讯,无法满足高速率数据交换的应用场景。To this end, it is necessary to consider a high-rate, high-reliability communication method based on an audio channel. In order to achieve high-speed, high-reliability communication, how to ensure higher decoding success rate is especially important, and the decoding success rate is related to interference caused by channel noise and channel nonlinear factors, channel noise and channel nonlinear factors. The more thoroughly filtered, the higher the decoding success rate. Especially for different audio channels, the signal-to-noise ratio and channel nonlinearity of the signal will also change. For example, when playing music on the mobile phone with an audio application, selecting different sound effects will cause the audio channel to change, if the filter coefficient is usually If it is fixed, it is difficult to achieve thorough filtering of interference, which makes it difficult to ensure a high decoding success rate, and thus it is difficult to achieve high-speed and high-reliability communication, and cannot meet the application scenario of high-rate data exchange.
发明内容Summary of the invention
有鉴于此,本发明实施例所解决的技术问题之一在于提供一种确定滤波器系数的方法及其装置、终端,用以克服或者缓解现有技术中的上述缺陷。In view of this, one of the technical problems to be solved by the embodiments of the present invention is to provide a method for determining filter coefficients, a device thereof, and a terminal for overcoming or relieving the above-mentioned defects in the prior art.
本申请实施例提供一种确定滤波器系数的方法,其包括:An embodiment of the present application provides a method for determining a filter coefficient, including:
根据滤波器当前时刻的输入信号,确定所述滤波器的估计输出;Determining an estimated output of the filter based on an input signal at a current moment of the filter;
根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差;Determining an output error of the filter based on a target output of the filter and an estimated output;
根据所述滤波器的输出误差以及预定的第一阈值,判断是否需要对当前滤波器系数进行修正;Determining whether the current filter coefficient needs to be corrected according to an output error of the filter and a predetermined first threshold;
若判定需要对当前滤波器系数进行修正,则对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数;If it is determined that the current filter coefficient needs to be corrected, the current filter coefficient is corrected to determine the filter coefficient at the next moment;
若判定不需要对当前滤波器系数进行修正,则将当前滤波器系数直接作为下一时刻的滤波器系数。If it is determined that the current filter coefficient does not need to be corrected, the current filter coefficient is directly used as the filter coefficient of the next time.
可选地,在本申请的一实施例中,对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数包括:Optionally, in an embodiment of the present application, modifying the current filter coefficient to determine a filter coefficient at a next moment includes:
确定所述当前滤波器系数的修正量;Determining a correction amount of the current filter coefficient;
根据所述当前滤波器系数的修正量对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数。
The current filter coefficient is modified according to the correction amount of the current filter coefficient to determine a filter coefficient at a next moment.
可选地,在本申请的一实施例中,根据当前时刻滤波器的输入信号,确定所述滤波器的估计输出之前还包括:在滤波器系数训练阶段根据预定的训练序列以及所述滤波器的输入信号,确定对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。Optionally, in an embodiment of the present application, before determining the estimated output of the filter according to the input signal of the current time filter, the method further includes: according to a predetermined training sequence and the filter in the filter coefficient training phase The input signal determines the current filter coefficient used when filtering the input signal at the current moment of the filter.
可选地,在本申请的一实施例中,根据预定的训练序列以及所述滤波器的输入信号,确定对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数包括:Optionally, in an embodiment of the present application, determining, according to a predetermined training sequence and an input signal of the filter, a current filter coefficient used when performing filtering processing on an input signal of a current time of the filter includes:
对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出;Sampling a predetermined training sequence to obtain a target output of the filter during a filter coefficient training phase;
根据在滤波器系数训练阶段所述滤波器的输入信号,确定在滤波器系数训练阶段所述滤波器的估计输出;Determining an estimated output of the filter during a filter coefficient training phase based on an input signal of the filter in a filter coefficient training phase;
根据在滤波器系数训练阶段所述滤波器的目标输出以及滤波器系数训练阶段所述滤波器的估计输出,确定在滤波器系数训练阶段所述滤波器的输出误差;Determining an output error of the filter in a filter coefficient training phase according to a target output of the filter in a filter coefficient training phase and an estimated output of the filter in a filter coefficient training phase;
根据在滤波器系数训练阶段所述滤波器的输出误差以及预定的第二阈值,判断是否需要进行训练,若是,则进行训练得到对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。Determining whether training is required according to the output error of the filter in the filter coefficient training phase and the predetermined second threshold, and if so, training to obtain a current filter used for filtering the input signal of the current time of the filter coefficient.
可选地,在本申请的一实施例中,还包括:若需要进行训练,则判断已训练的累计次数是否超过预定的训练次数门限,若未超过,则跳转到对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出,以继续进行训练。Optionally, in an embodiment of the present application, the method further includes: if training is needed, determining whether the accumulated number of times of training exceeds a predetermined threshold of training times, and if not, jumping to a predetermined training sequence Sampling yields the target output of the filter at the filter coefficient training stage to continue training.
可选地,在本申请的一实施例中,若已训练的累计次数超过预定的训练次数门限,则结束训练。Optionally, in an embodiment of the present application, if the accumulated number of times of training exceeds a predetermined threshold of training times, the training ends.
可选地,在本申请的一实施例中,所述训练序列为随机序列或伪随机序列。Optionally, in an embodiment of the application, the training sequence is a random sequence or a pseudo random sequence.
可选地,在本申请的一实施例中,所述训练序列选自对所述滤波器在滤波阶段的估计输出进行解码得到的数据流。Optionally, in an embodiment of the present application, the training sequence is selected from a data stream obtained by decoding an estimated output of the filter in a filtering stage.
可选地,在本申请的一实施例中,通过预定的修正标志位标示是否需要对当前滤波器系数进行修正。Optionally, in an embodiment of the present application, whether the current filter coefficient needs to be corrected is indicated by a predetermined correction flag.
可选地,在本申请的一实施例中,通过预定的训练标志位标示是否需要进行训练得到当前滤波器系数。Optionally, in an embodiment of the present application, the predetermined training flag is used to indicate whether training is needed to obtain the current filter coefficient.
本申请实施例提供一种确定滤波器系数的装置,其包括:An embodiment of the present application provides an apparatus for determining a filter coefficient, including:
滤波器,用于根据滤波器当前时刻的输入信号,确定所述滤波器的估计输出;a filter, configured to determine an estimated output of the filter according to an input signal of a current moment of the filter;
输出误差确定模块,用于根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差;An output error determining module, configured to determine an output error of the filter according to a target output of the filter and an estimated output;
滤波器系数确定模块,用于根据所述滤波器的输出误差以及预定的第一阈值判断是否需要对当前滤波器系数进行修正,若判定需要对当前滤波器系数进行修正,则对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数,若判定不需要对当前滤波器系数进行修正,则将当前滤波器系数直接作为下一时刻的滤波器系数。a filter coefficient determining module, configured to determine, according to an output error of the filter and a predetermined first threshold, whether the current filter coefficient needs to be corrected, and if it is determined that the current filter coefficient needs to be corrected, the current filtering is performed The coefficient is modified to determine the filter coefficient at the next moment. If it is determined that the current filter coefficient does not need to be corrected, the current filter coefficient is directly used as the filter coefficient of the next moment.
可选地,在本申请的一实施例中,滤波器系数确定模块包括:
Optionally, in an embodiment of the application, the filter coefficient determining module includes:
修订量确定单元,用于确定所述当前滤波器系数的修正量;a revision amount determining unit, configured to determine a correction amount of the current filter coefficient;
修正单元,用于根据所述当前滤波器系数的修正量对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数。And a correction unit, configured to modify the current filter coefficient according to the correction amount of the current filter coefficient to determine a filter coefficient at a next moment.
可选地,在本申请的一实施例中,还包括:训练模块,用于在滤波器系数训练阶段根据预定的训练序列以及所述滤波器的输入信号,确定对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。Optionally, in an embodiment of the present application, the method further includes: a training module, configured to determine, at a filter coefficient training stage, an input signal to a current moment of the filter according to a predetermined training sequence and an input signal of the filter The current filter coefficients used in the filtering process.
可选地,在本申请的一实施例中,所述训练模块包括:Optionally, in an embodiment of the application, the training module includes:
目标输出确定单元,用于对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出;a target output determining unit, configured to sample a predetermined training sequence to obtain a target output of the filter in a filter coefficient training phase;
估计输出确定单元,用于根据在滤波器系数训练阶段所述滤波器的输入信号,确定在滤波器系数训练阶段所述滤波器的估计输出;An estimated output determining unit configured to determine an estimated output of the filter during a filter coefficient training phase according to an input signal of the filter in a filter coefficient training phase;
输出误差确定单元,用于根据在滤波器系数训练阶段所述滤波器的目标输出以及在滤波器系数训练阶段所述滤波器的估计输出,确定在滤波器系数训练阶段所述滤波器的输出误差;An output error determining unit configured to determine an output error of the filter in a filter coefficient training phase according to a target output of the filter in a filter coefficient training phase and an estimated output of the filter in a filter coefficient training phase ;
滤波器系数确定单元,用于根据在滤波器系数训练阶段所述滤波器的输出误差以及预定的第二阈值,判断是否需要进行训练,若是,则进行训练得到对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。a filter coefficient determining unit, configured to determine whether training is required according to an output error of the filter in the filter coefficient training phase and a predetermined second threshold, and if so, performing training to obtain an input signal of a current time of the filter The current filter coefficient used in the filtering process.
可选地,在本申请的一实施例中,还包括:训练次数判断模块,用于当需要进行训练时判断已训练的累计次数是否超过预定的训练次数门限,若未超过,则所述目标输出确定单元继续对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出,以继续进行训练。Optionally, in an embodiment of the present application, the method further includes: a training number determining module, configured to determine, when training is needed, whether the accumulated number of times of training exceeds a predetermined threshold of training times, and if not, the target The output determination unit continues to sample the predetermined training sequence to obtain a target output of the filter during the filter coefficient training phase to continue training.
本申请实施例提供一种终端,其包括:处理器以及滤波器,其中:An embodiment of the present application provides a terminal, including: a processor and a filter, where:
所述滤波器用于根据所述当前时刻的输入信号,确定所述滤波器的估计输出;The filter is configured to determine an estimated output of the filter according to an input signal of the current moment;
所述处理器用于对接收的模拟信号进行采样得到采样信号并将其作为所述滤波器当前时刻的输入信号;The processor is configured to sample the received analog signal to obtain a sampling signal and use it as an input signal of the current moment of the filter;
所述处理器还用于根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差,再根据所述滤波器的输出误差以及预定的第一阈值判断是否需要对当前滤波器系数进行修正;The processor is further configured to determine an output error of the filter according to a target output of the filter and an estimated output, and determine whether a current filter is needed according to an output error of the filter and a predetermined first threshold. The coefficient is corrected;
所述处理器还用于当判定需要对当前滤波器系数进行修正时通过对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数;The processor is further configured to: when the current filter coefficient needs to be corrected, correct the current filter coefficient to determine a filter coefficient at a next moment;
所述处理器还用于当判定不需要对当前滤波器系数进行修正时将当前滤波器系数直接作为下一时刻的滤波器系数。The processor is further configured to directly use the current filter coefficient as the filter coefficient of the next moment when it is determined that the current filter coefficient does not need to be corrected.
可选地,在本申请的一实施例中,所述滤波器进一步用于根据下一时刻的滤波器系数对所述滤波器下一时刻的输入信号进行滤波处理。Optionally, in an embodiment of the present application, the filter is further configured to perform filtering processing on an input signal of the filter at a next moment according to a filter coefficient at a next moment.
可选地,在本申请的一实施例中,所述处理器进一步用于对所述滤波器的估计输出进行同步帧头检测、Manchester解码、循环冗余校验处理。Optionally, in an embodiment of the present application, the processor is further configured to perform synchronous frame header detection, Manchester decoding, and cyclic redundancy check processing on the estimated output of the filter.
本申请实施例的技术方案中,由于根据滤波器当前时刻的输入信号,确定所述滤波器的估计输出;根据所述滤波器的目标输出以及估计输出,确定所述
滤波器的输出误差;根据所述滤波器的输出误差以及预定的第一阈值,判断是否需要对当前滤波器系数进行修正;若判定需要对当前滤波器系数进行修正,则对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数;若判定不需要对当前滤波器系数进行修正,则将当前滤波器系数直接作为下一时刻的滤波器系数,从而可实现在滤波过程中可以根据数据传输通道的变化,对当前滤波器系数进行自适应修正,以达到彻底滤除干扰或者尽可能地滤除干扰,进而保证较高的解码成功率,最终实现高速率、高可靠性通讯。In the technical solution of the embodiment of the present application, the estimated output of the filter is determined according to an input signal of a current moment of the filter; and the determined output is determined according to a target output of the filter and an estimated output.
An output error of the filter; determining, according to the output error of the filter and the predetermined first threshold, whether the current filter coefficient needs to be corrected; if it is determined that the current filter coefficient needs to be corrected, the current filter is The coefficient is modified to determine the filter coefficient at the next moment; if it is determined that the current filter coefficient does not need to be corrected, the current filter coefficient is directly used as the filter coefficient of the next moment, so that the filtering process can be implemented according to The change of the data transmission channel adaptively corrects the current filter coefficients to completely filter out the interference or filter out the interference as much as possible, thereby ensuring a high decoding success rate, and finally achieving high-speed, high-reliability communication.
后文将参照附图以示例性而非限制性的方式详细描述本申请实施例的一些具体实施例。附图中相同的附图标记标示了相同或类似的部件或部分。本领域技术人员应该理解,这些附图未必是按比例绘制的。附图中:Some specific embodiments of the embodiments of the present application will be described in detail, by way of example, and not limitation, The same reference numbers in the drawings identify the same or similar parts. Those skilled in the art should understand that the drawings are not necessarily drawn to scale. In the figure:
图1为本申请实施例一中通讯系统的结构示意图;1 is a schematic structural diagram of a communication system according to Embodiment 1 of the present application;
图2为本申请实施例二中下位机对原始信号的处理流程示意图;2 is a schematic flowchart of processing an original signal by a lower computer in Embodiment 2 of the present application;
图3为本申请实施例三中编码的原理示意图,FIG. 3 is a schematic diagram of the principle of encoding in the third embodiment of the present application,
图4为本申请实施例四中作为上位机的第二通讯终端的工作流程示意图;4 is a schematic diagram showing the working flow of a second communication terminal as a host computer in Embodiment 4 of the present application;
图5为本申请实施例五中滤波流程示意图;5 is a schematic diagram of a filtering process in Embodiment 5 of the present application;
图6为本申请实施例六中滤波的框图;6 is a block diagram of filtering in Embodiment 6 of the present application;
图7为本申请实施例七中训练处理流程示意图;7 is a schematic diagram of a training process in Embodiment 7 of the present application;
图8为本申请实施例八中滤波器系数确定示意图;8 is a schematic diagram of determining a filter coefficient according to Embodiment 8 of the present application;
图9为本申请实施例九中确定滤波器系数的装置的结构示意图;9 is a schematic structural diagram of an apparatus for determining a filter coefficient in Embodiment 9 of the present application;
图10为本申请实施例十中终端的结构示意图。FIG. 10 is a schematic structural diagram of a terminal in Embodiment 10 of the present application.
实施本发明实施例的任一技术方案必不一定需要同时达到以上的所有优点。Any technical solution for implementing the embodiments of the present invention necessarily does not necessarily need to achieve all of the above advantages at the same time.
为了使本领域的人员更好地理解本发明实施例中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明实施例一部分实施例,而不是全部的实施例。基于本发明实施例中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本发明实施例保护的范围。For a better understanding of the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments are only a part of the embodiments of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art should be within the scope of protection of the embodiments of the present invention based on the embodiments in the embodiments of the present invention.
下面结合本发明实施例附图进一步说明本发明实施例具体实现。The specific implementation of the embodiments of the present invention is further described below in conjunction with the accompanying drawings.
本申请下述实施例的技术方案中,由于根据滤波器当前时刻的输入信号,确定所述滤波器的估计输出;根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差;根据所述滤波器的输出误差以及预定的第一阈值,判断是否需要对当前滤波器系数进行修正;若判定需要对当前滤波器系数进行修正,则对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数;若判定不需要对当前滤波器系数进行修正,则将当前滤波器系数直接作为下一时刻的滤波器系数。比如当音频通道生变化时,信噪比和信道非线性会发生变化,滤
波器的估计输出会发生变化,进一步导致滤波器的输出误差会发生变化,进而可以根据所述滤波器的输出误差以及预定的第一阈值判断是否对当前滤波器系数进行修正。具体地,比如当所述滤波器的输出误差的统计值超过第一阈值时,则判定需要对当前滤波器系数进行修正以确定下一时刻的滤波器系数,在滤波阶段根据下一时刻的滤波器系数进行滤波,进而达到彻底滤除干扰或者尽可能地滤除干扰,使得滤波器的目标输出与估计输出尽可能地一致,保证较高的解码成功率,最终实现高速率、高可靠性通讯。In the technical solution of the following embodiments, the estimated output of the filter is determined according to an input signal of a current moment of the filter; and an output error of the filter is determined according to a target output of the filter and an estimated output. And determining, according to the output error of the filter and the predetermined first threshold, whether the current filter coefficient needs to be corrected; if it is determined that the current filter coefficient needs to be corrected, correcting the current filter coefficient to determine The filter coefficient of the next time; if it is determined that the current filter coefficient does not need to be corrected, the current filter coefficient is directly used as the filter coefficient of the next time. For example, when the audio channel changes, the signal-to-noise ratio and channel nonlinearity will change.
The estimated output of the filter changes, further causing the output error of the filter to change, and then determining whether to correct the current filter coefficient according to the output error of the filter and the predetermined first threshold. Specifically, for example, when the statistical value of the output error of the filter exceeds the first threshold, it is determined that the current filter coefficient needs to be corrected to determine the filter coefficient at the next moment, and the filtering is performed according to the next moment in the filtering phase. The coefficients are filtered to achieve complete filtering of interference or to filter out interference as much as possible, so that the target output of the filter is as consistent as possible with the estimated output, ensuring a high decoding success rate, and finally achieving high-speed, high-reliability communication. .
本申请下述实施例中,以心率耳机为第一通讯终端,智能手机为第二通讯终端,原始信号为原始心率信号为例进行说明。第一通讯终端与第二通讯终端通过音频信道进行信号的传输。音频信道具体可包括音频接口和音频线。In the following embodiments of the present application, the heart rate earphone is used as the first communication terminal, the smart phone is the second communication terminal, and the original signal is the original heart rate signal as an example for description. The first communication terminal and the second communication terminal transmit signals through the audio channel. The audio channel may specifically include an audio interface and an audio line.
在上述包括第一通讯终端和第二通讯终端的通讯系统中,在不同的时间段,当音频信道可能发生改变时,其信道特征也可能随之发生改变,比如信道非线性发生变化。针对此种类似情形,在第一通讯终端和第二通讯终端进行高速数据传输速率通讯的过程中,对滤波器系数进行自适应修正,从而提高解调成功率,并达到需要的滤波要求,实现干扰的彻底过滤。In the above communication system including the first communication terminal and the second communication terminal, when the audio channel may change in different time periods, the channel characteristics may also change, such as the channel nonlinearity changes. For such a similar situation, in the process of high-speed data transmission rate communication between the first communication terminal and the second communication terminal, the filter coefficients are adaptively modified, thereby improving the demodulation success rate and achieving the required filtering requirements. Thorough filtering of interference.
但是,需要说明的是,在下述实施例的启发下,可以将本申请的技术方案用于任一需要数据处理的场合,比如耳式温度计与智能终端的场合。However, it should be noted that, in the enlightenment of the following embodiments, the technical solution of the present application can be applied to any occasion requiring data processing, such as an ear thermometer and a smart terminal.
为了便于对本申请的方案理解,下述实施例中,首先对应用本申请的滤波系数调整方法的具体通讯系统为例进行简要说明。当在该具体通讯系统中进行应用时,滤波只是其中一部分流程,而在滤波之前经过采样、编码等处理得到模拟信号,在滤波之后,进行解码得到解码比特流以便应用程序进行使用,详细过程请参见下述示例描述。In order to facilitate understanding of the solution of the present application, in the following embodiments, a specific communication system to which the filter coefficient adjustment method of the present application is applied is first briefly described as an example. When applied in this specific communication system, filtering is only part of the process, and the analog signal is obtained after sampling, encoding, etc. before filtering, and after decoding, decoding is performed to obtain the decoded bit stream for use by the application. See the example description below.
将本申请的滤波器系数更新方法应用到一具体通讯系统中,该通讯系统包括:第一通讯终端、第二通讯终端、滤波器,如前所述,第一通讯终端101示例性地为心率耳机,在具体应用时,心率耳机作为下位机,第二通讯终端102示例性地为智能终端,心率耳机与智能终端配合以实现心率检测的目的,其中在智能终端处配置有滤波器,参见图1,其为本申请实施例一中通讯系统的结构示意图。Applying the filter coefficient update method of the present application to a specific communication system, the communication system includes: a first communication terminal, a second communication terminal, and a filter. As described above, the first communication terminal 101 is illustratively a heart rate. The earphone, in a specific application, the heart rate earphone as the lower computer, the second communication terminal 102 is illustratively an intelligent terminal, and the heart rate earphone cooperates with the intelligent terminal to achieve the purpose of heart rate detection, wherein the smart terminal is configured with a filter, see the figure 1. It is a schematic structural diagram of a communication system in Embodiment 1 of the present application.
本实施例中,所述第一通讯终端用于获取原始信号、对所述原始信号进行处理得到模拟信号并传输给所述第二通讯终端;如前所述,由于第一通讯终端为心率耳机,因此,本实施例中,原始信号具体为心率原始信号,模拟信号具体为心率模拟信号。In this embodiment, the first communication terminal is configured to acquire an original signal, process the original signal to obtain an analog signal, and transmit the analog signal to the second communication terminal; as described above, since the first communication terminal is a heart rate earphone Therefore, in this embodiment, the original signal is specifically a heart rate original signal, and the analog signal is specifically a heart rate analog signal.
具体地,作为下位机的第一通讯终端(即心率耳机)对所述心率原始信号进行处理得到心率模拟信号,示例性流程如图2所示,为本申请实施例二中下位机对原始信号的处理流程示意图;如图2所示,其具体包括:Specifically, the first communication terminal (ie, the heart rate earphone) as the lower computer processes the heart rate original signal to obtain a heart rate analog signal, and an exemplary flow is shown in FIG. 2 , which is the lower machine pair original signal in the second embodiment of the present application. Schematic diagram of the processing flow; as shown in Figure 2, it specifically includes:
S201、对所述原始信号进行组包处理;S201: Perform packet processing on the original signal.
本实施例中,所述第一通讯终端对所述原始信号进行组包处理时,每个数据包包括同步帧头、数据字段和循环冗余校验位。In this embodiment, when the first communication terminal performs group packet processing on the original signal, each data packet includes a synchronization frame header, a data field, and a cyclic redundancy check bit.
本实施例中,所述同步帧头作为上位机的智能手机检测数据包。当上位机
检测到同步帧头时,认为检测到一个新的数据包,才能开始后续的解码过程。所述数据字段在不同的应用环境中会有所不同,其可能包括数据类型、数据长度、包序号和实际数据等。In this embodiment, the synchronization frame header is used as a smart phone of the upper computer to detect a data packet. When the host computer
When the sync frame header is detected, it is considered that a new data packet is detected before the subsequent decoding process can be started. The data fields may vary in different application environments, and may include data types, data lengths, packet serial numbers, and actual data.
S202、对组包处理后的所述原始信号进行编码得到数字信号;S202. Encode the original signal processed by the group packet to obtain a digital signal.
本实施例中,所述第一通讯终端对组包处理后的所述原始信号进行编码时采用Manchester编码;具体地,请参见图3,为本申请实施例三中编码的原理示意图,将组包处理后的原始信号“0”映射为“10”,将原始信号“1”映射为“01”。每个原始信号对应比特占用的传输时间为T,那么编码后的每个原始信号对应的比特时间为T/2,进而数据传输速率为1/T bps。In this embodiment, the first communication terminal uses the Manchester code to encode the original signal after the packet processing. Specifically, refer to FIG. 3, which is a schematic diagram of the principle of coding in the third embodiment of the present application. The original signal "0" after the packet processing is mapped to "10", and the original signal "1" is mapped to "01". The transmission time occupied by the corresponding bit of each original signal is T, and the bit time corresponding to each original signal after encoding is T/2, and the data transmission rate is 1/T bps.
S203、对数字信号进行调制处理得到模拟信号。S203. Perform modulation processing on the digital signal to obtain an analog signal.
本实施例中,对数字信号进行调制时,将比特“0”对应第一模拟电平,比特“1”对应第二模拟电平。在具体应用场景中,比如第一模拟电平为-V,第二模拟电平为+V,V表示电平的高低。In this embodiment, when the digital signal is modulated, the bit "0" corresponds to the first analog level, and the bit "1" corresponds to the second analog level. In a specific application scenario, for example, the first analog level is -V, and the second analog level is +V, and V represents the level of the level.
所述第二通讯终端的处理对所述模拟信号进行采样得到采样信号并将采样信号传输给滤波器作为所述滤波器的输入信号;所述滤波器用于根据滤波器的输入信号确定所述滤波器的估计输出;所述第二通讯终端的处理进一步用于根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差,再进一步根据所述滤波器的输出误差以及预定的第一阈值,判断是否需要对当前滤波器系数进行修正;若是,则对所述当前滤波器系数进行修正,以确定下一时刻的滤波器系数;Processing by the second communication terminal samples the analog signal to obtain a sampling signal and transmits the sampling signal to a filter as an input signal of the filter; the filter is configured to determine the filtering according to an input signal of the filter The estimated output of the second communications terminal is further configured to determine an output error of the filter based on a target output of the filter and an estimated output, and further based on an output error of the filter and a predetermined a first threshold, determining whether correction of the current filter coefficient is needed; if yes, correcting the current filter coefficient to determine a filter coefficient at a next moment;
所述滤波器用于根据下一时刻的滤波器系数对所述滤波器下一时刻的输入信号进行滤波处理。The filter is configured to filter the input signal of the filter at the next moment according to the filter coefficient at the next moment.
具体地,本实施例中,参见图4所示,为本申请实施例四中作为上位机的第二通讯终端的工作流程示意图;如图4所示,其包括:Specifically, in this embodiment, referring to FIG. 4, it is a schematic diagram of a working process of a second communication terminal as a host computer in Embodiment 4 of the present application; as shown in FIG. 4, it includes:
S401、对接收到的模拟信号进行采样得到采样信号;S401. Sample the received analog signal to obtain a sampling signal.
本实施例中,采样的参数如采样频率和数据位宽因应用场景而不同。In this embodiment, the sampling parameters such as the sampling frequency and the data bit width are different depending on the application scenario.
S402、滤波器对所述采样信号进行滤波处理;S402. The filter performs filtering processing on the sampling signal.
本实施例中,滤波器为FIR带通滤波器,在进行滤波时,若需要对当前滤波器进行修正,则上位机对当前滤波系数进行修正得到下一时刻的滤波器系数,滤波器根据下一时刻的滤波系数对滤波器下一时刻的输入信号进行滤波处理,详细的滤波处理流程可参见下述图5所示。In this embodiment, the filter is an FIR band-pass filter. If the current filter needs to be corrected during filtering, the host computer corrects the current filter coefficient to obtain the filter coefficient at the next moment, and the filter is based on the next filter. The filter coefficient at a moment filters the input signal at the next moment of the filter. The detailed filtering process can be seen in Figure 5 below.
S403、对所述滤波器的估计输出进行同步帧头检测;S403. Perform synchronization frame header detection on the estimated output of the filter.
S404、判断是否检测到同步帧头,若是,则执行步骤S405,若否,则跳转到步骤S401;S404, it is determined whether the synchronization frame header is detected, and if so, step S405 is performed, and if not, then the process proceeds to step S401;
本实施例中,将同步帧头后的一定长度数据传递给步骤S405处理。一定长度应足够覆盖整段数据包,尤其包括数据字段。如果没有检测到同步帧头,则跳转到步骤S401进行下一轮处理。In this embodiment, the data of a certain length after the synchronization frame header is transmitted to the processing of step S405. A certain length should be sufficient to cover the entire packet, especially the data field. If the sync frame header is not detected, it jumps to step S401 to perform the next round of processing.
S405、对同步帧头检测处理后的滤波器的估计输出进行Manchester解码;S405. Perform Manchester decoding on the estimated output of the filter after the synchronization frame header detection process.
参照上述编码的过程,本步骤S405执行与上述编码逆向的处理过程,从
而得到解码比特流。Referring to the above-described encoding process, this step S405 performs the processing process opposite to the above encoding, from
The decoded bit stream is obtained.
S406、对解码比特流进行循环冗余校验处理。S406. Perform cyclic redundancy check processing on the decoded bit stream.
本实施例中,循环冗余校验处理以对解码比特流进行错误侦测。In this embodiment, the cyclic redundancy check process performs error detection on the decoded bit stream.
S407、将循环冗余校验结果以及解码比特流传输给应用程序。S407. Transmit the cyclic redundancy check result and the decoded bit stream to the application.
本实施例中,应用程序可以是指配合耳式温度计、心率耳机使用在电子终端上安装的应用程序。In this embodiment, the application program may refer to an application installed on the electronic terminal in conjunction with the ear thermometer and the heart rate earphone.
本实施例中,滤波器的估计输出也即经过滤波处理后滤波器实际输出的信号。In this embodiment, the estimated output of the filter is the signal actually output by the filter after the filtering process.
应用程序根据循环冗余校验结果以及解码比特流确定心率值计算等。The application determines the heart rate value calculation and the like based on the cyclic redundancy check result and the decoded bit stream.
具体地,如图5所示,为本申请实施例五中滤波流程示意图;如图6所示,为本申请实施例六中滤波的框图;结合图5和图6所示,下述S501-S504组成滤波器系数的确定方法或称为修正算法,需要说明的是,当前滤波器系数可以根据预定的训练序列和滤波器的输入信号对初始滤波器系数进行不断训练得到,详细可参见后述图7记载。Specifically, as shown in FIG. 5, it is a schematic diagram of a filtering process in Embodiment 5 of the present application; as shown in FIG. 6, is a block diagram of filtering in Embodiment 6 of the present application; as shown in FIG. 5 and FIG. 6, the following S501- S504 is a method for determining a filter coefficient or a correction algorithm. It should be noted that the current filter coefficient can be continuously trained according to a predetermined training sequence and an input signal of the filter. For details, refer to the following. Figure 7 shows.
需要说明的是,在执行滤波的过程中,当前滤波器系数可以是根据预定的训练序列和滤波器的输入信号对初始滤波器系数进行实时训练得到,也可以是使用之前已经过训练过程处理得到已有的当前滤波器系数。比如,在一种场景中,应用程序重启之后的话,音频信道发生了变化,如果要启动滤波处理,则需要对初始滤波器系数进行实时训练得到当前滤波器系数;如果只是应用程序暂停之后,音频信道并没有发生变化,则可以不需要对初始滤波器系数进行实时训练得到当前滤波器,而只是继续使用暂停之前已有的当前滤波器系数。It should be noted that, in the process of performing filtering, the current filter coefficient may be obtained by real-time training the initial filter coefficients according to a predetermined training sequence and an input signal of the filter, or may be obtained by using a training process before use. Existing current filter coefficients. For example, in a scenario, after the application restarts, the audio channel changes. If the filtering process is to be started, the initial filter coefficients need to be trained in real time to obtain the current filter coefficients; if only the application is paused, the audio is The channel does not change, and the initial filter coefficients need not be trained in real time to obtain the current filter, but only continue to use the current filter coefficients existing before the pause.
本实施例中,具体的滤波的过程如下:In this embodiment, the specific filtering process is as follows:
S501、根据当前滤波器系数以及滤波器的输入信号,确定所述滤波器的估计输出;S501. Determine an estimated output of the filter according to a current filter coefficient and an input signal of the filter.
本实施例中,假设n时刻的输入信号x(n)包括滤波器的目标输出d(n)和干扰噪声v(n),如公式(1)所示:In this embodiment, it is assumed that the input signal x(n) at time n includes the target output d(n) of the filter and the interference noise v(n), as shown in the formula (1):
x(n)=d(n)+v(n) (1)x(n)=d(n)+v(n) (1)
S502、根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差;S502. Determine an output error of the filter according to a target output of the filter and an estimated output.
本实施例中,若滤波器采用FIR滤波器,Wn表示p阶滤波器的系数,参见公式(2)表示p阶滤波器的滤波系数:In this embodiment, if the filter uses an FIR filter, W n represents the coefficient of the p-th order filter, and the formula (2) represents the filter coefficient of the p-th order filter:
Wn=[ωn(0),ωn(1),…,ωn(P)]T (2)。W n = [ω n (0), ω n (1), ..., ω n (P)] T (2).
滤波阶段滤波器的估计输出由滤波器的输入信号X(n)和滤波器系数Wn卷积生成,如公式(3)所示:Estimated output of the filter stage filter Generated by the convolution of the input signal X(n) of the filter and the filter coefficient W n , as shown in equation (3):
在上述公式(3)中X(n)=[x(n),x(n-1),…,xn(n-p)]T。In the above formula (3), X(n) = [x(n), x(n-1), ..., x n (np)] T .
在n时刻,滤波器的输出误差e(n)是其目标输出与估计输出的差值,即如公式(4):At time n, the output error e(n) of the filter is the difference between its target output and the estimated output, ie, as in equation (4):
如公式(4)所示,输出误差e(n)的大小反映了估计输出和目标输出的接近
程度,比如在一种具体的应用场景中,若e(n)越小,表明估计输出越接近目标输出。As shown in equation (4), the magnitude of the output error e(n) reflects the proximity of the estimated output to the target output.
The degree, for example, in a specific application scenario, if e(n) is smaller, it indicates that the estimated output is closer to the target output.
本实施例中,由于滤波器的输入信号X(n)已知,因此,可以通过对输入信号x(n)进行伪采样从而得到目标输出d(n)。In the present embodiment, since the input signal X(n) of the filter is known, the target output d(n) can be obtained by pseudo-sampling the input signal x(n).
S503、根据所述滤波器的输出误差以及预定的第一阈值,判断是否需要对当前滤波器系数进行修正;若是,则执行步骤S504;若否,则执行步骤S506:将当前滤波器系数直接作为下一时刻的滤波器系数并判断上位机与下位机之间的通讯是否结束,如未结束,转到步骤S501继续处理下一段输入信号;S503. Determine, according to the output error of the filter and the predetermined first threshold, whether the current filter coefficient needs to be corrected; if yes, execute step S504; if not, execute step S506: directly use the current filter coefficient as The filter coefficient of the next moment determines whether the communication between the upper computer and the lower computer ends. If not, the process goes to step S501 to continue processing the next input signal;
本实施例中,在判断是否需要对当前滤波器系数进行修正时,具体根据所述滤波器的输出误差的统计值是否超过预定的第一阈值来确定,若是,则需要对当前滤波器系数进行修正。第一阈值的大小可以根据滤波精度要求进行调整,如果要让估计输出尽可能地与目标输出一致,第一阈值可以较小,否则,第一阈值可以较大。In this embodiment, when it is determined whether the current filter coefficient needs to be corrected, whether the statistical value of the output error of the filter exceeds a predetermined first threshold is determined, and if yes, the current filter coefficient needs to be performed. Corrected. The size of the first threshold may be adjusted according to the filtering accuracy requirement. If the estimated output is to be as consistent as possible with the target output, the first threshold may be smaller, otherwise the first threshold may be larger.
本实施例中,具体可以根据如下公式(5)定义一个代价函数ξ(n),该代价函数的值作为输出误差的统计值,该统计值越小,表明估计输出越接近目标输出。In this embodiment, a cost function ξ(n) may be defined according to the following formula (5). The value of the cost function is used as a statistical value of the output error. The smaller the statistical value, the closer the estimated output is to the target output.
上述公式(5)中,其中,λ是加权因子,用于“遗忘”过旧的输出误差,所谓“过旧”可理解为距离当前滤波系数之前越早的输出误差,并实时跟踪最新的输出误差,λ满足0<λ≤1。λ越大,滤波器对新输出误差的响应越缓慢,λ越小,旧输出误差起到的作用越小。In the above formula (5), where λ is a weighting factor for “forgetting” the old output error, the so-called “over old” can be understood as the earlier output error before the current filter coefficient, and the latest output is tracked in real time. The error, λ satisfies 0 < λ ≤ 1. The larger λ, the slower the response of the filter to the new output error, and the smaller the λ, the smaller the effect of the old output error.
上述公式(5)中,是对输出误差进行平方和进行统计得到输出误差的统计值。在其他实施例中,也可以对输出误差绝对值的和进行统计得到输出误差的统计值。In the above formula (5), the statistical value of the output error is obtained by performing a square sum of the output errors. In other embodiments, the sum of the absolute values of the output errors may also be statistically derived to obtain a statistical value of the output error.
上述公式(5)中,以最小二乘法为例进行说明,在其他实施例中,也可以采用最小均方算法(least mean square,LMS)、格型算法。In the above formula (5), the least squares method is taken as an example for description. In other embodiments, a least mean square (LMS) and a lattice algorithm may also be used.
S504、确定所述当前滤波器系数的修正量,根据所述当前滤波器系数的修正量对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数。S504. Determine a correction amount of the current filter coefficient, and correct the current filter coefficient according to the correction amount of the current filter coefficient to determine a filter coefficient at a next moment.
本实施例中,所述当前滤波器系数的修正量ΔWn具体可以根据输入信号X(n)和输出误差e(n)计算出,根据输入信号X(n)和输出误差e(n)计算出修正量ΔWn的技术处理已属于现有技术,在此不再赘述。In this embodiment, the correction amount ΔW n of the current filter coefficient may be specifically calculated according to the input signal X(n) and the output error e(n), and is calculated according to the input signal X(n) and the output error e(n). The technical processing of the correction amount ΔW n is already in the prior art and will not be described here.
S505、所述滤波器根据下一时刻的滤波器系数对所述滤波器下一时刻的输入信号进行滤波处理。S505. The filter performs filtering processing on the input signal of the filter at the next moment according to the filter coefficient at the next moment.
本实施例中,具体地,可以根据Wn+1=Wn+ΔWn对当前滤波器系数Wn进行修正得到下一时刻的滤波器系数Wn+1,以在对滤波器下一时刻的输入信号进行滤波时使用。In this embodiment, specifically, the current filter coefficient W n may be corrected according to W n+1 =W n +ΔW n to obtain the filter coefficient W n+1 at the next moment, at the next moment of the filter. The input signal is used for filtering.
需要说明的是,本实施例中步骤S501至步骤S504也可理解为对滤波器系数进行自适应修正的流程。It should be noted that step S501 to step S504 in this embodiment can also be understood as a flow of adaptively correcting the filter coefficients.
本实施例中,根据上述步骤S503和步骤S504整体上确定出下一时刻的滤波器系数。
In this embodiment, the filter coefficients of the next time are determined as a whole according to the above steps S503 and S504.
对初始滤波器系数进行训练处理得到当前滤波器系数的过程可如图7所示。如图7所示,为本申请实施例七中训练处理流程示意图,其根据预定的训练序列以及训练阶段所述滤波器的输入信号,对初始滤波器系数进行训练得到当前滤波器系数。具体地,其包括如下步骤:The process of training the initial filter coefficients to obtain the current filter coefficients can be as shown in FIG. As shown in FIG. 7 , it is a schematic diagram of a training process in the seventh embodiment of the present application. The initial filter coefficients are trained according to a predetermined training sequence and an input signal of the filter in the training phase to obtain a current filter coefficient. Specifically, it includes the following steps:
S701、初始化当前滤波器系数得到初始滤波器系数;S701. Initialize a current filter coefficient to obtain an initial filter coefficient.
本实施例中,比如直接给当前滤波器系数赋予具体的数值以完成初始化,得到初始滤波器系数。In this embodiment, for example, a specific value is directly given to the current filter coefficient to complete initialization, and an initial filter coefficient is obtained.
S702、预定训练序列并对预定的训练序列进行采样得到在训练阶段所述滤波器的目标输出;S702. The predetermined training sequence is sampled and the predetermined training sequence is sampled to obtain a target output of the filter in the training phase.
本实施例中,所述训练序列为随机序列或伪随机序列。所述训练序列选自对所述滤波器在滤波阶段的估计输出进行解码得到的数据流。比如为上一滤波循环处理已完成同步帧头检测和解码得到的解码比特流。In this embodiment, the training sequence is a random sequence or a pseudo random sequence. The training sequence is selected from a data stream obtained by decoding an estimated output of the filter during a filtering phase. For example, the decoded bit stream obtained by the synchronization frame header detection and decoding is processed for the previous filtering loop.
本实施例中,通过对训练序列S(n)的调制信号进行伪采样,得到用于训练流程的目标输出D(n)。本实施例中,为得到训练阶段滤波器的目标输出,所使用的采样频率可以与上位机实际的采样频率相同。In this embodiment, the target output D(n) for the training process is obtained by pseudo-sampling the modulated signal of the training sequence S(n). In this embodiment, in order to obtain the target output of the training phase filter, the sampling frequency used may be the same as the actual sampling frequency of the upper computer.
S703、上位机对接收到的模拟信号进行采样得到采样信号并将其作为在训练阶段滤波器的输入信号;S703. The host computer samples the received analog signal to obtain a sampling signal and uses it as an input signal of the filter in the training phase;
如前所述,本实施例中,上位机的采样频率与上述步骤S702中得到滤波器的目标信号所使用的采样频率相同。As described above, in the present embodiment, the sampling frequency of the upper computer is the same as the sampling frequency used for the target signal of the filter obtained in the above step S702.
S704、根据所述滤波器的初始滤波器系数以及滤波器系数训练阶段所述滤波器的输入信号,确定在训练阶段所述滤波器的估计输出;S704. Determine an estimated output of the filter in a training phase according to an initial filter coefficient of the filter and an input signal of the filter in a filter coefficient training phase.
参照下述公式(6)得到所述滤波器的估计输出
The estimated output of the filter is obtained by referring to the following formula (6).
公式(6)中X(n)=[x(n),x(n-1),…,xn(n-p)]T
In formula (6), X(n)=[x(n), x(n-1),...,x n (np)] T
S705、根据在滤波器系数训练阶段所述滤波器的目标输出以及滤波器系数训练阶段所述滤波器的估计输出,确定在滤波器系数训练阶段所述滤波器的输出误差;S705. Determine an output error of the filter in a filter coefficient training phase according to a target output of the filter in a filter coefficient training phase and an estimated output of the filter in a filter coefficient training phase.
参照下述公式(7)得到在训练阶段所述滤波器的输出误差E(n):The output error E(n) of the filter described in the training phase is obtained by referring to the following formula (7):
S706、根据在滤波器系数训练阶段所述滤波器的输出误差以及预定的第二阈值,判断是否需要对初始滤波器系数进行训练,若是,则执行步骤S707;若否,则执行上述滤波器系数的确定方法并重置训练的累计次数;S706. Determine, according to an output error of the filter in the filter coefficient training stage, and a predetermined second threshold, whether the initial filter coefficient needs to be trained, if yes, execute step S707; if not, execute the filter coefficient. Determine the method and reset the cumulative number of trainings;
本实施例中,在判断是否需要对初始滤波器系数进行训练时,具体根据训练阶段所述滤波器的输出误差的统计值是否超过预定的第二阈值来确定,若是,则需要对初始滤波器系数进行训练。In this embodiment, when it is determined whether the initial filter coefficient needs to be trained, whether the statistical value of the output error of the filter exceeds a predetermined second threshold according to the training phase is determined, and if yes, the initial filter is needed. The coefficients are trained.
本实施例中的统计值可以参照上述图5中的统计值说明。The statistical values in this embodiment can be described with reference to the statistical values in FIG. 5 described above.
本实施例中,第二阈值的大小可以根据历史经验数据进行确定,或者根据滤波精度的要求,灵活调整。具体地,第二阈值可以与第一阈值相同也可以不同。在一具体应用中,为了得到更准确的当前滤波器系数,第二阈值具体比第一阈值小。
In this embodiment, the size of the second threshold may be determined according to historical empirical data, or may be flexibly adjusted according to the requirements of filtering accuracy. Specifically, the second threshold may be the same as or different from the first threshold. In a specific application, in order to obtain a more accurate current filter coefficient, the second threshold is specifically smaller than the first threshold.
S707、确定在训练阶段初始滤波器系数的修正量;S707. Determine a correction amount of an initial filter coefficient in the training phase;
本实施例中,所述初始滤波器系数的修正量ΔWn′具体可以根据滤波器的输入信号x(n)和输出误差E(n)计算出,比如,对输入信号X(n)和输出误差E(n)应用最小均方算法(least mean square,LMS),或者递推最小二乘法(recursive least square,RLS),从而计算出修正量ΔWn′。In this embodiment, the correction amount ΔW n ' of the initial filter coefficient may be specifically calculated according to the input signal x(n) of the filter and the output error E(n), for example, the input signal X(n) and the output. The error E(n) applies a least mean square (LMS) or a recursive least square (RLS) to calculate the correction amount ΔW n '.
S708、根据所述初始滤波器系数的修正量,对滤波器的初始滤波器系数进行训练得到当前滤波器系数。S708. Train the initial filter coefficients of the filter according to the correction amount of the initial filter coefficients to obtain current filter coefficients.
本实施例中,具体地,可以根据W′n+1=Wn′+ΔWn′对初始滤波器系数Wn′进行修正得到修正后的滤波器系数W′n+1,即当前滤波器系数,即该修正后的滤波器系数W′n+1做为上述滤波实施例中的当前滤波器系数Wn。In this embodiment, specifically, the initial filter coefficient W n ' can be corrected according to W′ n+1 =W n ′+ΔW n ′ to obtain the modified filter coefficient W′ n+1 , that is, the current filter. coefficients, i.e., the filter coefficient W after the correction 'n + 1 as the filter of the current filter coefficient W n in the embodiment.
需要说明的是,初始滤波器系数Wn′在首次训练处理时,指的是首次初始化时得到的初始化滤波系数,而在经过了至少一次训练处理之后,指的是修正后的初始化滤波系数。It should be noted that, in the first training process, the initial filter coefficient W n ' refers to the initializing filter coefficient obtained at the time of initial initialization, and after at least one training process, refers to the modified initializing filter coefficient.
S709、判断已训练的累计次数是否超过预定的训练次数门限,若未超过,则跳转到步骤S702,以继续对初始滤波器系数进行修正;若已训练的累计次数超过预定的训练次数门限,则结束对初始滤波器系数的训练。S709. Determine whether the accumulated number of times of training exceeds a predetermined threshold of training times. If not, go to step S702 to continue to correct the initial filter coefficients; if the accumulated number of times of training exceeds a predetermined threshold of training times, Then the training of the initial filter coefficients is ended.
上述图7所示的训练过程,在滤波器进行滤波之前,也可以理解为对初始化滤波器系数进行不断修正得到当前滤波器系数的过程。The training process shown in FIG. 7 above can also be understood as a process of continuously correcting the initial filter coefficients to obtain the current filter coefficients before the filter performs filtering.
在图7的基础上,提供了一种结合是否需要进行训练处理的滤波器系数修正方案,如图8所示,为本申请实施例八中滤波器系数确定示意图;On the basis of FIG. 7, a filter coefficient correction scheme is provided in combination with whether or not training processing is required, as shown in FIG. 8 , which is a schematic diagram of determining filter coefficients in the eighth embodiment of the present application;
S801、设置训练标志位;S801, setting a training flag bit;
若训练标志位的值设置为1,表示需要执行训练处理过程,若训练标志位的值设置为0,则不需要执行训练处理过程;If the value of the training flag is set to 1, it indicates that the training process needs to be performed. If the value of the training flag is set to 0, the training process does not need to be performed;
比如在应用程序重启时,训练标志位为1,在应用程序暂停时,训练标志位为0。For example, when the application restarts, the training flag is 1, and when the application is paused, the training flag is 0.
S802、根据训练标志位判断是否需要执行训练处理,如训练标志位的值为1,在执行上述步骤S701-S709的训练处理过程再执行步骤S803;否则,直接执行步骤S803;S802, determining, according to the training flag, whether the training process needs to be performed, for example, the value of the training flag is 1, and performing the step S803 after performing the training process of the above steps S701-S709; otherwise, directly performing step S803;
S803、对模拟信号进行采样得到的采样信号并作为滤波器的输入信号;S803. The sampling signal obtained by sampling the analog signal is used as an input signal of the filter;
参照公式(3),滤波处理后的信号即滤波器的估计输出
Referring to formula (3), the filtered signal is the estimated output of the filter.
S804、确定所述滤波器的输出误差并判断所述滤波器的输出误差的统计值是否超过预定的第一阈值;如未超过,则执行步骤S805;若超过,则设置修正标志位flag为1,并执行上述步骤S504,之后,再次转到步骤S805;S804, determining an output error of the filter and determining whether a statistical value of an output error of the filter exceeds a predetermined first threshold; if not, executing step S805; if yes, setting a correction flag flag to 1 And performing the above step S504, after which, go to step S805 again;
S805、判断上位机与下位机之间的通讯是否结束,若是,则结束,否则转到步骤802;S805, determining whether the communication between the upper computer and the lower computer is over, and if so, then ending, otherwise proceeds to step 802;
本实施例中,可以具体获取应用程序标志位的值并根据该应用程序标志的值来判断上位机与下位机的通讯是否结束,比如若应用程序标志位为1,则表示结束。
In this embodiment, the value of the application flag bit can be specifically obtained and the communication between the upper computer and the lower computer is terminated according to the value of the application flag. For example, if the application flag bit is 1, the end is indicated.
本实施例中,设置一个训练标志位和一个修正标志位,训练标志位在训练过程中用于标示是否需要对初始滤波器系数进行训练,修正标志位用于在滤波过程中标示是否需要对当前滤波器系数进行修正。In this embodiment, a training flag bit and a correction flag bit are set. The training flag bit is used to indicate whether the initial filter coefficient needs to be trained during the training process, and the correction flag bit is used to indicate whether it needs to be current in the filtering process. The filter coefficients are corrected.
需要说明的是,在其他实施例中,训练标志位也可以复用为在滤波过程中对当前滤波器系数是否需要进行修正进行标示,即训练标志位同时复用为修正标志位。It should be noted that, in other embodiments, the training flag bits may also be multiplexed to indicate whether the current filter coefficients need to be corrected during the filtering process, that is, the training flag bits are simultaneously multiplexed into the modified flag bits.
在另外一实施例中,所述第一通讯终端为上位机,所述第二通讯终端为下位机,所述第一通讯终端包括所述滤波器,详细通讯过程类似上述图1所示实施例。In another embodiment, the first communication terminal is a host computer, the second communication terminal is a lower computer, and the first communication terminal includes the filter, and the detailed communication process is similar to the embodiment shown in FIG. 1 above. .
需要说明的是,在上述实施例中,滤波器可以为数字滤波器。It should be noted that, in the above embodiment, the filter may be a digital filter.
图9为本申请实施例九中确定滤波器系数的装置的结构示意图;如图9所示,所述滤波器的估计输出由滤波器901根据滤波器当前时刻的输入信号确定;确定滤波器系数的装置包括的输出误差确定模块902和滤波器系数确定模块903如下说明:9 is a schematic structural diagram of an apparatus for determining a filter coefficient according to Embodiment 9 of the present application; as shown in FIG. 9, an estimated output of the filter is determined by a filter 901 according to an input signal of a current moment of a filter; and a filter coefficient is determined. The output error determination module 902 and the filter coefficient determination module 903 included in the apparatus are as follows:
输出误差确定模块902,用于根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差;An output error determining module 902, configured to determine an output error of the filter according to a target output of the filter and an estimated output;
滤波器系数确定模块903,用于根据所述滤波器的输出误差以及预定的第一阈值判断是否需要对当前滤波器系数进行修正,若判定需要对当前滤波器系数进行修正,则对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数,若判定不需要对当前滤波器系数进行修正,则将当前滤波器系数直接作为下一时刻的滤波器系数。The filter coefficient determining module 903 is configured to determine, according to the output error of the filter and the predetermined first threshold, whether the current filter coefficient needs to be corrected, and if it is determined that the current filter coefficient needs to be corrected, the current The filter coefficients are corrected to determine the filter coefficients at the next moment. If it is determined that the current filter coefficients need not be corrected, the current filter coefficients are directly used as the filter coefficients of the next moment.
可选地,在任一实施例中,滤波器系数确定模块903包括:Optionally, in any embodiment, the filter coefficient determining module 903 includes:
修订量确定单元,用于确定所述当前滤波器系数的修正量;a revision amount determining unit, configured to determine a correction amount of the current filter coefficient;
修正单元,用于根据所述当前滤波器系数的修正量对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数。And a correction unit, configured to modify the current filter coefficient according to the correction amount of the current filter coefficient to determine a filter coefficient at a next moment.
可选地,在任一实施例中,还包括:训练模块,用于在滤波器系数训练阶段根据预定的训练序列以及所述滤波器的输入信号,确定对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。Optionally, in any embodiment, the method further includes: a training module, configured to determine, according to a predetermined training sequence and an input signal of the filter, a filter processing on an input signal of a current moment of the filter in a filter coefficient training phase The current filter coefficient to use.
可选地,在任一实施例中,所述训练模块包括:Optionally, in any embodiment, the training module includes:
目标输出确定单元,用于对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出;a target output determining unit, configured to sample a predetermined training sequence to obtain a target output of the filter in a filter coefficient training phase;
估计输出确定单元,用于根据所述滤波器的输入信号,确定在滤波器系数训练阶段所述滤波器的估计输出;An estimated output determining unit configured to determine an estimated output of the filter during a filter coefficient training phase according to an input signal of the filter;
输出误差确定单元,用于根据在滤波器系数训练阶段所述滤波器的目标输出以及滤波器系数训练阶段所述滤波器的估计输出,确定在滤波器系数训练阶段所述滤波器的输出误差;An output error determining unit, configured to determine an output error of the filter in a filter coefficient training phase according to a target output of the filter in a filter coefficient training phase and an estimated output of the filter in a filter coefficient training phase;
滤波器系数确定单元,用于根据在滤波器系数训练阶段所述滤波器的输出误差以及预定的第二阈值,判断是否需要进行训练,若是,则进行训练得到对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。a filter coefficient determining unit, configured to determine whether training is required according to an output error of the filter in the filter coefficient training phase and a predetermined second threshold, and if so, performing training to obtain an input signal of a current time of the filter The current filter coefficient used in the filtering process.
需要说明的是,在一具体应用场景中,估计输出确定单元可以复用上述估
计输出确定模块,输出误差确定单元可以复用上述输出误差确定模块,滤波器系数确定单元可以复用上述滤波器系数确定单元。It should be noted that, in a specific application scenario, the estimated output determining unit may reuse the above estimation.
The output output determining unit may multiplex the output error determining module, and the filter coefficient determining unit may multiplex the filter coefficient determining unit.
可选地,在任一实施例中,还包括:训练次数判断模块,用于当需要进行训练时判断已训练的累计次数是否超过预定的训练次数门限,若未超过,则跳转到对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出,以继续进行训练。Optionally, in any embodiment, the method further includes: a training number determining module, configured to determine, when training is needed, whether the accumulated number of times of training exceeds a predetermined threshold of training times, and if not, jump to a predetermined The training sequence is sampled to obtain the target output of the filter during the filter coefficient training phase to continue training.
图10为本申请实施例十中终端的结构示意图;如图10所示,其包括:滤波器1001以及处理器1002,其中:10 is a schematic structural diagram of a terminal in Embodiment 10 of the present application; as shown in FIG. 10, it includes: a filter 1001 and a processor 1002, where:
所述滤波器1001用于根据所述滤波器当前时刻的输入信号,确定所述滤波器的估计输出;The filter 1001 is configured to determine an estimated output of the filter according to an input signal of a current moment of the filter;
所述处理器1002用于对接收的模拟信号进行采样得到采样信号并将其作为所述滤波器当前时刻的输入信号;The processor 1002 is configured to sample the received analog signal to obtain a sampling signal and use it as an input signal of the current moment of the filter;
所述处理器1002还用于根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差,再根据所述滤波器的输出误差以及预定的第一阈值判断是否需要对当前滤波器系数进行修正;The processor 1002 is further configured to determine an output error of the filter according to a target output and an estimated output of the filter, and determine, according to an output error of the filter and a predetermined first threshold, whether current filtering is needed. Correction of the coefficient of the device;
所述处理器1002还用于当判定需要对当前滤波器系数进行修正时通过对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数;The processor 1002 is further configured to: when determining that the current filter coefficient needs to be corrected, correct the current filter coefficient to determine a filter coefficient at a next moment;
所述处理器1002还用于当判定不需要对当前滤波器系数进行修正时将当前滤波器系数直接作为下一时刻的滤波器系数。The processor 1002 is further configured to directly use the current filter coefficient as the filter coefficient of the next moment when it is determined that the current filter coefficient does not need to be corrected.
可选地,在任一实施例中,所述滤波器1001进一步用于根据下一时刻的滤波器系数对所述滤波器下一时刻的输入信号进行滤波处理。Optionally, in any embodiment, the filter 1001 is further configured to perform filtering processing on an input signal of the filter at a next moment according to a filter coefficient at a next moment.
可选地,在任一实施例中,所述处理器1002进一步用于对所述滤波器的估计输出进行同步帧头检测、Manchester解码、循环冗余校验处理。Optionally, in any embodiment, the processor 1002 is further configured to perform synchronous frame header detection, Manchester decoding, and cyclic redundancy check processing on the estimated output of the filter.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, ie may be located A place, or it can be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,所述计算机可读记录介质包括用于以计算机(例如计算机)可读的形式存储或传送信息的任何机制。例如,机器可读介质包括只读存储器(ROM)、随机存取存储器(RAM)、磁盘存储介质、光存储介质、闪速存储介质、电、光、声或其他形式的传播信号(例如,载波、红外信号、数字信号等)等,该计算机软件产品包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on such understanding, portions of the above technical solutions that contribute substantially or to the prior art may be embodied in the form of a software product that may be stored in a computer readable storage medium, the computer readable record The medium includes any mechanism for storing or transmitting information in a form readable by a computer (eg, a computer). For example, a machine-readable medium includes read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , an infrared signal, a digital signal, etc., etc., the computer software product comprising instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the various embodiments or portions of the embodiments described Methods.
最后应说明的是:以上实施例仅用以说明本申请实施例的技术方案,而非
对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, and
The present invention is described in detail with reference to the foregoing embodiments, and those skilled in the art should understand that the technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalent. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.
本领域的技术人员应明白,本发明实施例的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the embodiments of the invention may be provided as a method, apparatus (device), or computer program product. Thus, embodiments of the invention may be in the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, embodiments of the invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明实施例是参照根据本发明实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the invention are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
Claims (18)
- 一种确定滤波器系数的方法,其特征在于,包括:A method for determining a filter coefficient, comprising:根据滤波器当前时刻的输入信号,确定所述滤波器的估计输出;Determining an estimated output of the filter based on an input signal at a current moment of the filter;根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差;Determining an output error of the filter based on a target output of the filter and an estimated output;根据所述滤波器的输出误差以及预定的第一阈值,判断是否需要对当前滤波器系数进行修正;Determining whether the current filter coefficient needs to be corrected according to an output error of the filter and a predetermined first threshold;若判定需要对当前滤波器系数进行修正,则对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数;If it is determined that the current filter coefficient needs to be corrected, the current filter coefficient is corrected to determine the filter coefficient at the next moment;若判定不需要对当前滤波器系数进行修正,则将当前滤波器系数直接作为下一时刻的滤波器系数。If it is determined that the current filter coefficient does not need to be corrected, the current filter coefficient is directly used as the filter coefficient of the next time.
- 根据权利要求1所述的方法,其特征在于,对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数包括:The method of claim 1 wherein modifying the current filter coefficients to determine filter coefficients for the next moment comprises:确定所述当前滤波器系数的修正量;Determining a correction amount of the current filter coefficient;根据所述当前滤波器系数的修正量对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数。The current filter coefficient is modified according to the correction amount of the current filter coefficient to determine a filter coefficient at a next moment.
- 根据权利要求1所述的方法,其特征在于,根据当前时刻滤波器的输入信号,确定所述滤波器的估计输出之前还包括:在滤波器系数训练阶段根据预定的训练序列以及所述滤波器的输入信号,确定对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。The method according to claim 1, wherein determining the estimated output of the filter according to an input signal of the current time filter further comprises: according to a predetermined training sequence and the filter in a filter coefficient training phase The input signal determines the current filter coefficient used when filtering the input signal at the current moment of the filter.
- 根据权利要求3所述的方法,其特征在于,根据预定的训练序列以及所述滤波器的输入信号,确定对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数包括:The method according to claim 3, wherein determining the current filter coefficients used in filtering the input signal of the current time of the filter according to the predetermined training sequence and the input signal of the filter comprises:对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出;Sampling a predetermined training sequence to obtain a target output of the filter during a filter coefficient training phase;根据在滤波器系数训练阶段所述滤波器的输入信号,确定在滤波器系数训练阶段所述滤波器的估计输出;Determining an estimated output of the filter during a filter coefficient training phase based on an input signal of the filter in a filter coefficient training phase;根据在滤波器系数训练阶段所述滤波器的目标输出以及滤波器系数训练阶段所述滤波器的估计输出,确定在滤波器系数训练阶段所述滤波器的输出误差;Determining an output error of the filter in a filter coefficient training phase according to a target output of the filter in a filter coefficient training phase and an estimated output of the filter in a filter coefficient training phase;根据在滤波器系数训练阶段所述滤波器的输出误差以及预定的第二阈值,判断是否需要进行训练,若是,则进行训练得到对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。Determining whether training is required according to the output error of the filter in the filter coefficient training phase and the predetermined second threshold, and if so, training to obtain a current filter used for filtering the input signal of the current time of the filter coefficient.
- 根据权利要求4所述的方法,其特征在于,还包括:若需要进行训练,则判断已训练的累计次数是否超过预定的训练次数门限,若未超过,则跳转到对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出,以继续进行训练。The method according to claim 4, further comprising: if training is required, determining whether the accumulated number of times of training exceeds a predetermined threshold of training times, and if not, jumping to a predetermined training sequence Sampling yields the target output of the filter at the filter coefficient training stage to continue training.
- 根据权利要求5所述的方法,其特征在于,若已训练的累计次数超过预定的训练次数门限,则结束训练。The method according to claim 5, wherein the training is ended if the accumulated number of times of training exceeds a predetermined threshold of training times.
- 根据权利要求3所述的方法,其特征在于,所述训练序列为随机序列或 伪随机序列。The method of claim 3 wherein said training sequence is a random sequence or Pseudo-random sequence.
- 根据权利要求3所述的方法,其特征在于,所述训练序列选自对所述滤波器在滤波阶段的估计输出进行解码得到的数据流。The method of claim 3 wherein said training sequence is selected from a data stream obtained by decoding an estimated output of said filter during a filtering phase.
- 根据权利要求1所述的方法,其特征在于,通过预定的修正标志位标示是否需要对当前滤波器系数进行修正。The method of claim 1 wherein the predetermined correction flag is used to indicate whether correction of the current filter coefficients is required.
- 根据权利要求3所述的方法,其特征在于,通过预定的训练标志位标示是否需要进行训练得到当前滤波器系数。The method according to claim 3, wherein the current filter coefficients are obtained by indicating whether training is required by a predetermined training flag.
- 一种确定滤波器系数的装置,其特征在于,包括:A device for determining a filter coefficient, comprising:输出误差确定模块,用于根据滤波器的目标输出以及估计输出,确定所述滤波器的输出误差;An output error determining module, configured to determine an output error of the filter according to a target output of the filter and an estimated output;滤波器系数确定模块,用于根据所述滤波器的输出误差以及预定的第一阈值判断是否需要对当前滤波器系数进行修正,若判定需要对当前滤波器系数进行修正,则对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数,若判定不需要对当前滤波器系数进行修正,则将当前滤波器系数直接作为下一时刻的滤波器系数;a filter coefficient determining module, configured to determine, according to an output error of the filter and a predetermined first threshold, whether the current filter coefficient needs to be corrected, and if it is determined that the current filter coefficient needs to be corrected, the current filtering is performed The coefficient is modified to determine the filter coefficient at the next moment. If it is determined that the current filter coefficient does not need to be corrected, the current filter coefficient is directly used as the filter coefficient of the next moment;其中,所述滤波器的估计输出由滤波器根据滤波器当前时刻的输入信号确定。Wherein the estimated output of the filter is determined by the filter based on the input signal at the current moment of the filter.
- 根据权利要求11所述的装置,其特征在于,滤波器系数确定模块包括:The apparatus according to claim 11, wherein the filter coefficient determining module comprises:修订量确定单元,用于确定所述当前滤波器系数的修正量;a revision amount determining unit, configured to determine a correction amount of the current filter coefficient;修正单元,用于根据所述当前滤波器系数的修正量对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数。And a correction unit, configured to modify the current filter coefficient according to the correction amount of the current filter coefficient to determine a filter coefficient at a next moment.
- 根据权利要求11所述的装置,其特征在于,还包括:训练模块,用于在滤波器系数训练阶段根据预定的训练序列以及所述滤波器的输入信号,确定对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。The apparatus according to claim 11, further comprising: a training module, configured to determine an input signal to a current time of the filter according to a predetermined training sequence and an input signal of the filter in a filter coefficient training phase The current filter coefficients used in the filtering process.
- 根据权利要求13所述的装置,其特征在于,所述训练模块包括:The device of claim 13, wherein the training module comprises:目标输出确定单元,用于对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出;a target output determining unit, configured to sample a predetermined training sequence to obtain a target output of the filter in a filter coefficient training phase;估计输出确定单元,用于在滤波器系数训练阶段根据所述滤波器的输入信号,确定在滤波器系数训练阶段所述滤波器的估计输出;An estimated output determining unit, configured to determine an estimated output of the filter in a filter coefficient training phase according to an input signal of the filter in a filter coefficient training phase;输出误差确定单元,用于根据在滤波器系数训练阶段所述滤波器的目标输出以及在滤波器系数训练阶段所述滤波器的估计输出,确定在滤波器系数训练阶段所述滤波器的输出误差;An output error determining unit configured to determine an output error of the filter in a filter coefficient training phase according to a target output of the filter in a filter coefficient training phase and an estimated output of the filter in a filter coefficient training phase ;滤波器系数确定单元,用于根据在滤波器系数训练阶段所述滤波器的输出误差以及预定的第二阈值,判断是否需要进行训练,若是,则进行训练得到对滤波器当前时刻的输入信号进行滤波处理时使用的当前滤波器系数。a filter coefficient determining unit, configured to determine whether training is required according to an output error of the filter in the filter coefficient training phase and a predetermined second threshold, and if so, performing training to obtain an input signal of a current time of the filter The current filter coefficient used in the filtering process.
- 根据权利要求14所述的装置,其特征在于,还包括:训练次数判断模块,用于当需要进行训练时判断已训练的累计次数是否超过预定的训练次数门限,若未超过,则所述目标输出确定单元继续对预定的训练序列进行采样得到在滤波器系数训练阶段所述滤波器的目标输出,以继续进行训练。 The apparatus according to claim 14, further comprising: a training number determining module, configured to determine whether the accumulated number of times of training exceeds a predetermined number of training times when training is required, and if not, the target The output determination unit continues to sample the predetermined training sequence to obtain a target output of the filter during the filter coefficient training phase to continue training.
- 一种终端,其特征在于,包括:处理器以及滤波器,其中:A terminal, comprising: a processor and a filter, wherein:所述滤波器用于根据所述当前时刻的输入信号,确定所述滤波器的估计输出;The filter is configured to determine an estimated output of the filter according to an input signal of the current moment;所述处理器用于对接收的模拟信号进行采样得到采样信号并将其作为所述滤波器当前时刻的输入信号;The processor is configured to sample the received analog signal to obtain a sampling signal and use it as an input signal of the current moment of the filter;所述处理器还用于根据所述滤波器的目标输出以及估计输出,确定所述滤波器的输出误差,再根据所述滤波器的输出误差以及预定的第一阈值判断是否需要对当前滤波器系数进行修正;The processor is further configured to determine an output error of the filter according to a target output of the filter and an estimated output, and determine whether a current filter is needed according to an output error of the filter and a predetermined first threshold. The coefficient is corrected;所述处理器还用于当判定需要对当前滤波器系数进行修正时通过对所述当前滤波器系数进行修正以确定下一时刻的滤波器系数;The processor is further configured to: when the current filter coefficient needs to be corrected, correct the current filter coefficient to determine a filter coefficient at a next moment;所述处理器还用于当判定不需要对当前滤波器系数进行修正时将当前滤波器系数直接作为下一时刻的滤波器系数。The processor is further configured to directly use the current filter coefficient as the filter coefficient of the next moment when it is determined that the current filter coefficient does not need to be corrected.
- 根据权利要求16所述的终端,其特征在于,所述滤波器进一步用于根据下一时刻的滤波器系数对所述滤波器下一时刻的输入信号进行滤波处理。The terminal according to claim 16, wherein the filter is further configured to filter the input signal of the filter at the next moment according to the filter coefficient at the next moment.
- 根据权利要求16所述的终端,其特征在于,所述处理器进一步用于对所述滤波器的估计输出进行同步帧头检测、Manchester解码、循环冗余校验处理。 The terminal according to claim 16, wherein the processor is further configured to perform synchronous frame header detection, Manchester decoding, and cyclic redundancy check processing on the estimated output of the filter.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/102108 WO2019051841A1 (en) | 2017-09-18 | 2017-09-18 | Method for determining filter coefficient and device therefor, and terminal |
CN201780001078.7A CN107820677B (en) | 2017-09-18 | 2017-09-18 | Method and device for determining filter coefficient and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2017/102108 WO2019051841A1 (en) | 2017-09-18 | 2017-09-18 | Method for determining filter coefficient and device therefor, and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019051841A1 true WO2019051841A1 (en) | 2019-03-21 |
Family
ID=61606870
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/102108 WO2019051841A1 (en) | 2017-09-18 | 2017-09-18 | Method for determining filter coefficient and device therefor, and terminal |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107820677B (en) |
WO (1) | WO2019051841A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108877824B (en) * | 2018-05-31 | 2022-03-25 | 西南交通大学 | Combined step echo cancellation method with high tracking performance |
WO2020008627A1 (en) * | 2018-07-06 | 2020-01-09 | 三菱電機株式会社 | Filtering device, sensor device, filtering method and program |
CN112637610A (en) * | 2019-09-24 | 2021-04-09 | 富士通株式会社 | Coefficient acquisition device and method for deblocking filter, and image encoding and decoding device |
CN112865753B (en) * | 2020-12-28 | 2023-04-07 | 珠海格力电器股份有限公司 | Filter coefficient adjusting method and device, storage medium and filter |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103078640A (en) * | 2013-01-16 | 2013-05-01 | 华南理工大学 | RLS (Recursive Least Square) adaptive filtering calibration algorithm for ADC (Analog Digital Converter) |
JP2016090799A (en) * | 2014-11-05 | 2016-05-23 | 日本電信電話株式会社 | Noise suppression device, and method and program for the same |
CN105635008A (en) * | 2016-04-01 | 2016-06-01 | 电子科技大学 | Adaptive equalization method and device, and adaptive equalizer |
CN106157965A (en) * | 2016-05-12 | 2016-11-23 | 西南交通大学 | A kind of zero norm collection person's illumination-imitation projection self-adoptive echo cancel method reused based on weight vector |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101807903B (en) * | 2010-03-26 | 2012-05-23 | 深圳市云海通讯股份有限公司 | Self-adapting filter, filtration method and repeater |
CN103179296B (en) * | 2011-12-26 | 2017-02-15 | 中兴通讯股份有限公司 | Echo canceller and echo cancellation method |
CN103138714A (en) * | 2013-03-19 | 2013-06-05 | 苏州朗宽电子技术有限公司 | Hardware implementation of least means square (LMS) self-adapting filter with high performance |
US9485121B2 (en) * | 2014-01-27 | 2016-11-01 | Multiphy Ltd. | Digital baud rate clock recovery of heavily ISI-induced signals |
-
2017
- 2017-09-18 WO PCT/CN2017/102108 patent/WO2019051841A1/en active Application Filing
- 2017-09-18 CN CN201780001078.7A patent/CN107820677B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103078640A (en) * | 2013-01-16 | 2013-05-01 | 华南理工大学 | RLS (Recursive Least Square) adaptive filtering calibration algorithm for ADC (Analog Digital Converter) |
JP2016090799A (en) * | 2014-11-05 | 2016-05-23 | 日本電信電話株式会社 | Noise suppression device, and method and program for the same |
CN105635008A (en) * | 2016-04-01 | 2016-06-01 | 电子科技大学 | Adaptive equalization method and device, and adaptive equalizer |
CN106157965A (en) * | 2016-05-12 | 2016-11-23 | 西南交通大学 | A kind of zero norm collection person's illumination-imitation projection self-adoptive echo cancel method reused based on weight vector |
Non-Patent Citations (1)
Title |
---|
SHYNK, J.J.: "Adaptive IIR Filtering", IEEE ASSP MAGAZIN, 30 April 1998 (1998-04-30), XP011437202 * |
Also Published As
Publication number | Publication date |
---|---|
CN107820677A (en) | 2018-03-20 |
CN107820677B (en) | 2021-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019051841A1 (en) | Method for determining filter coefficient and device therefor, and terminal | |
CN103854649B (en) | A kind of frame losing compensation method of transform domain and device | |
US9978400B2 (en) | Method and apparatus for frame loss concealment in transform domain | |
CN110265052B (en) | Signal-to-noise ratio determining method and device for radio equipment, storage medium and electronic device | |
CN109102821B (en) | Time delay estimation method, time delay estimation system, storage medium and electronic equipment | |
US9916837B2 (en) | Methods and apparatuses for transmitting and receiving audio signals | |
CN111628946B (en) | Channel estimation method and receiving equipment | |
CN111462000B (en) | Image recovery method and device based on pre-training self-encoder | |
BRPI0812029B1 (en) | method of recovering hidden data, telecommunication device, data hiding device, data hiding method and upper set box | |
WO2014100794A1 (en) | Echo suppression | |
RU2705458C2 (en) | Masking errors in frames | |
JP6511897B2 (en) | Noise reduction device, noise reduction method and program | |
CN105432062A (en) | Echo removal | |
US10325605B2 (en) | Audio decoder state update for packet loss concealment | |
CN105409191A (en) | Echo removal | |
JP2016506673A (en) | Echo suppression | |
KR102303289B1 (en) | Method and apparatus for improving phase measurement accuracy | |
JP2016503262A (en) | Echo suppression | |
CN114611542A (en) | Signal noise reduction processing method and communication device | |
KR20160145711A (en) | Systems, methods and devices for electronic communications having decreased information loss | |
WO2014126630A1 (en) | System and method for broadband doppler compensation | |
CN111402905A (en) | Audio data recovery method and device and Bluetooth equipment | |
CN103430233B (en) | For the scrambler of predictability coding and method, for the code translator of decoding and method, for the system and method for predictability coding and decoding and predictability encoded information signal | |
RU2130233C1 (en) | Transmission device which recovers lost signal samples | |
US11642087B2 (en) | Method and apparatus for pre-processing PPG signal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17925344 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17925344 Country of ref document: EP Kind code of ref document: A1 |