Two-stage Morse signal automatic processing method based on time-frequency analysis

Through a two-stage method based on time-frequency analysis, the Morse signal is automatically detected and decoded, and the accuracy and health problems of relying on manual listening and copying in the existing technology are solved, and automated processing is achieved in harsh environments.

CN120301733APending Publication Date: 2025-07-11KUSN JIUHUA ELECTRONICS EQUIP FACTORY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510539371.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the prior art, the reception and processing of Morse signals relies on manual listening and copying, making it difficult to ensure accuracy in harsh communication environments, and is harmful to the health of the operator, and lacks automated processing methods.

Method used

Using a two-stage processing method based on time and frequency analysis, the Morse signal is first detected through FFT and STFT transformations, and then automatically recognized and decoded, including preprocessing, threshold segmentation, 0-1 sequence generation, symbol segmentation and WPM calculation.

Benefits of technology

The automatic detection and decoding of Morse signals is realized, which reduces manual intervention, improves processing accuracy in harsh environments, and alleviates the health impact on operators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301733A_ABST
    Figure CN120301733A_ABST
Patent Text Reader

Abstract

The invention discloses a two-stage Morse signal automatic processing method based on time-frequency analysis, which comprises two stages of Morse signal automatic detection and Morse signal automatic identification, and is characterized in that the Morse signal automatic detection judges whether an input signal is a Morse signal or not: if not, the processing process is ended, and a detection result of a non-Morse signal is given; if yes, entering a second stage, and performing subsequent Morse signal automatic identification processing, the Morse signal automatic identification stage having two functions: 1, decoding an input signal; and secondly, the WPM of the signal is automatically estimated. By means of the mode, whether the current input signal is the Morse signal or not can be automatically judged, an identification decoding result is further given, manual intervention is not needed in the whole process, a traditional manual copying and reporting mode is effectively replaced, and urgency of the automatic processing requirement of the Morse signal is relieved to a certain degree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of signal processing, and particularly to a two-stage automatic processing method for Morse signals based on time-frequency analysis. Background Art

[0002] Morse telegraph is one of the main applications of short-wave wireless communication. Its advantages are simple coding, strong confidentiality, long communication distance, and it can be transmitted in harsh environments with strong noise, weak signals, and narrow bandwidths. Moreover, the equipment for sending and receiving Morse signals is not complex. Therefore, Morse telegraph is an irreplaceable emergency communication method in emergencies such as wars and disasters.

[0003] For a long time, the reception and processing of Morse signals have basically relied on the transcription by telegraph operators, which has high requirements for the listening and transcription abilities and speeds of telegraph operators. On the other hand, in harsh and complex communication environments, the signals are severely interfered, and it is difficult to guarantee the transcription accuracy of telegraph operators. Moreover, long-term work will have many negative impacts on the physical and mental health of telegraph operators. Therefore, there is an urgent practical need to realize the automatic processing of Morse signals. Summary of the Invention

[0004] The main technical problem to be solved by the present invention is to provide a two-stage automatic processing method for Morse signals based on time-frequency analysis, which can automatically determine whether the currently input signal is a Morse signal and further give the recognition and decoding results.

[0005] To solve the above technical problem, a technical solution adopted by the present invention is: to provide a two-stage automatic processing method for Morse signals based on time-frequency analysis, and this two-stage automatic processing method for Morse signals based on time-frequency analysis includes the following steps:

[0006] S1: In the first stage, automatic detection of Morse signals. Automatic detection of Morse signals means real-time monitoring of whether there are Morse signals in the received data without manual operation, which is a prerequisite for subsequent recognition and decoding. Automatic detection of Morse signals determines whether the input signal is a Morse signal: if not, the processing process ends and the detection result of non-Morse signals is given; if so, enter the second stage for subsequent automatic recognition processing of Morse signals;

[0007] For automatic detection of Morse signals, first input the signal, perform FFT transformation on the signal, and calculate the empirical bandwidth B emp , and judge the bandwidth B emp< 500 Hz. If so, the current signal is a single tone; otherwise, the signal is a non-single tone signal and a non-Morse signal. Perform STFT transformation on the input single tone signal to obtain a time-frequency matrix. After splitting the time-frequency matrix, calculate the variances of the imaginary part and the real part respectively, find the maximum value in the variance matrix, and adaptively calculate the double thresholds T L and T H , and determine whether it meets the double-threshold criterion. If so, the signal is a Morse signal; otherwise, the input signal is a non-Morse signal;

[0008] S2: The second stage, automatic Morse signal recognition. Automatic Morse signal recognition means identifying the arrangement and combination of dots, dashes, and intervals in time series without manual operation, and then, according to the corresponding relationship in the coding rules, decoding the combination of each element into standard characters. It is the ultimate goal of automatic Morse signal processing. The automatic Morse signal recognition stage has two functions: First, decode the input signal; second, automatically estimate the WPM of the signal;

[0009] The said S2: The second stage, automatic Morse signal recognition, includes the following module steps:

[0010] S2-1): Module 1, preprocessing;

[0011] S2-2): Module 2, threshold segmentation and 0-1 sequence generation;

[0012] S2-3): Module 3, segmentation of the sequence to be processed in this frame;

[0013] S2-4): Module 4, conversion to the standard dot-dash form;

[0014] S2-5): Module 5, decoding: After generating the Morse sequence S in the standard dot-dash form, perform decoding with reference to the common Morse code look-up table;

[0015] S2-6): Module 6, calculation of WPM (Words Per Minute).

[0016] Preferably, the said S1: The first stage, automatic Morse signal detection, includes the following specific steps:

[0017] S1-1) Synthesize the input I / Q data into a complex expression form, that is, I + j*Q;

[0018] S1-2) Take the first N points in the complex sequence for fast Fourier transform (FFT) to obtain a spectrogram;

[0019] S1-3) Perform threshold segmentation on the spectrogram to obtain the signal part above the threshold;

[0020] S1-4) If the bandwidth B of the signal part emp < B CW ; then the current signal is a single tone, and continue to perform the subsequent step S1-5); otherwise, end the process, and the signal is a non-single tone signal and a non-Morse signal; where B CW is the empirical bandwidth of the single tone signal, and the general value range is 300-500 Hz;

[0021] S1-5) Calculate the number of points N covered by B S in the frequency spectrum according to the sampling rate f CW of the input signal CW ,

[0022] N CW = B CW / (f S / N win );

[0023] where, N win is the window length for calculating the short-time Fourier transform;

[0024] S1-6) The input I / Q data is assembled into a complex form I + j*Q, and perform STFT transformation with the window length N win and the step size N step to obtain the time-frequency matrix M cplx , where the columns correspond to frequencies and the rows correspond to time;

[0025] S1-7) Split the time-frequency matrix into a real part matrix M real and an imaginary part matrix M iag , M real + j*M imag = M cplx ;

[0026] S1-8) For the real part matrix M real , take a certain column j (j = 1, 2,..., N win ), calculate the variance of the points within the sliding window with a sliding window length of 2 n points and a step size of 2 n-1 points to obtain the real part variance matrix V real ;

[0027] S1-9) For the imaginary part matrix M imag , calculate the imaginary part variance matrix V imag in the same method as in step S1-8);

[0028] S1-10) Obtain the complete variance matrix V cplx = V real + V imag ;

[0029] S1-11) Find the variance matrix V cplx Find the maximum value in it and denote it as maxV;

[0030] S1-12) Calculate the thresholds T L and T H respectively according to the following calculations, where α1 is an empirical parameter,

[0031] T H =α1*maxV, T L =T H / 3;

[0032] S1-13) Use T H as the threshold to segment the variance matrix V cplx , where the variance value exceeding T H is denoted as 1, otherwise as 0, to obtain a matrix D cplx of the same size as V H ;

[0033] S1-14) For D H , if there is a '1' in a certain column of data, record the corresponding column number, obtain the column numbers, and the sequence composed of these numbers is denoted as:

[0034] S1-15) If N H is greater than N CW , then the input signal is a non-single-tone signal and a non-Morse signal, and end the execution; otherwise, continue to execute the subsequent steps;

[0035] S1-16) For x i (i = 1, 2,..., N H ), extract the data on the corresponding column in V cplx . If all the data in this column is greater than T L , then denote y i (i = 1, 2,..., N H ) as 0, otherwise, denote y i (i = 1, 2,..., N H ) as 1;

[0036] S1-17) If y i (i = 1, 2,..., N H ) are all 0, then the input signal is a non-Morse signal, otherwise, the signal is a Morse signal, and continue with the subsequent recognition process.

[0037] Preferably, the S2-1): Module 1, preprocessing, includes the following processing steps:

[0038] a) STFT transform: Perform STFT transform on the input signal to obtain the time-frequency matrix MC , M C The elements in it are in plural. The columns represent frequencies from left to right, and the rows represent time from top to bottom; for M C , take the modulus of the elements to obtain the corresponding modulus matrix M CA ;

[0039] b) Fixed-frequency denoising: For the modulus matrix M CA , sum by column to obtain a row matrix, denoted as A S ; find the maximum value in A S , and its corresponding serial number is M ind ; let the time-frequency matrix M C keep the M ind -th column unchanged, and set all the remaining columns to 0 to obtain the denoised STFT result M C_CN ; perform the inverse short-time Fourier transform on M C_CN to obtain the denoised time-domain signal sequence {c n};

[0040] c) Average pooling: Divide the denoised signal {c n} into N P groups on average; take the mean value of the signals in the j-th (j = 1, 2,..., N P ) group to obtain m j , and use m j to represent the signal sequence of the j-th group; the mean value sequence {m j , j = 1, 2,..., N P}, this sequence is called the pooling sequence or pooling signal, and subsequent processing is based on the pooling sequence.

[0041] Preferably, the S2-2): Module 2, threshold segmentation and 0-1 sequence generation, includes the following processing steps:

[0042] a) Adaptive threshold segmentation: (1) Find the maximum value in the pooling sequence {m j , j = 1, 2,..., N P}, denoted as m max , and obtain the lowest threshold T min , T min = β1 * m max , where β1 is an empirical parameter; (2) Divide the pooling sequence into N q groups on average; for the t-th (1 ≤ t ≤ N q ) group of data, find the maximum value, denoted as m t_max , and the threshold T t corresponding to this group of data, T t = max(β2 * m t_max , T min ), β2 is an empirical parameter; (3) Use T tSplit the t-th (1 ≤ t ≤ N q ) group of data, where those less than the threshold are '0' and those not less than the threshold are '1', so that T t splits the t-th group of data into a 0-1 sequence; (4) Traverse all t (1 ≤ t ≤ N q ), and convert the pooling signal into a 0-1 sequence;

[0043] b) Based on a pre-set buffer, generate a complete 0-1 sequence: (1) Determine whether the buffer is empty. If the buffer is empty, the 0-1 sequence generated in step S2-2-a) is the complete 0-1 sequence; otherwise, continue to execute other steps in step S2-2-b); (2) Take out the 0-1 sequence in the buffer and splice it to the head of the 0-1 sequence generated in step S2-2-a) to obtain the complete 0-1 sequence. At this time, the first bit of the original sequence in the buffer becomes the first bit of the complete 0-1 sequence; (3) Clear the buffer;

[0044] c) Fill gaps and remove noise: (1) "Fill gaps": Find all 1-connected regions in the complete 0-1 sequence from front to back; if the distance between two adjacent 1-connected regions is less than N itvlmin , set the '0' between them to 1. If the distance between them is not less than N itvlmin , do nothing; (2) The sequence after "filling gaps" is called the gap-filled sequence; (3) "Remove noise": Find all 1-connected regions in the gap-filled sequence; among them, if the length of a certain 1-connected region is less than N lenmin or greater than N lenmax , regard this region as noise and set it to 0; if the length of this 1-connected region is in the interval [N lenmin , N lenmax , keep this region without any processing; where N itvlmin is an empirical parameter representing the minimum interval between two 1-connected regions; N lenmin and N lenmax are empirical parameters representing the minimum and maximum lengths allowed for 1-connected regions respectively.

[0045] Preferably, in S2-3): Module Three, splitting the sequence to be processed in this frame. To distinguish it from the complete 0-1 sequence, the complete 0-1 sequence after "filling gaps and removing noise" is called the complete sequence, including the following processing steps:

[0046] a) Calculation of code element length interval: (1) For the complete sequence, find all 1-connected regions from front to back, and denote them as (2) Calculate the length corresponding to each connected region, that is, the number of '1's included in the connected region, and denote them as (3) Calculate The mean value is denoted as μ 1 ; (4) Using μ 1 as the threshold, find out the elements in 1 that are less than μ (5) The interval where the '.' is located is The 1-connected region with a length exceeding is '-';

[0047] b) Setting short code elements to 0: (1) Find all 1-connected regions in the complete sequence; (2) If the length of a certain 1-connected region is within the interval, set this region to 0; (3) Traverse all 1-connected regions; after the short code element setting to 0 process, obtain the complete sequence -1;

[0048] c) Interval length calculation: (1) In the complete sequence -1, find all 0-connected regions (formed by consecutive '0's) from front to back, and denote them as (2) Calculate the length of each 0-connected region, that is, the number of '0's it contains, and denote them as (3) Calculate the mean value of , and denote it as μ 0 ; (4) Using μ 0 as the threshold, find out all elements in 0 that are less than μ The mean value of the lengths of all elements not less than μ 0 is denoted as (5) The length interval of short intervals is The length interval of intervals in the middle is The length of long intervals is not less than

[0049] d) Setting short intervals to 1: (1) In the complete sequence -1, find all 0-connected regions; (2) If the length of a certain 0-connected region is within , set this region to 1; (3) Traverse all 0-connected regions; after the short interval setting to 1 process, obtain the complete sequence -2;

[0050] e) 0-1 sequence segmentation: (1) In the complete sequence -2, find all 0-connected regions in turn; (2) Find the last 0-connected region with a length not less than , and denote it as (3) Using to segment the complete sequence -2, The sequence before And the subsequent sequences are stored in the buffer; (4) If the lengths of all 0-connected regions are less than The complete sequence - 2 is not segmented and directly used as the sequence to be processed in this frame, and the buffer is empty.

[0051] Preferably, in step S2-4): Module Four, standard dot-dash form conversion, includes the following processing steps:

[0052] a) Based on the sequence to be processed in this frame, find all 1-connected regions, and denote them successively as The length of each corresponding 1-connected region is

[0053] b) According to the symbol element length interval, convert into the corresponding short tone or long tone, denoted as If Then If Then

[0054] c) Find all 0-connected regions, and denote them successively as The length of each corresponding 0-connected region is

[0055] d) According to the symbol element length interval, convert into the corresponding interval, denoted as

[0056] If Then is converted into a short interval, that is, is a short interval,

[0057] If Then is converted into a medium interval, that is, is a medium interval,

[0058] If Then is converted into a long interval, that is, is a long interval;

[0059] e) According to the order of the connected regions in the sequence to be processed in this frame, arrange and to obtain the standard Morse dot-dash form sequence S, where:

[0060] When the first connected region of the sequence to be processed is a 1-connected region:

[0061] P1 = Q0, then the arrangement of the elements in the dot-dash sequence S is P1 > Q0, then the arrangement of the elements in the dot-dash sequence S is

[0062] When the first connected region of the sequence to be processed is a 0-connected region:

[0063] If Q0 = P1, the arrangement of elements in the dot-dash sequence S is If Q0 > P1, the arrangement of elements in the dot-dash sequence S is

[0064] Preferably, in the step S2-6): Module Six, WPM (Words Per Minute) calculation, based on the sequence to be processed in this frame, the specific processing steps are as follows:

[0065] a) Find all 1-connected regions in the sequence to be processed in this frame with lengths in the interval, and the corresponding lengths are L′1, L′2…, L′ D ;

[0066] b) Calculate the mean value of L′1, L′2…, L′ D , denoted as L′ μ . The length of the short tone ‘.’ in the signal is L′ μ *2 P , and 2 P is the number of points taken for mean pooling. The number of points in the original signal is 2 P times that of the pooled signal;

[0067] c) Given that the sampling rate of the input signal is f S , the WPM value of the signal can be calculated according to the following formula:

[0068] WPM = f S / 25000×500 / (L′ μ *2 P )×80.

[0069] Compared with the prior art, the beneficial effects of the present invention are:

[0070] The present invention can automatically determine whether the current input signal is a Morse signal and further give the recognition and decoding results; the entire process does not require manual intervention, effectively replacing the traditional manual copying method and alleviating the urgency of the automatic processing requirement for Morse signals to a certain extent. Brief Description of the Drawings

[0071] Figure 1 is a schematic flowchart of a two-stage automatic Morse signal processing method based on time-frequency analysis.

[0072] Figure 2 is a schematic flowchart of automatic Morse signal detection.

[0073] Figure 3 It is a schematic diagram of the process for automatic recognition of Morse signals.

[0074] Figure 4 It is a schematic diagram of the time-domain display of the input Morse signal.

[0075] Figure 5 It is a spectrum display diagram of Morse data.

[0076] Figure 6 It is a time-frequency diagram of Morse signals.

[0077] Figure 7 It is a variance diagram generated based on the time-frequency diagram.

[0078] Figure 8 It is a frame of Morse signal for experiments.

[0079] Figure 9 It is the pooling signal and adaptive threshold diagram generated during the recognition process.

[0080] Figure 10 It is a 0-1 sequence diagram generated by gap filling and noise elimination.

[0081] Figure 11 It is a complete 0-1 sequence diagram.

[0082] Figure 12 It is the sequence diagram to be processed in this frame.

[0083] Figure 13 It is a diagram of standard Morse code and decoding results. Specific implementation manners

[0084] The following elaborates on the preferred embodiments of the present invention in conjunction with the accompanying drawings, so that the advantages and features of the invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0085] Please refer to Figures 1 to 13 , the embodiments of the present invention include:

[0086] A two-stage automatic processing method for Morse signals based on time-frequency analysis. This two-stage automatic processing method for Morse signals based on time-frequency analysis is divided into two stages. In the first stage, automatic detection and processing of Morse signals are carried out. The specific process is as Figure 2 shown. The automatic detection of Morse signals determines whether the input signal is a Morse signal: if not, the processing process ends and the detection result of a non-Morse signal is given; if so, it enters the second stage for subsequent automatic recognition processing of Morse signals. The second stage is the automatic recognition processing of Morse signals, and the specific process is as Figure 3As shown, the automatic Morse signal recognition stage has two functions: First, decode the input signal; Second, automatically estimate the WPM of the signal.

[0087] The specific implementation steps of the present invention are as follows:

[0088] S1: In the first stage, automatic Morse signal detection, the specific steps are as follows:

[0089] S1-1) Synthesize the input I / Q data into a complex expression form, that is, I + j*Q;

[0090] S1-2) Take the first N points in the complex sequence for fast Fourier transform (FFT) to obtain a spectrogram;

[0091] S1-3) Perform threshold segmentation on the spectrogram to obtain the signal part above the threshold;

[0092] S1-4) If the bandwidth B emp < B CW ; then the current signal is a single tone, and continue to perform the subsequent step S1-5); otherwise, end the process, and the signal is a non-single tone signal and a non-Morse signal; where B CW is the empirical bandwidth of the single tone signal, and the general value range is 300 - 500 Hz;

[0093] S1-5) Calculate the number of points N S covered by B CW on the spectrum according to the sampling rate f CW of the input signal; where N win is the window length for calculating the short-time Fourier transform (STFT),

[0094] N CW = B CW / (f S / N win );

[0095] S1-6) The input I / Q data is assembled into a complex form I + j*Q, and STFT is performed with a window length of N win and a step size of N step to obtain a time-frequency matrix M cplx , where the columns correspond to frequencies and the rows correspond to time;

[0096] S1-7) Split the time-frequency matrix into a real part matrix M real and an imaginary part matrix M iag , M real + j*M imag = M cplx ;

[0097] S1-8) For the real part matrix Mreal , take a certain column j (j = 1, 2, …, N win ), with 2 n points as the sliding window length and 2 n-1 points as the step size, calculate the variance of the points within the sliding window to obtain the real part variance matrix V real ;

[0098] S1-9) For the imaginary part matrix M imag , calculate the imaginary part variance matrix V imag in the same method as in step S1-8);

[0099] S1-10) Obtain the complete variance matrix V cplx = V real + V imag ;

[0100] S1-11) Find the maximum value in the variance matrix V cplx , denoted as maxV;

[0101] S1-12) Calculate the thresholds T L and T H respectively according to the following calculations, where α1 is an empirical parameter,

[0102] T H = α1 * maxV T L = T H / 3;

[0103] S1-13) Use T H as the threshold to segment the variance matrix V cplx , where the variance value exceeding T H is denoted as 1, otherwise as 0, to obtain a matrix D cplx of the same size as V H ;

[0104] S1-14) For D H , if there is a '1' in a certain column of data, record the corresponding column number, and obtain the column numbers. The sequence composed of these numbers is denoted as:

[0105] S1-15) If N H is greater than N CW , then the input signal is a non-single tone signal and a non-Morse signal, and end the execution; otherwise, continue to execute the subsequent steps;

[0106] S1-16) For x i (i = 1, 2, …, N H ), take out the data on the corresponding column in V cplx . If all the data in this column is greater than T L , then record yi (i = 1, 2, …, N H ) is 0, otherwise, denote y i (i = 1, 2, …, N H ) as 1;

[0107] S1-17) If y i (i = 1, 2, …, N H ) are all 0, then the input signal is a non-Morse signal, otherwise, the signal is a Morse signal, and continue with subsequent recognition processing.

[0108] S2: The second stage, automatic Morse signal recognition. This stage contains multiple modules, and the specific steps corresponding to each module are as follows:

[0109] S2-1): Module 1, preprocessing. This module specifically includes the following processing:

[0110] a) STFT transformation: Perform short-time Fourier transform (STFT) on the input signal to obtain the time-frequency matrix M C , where the elements in M C are complex numbers. The columns represent frequencies from left to right, and the rows represent time from top to bottom; Take the modulus of the elements in M C to obtain the corresponding modulus matrix M CA ;

[0111] b) Fixed-frequency denoising: For the modulus matrix M CA , sum by column to obtain a row matrix, denoted as A S ; Find the maximum value in A S , and its corresponding serial number is M ind ; Let the M C -th column in the time-frequency matrix M ind remain unchanged, and set all other columns to 0 to obtain the denoised STFT result M C_CN ; Perform inverse short-time Fourier transform on M C_CN to obtain the denoised time-domain signal sequence {c n};

