Near field communication method and device, chip and electronic equipment
By dynamically adjusting the decoding threshold of the NFC receiving device, responding to different noise environments according to the amplitude of the NFC modulated signal, the problem of misdecoding of the NFC receiving device in a noisy environment is solved, and the reliability and efficiency of near-field communication is improved.
Patent Information
- Application Number
- CN202411837086.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-18
AI Technical Summary
Existing NFC receiving devices are prone to misdecode when facing external environment noise and interference, resulting in reduced reliability and efficiency of near-field communication.
By dynamically adjusting the decoding threshold according to the amplitude of the NFC modulated signal, it is ensured that the baseband signal is accurately decoded under different noise environments. The specific method includes estimating the baseband amplitude based on the carrier amplitude and modulation coefficient during the frame head detection and intra-decoding process, and dynamically updating the decoding threshold.
It effectively solves the misdecoding problem caused by external noise interference, and improves the reliability and efficiency of near-field communication.
Smart Images

Figure CN119853739A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of near field communication (NFC), and in particular to a near field communication method, device, chip and electronic device. Background Art
[0002] Near field communication, also known as short-range wireless communication, is a short-range high-frequency wireless communication technology. The NFC sending device and the NFC receiving device can perform contactless point-to-point data transmission at a short distance, such as within ten centimeters, thereby realizing data exchange.
[0003] In related technologies, NFC receiving devices generally use a fixed decoding threshold to decode baseband signals. This fixed value often depends on the noise floor of the circuit itself. In actual applications, some external environmental noise and interference are often encountered, such as the noise and interference of the NFC sending device, which will be coupled to the NFC receiving device through the air interface. In some cases, this noise is often greater than the circuit noise floor, which will cause the NFC receiving device to misinterpret. Summary of the invention
[0004] In view of the above problems, the embodiments of the present application provide a near field communication method, device, chip and electronic device to solve the above technical problems.
[0005] In a first aspect, an embodiment of the present application provides a near field communication method, including: receiving an NFC modulated signal, where the NFC modulated signal is modulated based on an amplitude modulation scheme; determining a decoding threshold according to the amplitude of the NFC modulated signal; and decoding a baseband signal of the NFC modulated signal according to the decoding threshold.
[0006] In some possible implementations, determining a decoding threshold according to the amplitude of an NFC modulated signal includes: in a process of detecting a frame header according to a first decoding threshold, if no frame header is detected, updating the first decoding threshold according to the amplitude of the NFC modulated signal, so as to continue to perform frame header detection based on the updated first decoding threshold; and / or in an intra-frame decoding process, updating a second decoding threshold according to the amplitude of the NFC modulated signal, so as to continue to decode intra-frame data based on the updated second decoding threshold.
[0007] In some possible implementations, determining the decoding threshold according to the amplitude of the NFC modulated signal further includes: if a frame header is detected, initializing a second decoding threshold based on the first decoding threshold when the frame header is detected, so as to start decoding the data in the frame based on the initialized second decoding threshold.
[0008] In some possible implementations, updating the first decoding threshold according to the amplitude of the NFC modulated signal includes: measuring the carrier amplitude of the NFC modulated signal at preset time intervals; for each measured carrier amplitude: estimating a baseband amplitude based on the carrier amplitude and a modulation coefficient, and updating the first decoding threshold based on the estimated baseband amplitude.
[0009] In some possible implementations, the above method also includes: for each measured carrier amplitude, comparing the carrier amplitude with the current first decoding threshold to obtain a change in the carrier amplitude; when the change is greater than a preset threshold, estimating the baseband amplitude based on the carrier amplitude and the modulation coefficient, and updating the first decoding threshold based on the estimated baseband amplitude.
[0010] In some possible implementations, updating the second decoding threshold according to the amplitude of the NFC modulated signal includes: detecting a preset feature of a baseband signal of the NFC modulated signal, predicting that the feature includes a rising edge or a gap; delaying for a preset time length each time the preset feature is detected; after delaying for the preset time length, measuring the carrier amplitude or baseband amplitude of the NFC modulated signal; and updating the second decoding threshold based on the carrier amplitude or the baseband amplitude.
[0011] In some possible implementations, updating the second decoding threshold based on the carrier amplitude includes: estimating the baseband amplitude based on the carrier amplitude and the modulation coefficient; and updating the second decoding threshold based on the estimated baseband amplitude.
[0012] In some possible embodiments, updating the first decoding threshold based on the baseband amplitude includes: reducing the baseband amplitude based on the first proportional coefficient to obtain the first decoding threshold; updating the second decoding threshold based on the baseband amplitude includes: reducing the baseband amplitude based on the second proportional coefficient to obtain the second decoding threshold; the first proportional coefficient is the same as or different from the second proportional coefficient.
[0013] In a second aspect, an embodiment of the present application provides a near field communication device, including: a contactless interface for receiving an NFC modulated signal, where the NFC modulated signal is modulated based on an amplitude modulation scheme; a decoding module, for determining a decoding threshold according to the amplitude of the NFC modulated signal, and decoding a baseband signal of the NFC modulated signal according to the decoding threshold.
[0014] In some possible implementations, the decoding module is further configured to: in a process of detecting a frame header according to a first decoding threshold, if no frame header is detected, update the first decoding threshold according to the amplitude of the NFC modulation signal, so as to continue detecting the frame header based on the updated first decoding threshold; and / or in a process of decoding intra-frame data according to a second decoding threshold, update the second decoding threshold according to the amplitude of the NFC modulation signal, so as to continue decoding the intra-frame data based on the updated second decoding threshold.
[0015] In some possible implementations, the decoding module is further configured to: if a frame header is detected, initialize a second decoding threshold based on a first decoding threshold when the frame header is detected, so as to start decoding the intra-frame data based on the initialized second decoding threshold.
[0016] In some possible implementations, the decoding module is further configured to: measure the carrier amplitude of the NFC modulated signal at preset time intervals; for each measured carrier amplitude: estimate a baseband amplitude based on the carrier amplitude and the modulation coefficient, and update the first decoding threshold based on the estimated baseband amplitude.
[0017] In some possible implementations, the decoding module is further used to: compare the carrier amplitude obtained each time with the current first decoding threshold to obtain a change in the carrier amplitude; when the change is greater than a preset threshold, estimate the baseband amplitude based on the carrier amplitude and the modulation coefficient, and update the first decoding threshold based on the estimated baseband amplitude.
[0018] In some possible implementations, the decoding module is further used to: detect a preset feature of a baseband signal of the NFC modulated signal, the predicted feature including a rising edge or a gap; delay a preset time length each time the preset feature is detected; after the preset delay time length, measure the carrier amplitude or baseband amplitude of the NFC modulated signal; and update the second decoding threshold based on the carrier amplitude or the baseband amplitude.
[0019] In some possible implementations, the decoding module is further configured to: estimate a baseband amplitude based on a carrier amplitude and a modulation coefficient; and update a second decoding threshold based on the estimated baseband amplitude.
[0020] In some possible implementations, the decoding module is further used to: during the frame header detection process, reduce the baseband amplitude based on a first proportional coefficient to obtain a first decoding threshold; during the intra-frame decoding process, reduce the baseband amplitude based on a second proportional coefficient to obtain a second decoding threshold; the first proportional coefficient is the same as or different from the second proportional coefficient.
[0021] In a third aspect, an embodiment of the present application provides a near field communication chip, comprising the above-mentioned near field communication device.
[0022] In a fourth aspect, an embodiment of the present application provides an electronic device, including a device body and the above-mentioned near field communication device or chip provided in the device body.
[0023] The near field communication method, device, chip and electronic device provided in the embodiments of the present application can solve the problem of misdecoding of the NFC receiving device caused by external environmental noise and interference by determining a decoding threshold according to the amplitude of the NFC modulated signal and decoding the baseband signal of the NFC modulated signal according to the decoding threshold, thereby improving the reliability and efficiency of near field communication.
[0024] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 A schematic diagram of the structure of an electronic device to which the technical solution of an embodiment of the present application can be applied is shown.
[0027] Figure 2A An exemplary carrier signal is shown as a sine wave.
[0028] Figure 2B An exemplary baseband signal is shown.
[0029] Figure 2C Shown by Figure 2B An exemplary baseband signal modulation Figure 2A carrier signal.
[0030] Figure 3 A schematic flow chart of a near field communication method provided in an embodiment of the present application is shown.
[0031] Figure 4A A schematic diagram of a baseband signal corresponding to an exemplary NFC command is shown.
[0032] Figure 4B Shown Figure 4A FIG. 2 is a schematic diagram of an exemplary NFC command decoding to explain the updating of the second decoding threshold.
[0033] Figure 5 A schematic block diagram of a near field communication device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0034] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0035] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0036] In the embodiments of the present application, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0037] Moreover, the terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0038] In the description of the embodiments of the present application, words such as "example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "example" or "for example" in the embodiments of the present application is not to be interpreted as being more preferred or having more advantages than another embodiment or design. The use of words such as "example" or "for example" is intended to present relative concepts in a clear manner.
[0039] In addition, the "plurality" in the embodiments of the present application refers to two or more than two. In view of this, in the embodiments of the present application, "plurality" can also be understood as "at least two". "At least one" can be understood as one or more, for example, one, two or more. For example, including at least one means including one, two or more, and there is no limit on which ones are included. For example, including at least one of A, B and C, then A, B, C, A and B, A and C, B and C, or A, B and C can be included.
[0040] It should be noted that, in the embodiments of the present application, "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after are in an "or" relationship.
[0041] It should be noted that in the embodiments of the present application, "connection" can be understood as electrical connection, and the connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be either a direct connection between A and B or an indirect connection between A and B through one or more other electrical components.
[0042] Figure 1 A schematic diagram showing the structure of an electronic device that can be applied to the technical solution of the embodiment of the present application is shown. Figure 1 As shown, the typical hardware structure of the electronic device 100 may include: a processor 101, a memory 102, a radio device 103, an audio output unit 104, an A / V input unit 105, a display unit 106, a user input unit 107, an interface unit 108 and a power supply 109. It should be understood that Figure 1 This is merely an exemplary description of the embodiment of the present application and is not intended to limit the electronic device 100 .
[0043] The display unit 106 includes various types of display panels that can display visual graphics, such as a graphical user interface (GUI). The user input unit 107 may include a touch panel that can cover the display panel. The audio output unit 104 includes a speaker, etc. The A / V input unit 105 includes an image processor 1051 and a microphone 1052.
[0044] The memory 102 may store data and instructions that may be executed on the processor 101, including an operating system 111 and the like. Figure 1 As shown, the memory 102 stores a plurality of application programs 110. The one or more application programs 110 include weather, instant messaging, phone, text messages, mailboxes, or stocks, etc.
[0045] Please continue to refer to Figure 1 As shown, in the embodiment of the present application, the electronic device 100 also includes an NFC device 200. The processor 101 can communicate with the NFC device 200. Specifically, the processor 101 can communicate with the NFC device 200, and the processor 101 and the NFC device 200 can be connected via a bus. The aforementioned operating system 111 and / or application 110 can control the NFC device 200 to implement NFC functions such as mobile payment, identity recognition, access control, obtaining electronic tag information, data exchange, device connection, electronic wallet, and electronic bus card.
[0046] The electronic device 100 can work in active mode or passive mode. The active mode may include peer-to-peer mode (P2P mode for short) and reader / writer mode (RW mode for short). In peer-to-peer mode, two electronic devices 100 with NFC function are paired and connected to realize point-to-point data transmission, such as quickly transferring files between two electronic devices 100. In reader / writer mode, the electronic device 100 with NFC function reads and writes information from media such as tags, stickers, business cards with NFC chips. The passive mode includes card emulation mode (CE mode for short). In card emulation mode, the electronic device 100 is equivalent to an IC card using RFID technology, which can be used as a credit card, transportation card, access control, train ticket, etc.
[0047] In an embodiment of the present application, the NFC transmitting device can modulate the baseband signal onto the carrier based on modulation schemes such as amplitude modulation (AM), frequency modulation (FM) and phase modulation (PM) to obtain an NFC modulated signal, and the baseband signal is usually a binary digital signal. Amplitude modulation (AM), frequency modulation (FM) and phase modulation (PM) encode data onto the carrier by changing the amplitude of the carrier, the frequency of the carrier and the phase of the carrier respectively according to the information to be transmitted. In a specific implementation, in the electronic device 100, in the CE mode, the NFC device 200 acts as an NFC receiving device, and the NFC device 200 can receive the NFC modulated signal modulated by the amplitude modulation scheme.
[0048] Figure 2A An exemplary carrier signal 310 is shown as a sine wave, and in the ISO / IEC 18092 standard for NFC, the frequency of the carrier signal 310 is 13.56 MHz. Figure 2B An exemplary baseband signal 320 is shown, such as Figure 2B The illustrated baseband signal 320 is a binary data signal having a value of 11001100. Figure 2C Shown by Figure 2B An exemplary baseband signal 320 modulated Figure 2A The carrier signal 310, in this example, has an amplitude that has been modulated to Figure 2B The baseband signal 320 is encoded as 11001100, which is called the NFC modulated signal.
[0049] In the electronic device 100, the NFC device 200 can Figure 2C The carrier signal 310 (ie, the modulated signal) shown in FIG. 1 is subjected to envelope detection to recover the baseband signal 320 from the carrier signal 310. Figure 2C The signal recovered from the baseband signal 330 is represented as a baseband signal 330. Figure 2C The baseband signal 330 shown can be reconstructed Figure 2B The baseband signal 320 is shown. Further, the NFC device 200 compares the decoding threshold 340 to reconstruct the baseband signal 320. For example, if the amplitude of the baseband signal 330 is greater than the decoding threshold, it is interpreted as 1, and if the amplitude of the baseband signal 330 is less than or greater than the decoding threshold, it is interpreted as 0.
[0050] In the related art, the NFC device 200 generally uses a fixed decoding threshold 340 to decode the baseband signal 330, such as Figure 2C As shown, the decoding threshold 340 is fixed from t0 to t8, and this fixed value often depends on the circuit noise floor. In actual applications, some external environmental noise and interference are often encountered, such as the noise and interference of the NFC sending device, which will be coupled to the NFC device 200 through the air interface. In some cases, this noise is often greater than the circuit noise floor, which will cause the NFC device 200 to misdecode.
[0051] The embodiment of the present application provides a near field communication method, which can be implemented by the NFC device 200 and the electronic device 100 of the embodiment of the present application, and solves the problem of misdecoding caused by external environmental noise and interference by dynamically adjusting the decoding threshold. That is, in the embodiment of the present application, Figure 3 The decoding threshold 340 is shown to be dynamically variable rather than a fixed value.
[0052] Figure 3 A flow chart of a near field communication method provided in an embodiment of the present application is shown. Figure 3 As shown, the near field communication method of the embodiment of the present application includes steps S301 to S303.
[0053] Step S301: receiving an NFC modulated signal, where the NFC modulated signal is modulated based on an amplitude modulation scheme.
[0054] In an embodiment of the present application, in the electronic device 100, the NFC device 200 can receive an NFC modulated signal, which can be a carrier signal modulated with a baseband signal, that is, the NFC modulated signal includes a carrier signal and a baseband signal. The NFC modulated signal can only include a carrier signal.
[0055] Further, in the electronic device 100, when the NFC device 200 works in the CE mode, it is first in a low power consumption state, and the NFC device 200 in the low power consumption state detects the NFC modulation signal sent by the NFC sending device, and when it is detected that the NFC modulation signal meets the wake-up condition, the NFC device 200 enters the wake-up state. After entering the wake-up state, the NFC device 200 communicates with the NFC sending device 200. The communication between the NFC device 200 in the wake-up state and the NFC sending device 200 may include: the NFC device 200 receives the NFC command sent by the NFC sending device, and the NFC device 200 replies to the NFC sending device 200 with the NFC response of the NFC command. The NFC command and the NFC response are modulated and encoded into the NFC modulation signal.
[0056] Furthermore, the transmission frame format of the NFC sending device sending the NFC command includes a frame header (Start of Frame, referred to as SOF), transmission data and a frame end (End of Frame, referred to as EOF), the frame header indicates the start of the transmission frame, and the frame end indicates the end of the transmission frame. Before the NFC sending device sends the NFC command, the NFC modulated signal sent by the NFC sending device only contains the carrier signal. In the electronic device 100, the process of the NFC device 200 obtaining the NFC command includes frame header detection and intra-frame decoding. Before the frame header is detected, the NFC modulated signal received by the NFC device 200 contains only the carrier signal, that is, the baseband signal is not modulated and encoded on the carrier signal. After the frame header is detected, the NFC modulated signal received by the NFC device 200 contains the carrier signal and the baseband signal modulated and encoded on the carrier signal.
[0057] Step S302: determining a decoding threshold according to the amplitude of the NFC modulated signal.
[0058] In an embodiment of the present application, in the electronic device 100, when the NFC device 200 detects the frame header according to the first decoding threshold, if the frame header is not detected, the first decoding threshold can be updated according to the amplitude of the NFC modulated signal to continue to detect the frame header based on the updated first decoding threshold, thereby improving the reliability of the frame header detection. Before the frame header is detected, the NFC modulated signal received by the NFC device 200 only contains the carrier signal, that is, the coded baseband signal is not modulated on the carrier signal. The NFC device 200 can measure the carrier amplitude of the NFC modulated signal and update the first decoding threshold based on the carrier amplitude. In a specific implementation, the initial first decoding threshold can be pre-set, for example, a corresponding empirical value is pre-set according to the actual product application scenario.
[0059] In an embodiment of the present application, in the electronic device 100, the NFC device 200 can update the second decoding threshold according to the amplitude of the NFC modulated signal in the process of decoding the data in the frame according to the second decoding threshold, so as to continue to decode the data in the frame based on the updated second decoding threshold, thereby improving the reliability of the intra-frame decoding. After detecting the frame header, the NFC modulated signal received by the NFC device 200 includes a carrier signal and a baseband signal modulated and encoded on the carrier signal. The NFC device 200 can measure the carrier amplitude or baseband amplitude of the NFC modulated signal, and determine the second decoding threshold based on the carrier amplitude or the baseband amplitude. Exemplarily, the NFC device 200 updates the second decoding threshold based on the amplitude of the NFC modulated signal decoded to the current data bit in the process of decoding the data in the frame according to the second decoding threshold, so as to decode at least one subsequent data bit based on the updated second decoding threshold, such as the next data bit of the current data bit.
[0060] Optionally, the NFC device 200 can also initialize the second decoding threshold based on the first decoding threshold detected when the frame header is detected, so as to start decoding the data in the frame based on the second decoding threshold obtained by initialization. In a specific implementation, the first decoding threshold detected when the frame header is detected can be used as the initialized second decoding threshold, that is, the first decoding threshold detected when the frame header is detected can be used to start decoding the data in the frame. Further, after starting to decode the data in the frame according to the initialized second decoding threshold, the second decoding threshold can be updated according to the amplitude of the NFC modulation signal to continue decoding the data in the frame based on the updated second decoding threshold. As a typical implementation, the first data bit in the frame is decoded according to the initialized second decoding threshold, and when the first data bit is decoded, the second decoding threshold is updated based on the amplitude of the NFC modulation signal corresponding to the decoded first data bit, and the next one or more data bits are decoded according to the updated second decoding threshold. By analogy, the second decoding threshold is updated based on the amplitude of the NFC modulation signal corresponding to the decoded current data bit, and the next one or more data bits are decoded according to the updated second decoding threshold.
[0061] In some possible implementations, in the electronic device 100, when the NFC device 200 detects the frame header according to the first decoding threshold, if the frame header is not detected, the first decoding threshold may be updated according to the amplitude of the NFC modulated signal. The NFC device 200 may compare the first decoding threshold with the amplitude of the received NFC modulated signal to determine whether the frame header is detected. For example, the NFC device 200 may measure the amplitude of the received NFC modulated signal. If the amplitude of the received NFC modulated signal is greater than the first decoding threshold, the frame header is detected, indicating that the transmission frame has started; if the amplitude of the received NFC modulated signal is less than the first decoding threshold, the frame header is not detected, indicating that the transmission frame has not started yet.
[0062] Furthermore, in the electronic device 100, the NFC device 200 can measure the carrier amplitude of the NFC modulated signal at preset time intervals. In a specific implementation, the preset time intervals may be equal intervals or not, and the time intervals may be set according to the actual needs of the product. For the carrier amplitude obtained in each measurement: the baseband amplitude is estimated based on the carrier amplitude and the modulation coefficient, and the first decoding threshold is updated based on the estimated baseband amplitude. In the NFC-A transmission technology, the modulation mode is Amplitude Shift Keying (ASK) modulation with a modulation coefficient of 100%, and the baseband amplitude is equal to the carrier amplitude. In the NFC-B and NFC-F transmission technologies, the modulation mode is ASK modulation with a modulation coefficient of 10%, and the baseband amplitude can be estimated from the carrier amplitude based on the modulation ratio.
[0063] In some specific implementations, for each measured carrier amplitude, the carrier amplitude can also be compared with the current first decoding threshold to obtain the change in the carrier amplitude; when the change is greater than a preset threshold, the baseband amplitude is estimated based on the carrier amplitude and the modulation coefficient, and the first decoding threshold is updated based on the estimated baseband amplitude. This implementation can achieve the first decoding threshold not being updated when the change in the carrier amplitude is small, and can reduce the frequency of adjusting the first decoding threshold.
[0064] In some possible implementations, in the electronic device 100, the NFC device 200 may update the second decoding threshold according to the amplitude of the NFC modulated signal during the process of decoding the data in the frame according to the second decoding threshold. This implementation can cope with the change in baseband signal amplitude caused by the change in carrier amplitude due to the movement of the electronic device 100 during the long frame interaction, which may increase or decrease. By dynamically updating the second decoding threshold according to the amplitude of the NFC modulated signal, the second decoding threshold follows the change to better adapt to the decoding.
[0065] In some possible implementations, updating the second decoding threshold according to the amplitude of the NFC modulated signal includes: detecting a preset feature of a baseband signal of the NFC modulated signal, predicting that the feature includes a rising edge or a gap; delaying for a preset time length each time the preset feature is detected; after delaying for the preset time length, measuring the carrier amplitude or baseband amplitude of the NFC modulated signal; and updating the second decoding threshold based on the carrier amplitude or the baseband amplitude.
[0066] Figure 4AA schematic diagram of a baseband signal corresponding to an exemplary NFC command is shown, where a baseband signal 400 is composed of a high level and a low level. A high level flips to a low level to generate a falling edge 401, and a low level flips to a high level to generate a rising edge 402. The portion between adjacent falling edges 401 and rising edges 402 is called a pause. In general applications, a baseband signal 410 often has a large downshot 403 and overshot 404. If the amplitude is measured at the overshoot 404, the measured amplitude is greater than the actual amplitude. In order to reduce the impact of the overshoot 404 and the undershoot 403 on the decoding, when the carrier amplitude or baseband amplitude is measured after the gap or rising edge is triggered, a delay is made for a period of time to avoid this interference.
[0067] Figure 4B Shown Figure 4A FIG. 1 is a schematic diagram of an exemplary NFC command decoding to explain the update of the second decoding threshold, as shown in FIG. Figure 4B As shown, due to the movement of the electronic device 100, the distance between the electronic device 100 and the NFC transmitting device changes, and the amplitude of the baseband signal 400 changes. Figure 4B The figure shows a situation where the amplitude of the baseband signal 400 changes gradually. Further, when a rising edge or a gap is detected, a preset delay is performed. By delaying the preset delay, the overshot of the baseband signal is avoided, so that the amplitude of the carrier signal or the baseband signal is detected in the high level interval of the signal. After the preset delay, the carrier amplitude or the baseband amplitude of the NFC modulated signal is measured, and the second decoding threshold is determined based on the carrier amplitude or the baseband amplitude. Figure 4B As shown, the second decoding threshold 410 varies with the carrier amplitude or the baseband amplitude.
[0068] In some possible implementations, in the electronic device 100, the NFC device 200 may measure the baseband amplitude of the NFC modulated signal, and update the second decoding threshold based on the baseband amplitude. In other possible implementations, the NFC device 200 may measure the carrier amplitude, estimate the baseband amplitude based on the carrier amplitude and the modulation coefficient, and update the second decoding threshold based on the estimated baseband amplitude.
[0069] Further, updating the first decoding threshold based on the baseband amplitude includes: reducing the baseband amplitude based on the first proportional coefficient to obtain the first decoding threshold; updating the second decoding threshold based on the baseband amplitude includes: reducing the baseband amplitude based on the second proportional coefficient to obtain the second decoding threshold; the first proportional coefficient is the same as or different from the second proportional coefficient. In a specific implementation, the first proportional coefficient and the second proportional coefficient can be set according to actual product requirements.
[0070] In a specific implementation, during NFC-A 106kHz communication, because the modulation coefficient MI of the NFC transmitter device is 100%, the carrier signal amplitude of the signal received by the NFC device 200 of the electronic device 100 is equal to the baseband signal amplitude, so that the baseband signal amplitude value can be predicted by the detected carrier amplitude, and the first proportional coefficient and / or the second proportional coefficient can be set to between 30% and 70% of the carrier signal amplitude. This ratio will not affect normal waveform decoding, and can effectively suppress interference with noise signal amount / carrier signal amount <30%. During NFC-B and NFC-F communication, because the modulation coefficient MI of the NFC transmitter device is 8% to 15%, the baseband signal amplitude of the signal received by the NFC device 200 of the electronic device 100 = carrier signal amplitude * (15% to 26%), and the first proportional coefficient and / or the second proportional coefficient can be set to make the decoding threshold about 5% to 10% of the carrier signal amplitude.
[0071] Step S303: decode the baseband signal of the NFC modulated signal according to the decoding threshold.
[0072] By using this near field communication method, a decoding threshold is updated according to the amplitude of the NFC modulated signal, and a baseband signal of the NFC modulated signal is decoded according to the decoding threshold, which can solve the problem of misdecoding of the NFC receiving device caused by external environmental noise and interference, and improve the reliability and efficiency of near field communication.
[0073] The present application also provides an NFC device, which can implement the above-mentioned near field communication method, which can be Figure 1 The NFC device 200 shown in the figure may be implemented as an NFC receiving device. In some possible implementations, such as Figure 5 As shown, the NFC device 500 may include: a contactless interface 510 and a decoding module 520. The decoding module 520 in the embodiment of the present application may be implemented by a hardware circuit, or a combination of a hardware circuit and a program instruction, which is not limited in the embodiment of the present application.
[0074] See also Figure 5 As shown, the contactless interface 510 is used to receive an NFC modulated signal. In an embodiment of the present application, the NFC modulated signal may be modulated based on an amplitude modulation scheme. The decoding module 520 is used to determine a decoding threshold according to the amplitude of the NFC modulated signal, and decode the baseband signal of the NFC modulated signal according to the decoding threshold.
[0075] In some possible implementations, the decoding module 520 is specifically configured to: in a process of detecting a frame header according to a first decoding threshold, if no frame header is detected, update the first decoding threshold according to an amplitude of the NFC modulated signal, so as to continue detecting the frame header based on the updated first decoding threshold.
[0076] In some possible implementations, the decoding module 520 is specifically configured to: in a process of decoding the intra-frame data according to the second decoding threshold, update the second decoding threshold according to the amplitude of the NFC modulated signal, so as to continue decoding the intra-frame data based on the updated second decoding threshold.
[0077] In some possible implementations, the decoding module 520 is specifically configured to: in a process of detecting a frame header according to a first decoding threshold, if no frame header is detected, update the first decoding threshold according to the amplitude of the NFC modulation signal, so as to continue detecting the frame header based on the updated first decoding threshold; and in a process of decoding intra-frame data according to a second decoding threshold, update the second decoding threshold according to the amplitude of the NFC modulation signal, so as to continue decoding the intra-frame data based on the updated second decoding threshold.
[0078] Furthermore, in some possible implementations, the decoding module 520 is further configured to: if a frame header is detected, initialize a second decoding threshold based on a first decoding threshold when the frame header is detected, so as to start decoding the intra-frame data based on the initialized second decoding threshold.
[0079] In some possible implementations, the decoding module 520 is further configured to: measure the carrier amplitude of the NFC modulated signal at preset time intervals; for each measured carrier amplitude: estimate a baseband amplitude based on the carrier amplitude and the modulation coefficient, and update a first decoding threshold based on the estimated baseband amplitude.
[0080] In some possible implementations, the decoding module 520 is also used to: compare the carrier amplitude obtained each time with the current first decoding threshold to obtain a change in the carrier amplitude; when the change is greater than a preset threshold, estimate the baseband amplitude based on the carrier amplitude and the modulation coefficient, and update the first decoding threshold based on the estimated baseband amplitude.
[0081] In some possible implementations, the decoding module 520 is further used to: detect a preset feature of a baseband signal of the NFC modulated signal, the predicted feature including a rising edge or a gap; delay a preset time length each time the preset feature is detected; after the preset delay time length, measure the carrier amplitude or baseband amplitude of the NFC modulated signal; and update the second decoding threshold based on the carrier amplitude or the baseband amplitude.
[0082] In some possible implementations, the decoding module 520 is further configured to: estimate the baseband amplitude based on the carrier amplitude and the modulation coefficient; and update the second decoding threshold based on the estimated baseband amplitude.
[0083] In some possible implementations, the decoding module 520 is further used to: during the frame header detection process, reduce the baseband amplitude based on a first proportional coefficient to obtain a first decoding threshold; during the intra-frame decoding process, reduce the baseband amplitude based on a second proportional coefficient to obtain a second decoding threshold; the first proportional coefficient is the same as or different from the second proportional coefficient.
[0084] In some embodiments, the NFC device 500 is used to implement a near field communication method, such as Figure 3 For the near field communication method shown in the figure, the specific implementation of the NFC device 500 can refer to the description of the Figure 3 The description of the near field communication method shown is not repeated here.
[0085] The embodiment of the present application also provides an NFC chip, which is used to implement the above-mentioned near field communication method. As an implementation method, the NFC chip may include the above-mentioned NFC device. The chip may be, but is not limited to, a SOC (System on Chip) chip or a SIP (system in package) chip.
[0086] An embodiment of the present application provides an electronic device, including a device body and the above-mentioned device or chip arranged in the device body. The electronic device includes a device body and a chip as described above arranged in the device body. The electronic device may be, but is not limited to, a weight scale, a body fat scale, a nutrition scale, an infrared electronic thermometer, a pulse oximeter, a body composition analyzer, a mobile power supply, a wireless charger, a fast charging charger, a car charger, an adapter, a display, a USB (Universal Serial Bus) docking station, a stylus, a true wireless headset, a car central control screen, a car, a smart wearable device, a mobile terminal, and a smart home device. Smart wearable devices include, but are not limited to, smart watches, smart bracelets, and cervical massagers. Mobile terminals include, but are not limited to, smart phones, laptops, tablet computers, and POS (point of sales terminal) machines. Smart home devices include, but are not limited to, smart sockets, smart rice cookers, smart sweepers, and smart lights. In a specific implementation, the electronic device may be implemented as follows Figure 1 An electronic device 100 is shown.
[0087] The above are only preferred embodiments of the present application, and are not intended to limit the present application in any form. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technical personnel in the field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present application. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. A near field communication (NFC) method, characterized in that: include: Receiving an NFC modulated signal, where the NFC modulated signal is modulated based on an amplitude modulation scheme; Determining a decoding threshold according to the amplitude of the NFC modulated signal; The baseband signal of the NFC modulated signal is decoded according to the decoding threshold.
2. The method according to claim 1, characterized in that The determining a decoding threshold according to the amplitude of the NFC modulation signal includes: In the process of detecting the frame header according to the first decoding threshold, if the frame header is not detected, updating the first decoding threshold according to the amplitude of the NFC modulated signal, so as to continue detecting the frame header based on the updated first decoding threshold; and / or In the process of decoding the intra-frame data according to the second decoding threshold, the second decoding threshold is updated according to the amplitude of the NFC modulation signal, so as to continue decoding the intra-frame data based on the updated second decoding threshold.
3. The method according to claim 2, characterized in that The step of determining a decoding threshold according to the amplitude of the NFC modulation signal further includes: If the frame header is detected, the second decoding threshold is initialized based on the first decoding threshold when the frame header is detected, so as to start decoding the intra-frame data based on the initialized second decoding threshold.
4. The method according to claim 2, characterized in that The updating the first decoding threshold according to the amplitude of the NFC modulation signal includes: Measuring the carrier amplitude of the NFC modulated signal at preset time intervals; For each measured carrier amplitude: estimate the baseband amplitude based on the carrier amplitude and the modulation coefficient, and update the first decoding threshold based on the estimated baseband amplitude.
5. The method according to claim 4, characterized in that Also includes: For each measured carrier amplitude, compare the carrier amplitude with the current first decoding threshold to obtain a change in the carrier amplitude; When the change amount is greater than a preset threshold, a baseband amplitude is estimated based on the carrier amplitude and the modulation coefficient, and the first decoding threshold is updated based on the estimated baseband amplitude.
6. The method according to claim 2, characterized in that Updating the second decoding threshold according to the amplitude of the NFC modulation signal includes: Detecting a preset feature of a baseband signal of the NFC modulated signal, wherein the predicted feature includes a rising edge or a gap; Whenever the preset feature is detected, delay for a preset time period; After a preset delay time, measuring the carrier amplitude or baseband amplitude of the NFC modulated signal; The second decoding threshold is updated based on the carrier amplitude or the baseband amplitude.
7. The method according to claim 6, characterized in that The updating the second decoding threshold based on the carrier amplitude comprises: estimating a baseband amplitude based on the carrier amplitude and the modulation coefficient; The second decoding threshold is updated based on the estimated baseband amplitude.
8. The method according to claim 2, characterized in that Updating the first decoding threshold based on the baseband amplitude includes: reducing the baseband amplitude based on a first proportionality coefficient to obtain the first decoding threshold; Updating the second decoding threshold based on the baseband amplitude includes: reducing the baseband amplitude based on a second proportional coefficient to obtain the second decoding threshold; The first proportionality factor is the same as or different from the second proportionality factor.
9. A near field communication (NFC) device, characterized in that: include: A contactless interface, used to receive an NFC modulated signal, where the NFC modulated signal is modulated based on an amplitude modulation scheme; A decoding module is used to determine a decoding threshold according to the amplitude of the NFC modulated signal, and decode a baseband signal of the NFC modulated signal according to the decoding threshold.
10. The device according to claim 9, characterized in that The decoding module is further used for: In the process of detecting the frame header according to the first decoding threshold, if the frame header is not detected, updating the first decoding threshold according to the amplitude of the NFC modulated signal, so as to continue detecting the frame header based on the updated first decoding threshold; and / or In the process of decoding the intra-frame data according to the second decoding threshold, the second decoding threshold is updated according to the amplitude of the NFC modulation signal, so as to continue decoding the intra-frame data based on the updated second decoding threshold.
11. The device according to claim 10, characterized in that The decoding module is further configured to: if a frame header is detected, initialize the second decoding threshold based on the first decoding threshold when the frame header is detected, so as to start decoding the intra-frame data based on the initialized second decoding threshold.
12. The device according to claim 11, characterized in that The decoding module is further used for: Measuring the carrier amplitude of the NFC modulated signal at preset time intervals; For each measured carrier amplitude: estimate the baseband amplitude based on the carrier amplitude and the modulation coefficient, and update the first decoding threshold based on the estimated baseband amplitude.
13. The device according to claim 12, characterized in that The decoding module is further used for: For each measured carrier amplitude, compare the carrier amplitude with the current first decoding threshold to obtain a change in the carrier amplitude; When the change amount is greater than a preset threshold, a baseband amplitude is estimated based on the carrier amplitude and the modulation coefficient, and the first decoding threshold is updated based on the estimated baseband amplitude.
14. The device according to claim 10, characterized in that The decoding module is further used for: Detecting a preset feature of a baseband signal of the NFC modulated signal, wherein the predicted feature includes a rising edge or a gap; Whenever the preset feature is detected, delay for a preset time period; After a preset delay time, measuring the carrier amplitude or baseband amplitude of the NFC modulated signal; The second decoding threshold is updated based on the carrier amplitude or the baseband amplitude.
15. The device according to claim 14, characterized in that The decoding module is further used for: estimating a baseband amplitude based on the carrier amplitude and the modulation coefficient; The second decoding threshold is updated based on the estimated baseband amplitude.
16. The device according to claim 10, characterized in that The decoding module is further used for: In the frame header detection process, reducing the baseband amplitude based on a first proportionality coefficient to obtain the first decoding threshold; In the intra-frame decoding process, reducing the baseband amplitude based on a second proportional coefficient to obtain the second decoding threshold; The first proportionality factor is the same as or different from the second proportionality factor.
17. A near field communication (NFC) chip, characterized in that: The near field communication device comprises any one of claims 9 to 16.
18. An electronic device, characterized in that: The device comprises a device body and a near field communication device as described in any one of claims 9 to 16 or a near field communication chip as described in claim 17, which is arranged on the device body.
Citation Information
Cited By
Near field communication decoding optimization method, system and device and medium
CN120825190A