Viterbi decoding method and apparatus, electronic device, and storage medium
By setting a deletion threshold and dynamically adjusting the signal-to-noise ratio parameter in the Viterbi decoding method, and combining backtracking decoding in radix-2 and radix-4 modes, the problems of slow decoding speed and high power consumption in the prior art are solved, and a high-speed and low-power decoding effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD
- Filing Date
- 2023-02-10
- Publication Date
- 2026-04-21
AI Technical Summary
Existing Viterbi decoding methods suffer from wasted hardware resources or excessive computational load under both high and low signal-to-noise ratio (SNR) conditions, resulting in slower decoding speeds and increased power consumption.
By calculating the distance between the received codeword and the expected codeword, a deletion threshold is set to filter surviving paths. Combining the backtracking decoding methods of radix-2 and radix-4 modes, the signal-to-noise ratio related parameters are dynamically adjusted to optimize the decoding process.
It achieves efficient decoding with high speed and low power consumption under different signal-to-noise ratio conditions, reducing the amount of computation and making reasonable use of hardware resources.
Smart Images

Figure CN116318190B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of satellite positioning and navigation communication technology, and more specifically, to a Viterbi decoding method, a Viterbi decoding device, an electronic device, and a storage medium. Background Technology
[0002] In modern Global Navigation Satellite Systems (GNSS), many signals, such as GPS L5 and L2C signals; Galileo E1B, E5b-I, and E5a-I signals; GLONASS L1OCd and L3Ocd signals; QZSS L5, L2C, L1-SAIF, and L5S signals; IRNSS L5 and S signals; and SBAS L1C / A and L5 signals, use a (2, 1, 7) convolutional code with tap coefficients of (171, 133)⁸ as its forward error correction code for navigation message channel coding. The Viterbi algorithm is commonly used for decoding such convolutional codes. The Viterbi algorithm is a maximum likelihood decoding algorithm based on a trellis graph.
[0003] However, as decoding performance requirements continue to increase, the constraint length of convolutional codes is constantly growing, leading to a key problem: the increase in the number of states in the lattice graph. This directly results in an increase in decoding computation and data storage, which in turn leads to a series of problems such as slower decoding speed and increased hardware power consumption.
[0004] Existing technical solutions have made improvements to the Viterbi algorithm, reducing the number of surviving paths at each time step to some extent while ensuring the bit error rate remains within an acceptable range. The degree of reduction is related to the signal-to-noise ratio (SNR). However, existing technologies have drawbacks in both low and high SNR scenarios. For example, when the SNR is low, the number of surviving paths is excessive, resulting in minimal improvement in decoding speed and power consumption. Conversely, when the SNR is high, although the number of surviving path data is significantly reduced, it may lead to idle and wasted hardware resources.
[0005] Therefore, a new Viterbi decoding method is urgently needed to solve the above-mentioned technical problems. Summary of the Invention
[0006] The summary section introduces a series of simplified concepts, which will be further explained in detail in the detailed description section. This summary section is not intended to limit the key features and essential technical features of the claimed technical solution, nor is it intended to determine the scope of protection of the claimed technical solution.
[0007] In a first aspect, the present invention proposes a Viterbi decoding method, comprising:
[0008] Calculate the distance between the received codeword and the expected codeword at the same time to obtain the branch metric value at the current time.
[0009] Based on the branch metric at the current moment, the surviving path metric at the current moment is determined, and then the surviving path information is determined;
[0010] Set a deletion threshold;
[0011] The survival path metric at the current moment is filtered based on the deletion threshold to obtain the minimum survival path metric.
[0012] When the decoding time reaches the backtracking depth, backtracking begins based on the state corresponding to the minimum surviving path metric at the current decoding time, using the surviving path information as the starting point, in order to output the corresponding decoding result.
[0013] Optionally, the distance between the received codeword and the expected codeword at the same time is calculated to obtain the branch metric value at the current time, including:
[0014] The Hamming distance between the received codeword and the expected codeword is calculated using hard-decision decoding; or,
[0015] The Euclidean distance between the received codeword and the expected codeword is calculated using a soft-decision decoding method.
[0016] Optionally, the decoding object of the decoding method is the convolutional code used by the Global Navigation Satellite System;
[0017] Set deletion thresholds, including:
[0018] When determining the branch metric based on hard-decision decoding, the deletion threshold is set to min{d}. f d min +T}, where d f d is the minimum free distance of the convolutional code. min Let T be the minimum surviving path metric among all states at the current moment, where T is the variable controlling the signal-to-noise ratio at the current moment under hard-decision decoding, and min{} represents taking the smaller value between the two; or,
[0019] When determining the branch metric based on soft-decision decoding, the deletion threshold is set to min{Q*d}. f_soft d min_soft +T soft}, where Q is the quantization series minus 1, d f_soft d is the equivalent minimum free distance of the convolutional code. min_soft T is the minimum survival path metric among all states at the current time. softLet min{} be the variable that controls the signal-to-noise ratio at the current moment in soft-decision decoding, where min{} represents taking the smaller value between the two.
[0020] Optionally, the method further includes:
[0021] In hard-decision decoding, an initial value is set for variable T. in, Indicates rounding down;
[0022] The variable T is dynamically adjusted using the formula T = T0 + τ, where τ is a parameter negatively correlated with the signal-to-noise ratio; or...
[0023] In soft-decision decoding, for variable T soft Set the initial value T soft_0 , among which, T soft_0 Related to quantization series;
[0024] Using formula T soft =T soft_0 +τ soft For variable T soft Dynamic adjustments are made, where τ soft This parameter is negatively correlated with the signal-to-noise ratio.
[0025] Optionally, when the decoding time reaches the backtracking depth, backtracking begins based on the state corresponding to the minimum surviving path metric at the current decoding time, using the surviving path information as the starting point, to output the corresponding decoding result, including:
[0026] Backtracking is performed using radix-2 and / or radix-4 backtracking decoding to output the corresponding decoding result.
[0027] Optionally, backtracking can be performed in radix-2 and / or radix-4 mode to output the corresponding decoding results, including:
[0028] Count the number of butterfly units required for the next time step in the current time step;
[0029] The number of butterfly units is compared with a preset first switching threshold or a second switching threshold to obtain the comparison result;
[0030] If the comparison result indicates that the number of butterfly units is less than the first switching threshold, the backtracking decoding mode at the next moment will be switched to radix-4 mode. If the comparison result indicates that the number of butterfly units is greater than or equal to the first switching threshold, backtracking decoding will continue in radix-2 mode.
[0031] If the comparison result indicates that the number of butterfly units is greater than the second switching threshold, the backtracking decoding mode at the next moment will be switched to radix-2 mode. If the comparison result indicates that the number of butterfly units is less than or equal to the second switching threshold, backtracking decoding will continue in radix-4 mode.
[0032] Optionally, based on the branch metric at the current moment, the surviving path metric at the current moment is determined, and then the surviving path information is determined, including:
[0033] Add the path metrics of any two states from the previous time step to their corresponding branch metrics to obtain the two path metrics of the corresponding state at the current time step, and take the smaller of the two path metrics of the corresponding state as the surviving path metric of the current time step, wherein the two states and the corresponding state at the current time step belong to the same butterfly unit.
[0034] Based on the branch information traversed from the previous state to the current state, the survival path information is determined.
[0035] Secondly, a Viterbi decoding device is also proposed, comprising:
[0036] The calculation module is used to calculate the distance between the received codeword and the expected codeword at the same time to obtain the branch metric value at the current time.
[0037] The information determination module is used to determine the surviving path metric at the current moment based on the branch metric at the current moment, and then determine the surviving path information.
[0038] The parameter setting module is used to set the deletion threshold;
[0039] The filtering module is used to filter the surviving path metric at the current moment based on the deletion threshold in order to obtain the minimum surviving path metric.
[0040] The decoding module is used to backtrack based on the state corresponding to the minimum surviving path metric at the current decoding time when the decoding time reaches the backtracking depth, in order to output the corresponding decoding result.
[0041] Thirdly, an electronic device is also proposed, including a processor and a memory, wherein the memory stores computer program instructions, which are executed by the processor to perform the Viterbi decoding method as described above.
[0042] Fourthly, a storage medium is also proposed, on which program instructions are stored, which are used to execute the Viterbi decoding method as described above during runtime.
[0043] According to the above technical solution, the branch metric value at the current moment is first obtained. Based on the branch metric value at the current moment, the surviving path metric value at the current moment is determined, thereby determining the surviving path information. Next, the surviving path metric value at the current moment is filtered based on the set deletion threshold to obtain the minimum surviving path metric value. Finally, when the decoding time reaches the backtracking depth, backtracking decoding begins based on the state corresponding to the minimum surviving path metric value at the current decoding time, starting from the surviving path information, and finally outputting the corresponding decoding result. Thus, the setting of the deletion threshold achieves effective filtering of surviving paths, effectively reducing the amount of computation in the decoding process, and achieving high-speed and low-power efficient decoding under any signal-to-noise ratio conditions.
[0044] The Viterbi decoding method of the present invention, other advantages, objectives and features of the present invention will be apparent in part from the following description, and in part will be understood by those skilled in the art through study and practice of the present invention. Attached Figure Description
[0045] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit this specification. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0046] Figure 1 A schematic flowchart of a Viterbi decoding method according to an embodiment of the present invention is shown;
[0047] Figure 2 A schematic flowchart of a Viterbi decoding method according to another embodiment of the present invention is shown;
[0048] Figure 3 A schematic block diagram of a Viterbi decoding apparatus according to an embodiment of the present invention is shown; and
[0049] Figure 4 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. Detailed Implementation
[0050] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The technical solutions of the embodiments of this application will now be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0051] According to a first aspect of the present invention, a Viterbi decoding method is proposed. Figure 1 A schematic flowchart of a Viterbi decoding method 100 according to an embodiment of the present invention is shown. Figure 1 As shown, method 100 may include the following steps.
[0052] Step S110: Calculate the distance between the received codeword and the expected codeword at the same time to obtain the branch metric value at the current time.
[0053] As mentioned earlier, the Viterbi algorithm is a grid-based algorithm that involves multiple branches during computation. In actual decoding, for the received codeword at the current moment, there is a corresponding expected codeword at the same moment. The expected codeword can be understood as representing the ideal state of each branch on the grid under ideal conditions. The distance between the received codeword and the expected codeword can be calculated using any existing or future technology, and the obtained distance can then be used as the branch metric for the corresponding branch at the current moment.
[0054] Step S120: Based on the branch metric value at the current moment, determine the surviving path metric value at the current moment, and then determine the surviving path information.
[0055] Optionally, step S120 may include steps S121 and S122.
[0056] Step S121: Add the path metric values of any two states in the previous time step to their corresponding branch metric values to obtain the two path metric values of the corresponding state in the current time step, and take the smaller of the two path metric values of the corresponding state as the surviving path metric value in the current time step. Here, any two states and the corresponding state in the current time step belong to the same butterfly unit.
[0057] Specifically, assuming the current time is t=1, the previous time was t=0, and the next time is t=2. In this embodiment, adding the path metrics PM1 and PM2 of any two states (e.g., state 1 and state 2) at time t=0 to their corresponding branch metrics yields the two path metrics PM1 and PM2 of the corresponding states (e.g., state 3 and state 4) at time t=1. new1 PM new2 It can be understood that at time t=0, the path metrics for states 1 and 2 are 0. Therefore, the path metrics for states 3 and 4 at time t=1 are equal to the path metrics for states 1 and 2 at time t=0, which are PM1 and PM2. After obtaining the two path metrics for states 3 and 4 at time t=1, their values are compared. Based on the comparison result, the smaller value can be taken as the surviving path metric for the state at the current time t=1. States 1 and 2 belong to the same butterfly unit as states 3 and 4. Similarly, assuming the current time is t=2, the previous time was t=1, and the next time is t=3. In this embodiment, adding the path metrics PM1 and PM2 of states 3 and 4 at time t=1 to their corresponding branch metrics BM1 and BM2 yields the two path metrics for the corresponding states at time t=2, such as states 5 and 6, i.e., PM1+BM1 and PM2+BM2. Similarly, the two values are compared, and the smaller value is taken as the survival path metric for the state at the current time t=2. This process can be repeated to calculate the survival path metrics for multiple states at subsequent time points; for simplicity, this will not be described in detail here.
[0058] Step S122: Determine the surviving path information based on the branch information traversed from the previous state to the current state.
[0059] During the calculation process of step S121 above, if the state at the previous moment passes through branch 0 when it reaches the state at the current moment, the corresponding surviving path information is 0; or, if the state at the previous moment passes through branch 1 when it reaches the state at the current moment, the corresponding surviving path information is 1.
[0060] Therefore, based on the above technical solution, multiple surviving path metrics at multiple time points can be determined through a simple calculation process, resulting in accurate and more efficient results, providing a reliable guarantee for the subsequent decoding process.
[0061] Step S130: Set the deletion threshold.
[0062] Optionally, the deletion threshold can be preset based on experience or set according to the actual situation, and there are no restrictions here.
[0063] Step S140: Filter the surviving path metric values at the current time based on the deletion threshold to obtain the minimum surviving path metric value.
[0064] The deletion threshold is equivalent to a filtering condition. If the condition is met, the surviving path metric is retained; otherwise, the path is deleted. The deletion threshold can be a specific numerical value or a parameter range. For example, if the surviving path metric at the current moment is less than or equal to the deletion threshold, or within the threshold's range, the surviving path metric is retained; conversely, if the surviving path metric at the current moment is greater than the threshold, or outside the threshold's range, the path is deleted. After this filtering process, the minimum surviving path metric is obtained. It's important to understand that the number of minimum surviving path metrics is not fixed.
[0065] Step S150: When the decoding time reaches the backtracking depth, start backtracking based on the state corresponding to the minimum surviving path metric at the current decoding time, and output the corresponding decoding result.
[0066] It is understood that steps S110-S140 above are all decoding steps, and the time spent executing these steps is accumulated. When the current decoding time reaches the backtracking depth, the state corresponding to the minimum surviving path metric at the current decoding time is taken as the starting point, and backtracking begins based on the surviving path information determined in step S120 above, until backtracking to time t=0. In this embodiment, no specific limitation is made to the backtracking method; any existing or future technical solution that can achieve decoding backtracking is within the protection scope of this application. After decoding is completed for the duration corresponding to the backtracking depth, steps S110-S150 above are repeated for subsequent decoding work until decoding is finished. The backtracking depth can be set empirically to any reasonable value, such as 5-10 times the constraint length of the convolutional code.
[0067] According to the above technical solution, the branch metric value at the current moment is first obtained. Based on the branch metric value at the current moment, the surviving path metric value at the current moment is determined, thereby determining the surviving path information. Next, the surviving path metric value at the current moment is filtered based on the set deletion threshold to obtain the minimum surviving path metric value. Finally, when the decoding time reaches the backtracking depth, backtracking decoding begins based on the state corresponding to the minimum surviving path metric value at the current decoding time, starting from the surviving path information, and finally outputting the corresponding decoding result. Thus, the setting of the deletion threshold achieves effective filtering of surviving paths, effectively reducing the amount of computation in the decoding process, and achieving high-speed and low-power efficient decoding under any signal-to-noise ratio conditions.
[0068] In a specific embodiment, step S110, calculating the distance between the received codeword and the expected codeword at the same time to obtain the branch metric value at the current time, may include:
[0069] Step S111: Calculate the Hamming distance between the received codeword and the expected codeword using hard-decision decoding. Alternatively, step S112: Calculate the Euclidean distance between the received codeword and the expected codeword using soft-decision decoding.
[0070] It is understood that steps S111 and S112 are different execution steps using different decision methods, and there is no order of execution between them. Both calculating the Hamming distance between the received codeword and the expected codeword and calculating the Euclidean distance between the received codeword and the expected codeword are existing technologies that can be understood by those skilled in the art; therefore, for the sake of brevity, they will not be described in detail here.
[0071] Optionally, the decoding object of the decoding method is the convolutional code used by the Global Navigation Satellite System. Specifically, the following description takes a (2,1,7) convolutional code as an example.
[0072] Step S130, setting the deletion threshold, may include steps S131 and S132.
[0073] For example, in one embodiment, step S131, when the branch metric is determined based on hard-decision decoding, sets the deletion threshold to min{d}. f d min +T}, where d f d is the minimum free distance of the convolutional code. min Let be the minimum surviving path metric among all states at the current time, T be the variable controlling the signal-to-noise ratio at the current time under hard-decision decoding, and min{} represent taking the smaller value between the two. Where d f For a fixed value, the magnitude of the value reflects its error correction capability; the larger the minimum free distance, the stronger the error correction capability. dmin This can be obtained through calculation and comparison using the above technical solutions. Preferably, an initial value can be set for variable T. in, Indicates rounding down. This can represent the error correction capability of convolutional codes. The variable T can be dynamically adjusted using the formula T = T0 + τ, where τ is a parameter negatively correlated with the signal-to-noise ratio (SNR). Specifically, the first SNR threshold can be set to R1 based on experience or actual needs. If the current SNR is greater than R1, τ is negative, and the larger the SNR, the smaller τ is. Conversely, if the current SNR is less than or equal to R1, τ is positive, and the smaller the SNR, the larger τ is.
[0074] Alternatively, in another embodiment, step S132, when determining the branch metric based on soft-decision decoding, sets the deletion threshold to min{Q*d}. f_soft d min_soft +T soft}, where Q is the quantization series minus 1, d f_soft This represents the equivalent minimum free distance of the convolutional code. It can be understood that soft-decision decoding has stronger error correction capabilities than hard-decision decoding; therefore, when using soft-decision decoding, its minimum free distance d is... f_soft Compared to the minimum free distance d when using hard decision f Large. Generally, d f_soft =d f +Constraint length of the convolutional code. For a (2,1,7) convolutional code, its d... f_soft =d f +7. d min_soft T is the minimum survival path metric among all states at the current time. soft Let T be the variable controlling the signal-to-noise ratio at the current moment in soft-decision decoding, and min{} denotes taking the smaller value between the two. In soft-decision decoding, for variable T... soft An initial value T can be set. soft_0 , among which, T soft_0 Related to the quantization series. Using formula T soft =T soft_0 +τ soft Can be applied to variable T soft Dynamic adjustments are made, where τ soft This parameter is negatively correlated with the signal-to-noise ratio (SNR). Specifically, the second SNR threshold can be set to R2 based on experience or actual needs. If the current SNR is greater than R2, then τ... soft The value τ is negative, and the higher the signal-to-noise ratio (SNR), the smaller τ is. Conversely, if the current SNR is less than or equal to R², then τ is negative. soft It is a positive number, and the smaller the signal-to-noise ratio, the larger τ is.
[0075] Therefore, by reasonably setting the deletion threshold according to the above technical solution, the decoding method of this application can achieve high-speed and low-power decoding under both low and high signal-to-noise ratio (SNR) conditions. Specifically, the process of setting the deletion threshold also involves setting an initial value for a variable controlling the SNR magnitude at the current moment for different decoding methods. This initial value is related to the SNR-related parameter τ or τ0. soft Together they determine T or T at the current moment. soft The value of the initial value can be set appropriately to ensure that the decoding speed is effectively improved and the power consumption is reduced, while also avoiding the idleness and waste of hardware resources. This further ensures that the decoding method of this application can perform high-speed and low-power decoding under both low and high signal-to-noise ratio conditions.
[0076] It is understandable that steps S131 and S132 are different execution steps using different judgment methods, and there is no order of execution between them.
[0077] Optionally, in step S150, if the decoding time reaches the backtracking depth, backtracking begins based on the state corresponding to the minimum surviving path metric at the current decoding time, using the surviving path information as the starting point, to output the corresponding decoding result, including:
[0078] Step S151: Backtracking is performed using radix-2 and / or radix-4 backtracking decoding to output the corresponding decoding result.
[0079] It's understandable that using radix-2 mode backtracks to only one time step, outputting a single bit of the decoding result; while using radix-4 mode backtracks to two time steps, outputting two bits of the decoding result. Radix-4 mode is essentially a merging of radix-2 mode, allowing the number of states from the previous time step to potentially be twice the number of states from the next time step. Furthermore, the radix-4 trellis diagram has a one-to-one correspondence with the radix-2 trellis diagram, therefore it does not degrade decoding performance. Based on experience or practical considerations, either radix-2 or radix-4 backtracking decoding can be chosen to output the corresponding decoding result.
[0080] Specifically, step S151 may include:
[0081] Step S151a: Count the number of butterfly units required for the operation of the next time step from the current time step.
[0082] It is understandable that the number of butterfly units is related to the number of surviving paths, and that butterfly units are core computational units in the decoding process. The number of butterfly units required for the next computation step can be calculated using any existing or future method; no limitation is made here.
[0083] Step S151b: Compare the number of butterfly units with a preset first switching threshold or a second switching threshold to obtain a comparison result.
[0084] For example, the first switching threshold is TH2, which corresponds to radix-2 mode; the second switching threshold is TH4, which corresponds to radix-4 mode.
[0085] In step S151c, if the comparison result indicates that the number of butterfly units is less than the first switching threshold, the backtracking decoding mode for the next moment is switched to radix-4 mode; if the comparison result indicates that the number of butterfly units is greater than or equal to the first switching threshold, backtracking decoding continues in radix-2 mode.
[0086] Specifically, if the current backtracking decoding is performed in radix-2 mode, the number of butterfly units counted in step S151a can be compared with the first switching threshold TH2. If the number of butterfly units is less than TH2, the backtracking decoding mode at the next moment will be switched to radix-4 mode; otherwise, if the number of butterfly units is greater than or equal to TH2, the backtracking decoding mode at the next moment will remain in radix-2 mode.
[0087] In step S151d, if the comparison result indicates that the number of butterfly units is greater than the second switching threshold, the backtracking decoding mode for the next moment is switched to radix-2 mode. If the comparison result indicates that the number of butterfly units is less than or equal to the second switching threshold, backtracking decoding continues in radix-4 mode.
[0088] If radix-4 mode is currently used for backtracking decoding, the number of butterfly units counted above can be compared with the second switching threshold TH4. If the number of butterfly units is greater than TH4, the backtracking decoding mode for the next time step will be switched to radix-2 mode; otherwise, if the number of butterfly units is less than or equal to TH4, the backtracking decoding mode for the next time step will remain in radix-4 mode.
[0089] Therefore, by rationally switching the backtracking decoding method based on the number of butterfly units counted during the actual decoding process, the decoding speed can be accelerated while effectively ensuring the rational use of hardware resources.
[0090] Figure 2 A schematic flowchart of a Viterbi decoding method according to another embodiment of the present invention is shown. Figure 2As shown, firstly, fixed and empirical parameters for the deletion threshold are set. Then, it is determined whether the current backtracking decoding method is in radix-2 mode. If it is, time I is incremented by 1. In this mode, only one branch metric is calculated at a time. Conversely, if it is in radix-4 mode, time I is incremented by 2, and two branch metric values are calculated at a time. Based on the calculated branch metric values, the survival path metric values for each state at time I can be calculated, and the corresponding survival path information is saved. Next, it is determined whether the current signal-to-noise ratio (SNR) is greater than a preset threshold. Specifically, different preset thresholds can be set for soft-decision decoding and hard-decision decoding. Then, if the current SNR is greater than the preset threshold, the variable τ or τdelete in the deletion threshold is determined. soft If it is negative, then the variable τ or τ' is positive. soft It is a positive number. Adjust the variable τ or τ based on the current signal-to-noise ratio. soft The corresponding deletion threshold can be determined, and the specific method has been described in detail above, so it will not be repeated here. Based on the determined deletion threshold, surviving paths can be filtered, and then the number of butterfly units required for the next time step can be counted. Correspondingly, a first switching threshold is set for radix-2 mode, and a second switching threshold is set for radix-4 mode. Specifically, taking the backtracking decoding method as radix-2 mode as an example, when the number of butterfly units is less than the first switching threshold, the current radix-2 mode can be switched to radix-4 mode. Conversely, if the number of butterfly units is greater than or equal to the first switching threshold, the current mode can be kept unchanged. After switching the backtracking decoding method to radix-4 mode, the currently counted number of butterfly units can be compared with the second switching threshold. If the number of butterfly units is greater than the second switching threshold, the radix-4 mode can be switched back to radix-2 mode; otherwise, if the number of butterfly units is less than or equal to the second switching threshold, the current radix-4 mode remains unchanged. Then, it is determined whether the backtracking depth has been reached at time I. If not, the above process is repeated. If the target has been reached, determine whether the current backtracking decoding method is radix-2 or radix-4. If it is radix-2, backtrack only one time step at a time and output one bit of the decoding result. If it is radix-4, backtrack two time steps at a time and output two bits of the decoding result. After reaching the end of the path, start a new decoding process, which is the same as the previous process. For the sake of brevity, it will not be described again here, until the convolutional code decoding is completed.
[0091] According to a second aspect of the invention, a Viterbi decoding device is also proposed. Figure 3 A schematic block diagram of a Viterbi decoding apparatus 300 according to an embodiment of the present invention is shown. Figure 3 As shown, the device 300 may include a calculation module 310, an information determination module 320, a parameter setting module 330, a filtering module 340, and a decoding module 350.
[0092] The calculation module 310 is used to calculate the distance between the received codeword and the expected codeword at the same time to obtain the branch metric value at the current time.
[0093] The information determination module 320 is used to determine the survival path metric value at the current time based on the branch metric value at the current time, and then determine the survival path information.
[0094] Parameter setting module 330 is used to set the deletion threshold;
[0095] The filtering module 340 is used to filter the surviving path metric value at the current moment based on the deletion threshold in order to obtain the minimum surviving path metric value.
[0096] The decoding module 350 is used to start backtracking based on the state corresponding to the minimum surviving path metric at the current decoding time when the decoding time reaches the backtracking depth, so as to output the corresponding decoding result.
[0097] According to a third aspect of the invention, an electronic device is also proposed. Figure 4 A schematic block diagram of an electronic device 400 according to an embodiment of the present invention is shown. Figure 4 As shown, electronic device 400 may include processor 410 and memory 420. Memory 420 stores computer program instructions, which are executed by processor 410 to perform the Viterbi decoding method described above. Processor 410 may be implemented using at least one of the following hardware forms: microprocessor, digital signal processor (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). Processor 410 may also be a central processing unit (CPU), graphics processing unit (GPU), application-specific integrated circuit (ASIC), or other processing units with data processing and / or instruction execution capabilities, or a combination thereof, and may control other components in electronic device 400 to perform desired functions. Memory 420 may include one or more computer program products. Computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, which the processor 410 may execute to implement the client functions (implemented by the processor) in the embodiments of the present invention described below, and / or other desired functions. Various applications and various data may also be stored in the computer-readable storage medium, such as various data used and / or generated by the applications.
[0098] According to a fourth aspect of the invention, a storage medium is also provided, on which program instructions are stored, which, when executed, perform the Viterbi decoding method as described above. The storage medium may, for example, include a storage component of a tablet computer, a hard disk of a computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0099] Those skilled in the art can understand the specific details and beneficial effects of the Viterbi decoding device, electronic device, and storage medium by reading the above description of the Viterbi decoding method, and will not be repeated here for the sake of brevity.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and / or device can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0101] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0102] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0103] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0104] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A Viterbi decoding method, characterized in that, include: Calculate the distance between the received codeword and the expected codeword at the same time to obtain the branch metric value at the current time. Based on the branch metric value at the current moment, the survival path metric value at the current moment is determined, and then the survival path information is determined; Set a deletion threshold; Based on the deletion threshold, the survival path metric value at the current moment is filtered to obtain the minimum survival path metric value. When the decoding time reaches the backtracking depth, backtracking begins based on the state corresponding to the minimum surviving path metric at the time of the decoding, using the surviving path information as the starting point, to output the corresponding decoding result. The calculation of the distance between the received codeword and the expected codeword at the same moment to obtain the branch metric value at the current moment includes: The Hamming distance between the received codeword and the expected codeword is calculated using hard-decision decoding; or, The Euclidean distance between the received codeword and the expected codeword is calculated using a soft-decision decoding method. The decoding object of the decoding method is the convolutional code used by the Global Navigation Satellite System; The setting of the deletion threshold includes: When the branch metric is determined based on the hard-decision decoding method, the deletion threshold is set to min{ , },in, The minimum free distance of the convolutional code. It is the minimum survival path metric among all states at the current moment. Let min{} be the variable controlling the signal-to-noise ratio at the current moment under the hard-decision decoding method, where min{} represents taking the smaller value between the two; or, When the branch metric is determined based on the soft-decision decoding method, the deletion threshold is set to min{ , + },in, To subtract 1 from the quantization level, The equivalent minimum free distance of the convolutional code is given. It is the minimum survival path metric among all states at the current moment. Let min{} be the variable controlling the signal-to-noise ratio at the current moment under the soft-decision decoding method, where min{} represents taking the smaller value between the two.
2. The Viterbi decoding method as described in claim 1, characterized in that, The method further includes: Under the hard-decision decoding method, for the variable Set initial values ,in, Indicates rounding down; Using formula For the variable Dynamic adjustments are made, among which, A parameter that is negatively correlated with the signal-to-noise ratio; or, Under the soft-decision decoding method, for the variable Set initial values , wherein Related to the quantization series; Using formula For the variable Dynamic adjustments are made, among which, This parameter is negatively correlated with the signal-to-noise ratio.
3. The Viterbi decoding method as described in claim 1 or 2, characterized in that, When the decoding time reaches the backtracking depth, the backtracking begins based on the state corresponding to the minimum surviving path metric at the current decoding time, using the surviving path information as the starting point, to output the corresponding decoding result, including: Backtracking is performed using radix-2 and / or radix-4 backtracking decoding to output the corresponding decoding result.
4. The Viterbi decoding method as described in claim 3, characterized in that, The backtracking in radix-2 and / or radix-4 mode to output the corresponding decoding result includes: Count the number of butterfly units required for the operation at the next time step from the current time step; The number of the butterfly units is compared with a preset first switching threshold or a second switching threshold to obtain the comparison result; If the comparison result indicates that the number of butterfly units is less than the first switching threshold, the backtracking decoding mode at the next moment is switched to radix-4 mode; if the comparison result indicates that the number of butterfly units is greater than or equal to the first switching threshold, backtracking decoding continues in radix-2 mode. If the comparison result indicates that the number of butterfly units is greater than the second switching threshold, the backtracking decoding mode at the next moment is switched to radix-2 mode. If the comparison result indicates that the number of butterfly units is less than or equal to the second switching threshold, backtracking decoding continues in radix-4 mode.
5. The Viterbi decoding method as described in claim 1 or 2, characterized in that, The process of determining the surviving path metric based on the branch metric at the current moment, and then determining the surviving path information, includes: Add the path metric values of any two states in the previous time step to their corresponding branch metric values to obtain two path metric values of the corresponding state in the current time step, and take the smaller of the two path metric values of the corresponding state as the survival path metric value of the current time step, wherein any two states and the corresponding state in the current time step belong to the same butterfly unit. Based on the branch information traversed by the state at the previous moment to reach the state at the current moment, the survival path information is determined.
6. A Viterbi decoding device, characterized in that, include: The calculation module is used to calculate the distance between the received codeword and the expected codeword at the same time to obtain the branch metric value at the current time. The information determination module is used to determine the survival path metric value at the current moment based on the branch metric value at the current moment, and then determine the survival path information; The parameter setting module is used to set the deletion threshold; The filtering module is used to filter the surviving path metric value at the current moment based on the deletion threshold in order to obtain the minimum surviving path metric value. The decoding module is used to start backtracking based on the state corresponding to the minimum surviving path metric at the time of the decoding, when the decoding time reaches the backtracking depth, so as to output the corresponding decoding result. The computing module is specifically used for: The Hamming distance between the received codeword and the expected codeword is calculated using hard-decision decoding; or, The Euclidean distance between the received codeword and the expected codeword is calculated using a soft-decision decoding method. The decoding object of the decoding method is the convolutional code used by the Global Navigation Satellite System; The parameter setting module is specifically used for: When the branch metric is determined based on the hard-decision decoding method, the deletion threshold is set to min{ , },in, The minimum free distance of the convolutional code. It is the minimum survival path metric among all states at the current moment. Let min{} be the variable controlling the signal-to-noise ratio at the current moment under the hard-decision decoding method, where min{} represents taking the smaller value between the two; or, When the branch metric is determined based on the soft-decision decoding method, the deletion threshold is set to min{ , + },in, To subtract 1 from the quantization level, The equivalent minimum free distance of the convolutional code is given. It is the minimum survival path metric among all states at the current moment. Let min{} be the variable controlling the signal-to-noise ratio at the current moment under the soft-decision decoding method, where min{} represents taking the smaller value between the two.
7. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, are used to perform the Viterbi decoding method as described in any one of claims 1 to 5.
8. A storage medium storing program instructions that, when executed, perform the Viterbi decoding method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for decoding convolution code
CN101997553A
Viterbi decoding method and Viterbi decoder
CN102386935A