[0112] c) Average pooling: Divide the denoised signal {c n} into N P groups on average; Take the mean value of the j-th (j = 1, 2, …, N P ) group of signals to obtain m j , and use m j to represent the j-th group of signal sequences; The mean value sequence {m j , j = 1, 2, …, N P}, this sequence is called the pooling sequence (or pooling signal), and subsequent processing is based on the pooling sequence;

[0113] S2-2): Module 2, threshold segmentation and 0-1 sequence generation. This module specifically includes the following processes:

[0114] a) Adaptive threshold segmentation: (1) Find the maximum value in the pooling sequence {m j , j = 1, 2, …, N P}, denoted as m max , and obtain the lowest threshold T min , T min = β1 * m max , where β1 is an empirical parameter; (2) Divide the pooling sequence into N q groups evenly; for the t-th (1 ≤ t ≤ N q ) group of data, find the maximum value, denoted as m t_max , and the corresponding threshold T t , T t = max(β2 * m t_max , T min ), where β2 is an empirical parameter; (3) Use T t to segment the t-th (1 ≤ t ≤ N q ) group of data. Among them, the values less than the threshold are '0', and the values not less than the threshold are '1'. In this way, T t divides the t-th group of data into a 0-1 sequence; (4) Traverse all t (1 ≤ t ≤ N q ), and convert the pooling signal into a 0-1 sequence;

[0115] b) Generate a complete 0-1 sequence based on a pre-set buffer: (1) Judge whether the buffer is empty. If the buffer is empty, the 0-1 sequence generated in step S2-2-a) is the complete 0-1 sequence; otherwise, continue to execute the other steps in step S2-2-b); (2) Take out the 0-1 sequence in the buffer and splice it to the head of the 0-1 sequence generated in step S2-2-a

[0116] to obtain the complete 0-1 sequence. At this time, the first bit of the original sequence in the buffer becomes the first bit of the complete 0-1 sequence; (3) Empty the buffer;

[0117] c) Fill gaps and eliminate noise: (1) "Fill gaps": Find all 1-connected regions in the complete 0-1 sequence from front to back; if the distance between two adjacent 1-connected regions is less than N itvlmin , set the '0' between them to '1'. If the distance between them is not less than N itvlmin , do nothing; (2) The sequence after "filling gaps" is called the gap-filled sequence;

[0118] (3) "Noise reduction": Find all 1-connected regions in the gap-filling sequence; among them, if the length of a 1-connected region is less than N lenmin or greater than N lenmax , consider this region as noise and set it to 0; if the length of this 1-connected region is within the interval [N lenmin , N lenmax , keep this region without any processing; where N itvlmin is an empirical parameter representing the minimum interval between two 1-connected regions; N lenmin and N lenmax are empirical parameters representing the minimum and maximum lengths allowed for 1-connected regions respectively.

[0119] S2-3): Module Three, segmentation of the sequence to be processed in this frame. To distinguish it from the complete 0-1 sequence, the complete 0-1 sequence after "gap-filling and noise reduction" processing will be referred to as the complete sequence in the following text:

[0120] a) Calculation of symbol length interval: (1) For the complete sequence, find all 1-connected regions from front to back and denote them sequentially as (2) Calculate the length corresponding to each connected region, that is, the number of '1's included in the connected region, and denote them sequentially as (3) Calculate the mean value of and denote it as μ 1 ; (4) Using

[0121] μ 1 as the threshold, find the elements in that are less than μ 1 , and their mean value is (5) The interval where '.' is long is The 1-connected regions with a length exceeding are '-';

[0122] b) Setting short symbols to 0: (1) Find all 1-connected regions in the complete sequence; (2) If the length of a 1-connected region is within the interval, set this region to 0; (3) Traverse all 1-connected regions; after the short symbol setting to 0 process, obtain the complete sequence -1;

[0123] c) Calculation of interval length: (1) In the complete sequence -1, find all 0-connected regions (formed by consecutive '0's) from front to back and denote them sequentially as (2) Calculate the length of each 0-connected region, that is, the number of '0's included in it, and denote them respectively as (3) Calculate the mean value of and denote it as μ 0 ; (4) Using μ 0 as the threshold, find All elements less than μ 0 in it, the mean of their lengths is denoted as All elements with lengths not less than μ 0 in it, the mean of their lengths is denoted as (5) The length interval of short intervals is The length interval of medium intervals is The length of long intervals is not less than

[0124] d) Set 1 for overly short intervals: (1) In the complete sequence - 1, find all 0 - connected regions; (2) If the length of a certain 0 - connected region is within , set this region to 1; (3) Traverse all 0 - connected regions; After the process of setting 1 for short intervals, obtain the complete sequence - 2;

[0125] e) 0 - 1 sequence segmentation: (1) In the complete sequence - 2, find all 0 - connected regions in sequence; (2) Find the last 0 - connected region with a length not less than , denoted as (3) Use to segment the complete sequence - 2, The sequence before is used as the sequence to be processed in this frame and input to the subsequent processing module; The sequence from and after it is stored in the buffer; (4) If the lengths of all 0 - connected regions are less than the complete sequence - 2 is not segmented and directly used as the sequence to be processed in this frame, and the buffer is empty;

[0126] S2 - 4): Module Four, standard dot - dash form conversion, this module specifically includes the following processing:

[0127] a) Based on the sequence to be processed in this frame, find all 1 - connected regions, denoted as The length of each corresponding 1 - connected region is

[0128] b) According to the code element length interval, convert into the corresponding short tone or long tone, denoted as

[0129] If then

[0130] If then

[0131] c) Find all 0 - connected regions, denoted as The length of each corresponding 0 - connected region is

[0132] d) According to the symbol length interval, is converted into the corresponding interval, denoted as

[0133] If then is converted into a short interval, that is, is the short interval,

[0134] If then is converted into a medium interval, that is, is the medium interval,

[0135] If then is converted into a long interval, that is, is the long interval;

[0136] e) According to the order of the connected regions in the sequence to be processed in this frame, arrange and

