CN114997233B - Signal processing method and device and electronic equipment - Google Patents
Signal processing method and device and electronic equipment Download PDFInfo
- Publication number
- CN114997233B CN114997233B CN202210643786.3A CN202210643786A CN114997233B CN 114997233 B CN114997233 B CN 114997233B CN 202210643786 A CN202210643786 A CN 202210643786A CN 114997233 B CN114997233 B CN 114997233B
- Authority
- CN
- China
- Prior art keywords
- signal
- image
- processing
- sampling
- processed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000005070 sampling Methods 0.000 claims abstract description 171
- 238000012545 processing Methods 0.000 claims abstract description 141
- 230000010354 integration Effects 0.000 claims abstract description 55
- 238000000034 method Methods 0.000 claims abstract description 35
- 238000003384 imaging method Methods 0.000 claims abstract description 24
- 238000001914 filtration Methods 0.000 claims abstract description 21
- 230000006870 function Effects 0.000 claims description 38
- 230000003044 adaptive effect Effects 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 21
- 238000010586 diagram Methods 0.000 description 25
- 238000004422 calculation algorithm Methods 0.000 description 22
- 230000008859 change Effects 0.000 description 15
- 238000004088 simulation Methods 0.000 description 12
- 238000004458 analytical method Methods 0.000 description 8
- 238000012360 testing method Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 230000006835 compression Effects 0.000 description 5
- 238000007906 compression Methods 0.000 description 5
- 238000012795 verification Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 230000035945 sensitivity Effects 0.000 description 3
- 238000000354 decomposition reaction Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003121 nonmonotonic effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Image Processing (AREA)
Abstract
The invention provides a signal processing method, a signal processing device and electronic equipment, which are used for carrying out imaging processing on an acquired sampling signal to be processed to obtain an image to be identified; performing gain processing on the image to be identified to obtain a gain processed image; determining an integration step length according to a preset sampling period, the image area of the image after gain processing and the line segment area; and inputting the integral step length into a function corresponding to a preset tracking differentiator, and outputting a signal subjected to denoising and filtering treatment on the sampling signal to be processed. The method is used for carrying out imaging processing on the sampling signal to be processed, calculating an integral step length based on the obtained image to be identified, and carrying out denoising filtering processing on the sampling signal to be processed based on the preset tracking differentiator, so that the tracking differentiator can autonomously select the integral step length according to the dynamic characteristics of the current sampling signal, and has a good denoising effect on discrete signals with low signal sampling frequency, high signal-to-noise ratio and complex and changeable signal waveforms.
Description
Technical Field
The present invention relates to the field of signal processing technologies, and in particular, to a signal processing method, a signal processing device, and an electronic device.
Background
The existing denoising filters are various in variety, such as a low-pass filter and a wavelet denoising filter starting from the frequency domain; or least square fitting denoising, numerical moving average denoising and the like which are started in the time domain; and tracking differentiator algorithm based on the fastest tracking, etc., the denoising methods have certain feasibility under certain use environments, but are difficult to achieve better denoising effect in working environments with low signal-to-noise ratio, low signal sampling frequency and complex and changeable signal waveforms.
Disclosure of Invention
The invention aims to provide a signal processing method, a signal processing device and electronic equipment, which are used for achieving a better denoising effect in a working environment with low signal-to-noise ratio, low signal sampling frequency and complex and changeable signal waveforms.
The invention provides a signal processing method, which comprises the following steps: acquiring a sampling signal to be processed; carrying out imaging processing on the sampling signal to be processed to obtain an image to be identified corresponding to the sampling signal to be processed; performing gain processing on the image to be identified to obtain a gain processed image; determining an integration step length according to a preset sampling period, the image area of the image after gain processing and the line segment area of a sampling signal in the image after gain processing; and inputting the integral step length into a function corresponding to a preset tracking differentiator, and outputting a signal subjected to denoising and filtering treatment on the sampling signal to be processed.
Further, the step of performing gain processing on the image to be identified to obtain a gain processed image includes: acquiring a preset reference value, and calculating a longitudinal gain coefficient according to the reference value and the longitudinal dimension of the image to be identified; and processing the image to be identified according to the longitudinal gain coefficient to obtain a gain processed image.
Further, the step of determining the integration step length according to a preset sampling period, an image area of the image after the gain processing, and a line segment area of a sampling signal in the image after the gain processing includes: calculating the image area of the image after the gain processing according to the transverse size and the longitudinal size of the image after the gain processing; calculating the sum of absolute values of differences between signal values corresponding to every two adjacent signal points in the image after the gain processing to obtain a sum result; calculating the product of the addition result and the sampling period to obtain the line segment area of the sampling signal in the image after gain processing; the integration step is determined based on the sampling period, the image area, and the line segment area.
Further, the step of determining the integration step based on the sampling period, the image area, and the line segment area includes: acquiring a preset integral step length self-adaptive function; calculating the ratio of the image area to the line segment area to obtain an area ratio; inputting the area ratio to an integral step length self-adaptive function to obtain a self-adaptive function output result; and calculating the ratio of the sampling period to the output result of the self-adaptive function to obtain the integral step length.
Further, the step of obtaining the sample signal to be processed includes: acquiring an analog signal to be processed and a preset signal window width; sampling the analog signal according to the sampling period to obtain an initial sampling signal; and selecting a sampling signal to be processed from the initial sampling signals according to the width of the signal window.
The invention provides a signal processing device, which comprises: the acquisition module is used for acquiring a sampling signal to be processed; the imaging processing module is used for carrying out imaging processing on the sampling signal to be processed to obtain an image to be identified corresponding to the sampling signal to be processed; the gain processing module is used for performing gain processing on the image to be identified to obtain a gain processed image; the determining module is used for determining an integration step length according to a preset sampling period, the image area of the image after gain processing and the line segment area of a sampling signal in the image after gain processing; the output module is used for inputting the integral step length into a function corresponding to a preset tracking differentiator and outputting a signal subjected to denoising and filtering processing on the sampling signal to be processed.
Further, the gain processing module is further configured to: acquiring a preset reference value, and calculating a longitudinal gain coefficient according to the reference value and the longitudinal dimension of the image to be identified; and processing the image to be identified according to the longitudinal gain coefficient to obtain a gain processed image.
Further, the determining module is further configured to: calculating the image area of the image after the gain processing according to the transverse size and the longitudinal size of the image after the gain processing; calculating the sum of absolute values of differences between signal values corresponding to every two adjacent signal points in the image after the gain processing to obtain a sum result; calculating the product of the addition result and the sampling period to obtain the line segment area of the sampling signal in the image after gain processing; the integration step is determined based on the sampling period, the image area, and the line segment area.
The invention provides an electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the signal processing method of any one of the above.
The invention provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement a signal processing method of any of the above.
The invention provides a signal processing method, a signal processing device and electronic equipment, which are used for acquiring a sampling signal to be processed; carrying out imaging processing on the sampling signal to be processed to obtain an image to be identified corresponding to the sampling signal to be processed; performing gain processing on the image to be identified to obtain a gain processed image; determining an integration step length according to a preset sampling period, the image area of the image after gain processing and the line segment area of a sampling signal in the image after gain processing; and inputting the integral step length into a function corresponding to a preset tracking differentiator, and outputting a signal subjected to denoising and filtering treatment on the sampling signal to be processed. The method is used for carrying out imaging processing on the sampling signal to be processed, calculating an integral step length based on the obtained image to be identified, and carrying out denoising filtering processing on the sampling signal to be processed based on the preset tracking differentiator, so that the tracking differentiator can autonomously select the integral step length according to the dynamic characteristics of the current sampling signal, and has a good denoising effect on discrete signals with low signal sampling frequency, high signal-to-noise ratio and complex and changeable signal waveforms.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a signal processing method according to an embodiment of the present invention;
fig. 2 is a flowchart of another signal processing method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a signal processing effect according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another signal processing effect according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another signal processing effect according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of another signal processing effect according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a tracking signal of a post-processing algorithm according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating signal curve decomposition according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of an imaging process according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a gain processed image according to an embodiment of the present invention;
FIG. 11 is a graph showing a comparison of curves according to an embodiment of the present invention;
Fig. 12 is a schematic diagram of a signal processing result according to an embodiment of the present invention;
fig. 13 is a schematic diagram of a signal processing result according to an embodiment of the present invention;
FIG. 14 is a graph showing a comparison of curves according to an embodiment of the present invention;
FIG. 15 is a graph showing experimental data after processing according to an embodiment of the present invention;
FIG. 16 is a schematic diagram of a simulation result provided by an embodiment of the present invention;
FIG. 17 is a schematic diagram of a P W curve corresponding to different signal window widths according to an embodiment of the present invention;
Fig. 18 is a schematic structural diagram of a signal processing device according to an embodiment of the present invention;
fig. 19 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be clearly and completely described in connection with the embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The existing denoising filters are various in variety, such as a low-pass filter and a wavelet denoising filter starting from the frequency domain; or least square fitting denoising, numerical moving average denoising and the like which are started in the time domain; and a tracking differentiator algorithm based on the fastest tracking. These denoising methods are difficult to effectively perform in working environments with low signal-to-noise ratio (not higher than 40 dB), low signal sampling frequency (not higher than 50 Hz) and complex and variable signal waveforms. The reasons for this are mainly the following:
1) Methods such as least squares fitting and moving average denoising, which are methods of performing calculation and analysis on past data points, essentially smooth an output signal curve by smoothing current signal noise with a plurality of received points. However, if an excellent denoising effect is desired, it is necessary to use more conventional data points, and the more conventional data points, the more the phase lag of the output signal becomes, the more serious. At the same time the problem of low sampling frequency also significantly aggravates this contradiction.
2) Because the waveforms of the sampling signals are complex and changeable, the working bandwidths of the low-pass filter and the wavelet denoising filter often cannot completely cover the bandwidths of the input signals, and the output result is greatly influenced.
3) The low signal sampling frequency and signal to noise ratio makes it difficult for the tracking differential algorithm to meet the technical indexes of high output smoothness and small hysteresis at the same time.
Based on the above, the embodiment of the invention provides a signal processing method, a signal processing device and electronic equipment, and the technology can be applied to applications requiring denoising and filtering processing on a sampling signal.
For the convenience of understanding the present embodiment, first, a signal processing method disclosed in the embodiment of the present invention is described in detail; as shown in fig. 1, the method comprises the steps of:
Step S102, obtaining a sampling signal to be processed.
The signal to be processed may be a signal obtained by performing discrete sampling on an analog signal, where noise is generally included in the signal to be processed, and noise in the signal to be processed needs to be filtered to obtain an effective signal of the signal to be processed.
Step S104, performing imaging processing on the sampling signal to be processed to obtain an image to be identified corresponding to the sampling signal to be processed.
In a signal curve corresponding to a sample signal to be processed, the thickness of the curve has close relation with the change trend of the signal. The thinner the curve, the greater the signal trend. Corresponding verification shows that by using the thickness information, the change trend can be effectively extracted from the noise sampling signal in real time. However, the information of the thickness is difficult to identify, so that the sample signal to be processed can be subjected to imaging processing, and the thickness information in the signal curve can be more conveniently identified by corresponding image processing on the image to be identified after the imaging processing.
Step S106, performing gain processing on the image to be identified to obtain a gain processed image.
A key difficulty in extracting the "thickness" information is that the "thickness" of the curve has both longitudinal and transverse components unless the sampled signal is in steady state, however the transverse component is difficult to obtain. Therefore, the image to be identified can be subjected to gain processing to obtain an image after gain processing, and the thickness difference of the curve in the image after gain processing can be clearly shown.
Step S108, determining an integration step length according to a preset sampling period, the image area of the image after gain processing and the line segment area of a sampling signal in the image after gain processing;
the sampling period may be a time interval between two adjacent sampling signal points in the to-be-processed sampling signal; the image area may be a product of a longitudinal dimension and a lateral dimension of the gain-processed image; the line segment area can be understood as the area actually covered by the signal curve of the sampling signal in the image after the gain processing; in actual implementation, the integration step length may be determined according to a preset sampling period, an image area of the image after gain processing, and a line segment area.
Step S110, inputting the integral step length into a function corresponding to a preset tracking differentiator, and outputting a signal subjected to denoising and filtering processing on the sampling signal to be processed.
The function corresponding to the tracking differentiator may be a function based on fhan, and the integration step length may be substituted into a preset function fhan to calculate a filtered output signal, where the filtered output signal is a signal after denoising and filtering the sampled signal to be processed.
The following provides a flowchart of another signal processing method as shown in fig. 2, in which an analog signal is input into a hardware signal acquisition system to output discrete signals, an operator completes relevant settings such as signal window width, integration step length self-adaptive selection function, etc. in advance, the discrete signals are subjected to imaging processing, the output images are subjected to image analysis and step length selection, and the selected integration step length h is substituted into fhan functions to calculate a filtered output signal, so as to obtain an output signal. The tracking differentiator based on fhan is improved based on the image recognition concept, so that the tracking differentiator can adaptively select a proper integration step length according to the dynamic characteristics of the current input signal, and the denoising filtering level of the tracking differentiator is greatly improved.
The working principle of a conventional fhan-based tracking differentiator is briefly described below: a second-order integral serial system is designed artificially, so that the first-order state and the second-order state of the system are respectively a tracking signal of a sampling signal and a differential signal of the tracking signal; based on this, the first order state parameter of the system is made to track the input of the sampling signal by setting the control input of the system. Therefore, as long as the phase lag of the second order system is small enough, the tracking effect can meet the precision and denoising effect, the output of this first order state parameter can be regarded as the denoising filter output of the sampling signal. Whereby the discrete form of the system is as follows:
Wherein x 1 is the tracking signal of the sampling signal, x 2 is the differential signal of the tracking signal, the parameter r is the constraint condition of the system control input, v (k) is the sampling signal input, u (k) is the control input set for human, h is the integration step length of the tracking differentiator, and the integration step length is consistent with the sampling period of the signal.
In the prior art, according to a time optimal control algorithm, a discrete control amount u (k) is obtained as follows (fhan):
Thus, the tracking differentiator algorithm based on fhan above is as follows:
the above is the general principle of operation of tracking differentiators based on fhan in the prior art.
The following is a proof of fhan function algorithm improvement and feasibility, and the test verification and mathematical analysis prove that the denoising effect of the tracking differentiator is closely related to the integration step length. When the integral step length is too large, on one hand, the convergence speed of tracking output can be reduced when the sampling signal is in a dynamic state; on the other hand, the sampled signal amplifies the sensitivity of the tracking output to noise when in steady state. The integration step of the original tracking differentiator is consistent with the sampling period of the signal, which means that the tracking differentiator is difficult to exert the due operating level when the sampling frequency is low.
Based on this, the present embodiment enables the tracking differentiator to autonomously select the integration step size according to the dynamic characteristics of the current sampled signal by designing a set of adaptive algorithms. Specifically, when the change speed of the sampling signal is slow, the integration step length is reduced appropriately; when the change speed of the sampling signal is high, the integration step length is properly taken to be large (not larger than the sampling period). Therefore, the aim of improving the operation efficiency of the differential tracker is achieved.
The feasibility of this improvement is demonstrated below:
1) It has been shown that the integration step size of the tracking differentiator does not cause a mismatch between the denoising filter output and the sampled signal input when the integration step size is different from the signal sampling period.
First defined as follows:
The equation is the compression factor of the integration step, where dt is the signal sampling period, h represents the integration step, and K t characterizes the ratio of the signal sampling period to the integration step.
Consider a sinusoidal discrete signal as follows:
v(i)=A·sin(i·h·Kt+θ)
where A is the amplitude of the signal, θ is the initial phase, and i is the sequence position of the current signal.
From the definition of Kt, the form of v (i) is known to have for any real number K t:
v(i)=A·sin(i·dt+θ)
It follows that if the values of h are different from the value sequence only and not from the time point of view, the discrete input signals can be regarded as signals at different step sizes h as follows as long as the sampled signals satisfy the form of v (i) described above:
v(i)=A·sin(i·dt+θ)
This phenomenon can be intuitively reflected by one signal processing effect diagram shown in fig. 3, another signal processing effect diagram shown in fig. 4, and another signal processing effect diagram shown in fig. 5. In the figure, v is a sampling signal, x 1 is a denoising output signal, dt is a sampling period, and T is simulation duration.
2) It has been shown that the denoising effect can be effectively improved by changing the integration step size of the tracking differentiator.
In numerical simulation, the given input signal is v (t) =10sin0.5t+n, and the signal acquisition period dt=0.02 s, where n is random noise in the (-0.5, 0.5) interval. Another signal processing effect is shown schematically in fig. 6, which shows the tracking signal of the tracking differentiator algorithm for the original integration step size in the interval 0-100 s.
The integral step size of the original tracking differentiator is then reduced to one fifth of the original step size, and the remaining parameters are unchanged, resulting in a tracking signal diagram of a post-processing algorithm as shown in fig. 7.
As is apparent from comparing fig. 6 and fig. 7, in terms of smoothness of signal output, by shortening the integration step length of the differentiator, the smoothness of signal tracking filtering can be effectively improved while ensuring the phase quality of signal processing. Therefore, for an ambient pressure signal with a single state, namely a signal with a relatively single change rate, the processing level of the signal can be effectively improved by reasonably setting the integration step length of the tracking differentiator.
The above filter for denoising the discrete sampled signal in real time may be generally described as follows: firstly, a current discrete sampling signal is obtained, then, signal analysis and denoising processing are carried out on the sampling signal through a built-in algorithm, and finally, the denoised signal is synchronously output. The denoising filter may be characterized by: 1) The signal-to-noise ratio is improved; 2) The phase lag is small; 3) The stability is strong, namely, the method can effectively adapt to signals with different dynamic characteristics.
The signal processing method is used for obtaining a sampling signal to be processed; carrying out imaging processing on the sampling signal to be processed to obtain an image to be identified corresponding to the sampling signal to be processed; performing gain processing on the image to be identified to obtain a gain processed image; determining an integration step length according to a preset sampling period, the image area of the image after gain processing and the line segment area of a sampling signal in the image after gain processing; and inputting the integral step length into a function corresponding to a preset tracking differentiator, and outputting a signal subjected to denoising and filtering treatment on the sampling signal to be processed. The method is used for carrying out imaging processing on the sampling signal to be processed, calculating an integral step length based on the obtained image to be identified, and carrying out denoising filtering processing on the sampling signal to be processed based on the preset tracking differentiator, so that the tracking differentiator can autonomously select the integral step length according to the dynamic characteristics of the current sampling signal, and has a good denoising effect on discrete signals with low signal sampling frequency, high signal-to-noise ratio and complex and changeable signal waveforms.
The embodiment of the invention also provides another signal processing method, which is realized on the basis of the method of the embodiment; the method comprises the following steps:
step one, obtaining an analog signal to be processed and a preset signal window width.
The analog signal refers to information represented by a continuously variable physical quantity, the amplitude, frequency, or phase of which continuously varies with time, or a signal whose characteristic quantity representing information can be represented as an arbitrary value at an arbitrary instant in a continuous time interval. The signal window width is understood to be the number of signal points used by the tracking differentiator each time the output signal is calculated. For example, when the calculation of the i-th signal point is performed, assuming that the signal window width is W, the signal point used for the analysis calculation is W signal points between the i-W-th to i-th signals.
And step two, sampling the analog signal according to the sampling period to obtain an initial sampling signal. In actual implementation, the analog signal may be input to a hardware signal acquisition system, and the hardware signal acquisition system performs discrete sampling on the analog signal to obtain a discrete initial sampling signal.
And thirdly, selecting a sampling signal to be processed from the initial sampling signals according to the width of the signal window.
For example, if the signal window width is W, W signal points are included in the sample signal to be processed selected from the initial sample signal.
Through multiple simulation experiments and mathematical deductions, the following analysis is performed before the specific algorithm is defined: 1) Since the output power of the controller executing part is limited, the integration step h will affect the output phase of the tracking differentiator (the larger h is more likely to cause more serious phase lag); 2) When the sampled signal is in steady state, the main problem for the tracking differentiator is denoising rather than phase lag; 3) For a tracking differentiator, the sensitivity of the output phase lag to the h value is proportional to the rate of change of the sampled signal.
Based on the above study, a preliminary integration step selection strategy can be stated as: the compression of the integration step is proportional to the intensity of the current sample signal change. Thus, the main problem of the algorithm design of this embodiment is to make clear how to extract the current signal change rate information from the noisy real-time sampled data.
Since the sampled signals exhibit waveforms of different forms under different conditions, for ease of analysis, these signal curves are decomposed into five forms, a signal curve decomposition diagram as shown in fig. 8. The five types of images shown in (a), (b), (c), (d) and (e) in fig. 8 are stretched, longitudinally turned over and spliced to form any signal form currently existing. These five types of signal curves may be used for training of image recognition algorithms. Theoretically, the algorithm should be able to process any type of sampled signal after training based on superposition principles.
And fourthly, performing imaging processing on the sampling signal to be processed to obtain an image to be identified corresponding to the sampling signal to be processed.
By observing these five types of signal curves in fig. 8, it can be seen that the "thickness" of the curves has a close relationship with the trend of the signal. The thinner the curve, the greater the signal trend. Corresponding verification shows that by using the thickness information, the change trend can be effectively extracted from the noise sampling signal in real time. However, the information "thickness" is difficult to recognize. To solve this problem, an image recognition algorithm is introduced. The method comprises the following specific steps:
1) Sampling signal imaging
Signal points near the current sampled signal are used as signal windows for image recognition. An imaging process is schematically shown in fig. 9.
And fifthly, acquiring a preset reference value, and calculating a longitudinal gain coefficient according to the reference value and the longitudinal dimension of the image to be identified.
When the sampled signal is not in a steady state, the "thickness" of the curve has both longitudinal and transverse components, whereas the transverse component is difficult to obtain. On the other hand, the relative duty cycle of the transverse component is inversely proportional to the slope of the signal curve, while the slope is proportional to the longitudinal dimension l. Based on this analysis, a longitudinal gain factor P y can be established for identifying the slope of the curve. Specifically, the longitudinal dimension of the signal image is measured and P y=l0/l is set, wherein l 0 corresponds to the reference value and corresponds to the longitudinal dimension of the steady-state sampling signal image; l is the longitudinal dimension of the image to be identified. As shown in fig. 10, a schematic diagram of the gain-processed image is shown, and the coefficient P y is multiplied by l, as shown in fig. 10 (a). As a comparison, an image corresponding to the stable signal is shown in fig. 10 (b).
And step six, processing the image to be identified according to the longitudinal gain coefficient to obtain a gain processed image.
And performing gain processing on the image to be identified according to the longitudinal gain coefficient to obtain the image after the gain processing. Comparing (a) and (b) in fig. 10, the "thickness" difference of the curves in the images is clearly visualized. Further, as can be seen from the image, the information of the curve "thickness" can be defined by calculating the area of the line segment portion in the image. Thus, the tracking differentiator can extract the trend of the change of the sampled signal using numerical calculation.
And step seven, calculating the image area of the image after the gain processing according to the transverse size and the longitudinal size of the image after the gain processing.
For the obtained gain processed image, its longitudinal and lateral dimensions are set to i and t d, respectively, where i is the difference between the maximum and minimum values within the signal window and t d is the time span of the signal window. The image area thus obtained can be expressed as:
S=td×l
And step eight, calculating the sum of absolute values of differences between signal values corresponding to every two adjacent signal points in the image after gain processing, and obtaining a sum result.
And step nine, calculating the product of the addition result and the sampling period to obtain the line segment area of the sampling signal in the image after gain processing.
Let the area of the line segment portion in the signal image be S S.
Obviously, there are:
Where v (·) is the signal value and n is the number of signal points within the signal window.
And step ten, determining an integration step length based on the sampling period, the image area and the line segment area.
The tenth step can be realized by the following steps a to D:
step A, obtaining a preset integral step length self-adaptive function;
Step B, calculating the ratio of the image area to the line segment area to obtain an area ratio;
step C, inputting the area ratio into an integral step length self-adaptive function to obtain a self-adaptive function output result;
and D, calculating the ratio of the sampling period to the output result of the self-adaptive function to obtain an integration step length.
The "thickness" of the signal curve can be reflected by the line segment area of the signal image in the foregoing process. Since each signal image has the same area, a thickness coefficient Pw is introduced for convenience, and is defined as follows:
thus, the "thickness" of the sampled signal curve can be characterized by the area ratio of the line segment portions to the entire image. Obviously, P w is inversely proportional to the "thickness" of the current time step downsampled signal curve, i.e. proportional to the rate of change of the sampled signal. For the obtained coefficient P w, it can be used to construct an adaptive integration step selection algorithm that tracks the differentiator. Such as:
Kt=f(Pw)
Where f (P w) is a function related to the coefficient P w, and needs to be preset by an operator according to the characteristics of the sampled signal and the requirement of the operator.
In particular, it is possible to define in advance
Where K t is the compression factor of the integration step, where dt is the signal sampling period, i.e., K t characterizes the ratio of the signal sampling period to the integration step.
Thus, the integration step h can be obtained by calculating the ratio of dt to K t.
The step size selection function K t=f(Pw) or h=f (P w) is a function of the step size with respect to the coefficient P W, and when the window width W is selected to be different, the overall change of P W occurs correspondingly. Thus, after determining the window width of the signal, analog simulation filtering should be performed through the historical sampling data to determine the approximate range of P W, and then clearly determine when P W is equal to how small the integration step is maximized or minimized as needed.
And step eleven, inputting the integral step length into a function corresponding to a preset tracking differentiator, and outputting a signal subjected to denoising and filtering treatment on the sampling signal to be processed.
The image recognition algorithm is verified using an artificial signal as an example. Let the sampling frequency of the artificial sampling signal be 50Hz and the signal to noise ratio be 26dB. Referring to fig. 11, a graph is shown, which is a graph comparing a signal curve of a sample signal to be processed with a P w curve according to the foregoing steps.
From a comparison of the two curves in fig. 11, it is known that P w has a higher sensitivity to the change of the trend of the sampled signal v to be processed, the hysteresis is low and is hardly affected by noise, and the steady-state region and the dynamic region of v are obviously distinguished on the P w curve, so that it is sufficient to provide clear dynamic characteristic information.
For this example, the selected strategy for setting the integration step size is shown in the following formula.
Where K tmax is the maximum compression factor for dt, K tmin is the minimum compression factor for dt, P wmin is the corresponding P w value when h has just taken the minimum value, and P wmax is the corresponding P w value when h has just taken the maximum value. The four parameters K tmax、Ktmin、Pwmin、Pwmax are preset by considering the characteristics of the system itself, and are set here as: [ K tmax Ktmin Pwmin Pwmax ] = [15 15 15].
A schematic diagram of the signal processing result is shown in fig. 12, which is a schematic diagram of the output of the real-time step h of the tracking differentiator with respect to the sensor acquisition signal.
As can be seen from fig. 12, the step size real-time selection strategy performed by the embodiments herein can effectively set a reasonable tracking differentiator real-time step size under different acquired signal trends. The method directly determines the rationality selected by the integral step length of the current differentiator for the prediction speed and the precision of the dynamic characteristics of the acquired signals and finally influences the quality of the tracking differential signal processing.
The denoising filter algorithm is subjected to simulation verification and result analysis through the artificial numerical value signal and the actual test data.
The artificial sampling signal shown in fig. 12 is taken for simulation verification, and relevant parameters are set as follows: the signal sampling interval dt is 0.02s, the total signal duration T is 1600s, the signal-to-noise ratio is 26dB, the signal window width W is 300, the constraint condition r is 10 (the value corresponds to the upper limit of the output power of the controller), the minimum and maximum equal division multiples K tmin and K tmax are respectively 6 and 10, and P wmin and P wmax are respectively 3.5 and 6. This simulation was performed to obtain a signal processing result diagram as shown in fig. 13. Comparing the tracking output curve of the fixed step tracking differentiator with the tracking output curve of the modified variable step tracking differentiator, a curve comparison diagram is obtained as shown in fig. 14.
As can be seen from fig. 13 and 14, the novel denoising filter constructed based on the image recognition algorithm and the variable step tracking differentiator algorithm can perform denoising filtering on the sampling signal better than the original fixed step tracking differentiator. The concrete steps are as follows: the distortion degree of the signal is effectively reduced in the sine fluctuation section, the smoothness of the signal is obviously improved in the stable section, and the signal-to-noise ratio of the output signal is greatly improved.
The actual pressure sampling data of a certain air pipe network system is selected for real-time simulation (test data are provided by a high-altitude simulation laboratory of the China aeronautical turbine institute). Since the set of test data is subjected to a certain data smoothing process before being derived, the real-time signal obtained by the sensor is lower in signal-to-noise ratio than the set of data. In this example, in order to better illustrate the reliability and engineering application capability of the method, artificial gaussian noise superposition within (-0.5, 0.5) is performed on the set of test collected data, so as to obtain a graph of the processed test data as shown in fig. 15.
Referring to a schematic diagram of simulation results shown in fig. 16, the foregoing parameter selection step is performed on the curve, and the simulation results are shown in fig. 16 (a) and (b) below. As can be seen from the comparison curve in the graph (b) in fig. 16, the method adopted herein can still effectively process the data of the actual test and obtain a more ideal output result.
The denoising filter designed in this embodiment requires an operator to perform correlation settings, including the signal window width and the integration step size selection function, before use. The setting of these parameters and functions affects the operating efficiency of the filter to a large extent. The rules that should be followed by the filter-related settings will be briefly described below.
The signal window width affects the sharpness of the curve of the "thickness" coefficient P W, as shown in a graph of P W corresponding to a different signal window width in fig. 17, where (a) in fig. 17 corresponds to a P W curve when the signal window frame w=300 and a signal curve of the sampled signal to be processed, and (b) in fig. 17 corresponds to a P W curve when the signal window frame w=800 and a signal curve of the sampled signal to be processed. When the trend of the signal in the signal window is monotonous, the wider the signal window is, the clearer the sampling signal change rate is extracted. When the signal within the signal window is non-monotonic (e.g., increasing followed by decreasing or decreasing followed by increasing), a phase lag or distortion of P W is introduced. Therefore, when setting the signal window width, an operator should observe the characteristics of the historical sampling signal first, so as to ensure that the signal within the signal window width basically keeps a monotonous change trend as much as possible.
The denoising filter algorithm based on the image recognition and tracking differentiator has better denoising effect on discrete signals with lower sampling frequency and higher signal-to-noise ratio; in addition, the mode has strong stability and can keep high-efficiency operation under most frequency input.
An embodiment of the present invention provides a signal processing apparatus, as shown in fig. 18, including: an acquisition module 180, configured to acquire a sampling signal to be processed; the imaging processing module 181 is configured to perform imaging processing on the sample signal to be processed, so as to obtain an image to be identified corresponding to the sample signal to be processed; the gain processing module 182 is configured to perform gain processing on the image to be identified, so as to obtain a gain-processed image; a determining module 183, configured to determine an integration step according to a preset sampling period, an image area of the image after gain processing, and a line segment area of a sampling signal in the image after gain processing; and the output module 184 is configured to input the integration step into a function corresponding to a preset tracking differentiator, and output a signal after denoising and filtering the sampled signal to be processed.
The signal processing device acquires a sampling signal to be processed; carrying out imaging processing on the sampling signal to be processed to obtain an image to be identified corresponding to the sampling signal to be processed; performing gain processing on the image to be identified to obtain a gain processed image; determining an integration step length according to a preset sampling period, the image area of the image after gain processing and the line segment area of a sampling signal in the image after gain processing; and inputting the integral step length into a function corresponding to a preset tracking differentiator, and outputting a signal subjected to denoising and filtering treatment on the sampling signal to be processed. The device performs imaging processing on the sampling signal to be processed, calculates an integral step length based on the obtained image to be identified, and performs denoising filtering processing on the sampling signal to be processed based on the preset tracking differentiator, so that the tracking differentiator can autonomously select the integral step length according to the dynamic characteristics of the current sampling signal, and has a good denoising effect on discrete signals with low signal sampling frequency, high signal-to-noise ratio and complex and changeable signal waveforms.
Further, the gain processing module 182 is further configured to: acquiring a preset reference value, and calculating a longitudinal gain coefficient according to the reference value and the longitudinal dimension of the image to be identified; and processing the image to be identified according to the longitudinal gain coefficient to obtain a gain processed image.
Further, the determining module 183 is further configured to: calculating the image area of the image after the gain processing according to the transverse size and the longitudinal size of the image after the gain processing; calculating the sum of absolute values of differences between signal values corresponding to every two adjacent signal points in the image after the gain processing to obtain a sum result; calculating the product of the addition result and the sampling period to obtain the line segment area of the sampling signal in the image after gain processing; the integration step is determined based on the sampling period, the image area, and the line segment area.
Further, the determining module 183 is further configured to: acquiring a preset integral step length self-adaptive function; calculating the ratio of the image area to the line segment area to obtain an area ratio; inputting the area ratio to an integral step length self-adaptive function to obtain a self-adaptive function output result; and calculating the ratio of the sampling period to the output result of the self-adaptive function to obtain the integral step length.
Further, the obtaining module 180 is further configured to: acquiring an analog signal to be processed and a preset signal window width; sampling the analog signal according to the sampling period to obtain an initial sampling signal; and selecting a sampling signal to be processed from the initial sampling signals according to the width of the signal window.
The implementation principle and the technical effects of the signal processing device provided by the embodiment of the present invention are the same as those of the signal processing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the signal processing method embodiment.
The embodiment of the present invention further provides an electronic device, referring to fig. 19, where the electronic device includes a processor 130 and a memory 131, where the memory 131 stores machine executable instructions that can be executed by the processor 130, and the processor 130 executes the machine executable instructions to implement the above-mentioned signal processing method.
Further, the electronic device shown in fig. 19 further includes a bus 132 and a communication interface 133, and the processor 130, the communication interface 133, and the memory 131 are connected through the bus 132.
The memory 131 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and at least one other network element is implemented via at least one communication interface 133 (which may be wired or wireless), and may use the internet, a wide area network, a local network, a metropolitan area network, etc. Bus 132 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in fig. 19, but not only one bus or one type of bus.
The processor 130 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in processor 130. The processor 130 may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131, and in combination with its hardware, performs the steps of the method of the foregoing embodiment.
The embodiment of the invention also provides a machine-readable storage medium, which stores machine-executable instructions that, when being called and executed by a processor, cause the processor to implement the signal processing method, and the specific implementation can be referred to the method embodiment and will not be described herein.
The signal processing method, the signal processing device and the computer program product of the electronic device provided by the embodiments of the present invention include a computer readable storage medium storing program codes, and instructions included in the program codes may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment and will not be described herein.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
Claims (8)
1. A method of signal processing, the method comprising:
Acquiring a sampling signal to be processed;
performing imaging processing on the sampling signal to be processed to obtain an image to be identified corresponding to the sampling signal to be processed;
Performing gain processing on the image to be identified to obtain a gain processed image;
Determining an integration step length according to a preset sampling period, the image area of the image after gain processing and the line segment area of a sampling signal in the image after gain processing;
inputting the integral step length into a function corresponding to a preset tracking differentiator, and outputting a signal after denoising and filtering the sampling signal to be processed;
The step of determining an integration step length according to a preset sampling period, an image area of the image after gain processing and a line segment area of the sampling signal in the image after gain processing comprises the following steps:
calculating the image area of the image after the gain processing according to the transverse size and the longitudinal size of the image after the gain processing;
Calculating the sum of absolute values of differences between signal values corresponding to every two adjacent signal points in the gain-processed image to obtain a sum result;
calculating the product of the addition result and the sampling period to obtain the line segment area of the sampling signal in the image after the gain processing;
The integration step is determined based on the sampling period, the image area, and the line segment area.
2. The method of claim 1, wherein the step of gain processing the image to be identified to obtain a gain processed image comprises:
Acquiring a preset reference value, and calculating a longitudinal gain coefficient according to the reference value and the longitudinal dimension of the image to be identified;
And processing the image to be identified according to the longitudinal gain coefficient to obtain the image after gain processing.
3. The method of claim 1, wherein determining the integration step based on the sampling period, the image area, and the line segment area comprises:
acquiring a preset integral step length self-adaptive function;
calculating the ratio of the image area to the line segment area to obtain an area ratio;
Inputting the area ratio to the integration step length adaptive function to obtain an adaptive function output result;
And calculating the ratio of the sampling period to the output result of the self-adaptive function to obtain the integration step length.
4. The method of claim 1, wherein the step of acquiring the sampled signal to be processed comprises:
acquiring an analog signal to be processed and a preset signal window width;
sampling the analog signal according to the sampling period to obtain an initial sampling signal;
and selecting the sampling signal to be processed from the initial sampling signals according to the width of the signal window.
5. A signal processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring a sampling signal to be processed;
The imaging processing module is used for carrying out imaging processing on the sampling signal to be processed to obtain an image to be identified corresponding to the sampling signal to be processed;
The gain processing module is used for performing gain processing on the image to be identified to obtain a gain processed image;
The determining module is used for determining an integration step length according to a preset sampling period, the image area of the image after the gain processing and the line segment area of a sampling signal in the image after the gain processing;
the output module is used for inputting the integral step length into a function corresponding to a preset tracking differentiator and outputting a signal after denoising and filtering the sampling signal to be processed;
the determining module is further configured to:
calculating the image area of the image after the gain processing according to the transverse size and the longitudinal size of the image after the gain processing;
Calculating the sum of absolute values of differences between signal values corresponding to every two adjacent signal points in the gain-processed image to obtain a sum result;
calculating the product of the addition result and the sampling period to obtain the line segment area of the sampling signal in the image after the gain processing;
The integration step is determined based on the sampling period, the image area, and the line segment area.
6. The apparatus of claim 5, wherein the gain processing module is further configured to:
Acquiring a preset reference value, and calculating a longitudinal gain coefficient according to the reference value and the longitudinal dimension of the image to be identified;
And processing the image to be identified according to the longitudinal gain coefficient to obtain the image after gain processing.
7. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the signal processing method of any of claims 1-4.
8. A machine-readable storage medium storing machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the signal processing method of any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210643786.3A CN114997233B (en) | 2022-06-08 | 2022-06-08 | Signal processing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210643786.3A CN114997233B (en) | 2022-06-08 | 2022-06-08 | Signal processing method and device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114997233A CN114997233A (en) | 2022-09-02 |
CN114997233B true CN114997233B (en) | 2024-10-01 |
Family
ID=83033958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210643786.3A Active CN114997233B (en) | 2022-06-08 | 2022-06-08 | Signal processing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114997233B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118465735B (en) * | 2024-07-15 | 2024-09-27 | 浙江禾川科技股份有限公司 | Dual-photoelectric sensor and signal processing method thereof |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102800063A (en) * | 2012-07-12 | 2012-11-28 | 中国科学院软件研究所 | Image enhancement and abstraction method based on anisotropic filtering |
CN111513747A (en) * | 2020-04-28 | 2020-08-11 | 东软医疗系统股份有限公司 | CT image acquisition method and device and CT machine |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0746844B2 (en) * | 1986-03-14 | 1995-05-17 | 株式会社日立製作所 | Signal readout device for solid-state imaging device |
CN113269264B (en) * | 2021-06-04 | 2024-07-26 | 北京灵汐科技有限公司 | Target recognition method, electronic device, and computer-readable medium |
CN114445619A (en) * | 2022-01-06 | 2022-05-06 | 煤炭科学研究总院有限公司 | Comprehensive pipe gallery risk identification method and system based on sound signal imaging |
-
2022
- 2022-06-08 CN CN202210643786.3A patent/CN114997233B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102800063A (en) * | 2012-07-12 | 2012-11-28 | 中国科学院软件研究所 | Image enhancement and abstraction method based on anisotropic filtering |
CN111513747A (en) * | 2020-04-28 | 2020-08-11 | 东软医疗系统股份有限公司 | CT image acquisition method and device and CT machine |
Also Published As
Publication number | Publication date |
---|---|
CN114997233A (en) | 2022-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114997233B (en) | Signal processing method and device and electronic equipment | |
TWI620546B (en) | Brain wave analysis method and device | |
CN108009122B (en) | Improved HHT method | |
CN115797335B (en) | Euler movement amplification effect evaluation and optimization method for bridge vibration measurement | |
CN117786325B (en) | Ambient temperature wisdom early warning system of heavy-calibre thing networking water gauge | |
CN108764073A (en) | A kind of acceleration filter of combination spectrum energy form fitting is made an uproar and integration method | |
CN117236084A (en) | Intelligent management method and system for woodworking machining production | |
CN115840104B (en) | Interference signal identification method based on electromagnetic compatibility experiment | |
CN114186596B (en) | Multi-window identification method and device for spectrogram peaks and electronic equipment | |
Alexander et al. | Analysis of noisy signal restoration quality with exponential moving average filter | |
CN112700039A (en) | Steady state detection and extraction method for load operation data of thermal power plant | |
CN114330850A (en) | Abnormal relative tendency generation method and system for climate prediction | |
CN112914588A (en) | Electroencephalogram outbreak inhibition index calculation method and system | |
CN110738621B (en) | Linear structure filtering method, device, equipment and storage medium | |
CN111991003A (en) | Savitzky-Golay filtering-based continuous blood glucose smoothing method, device, equipment and storage medium | |
CN107835025A (en) | A kind of electric load historical data self-adapting compressing method and system | |
CN113375065B (en) | Method and device for eliminating trend signal in pipeline leakage monitoring | |
CN107727634B (en) | Laser Raman spectrum resolution processing method | |
CN112494008B (en) | Respiration rate measurement method and device based on PPG signal | |
KR101919241B1 (en) | Apparatus and Method for optimum smoothing filtering to eliminate partial continuous filtering | |
TWI805081B (en) | Method and electronic device for measureing physiological parameter | |
CN111207830A (en) | Low-distortion spectral noise reduction filtering method | |
CN117590048B (en) | Resistor voltage division method and system of converter transformer valve side sleeve end screen voltage divider | |
CN113221692B (en) | Continuous variational modal decomposition DWT denoising method for optical fiber sensing | |
CN112535455B (en) | Filtering method, terminal device and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |