Modulation signal envelope extraction algorithm and electronic device
By converting the modulated signal into a waveform image and extracting the envelope using image segmentation and edge detection algorithms, the problems of high computational complexity and poor real-time performance in existing algorithms are solved, and fast and accurate envelope detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN TEXTILE UNIV
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-23
AI Technical Summary
Existing envelope detection algorithms for modulated signals suffer from high computational complexity, poor real-time performance, high hardware overhead, and shortcomings in envelope tracking accuracy and applicability, failing to effectively address the issues of high computational complexity and poor real-time performance in envelope detection algorithms for modulated signals.
The modulated data is converted into a waveform image, the target region is extracted using an image segmentation algorithm, the coordinates of edge points are obtained through an edge detection algorithm, and after filtering and processing, they are converted into an ordered set of coordinates to achieve envelope extraction.
It improves detection speed and accuracy, reduces computational complexity, enhances real-time performance and hardware applicability, and is suitable for various signal scenarios.
Smart Images

Figure CN122265314A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of modulation signal technology, specifically to a modulation signal envelope extraction algorithm and electronic device. Background Technology
[0002] The envelope of a modulated signal is the trajectory of the peak points of the modulated wave. Its core functions are to carry information, realize noncoherent demodulation, support power and distortion control, optimize system energy efficiency, and be used for signal analysis. It is a key element in communication and radio frequency systems that connects baseband and radio frequency and ensures reliable signal transmission and efficient processing.
[0003] Common algorithms for detecting the envelope of modulated signals include the following: 1. Hilbert transform method (the standard method for digital detection) The core principle is to construct an analytic signal by performing a Hilbert transform on the real signal, and the modulus of the analytic signal is the precise envelope. This algorithm has the highest detection accuracy and can extract the envelope of any narrowband modulated signal (including the amplitude envelope of AM / DSB / SSB / FM) without distortion. However, this algorithm has the following drawbacks: high computational complexity, requiring Fourier transform + Hilbert transform + modulus calculation, which demands high computing power from DSP / FPGA; algorithm latency exists, which decreases with higher sampling rates but increases hardware overhead, making it unsuitable for ultra-real-time scenarios; and detection performance degrades for wideband signals, requiring the "narrowband assumption" (signal bandwidth is much smaller than the carrier frequency).
[0004] 2. Absolute value + low-pass filtering method (simple digital detection) The core principle is to take the absolute value of the digitally modulated wave (full-wave rectification) and then filter out the high-frequency carrier components using a digital low-pass filter to obtain the envelope. This algorithm has extremely low computational complexity, involving only absolute value operations and simple filtering (such as FIR / IIR), resulting in low hardware overhead and real-time performance close to analog methods. However, this algorithm has the following drawbacks: detection accuracy is generally low, with phase lag (caused by the low-pass filter); the real-time performance of envelope tracking decreases as the filter order increases; filter parameters are sensitive: too high a cutoff frequency will leave residual carrier ripple, while too low a cutoff frequency will lead to untimely envelope tracking and distortion; and it performs poorly in restoring rapidly changing envelopes, making it suitable for slowly changing envelope signals.
[0005] 3. Peak hold method (digital peak detection) Its core principle is to capture the peak value of a digital signal within a set time window, and then slowly decay it through a "release time constant" to track the envelope peak value. The algorithm is intuitive and easy to implement, and can accurately capture the peak characteristics of the envelope, making it suitable for signal amplitude monitoring and peak extraction scenarios. However, it has the following drawbacks: it cannot reproduce the detailed changes in the envelope, can only track the peak value, and cannot be used for precise demodulation; it is only suitable for monitoring or indication. It has high parameter dependence: improper setting of the release time constant can lead to untimely peak capture or excessively slow decay. It has poor reproduction effect on continuously changing envelopes (such as audio modulated signals), with obvious "step-like" distortion.
[0006] Therefore, a new modulation signal envelope extraction algorithm is urgently needed to solve the problems existing in the above-mentioned modulation signal envelope detection algorithms. Summary of the Invention
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: An algorithm for extracting the envelope of a modulated signal includes the following steps: S1. Generate a waveform image based on the modulation data and obtain the corresponding image region of the waveform image; S2. Extract the original boundary of the image region to obtain the set of boundary pixel coordinate points; S3. Filter the set of boundary pixel coordinates, specifically including the following steps: S31, The set of boundary pixel coordinates is the initial set to be processed; S32. Keep the start and end points of the current set to be processed, calculate the vertical distance from all intermediate points to the line connecting the start and end points, find the intermediate point corresponding to the maximum vertical distance, which is called the maximum distance point, and determine whether the maximum vertical distance is greater than the preset threshold. S33a. If the maximum vertical distance is greater than the preset threshold, two subsets of the original set to be processed are established as two new sets to be processed. The starting point of the first subset is the starting point of the original set to be processed, and the ending point is the maximum distance point. The starting point of the second subset is the maximum distance point, and the ending point is the ending point of the original set to be processed. The processing of the original set to be processed is completed, and the two new sets to be processed are returned to step S32 for processing respectively. S33b. If the maximum vertical distance is not greater than the preset threshold, then all intermediate points are deleted directly to complete the processing of the current set to be processed. S34. After processing all the sets to be processed, establish a new set of coordinate points for all the retained points in the original order. S4. Based on the set of coordinate points in step S34, the envelope is extracted to obtain the envelope set of the modulated signal.
[0008] Further, in step S1, specifically, a waveform image is first generated based on the coordinates of the data points of the modulation data, and then the corresponding image region of the waveform image is obtained according to the image segmentation algorithm.
[0009] Furthermore, in step S2, when extracting the original boundary of the image region, the pixels of the image region are traversed by a four-neighbor boundary tracking algorithm or an eight-neighbor boundary tracking algorithm to mark the edge pixels, thereby obtaining a set of boundary pixel coordinate points.
[0010] Furthermore, in step S4, when completing the envelope extraction, specifically, for any i-th point in the set of coordinate points obtained in step S34, where 2≤i≤n-1, and n represents the total number of coordinates in the set, the verification is performed in the following way: Subtract the row coordinate of the i-th point from the row coordinate of the (i-1)-th point, and the difference is represented as R1; Subtract the row coordinate of the (i+1)th point from the row coordinate of the i-th point, and the difference is represented as R2; If R1≥0 and R2<0, then the i-th point is determined to be the upper boundary envelope point; If R1≤0 and R2>0, then the i-th point is determined to be the lower boundary envelope point; If neither of the above two conditions is met, then the i-th point is determined not to be an envelope point. By using the above method, the verification of the 2nd to the (n-1)th points in the coordinate point set is completed in sequence, and the lower boundary envelope point set and the upper boundary envelope point set are obtained respectively, thus obtaining the envelope set of the modulated signal.
[0011] Furthermore, in step S4, the first point and the nth point in the set of coordinate points obtained in step S34 are not added to the envelope set, or whether they are added to the envelope set is determined manually.
[0012] Another aspect of the present invention provides an electronic device, comprising: A memory that stores computer programs; At least one processor adapted to implement the above-described modulation signal envelope extraction algorithm when executing the computer program.
[0013] Compared with the prior art, the modulation signal envelope extraction algorithm and electronic device provided by the present invention have the following technical advantages: This invention transforms discrete data into waveform images, extracts the target region using image segmentation algorithms, extracts the coordinates of region edge points using image processing edge extraction algorithms, and then transforms the pixel-level irregular region boundaries into an ordered set of coordinates after filtering. This reduces the amount of data and improves the accuracy of subsequent envelope extraction, effectively solving the shortcomings of existing commonly used algorithms. This invention features fast detection speed, safety and reliability, good practicality, and high accuracy. Attached Figure Description
[0014] Figure 1 A flowchart illustrating a modulation signal envelope extraction algorithm provided by the present invention; Figure 2 This is a schematic diagram of the set of coordinate points obtained after step S3 in a specific embodiment; Figure 3 This is a schematic diagram of the upper boundary envelope extracted in step S4 in a specific embodiment; Figure 4 This is a schematic diagram of the lower boundary envelope extracted in step S4 in a specific embodiment; Figure 5 This is a schematic diagram of the complete signal envelope extracted in step S4 in a specific embodiment. Detailed Implementation
[0015] To make the technical means, creative features, objectives and effects of this invention easier to understand, the following description, in conjunction with the accompanying drawings and specific embodiments, further explains how this invention is implemented.
[0016] In one specific embodiment, refer to Figure 1 As shown, this invention provides a modulation signal envelope extraction algorithm, comprising the following steps: In step S1, a waveform image is generated and the corresponding image region is obtained based on the modulation data. Specifically, the waveform image is first generated based on the coordinates of the data points in the modulation data, and then the corresponding image region is obtained based on the image segmentation algorithm.
[0017] In step S2, the original boundary of the image region is extracted to obtain a set of boundary pixel coordinates. When extracting the original boundary of the image region, a four-neighbor boundary tracking algorithm or an eight-neighbor boundary tracking algorithm can be used to traverse the pixels of the image region and mark the edge pixels, thereby obtaining the set of boundary pixel coordinates.
[0018] In step S3, the set of boundary pixel coordinate points is filtered, specifically including the following steps: S31, The set of boundary pixel coordinates is the initial set to be processed.
[0019] S32. Keep the start and end points of the current set to be processed, calculate the perpendicular distance from all intermediate points to the line connecting the start and end points, find the intermediate point corresponding to the maximum perpendicular distance, which is called the maximum distance point, and determine whether the maximum perpendicular distance is greater than the preset threshold.
[0020] S33a. If the maximum vertical distance is greater than the preset threshold, two subsets of the original set to be processed are established as two new sets to be processed. The starting point of the first subset is the starting point of the original set to be processed, and the ending point is the maximum distance point. The starting point of the second subset is the maximum distance point, and the ending point is the ending point of the original set to be processed. The processing of the original set to be processed is completed, and the two new sets to be processed are returned to step S32 for processing.
[0021] S33b. If the maximum vertical distance is not greater than the preset threshold, then all intermediate points are deleted directly to complete the processing of the current set to be processed.
[0022] S34. After processing all the sets to be processed, establish a new set of coordinate points for all the retained points in the original order.
[0023] The aforementioned thresholds can be manually set according to the signal scale and required precision. It is understood that after setting a suitable threshold, by determining whether the maximum vertical distance is greater than the preset threshold, intermediate points whose maximum vertical distance is not greater than the threshold are removed, making the lines connecting the retained points nearly straight, and retaining the points corresponding to peaks and troughs.
[0024] In this implementation, the set of coordinate points obtained after the filtering process in step S3 is referenced. Figure 2 As shown, Figure 2 With the following Figures 3-5 The image uses row and column coordinates, with the top left corner as the origin. The row coordinates point downwards and the column coordinates point to the right. In other words, the lower and more right a point is in the image, the larger its row and column coordinates are. Figure 2 The original boundaries of the waveform image before processing are also preserved. These original boundaries may contain tens of thousands of pixels, but after the selection in step S3, typically only tens or hundreds of coordinate points are retained. Furthermore, Figure 2 As can be seen, the set of coordinate points obtained after filtering retains almost all the peaks and troughs with obvious fluctuations; however, it also contains some points that do not belong to the peaks and troughs, so further processing is required in step S4.
[0025] In step S4, envelope extraction is performed based on the set of coordinate points obtained in step S34 to obtain the envelope set of the modulated signal.
[0026] When completing the envelope extraction, specifically, for any i-th point in the set of coordinate points obtained in step S34, where 2≤i≤n-1, and n represents the total number of coordinates in the set, the verification is performed as follows: Subtract the row coordinate of the i-th point from the row coordinate of the (i-1)-th point, and the difference is represented as R1.
[0027] Subtract the row coordinate of the (i+1)th point from the row coordinate of the i-th point, and the difference is represented as R2.
[0028] If R1≥0 and R2<0, then the i-th point is determined to be the upper boundary envelope point.
[0029] If R1≤0 and R2>0, then the i-th point is determined to be the lower boundary envelope point.
[0030] If neither of the above two conditions is met, then the i-th point is determined not to be an envelope point.
[0031] By using the above method, the verification of the 2nd to the (n-1)th points in the coordinate point set is completed in sequence, and the lower boundary envelope point set and the upper boundary envelope point set are obtained respectively, thus obtaining the envelope set of the modulated signal.
[0032] In addition, the first and nth points in the set of coordinate points obtained in step S34 can be directly removed without being added to the envelope set, which will have little impact on the final envelope; alternatively, it can be determined manually whether to add them to the envelope set.
[0033] In this embodiment, the upper boundary envelope is as follows: Figure 3 As shown, the lower boundary envelope is as follows Figure 4 As shown, the complete signal envelope is as follows Figure 5 As shown.
[0034] Another aspect of the present invention provides an electronic device, comprising: a memory storing a computer program; and at least one processor adapted to implement the above-described modulation signal envelope extraction algorithm when executing the computer program.
[0035] In summary, the modulation signal envelope extraction algorithm and electronic device provided by this invention converts discrete data into waveform images, extracts the target region using an image segmentation algorithm, extracts the coordinates of the region's edge points using an image processing edge extraction algorithm, and then transforms the pixel-level irregular region boundaries into an ordered set of coordinates after filtering. This reduces the amount of data and improves the accuracy of subsequent envelope extraction, effectively solving the shortcomings of existing commonly used algorithms. This invention features fast detection speed, safety and reliability, good practicality, and high accuracy.
[0036] Finally, it should be noted that the above description is only an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A modulation signal envelope extraction algorithm, characterized in that, Includes the following steps: S1. Generate a waveform image based on the modulation data and obtain the corresponding image region of the waveform image; S2. Extract the original boundary of the image region to obtain the set of boundary pixel coordinate points; S3. Filter the set of boundary pixel coordinates, specifically including the following steps: S31, The set of boundary pixel coordinates is the initial set to be processed; S32. Keep the start and end points of the current set to be processed, calculate the vertical distance from all intermediate points to the line connecting the start and end points, find the intermediate point corresponding to the maximum vertical distance, which is called the maximum distance point, and determine whether the maximum vertical distance is greater than the preset threshold. S33a. If the maximum vertical distance is greater than the preset threshold, two subsets of the original set to be processed are established as two new sets to be processed. The starting point of the first subset is the starting point of the original set to be processed, and the ending point is the maximum distance point. The starting point of the second subset is the maximum distance point, and the ending point is the ending point of the original set to be processed. The processing of the original set to be processed is completed, and the two new sets to be processed are returned to step S32 for processing respectively. S33b. If the maximum vertical distance is not greater than the preset threshold, then all intermediate points are deleted directly to complete the processing of the current set to be processed. S34. After processing all the sets to be processed, establish a new set of coordinate points for all the retained points in the original order. S4. Based on the filtered set of coordinate points, the envelope is extracted to obtain the envelope set of the modulated signal.
2. The modulation signal envelope extraction algorithm according to claim 1, characterized in that, In step S1, specifically, a waveform image is first generated based on the coordinates of the data points of the modulation data, and then the corresponding image region of the waveform image is obtained according to the image segmentation algorithm.
3. The modulation signal envelope extraction algorithm according to claim 1, characterized in that, In step S2, when extracting the original boundary of the image region, the image region pixels are traversed and the edge pixels are marked by a four-neighbor boundary tracking algorithm or an eight-neighbor boundary tracking algorithm, thereby obtaining the set of boundary pixel coordinate points.
4. The modulation signal envelope extraction algorithm according to claim 1, characterized in that, In step S4, when completing the envelope extraction, specifically, for any i-th point in the set of coordinate points obtained in step S34, where 2≤i≤n-1, and n represents the total number of coordinates in the set, the verification is performed in the following way: Subtract the row coordinate of the i-th point from the row coordinate of the (i-1)-th point, and the difference is represented as R1; Subtract the row coordinate of the (i+1)th point from the row coordinate of the i-th point, and the difference is represented as R2; If R1≥0 and R2<0, then the i-th point is determined to be the upper boundary envelope point; If R1≤0 and R2>0, then the i-th point is determined to be the lower boundary envelope point; If neither of the above two conditions is met, then the i-th point is determined not to be an envelope point. By using the above method, the verification of the 2nd to the (n-1)th points in the coordinate point set is completed in sequence, and the lower boundary envelope point set and the upper boundary envelope point set are obtained respectively, thus obtaining the envelope set of the modulated signal.
5. The modulation signal envelope extraction algorithm according to claim 4, characterized in that, In step S4, the first point and the nth point in the set of coordinate points obtained in step S34 are not added to the envelope set, or the addition of the two points to the envelope set is determined manually.
6. An electronic device, characterized in that, include: A memory that stores computer programs; At least one processor adapted to implement the modulation signal envelope extraction algorithm as described in any one of claims 1 to 5 when executing the computer program.