[0137] to obtain the standard Morse dot-dash form sequence S. Among them, when the first connected region in the sequence to be processed is a 1-connected region:

[0138] If P1 = Q0, the arrangement of the elements in the dot-dash sequence S is

[0139] If P1 > Q0, the arrangement of the elements in the dot-dash sequence S is

[0140] When the first connected region in the sequence to be processed is a 0-connected region:

[0141] If Q0 = P1, the arrangement of the elements in the dot-dash sequence S is

[0142] If Q0 > P1, the arrangement of the elements in the dot-dash sequence S is

[0143] S2-5): Module Five, Decoding: After generating the standard dot-dash form Morse sequence S, it can be decoded with reference to Table 1, the common Morse code comparison table;

[0144] S2-6): Module Six, WPM (Words Per Minute) calculation, based on the sequence to be processed in this frame, the specific processing is as follows:

[0145] a) Find all 1-connected regions with lengths in the interval in the sequence to be processed in this frame, and the corresponding lengths are L′1, L′2…, L′D ;

[0146] b) Calculate the means of L′1, L′2…, L′ D , denoted as L′ μ . The length of the short tone '.' in the signal is L′ μ *2 P , and 2 P is the number of points taken during mean pooling. The number of points in the original signal is 2 P times that of the pooled signal;

[0147] c) Given that the sampling rate of the input signal is f S , the WPM value of the signal can be calculated according to the following formula:

[0148] WPM = f S / 25000×500 / (L′ μ *2 P ).×80

[0149] Table 1 Common Morse Code Comparison Table

[0150]

[0151]

[0152] The following uses simulation experiments to further verify the functions and effects of the present invention. In the experiment, the data frame length of the input signal is 65536; in step S1-2), N is taken as 8192; when calculating the short-time Fourier transform STFT in step S1-6), the window length N win is set to 256, and the step length N step is set to 128; in step S1-8), n is taken as 4; in step S1-12), the empirical parameter α1 is taken as 0.325; when calculating the short-time Fourier transform STFT in step S2-1-a), the window length is still set to 256 and the step length is set to 128; in step S2-2-a), the empirical parameters β1 and β2 are respectively set to 0.15 and 0.275; in step S2-2-c), the empirical parameter N itvlmin takes the value of 2, N lenmin takes the value of 4, and N lenmax takes the value of 256.

[0153] In simulation experiment 1, an input frame of Morse signal is used to test the detection ability of the present invention. The experimental results are as Figures 4 - 7 shown, where Figure 4 is the time-domain display of the input Morse signal; Figure 5 is the corresponding spectrogram of the signal, the frequency spectrum display of Morse data, and the dotted line represents the threshold (T B ) taken when calculating the empirical bandwidth, and the empirical bandwidth Bemp is 149.54 Hz; Figure 6 is the time-frequency diagram of the Morse signal; Figure 7 is the variance diagram generated based on the time-frequency diagram (only the [0, fs / 2] frequency band is shown). In the figure, the '--' line and the '-·' line respectively represent the thresholds T H and T L , according to the method of the present invention, it can be finally determined that the signal is a Morse signal. It can be seen that the present invention can correctly identify that the input signal is a Morse signal.

[0154] Simulation experiment two: The input signal is a certain frame of Morse signal to test the recognition and decoding ability of the present invention. The experimental results are as Figures 8 - 13 shown, where Figure 8 is a frame of Morse signal used for the experiment; Figure 9 are the pooling signal and the adaptive threshold generated during the recognition process; Figure 10 is the 0-1 sequence generated by gap filling and noise elimination; Figure 11 is the complete 0-1 sequence; Figure 12 is the sequence to be processed in this frame; Figure 13 are the standard Morse code and the decoding result corresponding to the sequence to be processed in this frame. After comparison, the decoding result is correct. It can be seen that the present invention can correctly identify and decode. In addition, generating the final decoding result also means that the detection process in the first stage correctly determines the input signal as a Morse signal, which verifies the detection ability of the present invention again.

[0155] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be included in the patent protection scope of the present invention by the same token.

Claims

1. An automatic processing method for two-stage Morse signals based on time-frequency analysis, characterized in that: It includes the following steps: S1: In the first stage, automatic detection of Morse signals. The automatic detection of Morse signals determines whether the input signal is a Morse signal. If not, the processing process ends and the detection result of non-Morse signals is given. If so, enter the second stage for subsequent automatic recognition processing of Morse signals. The automatic detection of Morse signals first inputs the signal, performs an FFT transformation on the signal, and calculates the empirical bandwidth B emp , and determines B emp < 500 Hz. If so, the current signal is a single tone; otherwise, the signal is a non-single tone signal and a non-Morse signal. Perform an STFT transformation on the input single tone signal to obtain a time-frequency matrix. After splitting the time-frequency matrix, calculate the variances of the imaginary part and the real part respectively, find the maximum value in the variance matrix, and adaptively calculate the double thresholds T L and T H , and determine whether it meets the double threshold criterion. If so, the signal is a Morse signal; otherwise, the input signal is a non-Morse signal; S2: In the second stage, automatic recognition of Morse signals. Automatic recognition of Morse signals means identifying the arrangement and combination of dots, dashes, and intervals in time series without manual operation, and then decoding the combination of each element into standard characters according to the corresponding relationship in the coding rules. It is the ultimate destination of automatic processing of Morse signals. The automatic recognition stage of Morse signals has two functions: First, decode the input signal. Second, automatically estimate the WPM of the signal. S2: In the second stage, automatic recognition of Morse signals, including the following module steps: S2-1): Module 1, preprocessing. S2-2): Module 2, threshold segmentation and generation of 0-1 sequence. S2-3): Module 3, segmentation of the sequence to be processed in this frame. S2-4): Module 4, conversion to standard dot-dash form. S2-5): Module 5, decoding: After generating the Morse sequence S in standard dot-dash form, decode it with reference to the common Morse code look-up table. S2-6): Module 6, WPM calculation.

