CN102611657B - Method and device for detecting NFC (Near Field Communication) baseband symbols - Google Patents
Method and device for detecting NFC (Near Field Communication) baseband symbols Download PDFInfo
- Publication number
- CN102611657B CN102611657B CN201210083765.7A CN201210083765A CN102611657B CN 102611657 B CN102611657 B CN 102611657B CN 201210083765 A CN201210083765 A CN 201210083765A CN 102611657 B CN102611657 B CN 102611657B
- Authority
- CN
- China
- Prior art keywords
- order difference
- module
- order
- value
- judgment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004891 communication Methods 0.000 title description 8
- 238000000034 method Methods 0.000 title description 8
- 238000004364 calculation method Methods 0.000 claims abstract description 51
- 238000001514 detection method Methods 0.000 claims abstract description 26
- 238000010586 diagram Methods 0.000 description 10
- 238000005070 sampling Methods 0.000 description 9
- 230000007704 transition Effects 0.000 description 9
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000010363 phase shift Effects 0.000 description 2
- 230000000630 rising effect Effects 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Digital Transmission Methods That Use Modulated Carrier Waves (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明涉及一种NFC基带符号检测方法与装置,其包括如下步骤:a、将I、Q通道数据分别输入第一一阶差分模块、第二一阶差分模块;b、第一一阶差分模块、第二一阶差分模块分别计算并存储最近三个时钟周期的一阶差分值;c、第一二阶差分模块得到二阶差分值DP1;第二二阶差分模块得到二阶差分值DP2;d、阈值计算与判决模块得到一阶差分基值D2及二阶差分基值P2;e、阈值计算与判决模块内预设差分偏移量Derr及判断阈值Dmax与Dmin,阈值计算与判决模块根据一阶差分基值D2的绝对值同时根据二阶差分基值P2的绝对值与判断阈值Dmax、Dmin之间的关系判断NFC基带符号的变化,并调整差分偏移量Derr及判断阈值Dmax与Dmin的值。本发明步骤简单,检测精度高,提高解码的可靠性。
The present invention relates to a kind of NFC baseband symbol detection method and device, and it comprises the following steps: a, input I, Q passway data respectively into the first first-order difference module, the second first-order difference module; b, the first first-order difference module , the second first-order difference module calculates and stores the first-order difference value of the last three clock cycles respectively; c, the first second-order difference module obtains the second-order difference value DP1; the second second-order difference module obtains the second-order difference value DP2; d, the threshold calculation and judgment module obtains the first-order difference base value D2 and the second-order difference base value P2; e, the preset difference offset Derr and the judgment threshold Dmax and Dmin in the threshold calculation and judgment module, the threshold calculation and judgment module according to The absolute value of the first-order difference base value D2 judges the change of the NFC baseband symbol according to the relationship between the absolute value of the second-order difference base value P2 and the judgment threshold Dmax and Dmin at the same time, and adjusts the difference offset Derr and the judgment threshold Dmax and Dmin value. The invention has simple steps, high detection precision and improved decoding reliability.
Description
技术领域 technical field
本发明涉及一种符号检测方法与装置,尤其是一种NFC基带符号检测方法与装置,属于NFC数据通信的技术领域。The invention relates to a symbol detection method and device, in particular to an NFC baseband symbol detection method and device, belonging to the technical field of NFC data communication.
背景技术 Background technique
NFC是在RFID(Radio Frequency Identification)基础上发展起来的双向近程数据通信系统,具有广泛应用前景。目前主要相关标准为IEEE18092,IEEE14443等等,其中IEEE 14443定义了基本的数据率和调制方式,其中补充标准又定义了扩展的数据率和调制方式,最高支持847kbps。概括起来,其调制方式为OOK(开关调制)和BPSK(二进制移相)调制2种。NFC(Near FieldCommunication)通常集成于其它移动设备上,如手机等等,这就对NFC的成本,功耗,灵敏度等等有很大限制。图1是一种NFC系统的结构图。NFC is a two-way short-range data communication system developed on the basis of RFID (Radio Frequency Identification), which has broad application prospects. At present, the main relevant standards are IEEE18092, IEEE14443, etc. Among them, IEEE 14443 defines the basic data rate and modulation mode, and the supplementary standard defines the extended data rate and modulation mode, up to 847kbps. To sum up, the modulation methods are OOK (on-off modulation) and BPSK (binary phase shift) modulation. NFC (Near Field Communication) is usually integrated on other mobile devices, such as mobile phones, etc., which has great limitations on the cost, power consumption, sensitivity, etc. of NFC. FIG. 1 is a structural diagram of an NFC system.
对于IEEE14443中的基本数据和调制方式定义,系统载波频率为13.56Mhz,既为本振频率,系统的操作对象可以是另一个NFC设备(以″标签模拟“方式),也可以是一个被动标签,对RF信号进行负载调制。调制信号通过I/Q两路混频,和低通滤波、A/D转换,进入数字信号处理器进行解码,所以此解码器为同步解调方式运行。For the definition of basic data and modulation methods in IEEE14443, the carrier frequency of the system is 13.56Mhz, which is the local oscillator frequency. The operating object of the system can be another NFC device (in the way of "tag simulation"), or a passive tag. Load modulation of the RF signal. The modulated signal enters the digital signal processor for decoding through I/Q two-way mixing, low-pass filtering, and A/D conversion, so the decoder operates in a synchronous demodulation mode.
对于BPSK,OOK的解码,关键点在于如何探测信号状态的转换,包括信号幅度和信号的相位。系统在低信噪比的情况下要保证较低的误码率,同时还要满足成本,功耗方面的限制。即实现不能过于复杂,又不能牺牲系统整体性能。For BPSK, OOK decoding, the key point is how to detect the transition of the signal state, including the signal amplitude and the phase of the signal. In the case of low signal-to-noise ratio, the system must ensure a low bit error rate, and at the same time meet the constraints of cost and power consumption. That is to say, the implementation should not be too complicated, and the overall performance of the system should not be sacrificed.
图2显示了一种典型的BPSK/OOK解码器数字处理器的实现。I/Q两路输入信号经过模数转换后进入数字处理器,先经过DC分量移除,然后进行信号强度估算,利用反馈回来的定时恢复信息进行矫正,然后经过增益控制,进入符号相位排列,主要消除I/Q相位不平衡带来的影响,然后对2路信号相加,进行硬判决。Figure 2 shows the implementation of a typical BPSK/OOK decoder digital processor. The I/Q two-way input signal enters the digital processor after analog-to-digital conversion. First, the DC component is removed, and then the signal strength is estimated, and the timing recovery information fed back is used for correction. After gain control, it enters the symbol phase alignment. It mainly eliminates the influence of I/Q phase imbalance, and then adds the 2-way signals to make a hard decision.
需要指出的是,如果系统中引入补偿器(Equalizer),采用软判决,会达到更好的性能,但系统更为复杂,会需要更多的逻辑电路来实现。It should be pointed out that if an Equalizer is introduced into the system and soft decisions are used, better performance will be achieved, but the system is more complex and requires more logic circuits to implement.
图3显示了一种实现上更为简单的解码方式。I/Q信号首先经过一阶差分,然后进入峰值判定和限幅。差分同时也就删除了DC分量的影响,由于我们只要判定信号幅度(OOK)或者相位(BPSK)是否发生了突然的转换,所以差分突然达到一个峰值,可以用来做为判决的依据。Figure 3 shows a decoding method that is simpler to implement. The I/Q signal first passes through the first order difference, and then enters the peak determination and limiting. At the same time, the difference also deletes the influence of the DC component. Since we only need to determine whether the signal amplitude (OOK) or phase (BPSK) has a sudden conversion, the difference suddenly reaches a peak value, which can be used as a basis for judgment.
上述图2和图3所示的两种解决方法中,图2代表的方法性能比较好,但逻辑实现比较复杂,也就意味着成本较高,功耗较高。Among the two solutions shown in Figure 2 and Figure 3 above, the method represented in Figure 2 has better performance, but the logic implementation is more complicated, which means higher cost and higher power consumption.
图3所代表的方案逻辑简单,但系统性能受到很多限制,如信噪比,调制深度,距离,通信速率等等。尤其在高数据率情况下,由于符号间干饶(ISI)比较高,所以性能下降,图4和图5解释了为什么简单利用差分器会造成性能上的影响。The solution represented in Figure 3 is simple in logic, but the system performance is subject to many restrictions, such as signal-to-noise ratio, modulation depth, distance, communication rate, and so on. Especially at high data rates, due to the relatively high inter-symbol interference (ISI), performance drops. Figure 4 and Figure 5 explain why simply using a differentiator can cause a performance impact.
图4显示了OOK的信号图,竖直方向的虚线代表采样时间点。在时间0处,发生从1到0的转换,图中可以看到,载波幅度是逐渐变化的,中间有一段过渡带,符号间干扰(ISI)越大,这个过渡带就越长。图上黑色方框为一阶差分值,图中可以看到,由于过渡带的存在,在8个采样点内,差分值1,和差分值1都达到或近似达到了一个峰值,但是在理想状态下,应该只有差分值1达到了峰值,意味着在差分值1的时间点,信号状态发生转换。差分值2的存在使得判决器认为信号又发生了一次跳转,从而造成误码。Figure 4 shows the signal diagram of OOK, and the dashed line in the vertical direction represents the sampling time point. At time 0, a transition from 1 to 0 occurs. As can be seen in the figure, the carrier amplitude changes gradually, and there is a transition zone in the middle. The greater the intersymbol interference (ISI), the longer the transition zone. The black box on the figure is the first-order difference value. It can be seen in the figure that due to the existence of the transition zone, within 8 sampling points, the difference value 1 and the difference value 1 have reached or approximately reached a peak value, but in the ideal In the state, only the difference value 1 should reach the peak value, which means that at the time point of the difference value 1, the signal state transitions. The existence of the difference value 2 makes the decision device think that the signal jumps again, thus causing a bit error.
此失效原理同样适用于BPSK,图5显示了BPSK的信号图。对于BPSK信号,符号间干扰表现为相位的转换不是理想状态下的180°。图中红色的虚线代表理想状态下的信号,在时间T0时刻调制的数据从0跳变到1,由于符号间干扰的存在,实际信号的相位偏移有一定的延迟,而且有一个过渡带的存在(图中的黑色虚线框),在过渡带之间,相位是逐渐偏移的,ISI越大,过渡带就越宽,可能会出现在多个采样周期内。一阶差分值1,和2的绝对值都近似一个峰值,而在理想状态下,只有差分值1的绝对值达到峰值,标志着信号的相位跳转。多个采样点落在峰值区间造成判决器的误判,从而导致出现误码。This failure principle also applies to BPSK, and Figure 5 shows the signal diagram of BPSK. For BPSK signals, intersymbol interference is manifested as a phase shift that is not 180° in an ideal state. The red dotted line in the figure represents the ideal signal. The modulated data jumps from 0 to 1 at time T0. Due to the existence of intersymbol interference, the phase offset of the actual signal has a certain delay, and there is a transition zone There is (the black dotted line box in the figure), the phase is gradually shifted between the transition bands, the larger the ISI, the wider the transition band, which may appear in multiple sampling periods. The absolute values of the first-order differential values 1 and 2 are close to a peak value, but in an ideal state, only the absolute value of the differential value 1 reaches the peak value, which marks the phase jump of the signal. Multiple sampling points falling in the peak interval cause misjudgment by the decision device, resulting in bit errors.
对于IEEE14443定义的扩展通信速率,随着速率的提高,ISI增大,每个符号的采样点减少,此种失效模式会表现很突出从而严重影响解码性能。For the extended communication rate defined by IEEE14443, as the rate increases, the ISI increases and the sampling points of each symbol decrease. This failure mode will be very prominent and seriously affect the decoding performance.
发明内容 Contents of the invention
本发明的目的是克服现有技术中存在的不足,提供一种NFC基带符号检测方法与装置,其步骤简单,在保持电路相对简单的条件下提高解码的可靠性。The purpose of the present invention is to overcome the deficiencies in the prior art, to provide a method and device for detecting NFC baseband symbols, the steps are simple, and the reliability of decoding is improved while keeping the circuit relatively simple.
按照本发明提供的技术方案,一种NFC基带符号检测方法,所述基带符号检测方法包括如下步骤:According to the technical scheme provided by the present invention, a kind of NFC baseband symbol detection method, described baseband symbol detection method comprises the steps:
a、接收NFC信号,并解调成I通道数据与Q通道数据,且将I通道数据输入第一一阶差分模块,Q通道数据输入第二一阶差分模块;a. Receive the NFC signal and demodulate it into I-channel data and Q-channel data, and input the I-channel data into the first first-order differential module, and input the Q-channel data into the second first-order differential module;
b、第一一阶差分模块计算I通道数据的差分值,并存储最近三个时钟周期的一阶差分值DI0、DI1及DI2,其中,DI2为最新差分值;同时,第二一阶差分模块计算Q通道数据的差分值,并存储最近三个时钟周期的一阶差分值DQ0、DQ1及DQ2,其中,DQ2为最新差分值;b. The first first-order differential module calculates the differential value of the I channel data, and stores the first-order differential values DI0, DI1 and DI2 of the last three clock cycles, wherein DI2 is the latest differential value; meanwhile, the second first-order differential module Calculate the differential value of the Q channel data, and store the first-order differential values DQ0, DQ1, and DQ2 of the last three clock cycles, where DQ2 is the latest differential value;
c、第一一阶差分模块将一阶差分值DI2及DI1输入第一二阶差分模块,第一二阶差分模块根据一阶差分值DI2、DI1得到二阶差分值DP1;第二一阶差分模块将一阶差分值DQ2、DQ1输入第二二阶差分模块,第二二阶差分模块根据一阶差分值DQ2、DQ1得到二阶差分值DP2;c. The first first-order difference module inputs the first-order difference values DI2 and DI1 into the first second-order difference module, and the first second-order difference module obtains the second-order difference value DP1 according to the first-order difference values DI2 and DI1; the second first-order difference The module inputs the first-order difference values DQ2 and DQ1 into the second second-order difference module, and the second second-order difference module obtains the second-order difference value DP2 according to the first-order difference values DQ2 and DQ1;
d、阈值计算与判决模块接收一阶差分值DI0、DI1、DI2、DQ0、DQ1及DQ2,并接收二阶差分值DP1及DP2;阈值计算与判决模块根据DI2及DQ2得到一阶差分基值D2,并根据二阶差分值DP1、DP2得到二阶差分基值P2;d. The threshold calculation and judgment module receives the first-order differential values DI0, DI1, DI2, DQ0, DQ1, and DQ2, and receives the second-order differential values DP1 and DP2; the threshold calculation and judgment module obtains the first-order differential base value D2 according to DI2 and DQ2 , and obtain the second-order difference base value P2 according to the second-order difference values DP1 and DP2;
e、阈值计算与判决模块内预设差分偏移量Derr及判断阈值Dmax与Dmin,阈值计算与判决模块根据一阶差分基值D2的绝对值同时根据二阶差分基值P2的绝对值与判断阈值Dmax、Dmin之间的关系判断NFC基带符号的变化,以完成NFC基带符号的检测,并调整差分偏移量Derr及判断阈值Dmax与Dmin的值。e. The preset differential offset Derr and the judgment thresholds Dmax and Dmin in the threshold calculation and judgment module. The threshold calculation and judgment module is based on the absolute value of the first-order difference base value D2 and the absolute value of the second-order difference base value P2. The relationship between the thresholds Dmax and Dmin judges the change of the NFC baseband symbol to complete the detection of the NFC baseband symbol, and adjusts the difference offset Derr and the judgment threshold Dmax and Dmin.
所述步骤d中,一阶差分基值D2为D2=|DI2|+|DQ2|,二阶差分基值P2为P2=|DP1|+|DP2|。In the step d, the first-order difference base value D2 is D2=|DI2|+|DQ2|, and the second-order difference base value P2 is P2=|DP1|+|DP2|.
所述步骤e中,当一阶差分基值D2小于判断阈值Dmin时,阈值计算与判决模块输出NFC基带信号状态未发生变化;In the step e, when the first-order differential base value D2 is less than the judgment threshold Dmin, the threshold calculation and judgment module outputs the NFC baseband signal state unchanged;
当一阶差分基值D2小于判断阈值Dmax,将判断阈值Dmin设定为Dmin=(D0+D1+D2)/3,并将差分偏移量Derr设定为Derr=Max((|D0|-Dmin),(|D1|-Dmin),(|D2|-Dmin)),判断阈值Dmax设定为Dmax=Dmin+Derr+D max*w;其中,D0=|DI0|+|DQ0|,D1=|DI1|+|DQ1|,w为加权系数;When the first-order difference base value D2 is less than the judgment threshold Dmax, the judgment threshold Dmin is set as Dmin=(D0+D1+D2)/3, and the differential offset Derr is set as Derr=Max((|D0|- Dmin), (|D1|-Dmin), (|D2|-Dmin)), the judgment threshold Dmax is set as Dmax=Dmin+Derr+D max*w; among them, D0=|DI0|+|DQ0|, D1 =|DI1|+|DQ1|, w is the weighting coefficient;
当一阶差分值D2大于判断阈值Dmax,且二阶差分基值P2也大于判断阈值Dmax时,阈值计算与判决模块输出NFC基带信号状态发生变化,并将判断阈值Dmax设定为Dmax=D2。When the first-order difference value D2 is greater than the judgment threshold Dmax, and the second-order difference base value P2 is also greater than the judgment threshold Dmax, the threshold calculation and judgment module outputs the NFC baseband signal state to change, and the judgment threshold Dmax is set as Dmax=D2.
所述阈值计算与判断模块在初始预设时令判断阈值Dmin为零,判断阈值Dmax选取初始I数据通道与Q数据通道对应的最大值之和。The threshold calculation and judgment module sets the judgment threshold Dmin to be zero at the initial preset time, and the judgment threshold Dmax is selected from the sum of the maximum values corresponding to the initial I data channel and Q data channel.
所述加权系数w为0.75。The weighting coefficient w is 0.75.
一种NFC基带符号检测装置,包括用于接收I通道数据的第一一阶差分模块及用于接收Q通道数据的第二一阶差分模块,所述第一一阶差分模块的输出端分别与第一二阶差分模块及阈值计算与判决模块相连,第二一阶差分模块的输出端分别与第二二阶差分模块及阈值计算与判决模块相连,第一二阶差分模块及第二二阶差分模块的输出端分别与阈值计算与判决模块相连;A kind of NFC baseband symbol detection device, comprises the first first-order difference module for receiving I channel data and the second first-order difference module for receiving Q channel data, the output terminal of described first first-order difference module is connected with respectively The first second-order difference module and the threshold value calculation are connected to the judgment module, the output terminals of the second first-order difference module are respectively connected to the second second-order difference module and the threshold value calculation and decision module, and the first second-order difference module and the second second-order difference module are connected to each other. The output terminals of the difference module are respectively connected with the threshold calculation and decision modules;
第一一阶差分模块计算并存储最近三个时钟的I通道数据差分值DI2、DI1及DI0,第二一阶差分模块计算并存储最近三个时钟的Q通道数据差分至DQ2、DQ1及DQ0,其中,DQ2与DI2为最新的差分值;第一二阶差分模块根据一阶差分值DI2、DI1计算并存储二阶差分值DP1,第二二阶差分模块根据一阶差分值DQ2、DQ1计算并存储二阶差分值DP2;阈值计算与判决模块将I通道数据的一阶差分值、二阶差分值与Q通道数据的一阶差分值、二阶差分值与预设的判断阈值Dmax及判断阈值Dmin进行比较,以判断NFC基带符号状态的变化;并根据判断NFC基带符号状态调整判断阈值Dmax及判断阈值Dmin的值。The first first-order difference module calculates and stores the I channel data difference values DI2, DI1 and DI0 of the last three clocks, and the second first-order difference module calculates and stores the Q channel data difference of the last three clocks to DQ2, DQ1 and DQ0, Among them, DQ2 and DI2 are the latest difference values; the first second-order difference module calculates and stores the second-order difference value DP1 according to the first-order difference values DI2 and DI1, and the second second-order difference module calculates and stores the second-order difference value according to the first-order difference values DQ2 and DQ1. Store the second-order differential value DP2; the threshold calculation and judgment module compares the first-order differential value and the second-order differential value of the I channel data with the first-order differential value and the second-order differential value of the Q channel data with the preset judgment threshold Dmax and the judgment threshold Dmin is compared to determine the change of the state of the NFC baseband symbol; and the values of the judgment threshold Dmax and the judgment threshold Dmin are adjusted according to the judgment of the state of the NFC baseband symbol.
所述阈值计算与判决模块根据DI2及DQ2得到一阶差分基值D2,并根据二阶差分值DP1、DP2得到二阶差分基值P2;一阶差分基值D2为D2=|DI2|+|DQ2|,二阶差分基值P2为P2=|DP1|+|DP2|。The threshold calculation and judgment module obtains the first-order differential base value D2 according to DI2 and DQ2, and obtains the second-order differential base value P2 according to the second-order differential values DP1 and DP2; the first-order differential base value D2 is D2=|DI2|+| DQ2|, the second-order differential base value P2 is P2=|DP1|+|DP2|.
当一阶差分基值D2小于判断阈值Dmin时,阈值计算与判决模块输出NFC基带信号状态未发生变化;When the first-order differential base value D2 is less than the judgment threshold Dmin, the state of the NFC baseband signal output by the threshold calculation and judgment module has not changed;
当一阶差分基值D2小于判断阈值Dmax,将判断阈值Dmin设定为Dmin=(D0+D1+D2)/3,并将差分偏移量Derr设定为Derr=Max((|D0|-Dmin),(|D1|-Dmin),(|D2|-Dmin)),判断阈值Dmax设定为Dmax=Dmin+Derr+D max*w;其中,D0=|DI0|+|DQ0|,D1=|DI1|+|DQ1|,w为加权系数;When the first-order difference base value D2 is less than the judgment threshold Dmax, the judgment threshold Dmin is set as Dmin=(D0+D1+D2)/3, and the differential offset Derr is set as Derr=Max((|D0|- Dmin), (|D1|-Dmin), (|D2|-Dmin)), the judgment threshold Dmax is set as Dmax=Dmin+Derr+D max*w; among them, D0=|DI0|+|DQ0|, D1 =|DI1|+|DQ1|, w is the weighting coefficient;
当一阶差分值D2大于判断阈值Dmax,且二阶差分基值P2也大于判断阈值Dmax时,阈值计算与判决模块输出NFC基带信号状态发生变化,并将判断阈值Dmax设定为D max=D2。When the first-order differential value D2 is greater than the judgment threshold Dmax, and the second-order differential base value P2 is also greater than the judgment threshold Dmax, the threshold calculation and judgment module outputs the state of the NFC baseband signal, and the judgment threshold Dmax is set as Dmax=D2 .
所述阈值计算与判断模块在初始预设时令判断阈值Dmin为零,判断阈值Dmax选取初始I数据通道与Q数据通道对应的最大值之和。The threshold calculation and judgment module sets the judgment threshold Dmin to be zero at the initial preset time, and the judgment threshold Dmax is selected from the sum of the maximum values corresponding to the initial I data channel and Q data channel.
本发明的优点:将I通道数据Q通道数据分别输入第一一阶差分模块、第二一阶差分模块内,通过第一一阶差分模块、第二一阶差分模块进行一阶差分后得到近三个时钟周期的一阶差分值,并在下一个时钟周期将相应的一阶差分值输入第一二阶差分模块、第二二阶差分模块内;阈值计算与判决模块同时利用一阶差分基值、二阶差分基值与预设阈值Dmax、预设阈值Dmin进行比较,以能准确确定NFC基带符号的是否发生变化,并根据判断结果来调整预设阈值Dmax、Dmin与差分偏移量Derr,以能够准确对后续的NFC基带符号进行精确判断,从而为后续NFC基带信号解码提供必要的依据,步骤简单,检测精度高,提高解码的可靠性。The advantages of the present invention are: the I channel data and the Q channel data are respectively input into the first first-order difference module and the second first-order difference module, and after performing the first-order difference through the first first-order difference module and the second first-order difference module, a nearly The first-order difference value of three clock cycles, and input the corresponding first-order difference value into the first second-order difference module and the second second-order difference module in the next clock cycle; the threshold calculation and decision module simultaneously use the first-order difference base value , the second-order differential base value is compared with the preset threshold Dmax and the preset threshold Dmin, so as to accurately determine whether the NFC baseband symbol changes, and adjust the preset threshold Dmax, Dmin and the differential offset Derr according to the judgment result, In order to be able to accurately judge the subsequent NFC baseband symbols, thereby providing a necessary basis for subsequent NFC baseband signal decoding, the steps are simple, the detection accuracy is high, and the reliability of decoding is improved.
附图说明 Description of drawings
图1为现有NFC系统的结构框图。FIG. 1 is a structural block diagram of an existing NFC system.
图2为现有NFC基带符号检测的一种实施框图。Fig. 2 is an implementation block diagram of existing NFC baseband symbol detection.
图3为现有NFC基带符号检测的另一种实施框图。Fig. 3 is another implementation block diagram of existing NFC baseband symbol detection.
图4为现有OOK信号进行采样基带解码的误差分析图。FIG. 4 is an error analysis diagram of sampling baseband decoding of an existing OOK signal.
图5为现有BPSK信号进行采用基带解码的误差分析图。FIG. 5 is an error analysis diagram of baseband decoding of an existing BPSK signal.
图6为本发明的结构框图。Fig. 6 is a structural block diagram of the present invention.
图7为本发明一阶差分模块、二阶差分模块、阈值计算与判决模块的具体实现原理图。Fig. 7 is a specific implementation principle diagram of the first-order difference module, the second-order difference module, and the threshold calculation and judgment module of the present invention.
图8为本发明进行判决的流程图。Fig. 8 is a flow chart of making a judgment in the present invention.
具体实施方式 Detailed ways
下面结合具体附图和实施例对本发明作进一步说明。The present invention will be further described below in conjunction with specific drawings and embodiments.
如图6、图7和图8所示:为了能够有效对NFC基带信号符号状态进行检测,避免现有符号检测及解码中由于ISI造成对信号干扰而出现的误码问题,本发明对NFC基带符号检测的方法包括如下步骤:As shown in Fig. 6, Fig. 7 and Fig. 8: in order to be able to effectively detect the symbol state of the NFC baseband signal, and avoid the error problem caused by the signal interference caused by ISI in the existing symbol detection and decoding, the present invention is based on the NFC baseband The method for symbol detection includes the following steps:
a、接收NFC信号,并解调成I通道数据与Q通道数据,且将I通道数据输入第一一阶差分模块,Q通道数据输入第二一阶差分模块;a. Receive the NFC signal and demodulate it into I-channel data and Q-channel data, and input the I-channel data into the first first-order differential module, and input the Q-channel data into the second first-order differential module;
为了能够避免ISI造成对信号干扰出现的误码问题,本发明中先对解调后的I通道数据与Q数据进行一阶差分计算;同时,接收NFC信号,并解调成I通道数据与Q通道数据属于NFC数据通信中常规的解调方式,并不会增加本发明进行基带符号检测的复杂度与成本;In order to avoid the bit error problem caused by ISI to signal interference, first order differential calculation is performed on the demodulated I channel data and Q data in the present invention; at the same time, the NFC signal is received and demodulated into I channel data and Q data. The channel data belongs to the conventional demodulation mode in NFC data communication, and will not increase the complexity and cost of baseband symbol detection in the present invention;
b、第一一阶差分模块计算I通道数据的差分值,并存储最近三个时钟周期的一阶差分值DI0、DI1及DI2,其中,DI2为最新差分值;同时,第二一阶差分模块计算Q通道数据的差分值,并存储最近三个时钟周期的一阶差分值DQ0、DQ1及DQ2,其中,DQ2为最新差分值;b. The first first-order differential module calculates the differential value of the I channel data, and stores the first-order differential values DI0, DI1 and DI2 of the last three clock cycles, wherein DI2 is the latest differential value; meanwhile, the second first-order differential module Calculate the differential value of the Q channel data, and store the first-order differential values DQ0, DQ1, and DQ2 of the last three clock cycles, where DQ2 is the latest differential value;
图7为第一一阶差分模块与第二一阶差分模块的差分实现结构;在每个采样时钟的上升沿,第一一阶差分模块与第二一阶差分模块分别接收对应新的数据S1,将新的数据S1与一阶差分模块内存储的数据S0作差得到的一阶差分值;且第一一阶差分模块内存储最近三个时钟周期的一阶差分值,DI1为之前一个采样时钟得到的差分值,DI0为之前两个采样时钟得到的差分值;第二一阶差分模块与第一一阶差分模块同步计算,并进行相同的存储操作;当第一一阶差分模块与第二一阶差分模块已经存储三个一阶差分值后,再得到最新的一阶差分值时将存储时间最久的数据移出,以保持第一一阶差分模块与第二一阶差分模块的存储状态;Fig. 7 is the differential implementation structure of the first first-order difference module and the second first-order difference module; at the rising edge of each sampling clock, the first first-order difference module and the second first-order difference module respectively receive corresponding new data S1 , the first-order difference value obtained by making a difference between the new data S1 and the data S0 stored in the first-order difference module; and the first-order difference value of the last three clock cycles is stored in the first first-order difference module, and DI1 is the previous sampling The difference value obtained by the clock, DI0 is the difference value obtained by the previous two sampling clocks; the second first-order difference module and the first first-order difference module are calculated synchronously, and perform the same storage operation; when the first first-order difference module and the first After the second first-order difference module has stored three first-order difference values, when the latest first-order difference value is obtained, the data with the longest storage time is removed to keep the storage of the first first-order difference module and the second first-order difference module state;
c、第一一阶差分模块将一阶差分值DI2及DI1输入第一二阶差分模块,第一二阶差分模块根据一阶差分值DI2、DI1得到二阶差分值DP1;第二一阶差分模块将一阶差分值DQ2、DQ1输入第二二阶差分模块,第二二阶差分模块根据一阶差分值DQ2、DQ1得到二阶差分值DP2;c. The first first-order difference module inputs the first-order difference values DI2 and DI1 into the first second-order difference module, and the first second-order difference module obtains the second-order difference value DP1 according to the first-order difference values DI2 and DI1; the second first-order difference The module inputs the first-order difference values DQ2 and DQ1 into the second second-order difference module, and the second second-order difference module obtains the second-order difference value DP2 according to the first-order difference values DQ2 and DQ1;
在得到一阶差分值后,在下一个时钟周期的下降沿,分别将一阶差分值DI2、DI1输入第一二阶差分模块内,得到二阶差分值DP1=DI2-DI1;同时将一阶差分值DQ2、DQ1输入第二二阶差分模块内,得到二阶差分值DP2=DQ2-DQ1;一般地,根据三个一阶差分值能够得到三个二阶差分值,但是在NFC基带符号检测中一般利用最近两个时钟周期的一阶差分值即可;After the first-order differential value is obtained, on the falling edge of the next clock cycle, the first-order differential values DI2 and DI1 are respectively input into the first and second-order differential module to obtain the second-order differential value DP1=DI2-DI1; at the same time, the first-order differential value Values DQ2 and DQ1 are input into the second second-order difference module to obtain the second-order difference value DP2=DQ2-DQ1; generally, three second-order difference values can be obtained according to three first-order difference values, but in the NFC baseband symbol detection Generally, the first-order difference value of the last two clock cycles can be used;
d、阈值计算与判决模块接收一阶差分值DI0、DI1、DI2、DQ0、DQ1及DQ2,并接收二阶差分值DP1及DP2;阈值计算与判决模块根据DI2及DQ2得到一阶差分基值D2,并根据二阶差分值DP1、DP2得到二阶差分基值P2;d. The threshold calculation and judgment module receives the first-order differential values DI0, DI1, DI2, DQ0, DQ1, and DQ2, and receives the second-order differential values DP1 and DP2; the threshold calculation and judgment module obtains the first-order differential base value D2 according to DI2 and DQ2 , and obtain the second-order difference base value P2 according to the second-order difference values DP1 and DP2;
在下一个时钟的上升沿,将对应一阶差分值及二阶差分值均输入阈值计算与判决模块内;其中,一阶差分基值D2为D2=|DI2|+|DQ2|,二阶差分基值P2为P2=|DP1|+|DP2|;得到一阶差分基值D2与二阶差分基值P2作为阈值计算与判决模块的判断依据;On the rising edge of the next clock, the corresponding first-order difference value and second-order difference value will be input into the threshold calculation and judgment module; wherein, the first-order difference base value D2 is D2=|DI2|+|DQ2|, the second-order difference base value The value P2 is P2=|DP1|+|DP2|; the first-order difference base value D2 and the second-order difference base value P2 are obtained as the judgment basis of the threshold calculation and judgment module;
e、阈值计算与判决模块内预设差分偏移量Derr及判断阈值Dmax与Dmin,阈值计算与判决模块根据一阶差分基值D2的绝对值同时根据二阶差分基值P2的绝对值与判断阈值Dmax、Dmin之间的关系判断NFC基带符号的变化,以完成NFC基带符号的检测,并调整差分偏移量Derr及判断阈值Dmax与Dmin的值。e. The preset differential offset Derr and the judgment thresholds Dmax and Dmin in the threshold calculation and judgment module. The threshold calculation and judgment module is based on the absolute value of the first-order difference base value D2 and the absolute value of the second-order difference base value P2. The relationship between the thresholds Dmax and Dmin judges the change of the NFC baseband symbol to complete the detection of the NFC baseband symbol, and adjusts the difference offset Derr and the judgment threshold Dmax and Dmin.
本发明在步骤e中判断NFC基带符号的变化后,在确定NFC的初始符号状态下能够指示后续解码,避免ISI造成的误码情况,提高NFC通信的解码可靠性。在数字离散状态下,通过差分值能够判断信号状态的翻转,此处的翻转包括从高电平翻转到低电平,或是从低电平翻转到高电平。After judging the change of the NFC baseband symbol in step e, the present invention can indicate the subsequent decoding under the condition of determining the initial symbol state of the NFC, avoiding the error situation caused by ISI, and improving the decoding reliability of the NFC communication. In the digital discrete state, the inversion of the signal state can be judged by the differential value, and the inversion here includes inversion from high level to low level, or from low level to high level.
具体地,当一阶差分基值D2小于判断阈值Dmin时,阈值计算与判决模块输出NFC基带信号状态未发生变化;Specifically, when the first-order differential base value D2 is less than the judgment threshold Dmin, the state of the threshold calculation and judgment module output NFC baseband signal has not changed;
当一阶差分基值D2小于判断阈值Dmax,将判断阈值Dmin设定为Dmin=(D0+D1+D2)/3,并将差分偏移量Derr设定为Derr=Max((D0|-Dmin),(|D1|-Dmin),(|D2|-Dmin)),判断阈值Dmax设定为Dmax=Dmin+Derr+Dmax*w;其中,D0=|DI0|+|DQ0|,D1=|DI1|+|DQ1|,w为加权系数;When the first-order difference base value D2 is less than the judgment threshold Dmax, the judgment threshold Dmin is set as Dmin=(D0+D1+D2)/3, and the differential offset Derr is set as Derr=Max((D0|-Dmin ), (|D1|-Dmin), (|D2|-Dmin)), the judgment threshold Dmax is set as Dmax=Dmin+Derr+Dmax*w; wherein, D0=|DI0|+|DQ0|, D1=| DI1|+|DQ1|, w is the weighting coefficient;
当一阶差分值D2大于判断阈值Dmax,且二阶差分基值P2也大于判断阈值Dmax时,阈值计算与判决模块输出NFC基带信号状态发生变化,并将判断阈值Dmax设定为Dmax=D2。由于只采取一阶差分值进行判断时,还是容易造成ISI,因此需要二阶差分值进行二次判断。When the first-order difference value D2 is greater than the judgment threshold Dmax, and the second-order difference base value P2 is also greater than the judgment threshold Dmax, the threshold calculation and judgment module outputs the NFC baseband signal state to change, and the judgment threshold Dmax is set as Dmax=D2. Since it is easy to cause ISI when only the first-order difference value is used for judgment, the second-order difference value is required for secondary judgment.
所述阈值计算与判断模块在初始预设时令判断阈值Dmin为零,根据模拟前端,假定调制深度为100%,信号经过A/D转换之后,取I通道数据与Q通道数据中的最大值之和最为判断阈值Dmax的初始值。本发明中所述加权系数w一般取为0.75。The threshold calculation and judgment module judges that the threshold Dmin is zero at the initial preset time, and according to the analog front end, assuming that the modulation depth is 100%, after the signal is A/D converted, the maximum value in the I channel data and the Q channel data is taken and the initial value of the most judgment threshold Dmax. The weighting coefficient w in the present invention is generally taken as 0.75.
如图6和图7所示:上述NFC基带符号检测方法可以采用下述NFC基带符号检测装置完成。具体地,包括用于接收I通道数据的第一一阶差分模块及用于接收Q通道数据的第二一阶差分模块,所述第一一阶差分模块的输出端分别与第一二阶差分模块及阈值计算与判决模块相连,第二一阶差分模块的输出端分别与第二二阶差分模块及阈值计算与判决模块相连,第一二阶差分模块及第二二阶差分模块的输出端分别与阈值计算与判决模块相连;As shown in Fig. 6 and Fig. 7: the above-mentioned NFC baseband symbol detection method can be completed by using the following NFC baseband symbol detection device. Specifically, it includes a first first-order difference module for receiving I-channel data and a second first-order difference module for receiving Q-channel data, and the output terminals of the first first-order difference module are respectively connected to the first second-order difference module. The module and the threshold calculation are connected to the judgment module, the output terminals of the second first-order difference module are respectively connected to the second second-order difference module and the threshold calculation and judgment module, and the output terminals of the first second-order difference module and the second second-order difference module respectively connected to the threshold calculation and decision modules;
第一一阶差分模块计算并存储最近三个时钟的I通道数据差分值DI2、DI1及DI0,第二一阶差分模块计算并存储最近三个时钟的Q通道数据差分至DQ2、DQ1及DQ0,其中,DQ2与DI2为最新的差分值;第一二阶差分模块根据一阶差分值DI2、DI1计算并存储二阶差分值DP1,第二二阶差分模块根据一阶差分值DQ2、DQ1计算并存储二阶差分值DP2;阈值计算与判决模块将I通道数据的一阶差分值、二阶差分值与Q通道数据的一阶差分值、二阶差分值与预设的判断阈值Dmax及判断阈值Dmin进行比较,以判断NFC基带符号状态的变化;并根据判断NFC基带符号状态调整判断阈值Dmax及判断阈值Dmin的值。The first first-order difference module calculates and stores the I channel data difference values DI2, DI1 and DI0 of the last three clocks, and the second first-order difference module calculates and stores the Q channel data difference of the last three clocks to DQ2, DQ1 and DQ0, Among them, DQ2 and DI2 are the latest difference values; the first second-order difference module calculates and stores the second-order difference value DP1 according to the first-order difference values DI2 and DI1, and the second second-order difference module calculates and stores the second-order difference value according to the first-order difference values DQ2 and DQ1. Store the second-order differential value DP2; the threshold calculation and judgment module compares the first-order differential value and the second-order differential value of the I channel data with the first-order differential value and the second-order differential value of the Q channel data with the preset judgment threshold Dmax and the judgment threshold Dmin is compared to determine the change of the state of the NFC baseband symbol; and the values of the judgment threshold Dmax and the judgment threshold Dmin are adjusted according to the judgment of the state of the NFC baseband symbol.
第一一阶差分模块、第一二阶差分模块模块、第二一阶差分模块、第二二阶差分模块及阈值计算与判决模块的工作原理与状态参照上述描述。For the working principles and states of the first first-order difference module, the first second-order difference module, the second first-order difference module, the second second-order difference module, and the threshold calculation and judgment module, refer to the above description.
如图6~图8所示:工作时,将I通道数据Q通道数据分别输入第一一阶差分模块、第二一阶差分模块内,通过第一一阶差分模块、第二一阶差分模块进行一阶差分后得到近三个时钟周期的一阶差分值,并在下一个时钟周期将相应的一阶差分值输入第一二阶差分模块、第二二阶差分模块内;阈值计算与判决模块同时利用一阶差分基值、二阶差分基值与预设阈值Dmax、预设阈值Dmin进行比较,以能准确确定NFC基带符号的是否发生变化,并根据判断结果来调整预设阈值Dmax、Dmin与差分偏移量Derr,以能够准确对后续的NFC基带符号进行精确判断,从而为后续NFC基带信号解码提供必要的依据,步骤简单,检测精度高,提高解码的可靠性。As shown in Figures 6 to 8: When working, input the I channel data and Q channel data into the first first-order difference module and the second first-order difference module respectively, and pass through the first first-order difference module and the second first-order difference module After the first-order difference, the first-order difference value of nearly three clock cycles is obtained, and the corresponding first-order difference value is input into the first second-order difference module and the second second-order difference module in the next clock cycle; the threshold calculation and judgment module At the same time, the base value of the first-order difference and the base value of the second-order difference are compared with the preset threshold Dmax and the preset threshold Dmin to accurately determine whether the NFC baseband symbol changes, and adjust the preset threshold Dmax and Dmin according to the judgment result and the differential offset Derr to accurately judge the subsequent NFC baseband symbols, thereby providing the necessary basis for subsequent NFC baseband signal decoding. The steps are simple, the detection accuracy is high, and the reliability of decoding is improved.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210083765.7A CN102611657B (en) | 2012-03-27 | 2012-03-27 | Method and device for detecting NFC (Near Field Communication) baseband symbols |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210083765.7A CN102611657B (en) | 2012-03-27 | 2012-03-27 | Method and device for detecting NFC (Near Field Communication) baseband symbols |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102611657A CN102611657A (en) | 2012-07-25 |
CN102611657B true CN102611657B (en) | 2014-12-17 |
Family
ID=46528817
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210083765.7A Active CN102611657B (en) | 2012-03-27 | 2012-03-27 | Method and device for detecting NFC (Near Field Communication) baseband symbols |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102611657B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115085771B (en) * | 2022-08-23 | 2022-11-18 | 北京紫光青藤微系统有限公司 | Channel selection method and device for NFC (near field communication) signals |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101321276A (en) * | 2007-06-10 | 2008-12-10 | 华为技术有限公司 | Method and device for deblocking and determining region flatness |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000269856A (en) * | 1999-03-15 | 2000-09-29 | Ricoh Co Ltd | Correlation peak detection circuit |
KR101073937B1 (en) * | 2010-11-24 | 2011-10-17 | 에이큐 주식회사 | Mobile terminal with NFC communication function |
-
2012
- 2012-03-27 CN CN201210083765.7A patent/CN102611657B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101321276A (en) * | 2007-06-10 | 2008-12-10 | 华为技术有限公司 | Method and device for deblocking and determining region flatness |
Also Published As
Publication number | Publication date |
---|---|
CN102611657A (en) | 2012-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11277254B2 (en) | Receiver with enhanced clock and data recovery | |
US8576964B2 (en) | Radio receiver | |
CN105187348B (en) | Arbitrary velocity CPFSK signal timing synchronous method | |
CN103248593B (en) | Offset estimation and removing method and system | |
CN111600823B (en) | Parallel OQPSK offset quadriphase shift keying demodulator | |
US9584306B2 (en) | Phase detection in an analog clock data recovery circuit with decision feedback equalization | |
CN103532894A (en) | TCM-8PSK baseband signal demodulation method | |
US20220103407A1 (en) | Fsk radio-frequency demodulators | |
CN105119864B (en) | A kind of symmetrical extended binary phase shift keying modulation and demodulation method | |
CN106789790B (en) | Carrier frequency offset adjusting method | |
CN106508104B (en) | A kind of method of extension remote measurement coherent receiver frequency offset estimation range | |
CN107483078A (en) | A Realization Method of Receive Frequency Offset Estimation in Ship VDES System ASM System | |
JPH06205062A (en) | Delay detection circuit | |
CN101483624A (en) | Compensation apparatus and compensation method for frequency drift in MSK differential detection and demodulation circuit | |
CN102611657B (en) | Method and device for detecting NFC (Near Field Communication) baseband symbols | |
US8514987B2 (en) | Compensation for data deviation caused by frequency offset using timing correlation value | |
CN202713355U (en) | NFC baseband symbol detection apparatus | |
CN101827056B (en) | Decision feedback fraction multi-bit differential detection method based on continuous phase signal | |
CN101594167A (en) | The method of allied signal detection and Frequency Estimation in a kind of wireless network | |
CN101098555A (en) | Multi-mode self-adaptive direct spread communication system and method | |
CN115276921B (en) | Bluetooth frame type automatic detection method, system and storage medium for tester | |
US20070041473A1 (en) | Modulation detection in a saic operational environment | |
JP2011047877A (en) | Device measuring apparatus for portable terminal | |
CN116545456A (en) | Amplitude modulation digital baseband signal identification method and device | |
CN101635583A (en) | Anti-phase deviation demodulation method of narrow-band high-speed frequency hopping system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CB03 | Change of inventor or designer information | ||
CB03 | Change of inventor or designer information |
Inventor after: Liu Tianfeng Inventor before: Sun Lei |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20171225 Address after: The 404600 Chongqing city Fengjie County Zhenping on Village 7 Patentee after: FENGJIE DONGYANG BUILDING MATERIALS CO., LTD. Address before: 214028 room 108, building 21-1, Changjiang Road, New District, Jiangsu, Wuxi Patentee before: Wuxi Liwai Semiconductor Technology Co., Ltd. |