Summary of the invention
For the coding and decoding circuit based on CRC (cyclic redundancy check (CRC)), because each error code of finding all will be retransmitted, therefore for the serious occasion of the big noise of reading/writing distance, the number of communications between read write line and the label will increase.Suppose under the certain situation of read or write speed, must prolong the time of once successfully reading, influence ultrahigh-frequency radio-frequency identification system in practicality and the reliability of reading and writing occasion at a high speed.In order to address this problem, the present invention has designed the coding and decoding circuit of new radio-frequency recognition system, i.e. a kind of coding and decoding circuit of super high frequency radio frequency personal identification system.
Technical solution of the present invention is as follows:
A kind of coding and decoding circuit of super high frequency radio frequency personal identification system comprises coding circuit, decoding scheme and cyclic redundancy check (CRC) code circuit, it is characterized in that, also comprises convolutional encoding circuit and convolution decoder circuit; Described cyclic redundancy check (CRC) code circuit connects data bus, the input end of the described convolutional encoding circuit of its output termination, the input end of the output termination coding circuit of convolutional encoding circuit, the output signal of coding circuit is sent to the signal receiving end of super high frequency radio frequency personal identification system; The signal receiving end of the input termination super high frequency radio frequency personal identification system of described decoding scheme is to receive data, the input end of the output termination convolution decoder circuit of described decoding scheme, the input end of the output termination cyclic redundancy check (CRC) code circuit of described convolution decoder circuit.
Described convolutional encoding circuit adopts the convolution coding of " 2,1,3 "; Described convolution decoder circuit adopts viterbi coding method to decode.
As improvement, described cyclic redundancy check (CRC) code circuit is the cyclic redundancy check (CRC) code circuit of parallel input and line output.
The cyclic redundancy check (CRC) code circuit of described parallel input and line output is:
Generator polynomial is G (g
0, g
1... g
m), the input data are D (d
0, d
1... d
k), be output as X (x
0, x
1... x
m); Each parallel processing figure place is m, process
The individual clock period, circuit output cyclic redundancy check (CRC) extra-code; Have:
Wherein,
Be m * m matrix, the original state of X (0) expression register, the next state of X ' (0) expression register,
Symbolic representation and XOR more later on,
The symbolic representation XOR,
G '=(g
M-1G
1g
0)
TF
mThe gating matrix that enables for the cyclic redundancy check (CRC) code circuit of parallel input and line output.
Beneficial effect:
Mentality of designing of the present invention is to add convolution error correcting code, and and the mode of CRC circuits cascading reduce between read write line and the label and read and write number of times, improved the successful within a certain period of time read rate of system.CRC circuit among the present invention is based on the compact conformation of FPGA design realization, the parallel circuit of fast operation, has further reduced the communication time between reader and label.Compared with prior art, advantage of the present invention just is: owing to introduced the convolution coding-decoding circuit, significantly improved system's error correcting capability, strengthened the stability and the reliability of system; In addition, the CRC circuit that improves original serial is parallel CRC circuit, has also obviously improved the treatment effeciency of the data-handling capacity and the system of system.
Embodiment
Below with reference to accompanying drawing and specific implementation process the present invention is described in further details:
Embodiment 1:
The present invention considers to be made up of reader and electronic tag two parts as Fig. 1 radio-frequency recognition system.In electronic tag entered the reader EFFECTIVE RANGE, both sides can communicate by electromagnetic field according to certain agreement.Reader and electronic tag can be divided into mimic channel and digital baseband part on structure.The mimic channel of label comprises mu balanced circuit and radio-frequency interface circuit, and mu balanced circuit is responsible for obtaining energy and is offered the use of label digital baseband part in radiofrequency signal, and radio-frequency interface circuit then is responsible for the modulation transmission and the receiving demodulation of radiofrequency signal.Digital baseband part comprises coding and decoding circuit, clock circuit, system state machine, storage system.The return-to-zero code that coding and decoding circuit will be fit to digital processing is converted into other codings that are suitable for Channel Transmission, and the affix error control code; Clock circuit produces the frequency of operation of system; The system state machine produces the control signal of total system; The storage system stored protocol information.
The ISO/IEC18000-6 standard definition air interface and the communication protocol of radio-frequency recognition system in 860~960MHz band limits.Two class non-contact radio-frequency card Type A and Type B have been stipulated.This two classes card all adopts ASK modulation (amplitude-shift keying modulation) mode, has a reader pattern (Reader talks first) earlier, and the FMO coding is all adopted to link in the back, all uses the CRC check sign indicating number.Difference is that the forward link of Type A adopts the PIE coding, and what anti-collision algorithms was used is the ALOHA agreement; Type B agreement adopts the Manchester coding, and anti-collision algorithms is used binary tree.According to the ISO/IEC18000-6 standard, codec module comprises CRC check circuit, coding circuit, decoding scheme, control circuit, clock division circuits (as shown in Figure 2).
The basic thought of CRC check circuit is: produce the sign indicating number sequence that a string verification is used at transmitting terminal according to the certain according to this rule of binary number that will transmit, and the information back of being attached to sends.At receiving end, whether make mistakes in then transmitting according to the rule judgment of being followed between information code and the check code.According to agreement, the ultrahigh frequency system adopts CRC-5 and CRC-16, and generator polynomial is respectively x
5+ x
3+ 1 and x
16+ x
12+ x
5+ 1.
Coding circuit and decoding scheme adopt the PIE coding according to agreement category-A card forward link, and category-B card forward link adopts graceful Chester coding, and the back of two kinds of cards all adopts the FMO coding to link.
Control circuit comes programming Control with the MCU chip.It is mainly used to control the co-ordination of codec module each several part and as the interface of codec module and system, accepts the order of system state machine.Clock division circuits produces the required frequency of operation of various circuit in the codec module by the frequency division to system clock.
By above analysis to codec module as can be known, find at every turn that based on the codec module of CRC circuit error code all will retransmit, therefore for the serious occasion of the big noise of reading/writing distance, the number of communications between read write line and the label will increase.Suppose under the certain situation of read or write speed, must prolong the time of once successfully reading.This high speed reads such as recognition and tracking that must influence ultrahigh frequency system workpiece on highway unmanned charge station, streamline is write the practicality and the reliability of occasion.In order to address this problem, the present invention proposes the adding convolution error correcting code, and reduce the read-write number of times with the mode (see figure 3) of CRC circuits cascading, thus the successful within a certain period of time read rate of raising system.Increase the convolutional encoding sign indicating number time though add the convolutional code circuit, reduced the time of repeated communications.Along with made of hardware circuits which process speed is more and more faster, advantage is obvious more.
Coding and decoding circuit system works flow process proposed by the invention is: delivery section adds check code by the CRC circuit earlier to data, carries out convolutional encoding then and sends.Receiving end carries out convolution decoder, CRC school sign indicating number then earlier.For general error code, just can correct at the convolution decoder end; The not correctable error that has only continuous a plurality of error code to cause is just found by CRC school sign indicating number, and requires to retransmit.
The present invention adopts the convolutional code of (2,1,3), deciphers with Viterbi (Viterbi) interpretation method.The convolution coder principle as shown in Figure 4.The coding rule of (2,1,3) convolutional code is the code character that 1 bit information is encoded into 2 bits, but the code character of being weaved into not only with the information-related of current input but also information-related with 2 bits in front, generator polynomial G (z) (referring to Fig. 4) is as follows:
X in the following formula (z) is the input of convolution coder, and Y (z) is the output of convolution coder.
The decoding of convolutional code can be divided into algebraic decoding and probabilistic decoding two classes, and wherein algebraic decoding generally only is used for simple convolutional encoding; Viterbi decoding algorithm belongs to the maximum-likelihood decoding in the probabilistic decoding.The concrete steps of Viterbi decoding are as follows: (1) is calculated and is entered each individual path of each state and the Hamming distance (hard decision) between the receiving symbol, and this distance is called the branch metric of this branch.(2) the corresponding separately together previous moment state measurement addition summation of each branch metric, obtain path metric.In each state, select in the path metric that arrives this state and keep the state measurement of reckling as current time.Reservation path correspondingly is as survivor path simultaneously.(3) in the survivor path of each state, select of state measurement minimum, recall, obtain decoding output along this.
In order to improve the data processing speed of radio-frequency recognition system, increase the tag recognition amount in the unit interval, the present invention has designed new coding and decoding CRC (cyclic redundancy check (CRC) code) circuit.
Linear feedback shift register (LFSR) is realized cyclic redundancy check (CRC) relatively, and parallel cyclic redundancy check (CRC) circuit is all comparatively complicated on algorithm and circuit.For reducing the complicacy of circuit, reduce the area of label chip, simple algorithm and circuit are the keys of Parallel CRC circuit design.
Parallel CRC circuit design and algorithm that the present invention proposes are as follows:
If generator polynomial is G (g
0, g
1... g
m), the input data are D (d
0, d
1... d
k), be output as X (x
0, x
1... x
m).Each parallel processing figure place is m, then passes through
The individual clock period, circuit output CRC extra-code.
Construct a m * m matrix
If with the original state of X (0) expression register, the next state of X ' (0) expression register, and with
Symbolic representation and XOR more later on,
The symbolic representation XOR, then:
Can recursion go out:
Wherein
g′=(g
m-1…g
1g
0)
T。
The Parallel CRC circuit as shown in Figure 5, F
mThe gating matrix that enables for circuit.
With CRC-5, generator polynomial is x below
5+ x
3+ 1 (101001) enables matrix F for example explanation
mProduction process.
At first construct m * m matrix
Then can recursion go out column matrix down:
With
The output of expression register, [x
4x
3x
2x
1x
0]
TThe input of expression register, [d
4d
3d
2d
1d
0]
TExpression input data, then:
For time-invariant system, promptly generator polynomial enables later can the cancelling with door of control end for fixing CRC circuit among Fig. 5, is general CRC circuit diagram shown in Fig. 5, has only and determines could determine circuit after parallel bit wide and the generator polynomial.The number of registers is parallel bit wide among the figure, and generator polynomial determines to enable the logical relation of matrix, e
(m, m)Be 1 to open and door, allow register next state input or door; e
(m, m)Be 0 to forbid.The left side is a m bar vertical line among Fig. 5, is each register and e
(m, m)The connecting line of matrix.As seen from Figure 5: adopt parallel circuit not make CRC cyclic redundancy check (CRC) circuit obviously complicated, radio-frequency recognition system label chip area increases limited.
Experimental analysis:
Utilize the fpga chip of Xilinx company, Spartan2E series xc2s50e, on Xilinx ISE7.1i platform, respectively 1. the linear feedback shift register circuit of 1. inserting the register original state in advance (is called for short circuit, see ISO/IEC18000-6C standard accessory A), 2. general linear feedback shift register circuit (sees circuit shown in Figure 7, be called for short circuit 2.) and 3. the novel parallel circuit (see circuit shown in Figure 5, be called for short circuit 3.) that proposes of the present invention realize that the CRC cyclic redundancy check (CRC) tests and test.Fig. 6 (a) is the timing sequence test figure (1., 2. identical) of linear feedback shift register CRC circuit, and Fig. 6 (b) is the timing sequence test figure of Parallel CRC circuit.
Fig. 6 has tested the CRC-16 computing of 24 Bit datas, and generator polynomial is x
16+ x
12+ x
5+ 1,1., 2. circuit has used 25 clock period (a clock period initialization); And 3. circuit has only used 3 clock period.
3 circuit are as shown in table 1 in fpga chip resource operating position:
Table 1.FPGA resources of chip operating position table
System resource (always) |
Circuit 1. |
Circuit 2. |
Circuit 3. |
Logical block section Slice (768) |
9(1%) |
33(4%) |
18(2%) |
Latch Flip-Flops (1536) |
16(1%) |
50(3%) |
16(1%) |
Look-up table LUT (1536) |
0(0%) |
38(2%) |
35(2%) |
As can be seen from Table 1: the relative serial linear feedback shift register of the novel Parallel CRC circuit of the present invention CRC circuit, the circuit complexity is not significantly increased that (circuit is 1. for the custom chip circuit, so it is minimum that resource is used), but processing speed is significantly fast.
A large amount of experiments show that the improvement ultrahigh-frequency radio-frequency identification system coding and decoding circuit of the adding convolutional code compiler that the present invention proposes can reduce the error correction number of times of cyclic redundancy check (CRC) code CRC circuit, thereby reduce the number of communications of label and reader, improved the stability and the reliability of high speed long distance radio system; The novel Parallel CRC circuit data fast operation of the present invention's design, circuit is simple, can improve radio-frequency recognition system coding and decoding data processing speed frequently well, increases the tag recognition amount in the unit interval.Simultaneously, because circuit is simple relatively, the label chip area increases limited, can not exert an influence to the label cost substantially, and good practical value is arranged.