2. The automatic processing method for two-stage Morse signals based on time-frequency analysis according to claim 1, characterized in that: The above-mentioned S1: In the first stage, automatic detection of Morse signals, including the following specific steps: S1-1) Synthesize the input I / Q data into a complex expression form, that is, I + j*Q. S1-2) Take the first N points in the complex sequence for fast Fourier transform (FFT) to obtain a spectrogram. S1-3) Perform threshold segmentation on the spectrogram to obtain the signal part above the threshold. S1-4) If the bandwidth B of the signal part emp < B CW ; then the current signal is a single tone, and continue to perform the subsequent step S1-5); otherwise, end the process, and the signal is a non-single tone signal and a non-Morse signal; where B CW is the empirical bandwidth of the single tone signal, and the general value range is 300 - 500 Hz; S1-5) Calculate N, the number of points covered by B on the spectrum, according to the sampling rate f of the input signal S , calculate B CW covering the number of points N on the spectrum CW : N CW = B CW / (f S / N win ) Among them, N win is the window length for calculating the short-time Fourier transform (STFT); S1-6) The input I / Q data is combined into a complex form I + j*Q, with a window length of N win and a step size of N step to perform STFT transformation, obtaining a time-frequency matrix M cplx , where the columns correspond to frequencies and the rows correspond to time; S1-7) Split the time-frequency matrix into a real part matrix M real and an imaginary part matrix M iag , M real +j*M imag = M cplx ; S1-8) For the real part matrix M real , take a certain column j (j = 1, 2,..., N win ), with 2 n points as the sliding window length and 2 n-1 points as the step size, calculate the variance of the points within the sliding window to obtain the real part variance matrix V real ; S1-9) For the imaginary part matrix M imag , calculate the imaginary part variance matrix V in the same way as in step S1-8 imag ; S1-10) Obtain the complete variance matrix V cplx = V real + V imag ; S1-11) Find the variance matrix V cplx Find the maximum value in it, denoted as maxV; S1-12) Calculate the thresholds T and T respectively according to the following calculations, where α1 is an empirical parameter L and T H , where α1 is an empirical parameter T H = α1 * maxV, T L = T H / 3; S1-13) Use T H as the threshold to segment the variance matrix V cplx , where the variance value exceeding T H is denoted as 1, otherwise denoted as 0, to obtain a matrix D cplx with the same size as V H ; S1-14) For D H , if there is a '1' in a certain column of data, record the corresponding column number to obtain column numbers, and the sequence composed of these numbers is denoted as: S1-15) If N H is greater than N CW , then the input signal is a non-monophonic signal and a non-Morse signal, and the execution ends; otherwise, continue to execute the subsequent steps; S1-16) For x i (i = 1, 2, …, N H ), take out the data in the corresponding column of V cplx . If all the data in this column are greater than T L , then record y i (i = 1, 2, …, N H ) as 0. Otherwise, record y i (i = 1, 2, …, N H ) as 1; S1-17) If y i (i = 1, 2, …, N H ) are all 0, then the input signal is a non-Morse signal; otherwise, the signal is a Morse signal and subsequent recognition processing continues.

3. A two-stage automatic processing method for Morse signals based on time-frequency analysis according to claim 1, characterized in that: The above-mentioned S2-1): Module 1, preprocessing, including the following processing steps: a) STFT transform: Perform the STFT transform on the input signal to obtain the time-frequency matrix M C , M C The elements in M are complex numbers. The columns represent frequencies from left to right, and the rows represent time from top to bottom; Take the modulus of the elements in M C to obtain the corresponding modulus matrix M CA ; b) Fixed-frequency denoising: For the modulus matrix M CA , sum by column to obtain a row matrix, denoted as A S ; find the maximum value in A S , and its corresponding serial number is M ind ; let the M C -th column in the time-frequency matrix M ind remain unchanged, and set all other columns to 0 to obtain the denoised STFT result M C_CN ; perform the inverse short-time Fourier transform on M C_CN to obtain the denoised time-domain signal sequence {c n}; c) Average pooling: The denoised signal {c n} is evenly divided into N P groups; The mean value of the signals in the j-th (j = 1, 2, …, N P ) group is taken to obtain m j , and m j is used to represent the signal sequence of the j-th group; The mean value sequence {m j , j = 1, 2, …, N P}, this sequence is called the pooling sequence or the pooling signal, and subsequent processing is based on the pooling sequence.

4. A two-stage automatic processing method for Morse signals based on time-frequency analysis according to claim 1, characterized in that: The above-mentioned S2-2): Module 2, threshold segmentation and generation of 0-1 sequence, including the following processing steps: a) Adaptive threshold segmentation: (1) Find the maximum value in the pooling sequence {m j , j = 1, 2, …, N P}, denoted as m max , and obtain the lowest threshold T min , T min = β1 * m max , where β1 is an empirical parameter; (2) Divide the pooling sequence into N q groups evenly; for the t-th (1 ≤ t ≤ N q ) group of data, find the maximum value, denoted as m t_max , and the corresponding threshold T t , T t = max(β2 * m t_max , T min ), where β2 is an empirical parameter; (3) Use T t to segment the t-th (1 ≤ t ≤ N q ) group of data. Among them, the values less than the threshold are '0', and the values not less than the threshold are '1'. In this way, T t segments the t-th group of data into a 0-1 sequence; (4) Traverse all t (1 ≤ t ≤ N q ) to convert the pooling signal into a 0-1 sequence; b) Based on the pre-set buffer, generate a complete 0-1 sequence: (1) Judge whether the buffer is empty. If the buffer is empty, the 0-1 sequence generated in step S2-2-a) is the complete 0-1 sequence; otherwise, continue to execute other steps in step S2-2-b). (2) Take out the 0-1 sequence in the buffer and splice it to the head of the 0-1 sequence generated in step S2-2-a) to obtain the complete 0-1 sequence. At this time, the first bit of the original sequence in the buffer becomes the first bit of the complete 0-1 sequence. (3) Empty the buffer. c) Gap filling and noise elimination: (1) "Gap filling": Find all 1-connected regions in the complete 0-1 sequence from front to back; if the distance between two adjacent 1-connected regions is less than N itvlmin , set the '0' between them to 1, if the distance between them is not less than N itvlmin , do not perform any operation; (2) The sequence after "gap filling" is called the gap-filled sequence; (3) "Noise elimination": Find all 1-connected regions in the gap-filled sequence; among them, if the length of a certain 1-connected region is less than N lenmin or greater than N lenmax , regard this region as noise and set it to 0; if the length of this 1-connected region is in the interval [V lenmin , N lenmax , keep this region without any treatment; where N itvlmin is an empirical parameter representing the minimum interval between two 1-connected regions; N lenmin and N lenmax are empirical parameters, representing the minimum and maximum lengths allowed for 1-connected regions respectively.

5. A two-stage Morse signal automatic processing method based on time-frequency analysis according to claim 1, characterized in that: The above-mentioned S2-3): Module 3, segmentation of the sequence to be processed in this frame. To distinguish it from the complete 0-1 sequence, the complete 0-1 sequence processed by "gap filling and noise elimination" is called the complete sequence, including the following processing steps: a) Calculation of symbol length interval: (1) For the complete sequence, find all 1-connected regions from front to back, and denote them in turn as (2) Calculate the length corresponding to each connected region, that is, the number of '1's contained in the connected region, and denote them in turn as (3) Calculate the mean value of, denoted as μ 1 ; (4) Taking μ 1 as the threshold, find the elements in that are less than μ 1 , and their mean value is (5) The interval where the '.' is located is The 1-connected region with a length exceeding is '-'; b) Set short code elements to 0: (1) Find all 1-connected regions in the complete sequence; (2) If the length of a 1-connected region is within (0, interval, set this region to 0; (3) Traverse all 1-connected regions; After processing the short code elements by setting them to 0, obtain the complete sequence - 1; c) Interval length range calculation: (1) In the complete sequence -1, find all 0-connected regions from front to back. The 0-connected regions are composed of consecutive '0's, denoted as (2) Calculate the length of each 0-connected region, that is, the number of '0's it contains, denoted as (3) Calculate the mean value of , denoted as μ 0 ; (4) Using μ 0 as the threshold, find all elements in that are less than μ 0 . The mean value of their lengths is denoted as For all elements with lengths not less than μ 0 , the mean value of their lengths is denoted as (5) The length range of short intervals is The length range of intermediate intervals is The length of long intervals is not less than d) Setting 1 for short intervals: (1) In the complete sequence - 1, find all 0-connected regions; (2) If the length of a 0-connected region is within , set this region to 1; (3) Traverse all 0-connected regions; After the processing of setting 1 for short intervals, the complete sequence - 2 is obtained; e) 0-1 sequence segmentation: (1) In the complete sequence - 2, find all 0-connected regions in sequence; (2) Find the last 0-connected region with a length not less than , denoted as . (3) Use to segment the complete sequence - 2, The sequence before is used as the sequence to be processed in this frame and input to the subsequent processing module; The sequence after and including it is stored in the buffer. (4) If the length of all 0-connected regions is less than the complete sequence - 2 is not segmented and directly used as the sequence to be processed in this frame, and the buffer is empty.

6. The automatic processing method for two-stage Morse signals based on time-frequency analysis according to claim 1, characterized in that: The above-mentioned S2-4): Module 4, conversion to standard dot-dash form, including the following processing steps: a) Based on the sequence to be processed in this frame, find all 1-connected regions, and denote them in turn as The length of each corresponding 1-connected region is b) According to the symbol length interval, convert into the corresponding short tone or long tone, denoted as If then If then c) Find all 0-connected regions, denoted in sequence as The length of each corresponding 0-connected region is d) According to the symbol length interval, convert into the corresponding interval, denoted as If then is converted to a short interval, that is, is a short interval If then is converted to an intermediate interval, that is, is the intermediate interval, If then is converted to a long interval, that is is the long interval; e) Place them in the order of the connected regions in the sequence to be processed in this frame and to obtain a standard Morse dot-dash form sequence S, where: When the first connected region of the sequence to be processed is a 1-connected region: If P1 = Q0, then the arrangement of the elements in the dotted sequence S is If P1 > Q0, then the arrangement of the elements in the dotted sequence S is When the first connected region of the sequence to be processed is a 0-connected region: If Q0 = P1, then the arrangement of the elements in the dotted sequence S is If Q0 > P1, then the arrangement of the elements in the dot-dash sequence S is 7. A two-stage automatic processing method for Morse signals based on time-frequency analysis according to claim 1, characterized in that: The above-mentioned S2-6): Module 6, WPM calculation. Based on the sequence to be processed in this frame, the specific processing steps are as follows: a) Find all 1-connected regions in the sequence to be processed in this frame with lengths in the range of The corresponding lengths are L′1, L′2…, L′ D ; b) Calculate the means of L′1, L′2…, L′ D and denote it as L′ μ . The length of the short tone ‘.’ in the signal is L′ μ *2 P . Here, 2 P is the number of points taken during mean pooling, and the number of points in the original signal is 2 P times that of the pooled signal; c) Given that the sampling rate of the input signal is f S , the WPM value of the signal can be calculated by the following formula: WPM = f S / 25000×500 / (L′ μ *2 P )×80。

Citation Information

Cited By

  • Rapid Morse code identification method

    CN122313996A