Control method and related device based on ultra-wideband ranging
By determining the stable state of the crystal oscillator before UWB distance measurement, the accuracy reduction problem caused by the instability of the crystal oscillator in UWB distance measurement technology is solved, and higher distance measurement accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202010947346.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-10
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-09-10
AI Technical Summary
The existing UWB ranging technology is easily affected by external factors when the crystal oscillator is unstable, resulting in a decrease in the ranging accuracy, and the stability time of different crystal oscillators is inconsistent, which affects the ranging results.
By calling the built-in clock detection algorithm in memory before UWB distance measurement, obtaining the clock data of the crystal oscillator, determining its working state, and starting ranging in a stable state, avoiding ranging in unstable situations.
Improve the accuracy of UWB ranging, ensure the accuracy and reliability of ranging results, and reduce the risk of impact due to the stability of the crystal oscillator.
Smart Images

Figure CN114167396B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a control method and related device based on ultra-wideband ranging. Background Art
[0002] With the development of technology, indoor ranging technology has also developed more and more perfect. Ultra Wide Band (UWB) technology is a wireless carrier communication technology. It does not use a sinusoidal carrier, but uses nanosecond non-sinusoidal narrow pulses to transmit data, so it occupies a wide spectrum range. At present, UWB technology can be used for indoor ranging, but at the beginning of the current UWB technology, the crystal oscillator needs a certain time from startup to stability, generally hundreds of milliseconds or even one second before it can stabilize. Since the power consumption of UWB ranging is very low, it generally enters a dormant state after the ranging is completed. Therefore, the relevant modules will constantly switch back and forth between the working mode and the dormant mode. The existing means is to delay a certain time after entering the working mode each time before ranging, but the stability time of different crystal oscillators is not necessarily the same, and it is easily affected by external factors such as temperature and voltage, resulting in UWB ranging. The influence of the crystal oscillator leads to reduced accuracy. Summary of the invention
[0003] Based on the above problems, the present application proposes a control method and related devices based on ultra-wideband ranging, which can automatically determine the state of the crystal oscillator before UWB ranging to determine the time to start UWB ranging, greatly improving the ranging accuracy.
[0004] In a first aspect, an embodiment of the present application provides a control method based on ultra-wideband ranging, the method is applied to a control system based on ultra-wideband ranging, the system includes an ultra-wideband chip, a processor, a crystal oscillator, and a memory, the ultra-wideband chip includes an ultra-wideband protocol unit, an ultra-wideband radio frequency transceiver unit, the ultra-wideband chip is respectively connected to the processor and the crystal oscillator, the processor is also connected to the memory, the method includes:
[0005] The processor calls the clock detection algorithm built into the memory to obtain clock data of the crystal oscillator;
[0006] The processor determines the working state of the crystal oscillator according to the clock data, wherein the working state includes a stable state;
[0007] In the stable state, the processor sends a first notification message to the ultra-wideband protocol unit, where the first notification message is used to enable the ultra-wideband protocol unit to control the ultra-wideband radio frequency transceiver unit to transmit and receive signals.
[0008] In a second aspect, an embodiment of the present application provides a control system based on ultra-wideband ranging, the system is applied to an electronic device, the system includes an ultra-wideband chip, a processor, a crystal oscillator, and a memory, the ultra-wideband chip includes an ultra-wideband protocol unit, an ultra-wideband radio frequency transceiver unit, and the ultra-wideband chip is connected to the processor and the crystal oscillator respectively, the processor is also connected to the memory, and the processor is used to call the clock detection algorithm built into the memory to perform the following operations, the operations include:
[0009] Acquiring clock data of the crystal oscillator;
[0010] Determine the working state of the crystal oscillator according to the clock data, wherein the working state includes a stable state;
[0011] In the stable state, a first notification message is sent to the ultra-wideband protocol unit, where the first notification message is used to enable the ultra-wideband protocol unit to control the ultra-wideband radio frequency transceiver unit to transmit and receive signals.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of any method in the first aspect of the embodiment of the present application.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.
[0014] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product may be a software installation package.
[0015] It can be seen that in the embodiment of the present application, first, the processor calls the clock detection algorithm built into the memory to obtain the clock data of the crystal oscillator; the processor determines the working state of the crystal oscillator according to the clock data, and the working state includes a stable state; in the stable state, the processor sends a first notification message to the ultra-wideband protocol unit, and the first notification message is used to enable the ultra-wideband protocol unit to control the ultra-wideband radio frequency transceiver unit to transmit and receive signals. The state of the crystal oscillator can be automatically determined before UWB ranging to determine the time to start UWB ranging, which greatly improves the ranging accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0017] Figure 1 A schematic diagram of the architecture of a control system based on ultra-wideband ranging provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of functional units of a control system based on ultra-wideband ranging provided in an embodiment of the present application;
[0019] Figure 3 A flow chart of a control method based on ultra-wideband ranging provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of frequency variation of a crystal oscillator provided in an embodiment of the present application;
[0021] Figure 5 A flowchart of another control method based on ultra-wideband ranging provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution 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, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0025] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0026] In order to better understand the solution of the embodiment of the present application, the following first introduces the relevant terms and concepts that may be involved in the embodiment of the present application, and the principle of UWB ranging is explained below:
[0027] Two Way-Time of Flight (TW-TOF), for example, each UWB module generates an independent timestamp from the start. The transmitter of UWB module A transmits a pulse signal of request nature at Ta1 on its timestamp, and UWB module B transmits a response signal at Tb2, which is received by UWB module A at its own timestamp Ta2. From this, the flight time of the pulse signal between the two UWB modules can be calculated, thereby determining the flight distance S, S = C x [(Ta2-Ta1)-(Tb2-Tb1)] (C is the speed of light).
[0028] The TOF ranging method belongs to the two-way ranging technology (Two Way Ranging, TWR), which mainly uses the flight time of the signal between two asynchronous transceivers (Transceiver) to measure the distance between nodes. Because in the line-of-sight environment, the TOF ranging method is linearly related to the distance, so the result will be more accurate. We mark the time between the data packet sent by the sender and the received response as TTOT, and the time interval between the receiving end receiving the data packet and sending the response as TTAT. Then the one-way flight time TTOF of the data packet in the air can be calculated as: TTOF = (TTOT-TTAT) / 2, and then the distance between the two points D = C x TTOF can be calculated based on the result of TTOF and the electromagnetic wave propagation speed. The UWB ranging method will not be repeated here.
[0029] Combine the following Figure 1 The control system based on ultra-wideband ranging in the embodiment of the present application is described. Figure 1 The schematic diagram of the architecture of a control system based on ultra-wideband ranging provided in an embodiment of the present application, wherein the control system 100 includes an ultra-wideband chip 110, a processor 120, a crystal oscillator 130, and a memory 140, wherein the ultra-wideband chip 110 includes an ultra-wideband protocol unit 111, an ultra-wideband radio frequency transceiver unit 112, and the ultra-wideband chip 110 is connected to the processor 120 and the crystal oscillator 130, respectively, and the processor 120 is also connected to the memory 140, wherein the ultra-wideband protocol unit 110 is connected to the ultra-wideband radio frequency transceiver unit 112, and the ultra-wideband protocol unit 110 can be a microcontroller unit (Microcontroller Unit, MCU), used to control the ultra-wideband radio frequency unit 112 to send and receive signals. The ultra-wideband radio frequency transceiver unit 112 may be a radio frequency transceiver, used to transmit and receive signals, and may also be used to receive a clock signal of the crystal oscillator 130 and transmit it to the processor 120. The processor 120 may call a clock detection algorithm from the memory 140 to process the received clock signal of the crystal oscillator 130, and control whether the ultra-wideband protocol unit 111 sends relevant instructions, and the relevant instructions include instructing the ultra-wideband radio frequency transceiver unit 112 to transmit and receive signals, that is, to start ranging.
[0030] Combine the following Figure 2 The functional units of a control system in an embodiment of the present application are described. Figure 2 The present invention is a functional unit schematic diagram of a control system based on ultra-wideband ranging in an embodiment of the present application, specifically including a UWB protocol control unit 210, a UWB RF transceiver unit 220, a crystal unit 230, and a clock detection unit 240, wherein the UWB protocol control unit 210 is respectively connected to the UWB RF transceiver unit 220 and the clock detection unit 240, and the UWB RF transceiver unit 220 is respectively connected to the crystal unit 230 and the clock detection unit 240, specifically, the UWB RF transceiver unit 220 can obtain the clock signal of the crystal unit 230 and send the clock signal to the clock detection unit 240, and the clock detection unit 240 can analyze the obtained clock signal to determine whether the working state of the crystal unit 230 is stable, and then send relevant notification messages to the UWB protocol control unit 210 based on the working state of the crystal unit 230.
[0031] Through the above system architecture, it is possible to automatically determine the state of the crystal oscillator before UWB ranging to determine the time to start UWB ranging, avoid ranging when the crystal oscillator is unstable, and greatly improve the ranging accuracy.
[0032] Combine the following Figure 3 A control method based on ultra-wideband in an embodiment of the present application is described. The method is applied to a control system based on ultra-wideband ranging. The system includes an ultra-wideband chip, a processor, a crystal oscillator, and a memory. The ultra-wideband chip includes an ultra-wideband protocol unit, an ultra-wideband radio frequency transceiver unit, and the ultra-wideband chip is connected to the processor and the crystal oscillator respectively. The processor is also connected to the memory. Figure 3 A flow chart of a control method based on ultra-wideband provided in an embodiment of the present application specifically includes the following steps:
[0033] Step 301: The processor calls the clock detection algorithm built into the memory to obtain clock data of the crystal oscillator.
[0034] Among them, the memory has a built-in relevant clock detection algorithm, which can be used to obtain the clock data of the crystal oscillator and perform analysis and processing. Specifically, the processor can receive the clock data of the above-mentioned crystal oscillator within a preset period sent by the ultra-wideband RF transceiver unit. The above-mentioned clock data is the clock signal. It can be understood that the above-mentioned clock data is the clock signal of the crystal oscillator within a time period.
[0035] Among them, when the above-mentioned ultra-wideband RF transceiver unit is in a restart state, the clock signal of the above-mentioned crystal oscillator will be obtained within the above-mentioned preset period, and the above-mentioned restart state may include any one of starting, re-powering on, resetting, and restarting. It can be understood that as long as the above-mentioned ultra-wideband RF transceiver unit is changed from a sleep state to a working state, it can be called a restart state, and the restart state of the above-mentioned ultra-wideband RF transceiver unit is triggered by the ultra-wideband protocol control unit.
[0036] It can be seen that by the processor calling the built-in clock detection algorithm of the memory to obtain the clock data of the crystal oscillator, the UWB module can be prevented from performing ranging when it is just woken up, thereby avoiding low ranging accuracy due to the instability of the crystal oscillator.
[0037] Step 302: The processor determines the operating state of the crystal oscillator according to the clock data.
[0038] The working state includes a stable state, which means that the frequency of the crystal oscillator is close to the nominal frequency.
[0039] Specifically, the processor can calculate the frequency data of the crystal oscillator in a preset period according to the clock data, and the preset period can be divided into multiple first sampling periods and multiple second sampling periods. The processor calculates the frequency value of the crystal oscillator once every first sampling period, and calculates the maximum frequency and the minimum frequency in the current second sampling period once every second sampling period. The duration of the second sampling period is an integer multiple of the first sampling period. For example, Figure 4 As shown, Figure 4 A frequency change schematic diagram of a crystal oscillator provided in an embodiment of the present application shows that the preset period is composed of four second sampling periods △t2, and each second sampling period △t2 is composed of four first sampling periods △t1. The processor calculates the frequency of the crystal oscillator once every △t1, and determines the maximum frequency fmax_k and the minimum frequency fmin_k of each △t2, and obtains the ratio △fk / f0 between the frequency difference data △fk of the maximum frequency fmax_k and the minimum frequency fmin_k and the nominal frequency f0. The nominal frequency f0 is configured to the memory by the ultra-wideband protocol control unit, indicating the frequency of the normal operation of the crystal oscillator.
[0040] When Δfk / f0 is less than a preset threshold, the processor determines that the crystal oscillator is in the stable state;
[0041] When the Δfk / f0 is greater than or equal to the preset threshold, the processor determines that the crystal oscillator is in an unstable state.
[0042] The above-mentioned preset threshold is also pre-configured by the ultra-wideband protocol control unit and is not specifically limited here. It should be noted that: Figure 4 In the case where △fk / f0 is determined to be less than the preset threshold in the fourth second sampling cycle △t2, if △fk / f0 is determined to be less than the preset threshold in the first second sampling cycle △t2, it can be directly determined that the crystal oscillator is in a stable state without waiting for the preset cycle to expire.
[0043] It can be seen that by determining the working state of the crystal oscillator according to the clock data by the processor, whether the crystal oscillator is stable can be determined before UWB ranging, thereby preventing direct ranging when the crystal oscillator is unstable, resulting in low accuracy.
[0044] Step 303: In the stable state, the processor sends a first notification message to the ultra-wideband protocol unit.
[0045] The first notification message is used to enable the ultra-wideband protocol unit to control the ultra-wideband radio frequency transceiver unit to transmit and receive signals, that is, to start ranging, and the UWB ranging process is not described in detail here.
[0046] Through the above method, the state of the crystal oscillator can be automatically determined before UWB ranging to determine the time to start UWB ranging, which greatly improves the ranging accuracy.
[0047] Combine the following Figure 5 Another control method based on ultra-wideband ranging in an embodiment of the present application is described. The method is applied to a control system based on ultra-wideband ranging. The system includes an ultra-wideband chip, a processor, a crystal oscillator, and a memory. The ultra-wideband chip includes an ultra-wideband protocol unit, an ultra-wideband radio frequency transceiver unit, and the ultra-wideband chip is connected to the processor and the crystal oscillator respectively. The processor is also connected to the memory. Figure 5 A flow chart of another control method based on ultra-wideband ranging provided in an embodiment of the present application specifically includes the following steps:
[0048] Step 501: The processor calls the clock detection algorithm built into the memory to obtain clock data of the crystal oscillator.
[0049] Step 502: The processor determines the operating state of the crystal oscillator according to the clock data.
[0050] Wherein, the working state includes an unstable state.
[0051] Step 503: In the unstable state, the processor continues to receive clock data of the crystal oscillator within a maximum sampling period and determines the working state of the crystal oscillator according to the clock data.
[0052] The maximum sampling period means the preset period, that is, the processor continues to receive the clock signal of the crystal oscillator sent by the ultra-wideband RF transceiver unit within the preset period. Figure 4 The example in the following is used to illustrate the
[0053] It can be seen that the preset period is composed of four second sampling periods △t2, and each second sampling period △t2 is composed of four first sampling periods △t1. The processor calculates the frequency of the crystal oscillator every △t1, and determines the maximum frequency fmax_k and the minimum frequency fmin_k of each △t2, and obtains the ratio △fk / f0 between the frequency difference data △fk of the above maximum frequency fmax_k and the above minimum frequency fmin_k and the nominal frequency f0. The above nominal frequency f0 is configured to the above memory by the ultra-wideband protocol control unit, indicating the frequency of the normal operation of the above crystal oscillator. In the first △t2, △fk / f0 is greater than or equal to the preset threshold value. The processor determines that the crystal oscillator is in an unstable state, and it is still in the period of the maximum sampling period at this time, so it continues to calculate the second △t2, the third △t2 and the fourth △t2. △fk / f0 in the fourth △t2 is less than the preset threshold value. The subsequent processing steps can be referred to. Figure 3 The description in will not be repeated here. Another possible situation is given here, that is, △fk / f0 in the fourth △t2 is still greater than or equal to the preset threshold. The processing steps at this time refer to step 504.
[0054] It can be seen that in the unstable state, the processor continues to receive the clock data of the crystal oscillator within the maximum sampling period and determines the working state of the crystal oscillator according to the clock data, which can prevent the UWB module from performing ranging immediately when it is just awakened.
[0055] Step 504: If the working state is still the unstable state when the maximum sampling period is exceeded, the processor sends a second notification message to the ultra-wideband protocol unit.
[0056] Among them, the second notification message indicates that the crystal oscillator is in a fault, which prevents the processor from continuously detecting the crystal oscillator and reminds the user to repair the UWB module in time, thereby greatly improving the user experience.
[0057] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0058] The embodiment of the present application can divide the electronic device into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0059] Combine the following Figure 6 An electronic device in an embodiment of the present application is described in detail. Figure 6 A structural diagram of an electronic device provided for an embodiment of the present application includes a processor 610, a memory 620, a communication interface 630, and one or more programs 621, wherein the one or more programs 621 are stored in the above-mentioned memory 620 and are configured to be executed by the above-mentioned processor 610, and the one or more programs 621 include instructions for executing any step in the above-mentioned method embodiment. The electronic device 600 includes a control system based on ultra-wideband ranging, and the system includes an ultra-wideband chip, a processor, a crystal oscillator, and a memory. The ultra-wideband chip includes an ultra-wideband protocol unit, an ultra-wideband radio frequency transceiver unit, and the ultra-wideband chip is connected to the processor and the crystal oscillator respectively. The processor is also connected to the memory.
[0060] In a possible embodiment, the program 621 includes instructions for executing the following steps:
[0061] Acquiring clock data of the crystal oscillator;
[0062] Determine the working state of the crystal oscillator according to the clock data, wherein the working state includes a stable state;
[0063] In the stable state, a first notification message is sent to the ultra-wideband protocol unit, where the first notification message is used to enable the ultra-wideband protocol unit to control the ultra-wideband radio frequency transceiver unit to transmit and receive signals.
[0064] It can be seen that, first, the processor calls the clock detection algorithm built into the memory to obtain the clock data of the crystal oscillator; the processor determines the working state of the crystal oscillator according to the clock data, and the working state includes a stable state; in the stable state, the processor sends a first notification message to the ultra-wideband protocol unit, and the first notification message is used to enable the ultra-wideband protocol unit to control the ultra-wideband radio frequency transceiver unit to transmit and receive signals. The state of the crystal oscillator can be automatically determined before UWB ranging to determine the time to start UWB ranging, which greatly improves the ranging accuracy.
[0065] In an optional embodiment, in terms of calling the clock detection algorithm built into the memory to obtain the clock data of the crystal oscillator, the instructions in the program 621 are specifically used to perform the following operations:
[0066] The clock data of the crystal oscillator within a preset period sent by the ultra-wideband radio frequency transceiver unit is received, wherein the clock data includes a clock signal.
[0067] In an optional embodiment, in terms of determining the working state of the crystal oscillator according to the clock data, the instructions in the program 621 are specifically used to perform the following operations:
[0068] Calculate the frequency data of the crystal oscillator in the preset period according to the clock data;
[0069] The processor determines the operating state of the crystal oscillator according to the frequency data.
[0070] In an optional embodiment, the preset period consists of a first sampling period and a second sampling period, the second sampling period is an integer multiple of the first sampling period; the frequency data includes a maximum frequency and a minimum frequency; in terms of calculating the frequency data of the crystal oscillator in the preset period according to the clock data, the instructions in the program 621 are specifically used to perform the following operations:
[0071] The processor calculates the frequency value of the crystal oscillator in each first sampling period according to the clock data;
[0072] The processor determines the maximum frequency and the minimum frequency according to a frequency value of each first sampling period within the second sampling period.
[0073] In an optional embodiment, in terms of determining the working state of the crystal oscillator according to the frequency data, the instructions in the program 621 are specifically used to perform the following operations:
[0074] Acquire a ratio between the frequency difference data of the maximum frequency and the minimum frequency and a nominal frequency, wherein the nominal frequency is configured by the ultra-wideband protocol control unit to the memory and represents a frequency at which the crystal oscillator operates normally;
[0075] When the ratio is less than the preset threshold, the processor determines that the crystal oscillator is in the stable state;
[0076] When the ratio is greater than or equal to the preset threshold, the processor determines that the crystal oscillator is in an unstable state.
[0077] In an optional embodiment, the working state includes an unstable state; after determining the working state of the crystal oscillator according to the clock data, the instructions in the program 621 are further used to perform the following operations:
[0078] In the unstable state, the processor continues to receive clock data of the crystal oscillator within a maximum sampling period and determines the working state of the crystal oscillator according to the clock data;
[0079] If the working state is still the unstable state when the maximum sampling period is exceeded, the processor sends a second notification message to the ultra-wideband protocol unit, where the second notification message indicates that the crystal oscillator is in failure.
[0080] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.
[0081] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.
[0082] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0083] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0084] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0085] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0086] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0087] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0088] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0089] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A control method based on ultra-wideband ranging, characterized in that: The method is applied to a control system based on ultra-wideband ranging, the system comprising an ultra-wideband chip, a processor, a crystal oscillator, and a memory, the ultra-wideband chip comprising an ultra-wideband protocol unit and an ultra-wideband radio frequency transceiver unit, the ultra-wideband chip being connected to the processor and the crystal oscillator respectively, the processor being also connected to the memory, the method comprising: The processor calls the clock detection algorithm built into the memory to obtain clock data of the crystal oscillator; The processor determines the working state of the crystal oscillator according to the clock data, wherein the working state includes an unstable state; In the unstable state, the processor continues to receive clock data of the crystal oscillator within a maximum sampling period and determines the working state of the crystal oscillator according to the clock data; If the working state is still the unstable state when the maximum sampling period is exceeded, the processor sends a second notification message to the ultra-wideband protocol unit, where the second notification message indicates that the crystal oscillator is in failure.
2. The method according to claim 1, characterized in that The working state includes a stable state; after the processor determines the working state of the crystal oscillator according to the clock data, the method further includes: In the stable state, the processor sends a first notification message to the ultra-wideband protocol unit, where the first notification message is used to enable the ultra-wideband protocol unit to control the ultra-wideband radio frequency transceiver unit to transmit and receive signals.
3. The method according to claim 1, characterized in that The processor calls the clock detection algorithm built into the memory to obtain the clock data of the crystal oscillator; including: The processor receives clock data of the crystal oscillator within a preset period sent by the ultra-wideband radio frequency transceiver unit, where the clock data includes a clock signal.
4. The method according to claim 3, characterized in that The processor determines the working state of the crystal oscillator according to the clock data, including: The processor calculates frequency data of the crystal oscillator in the preset period according to the clock data; The processor determines the operating state of the crystal oscillator according to the frequency data.
5. The method according to claim 4, characterized in that The preset period is composed of a first sampling period and a second sampling period, and the second sampling period is an integer multiple of the first sampling period; the frequency data includes a maximum frequency and a minimum frequency; The processor calculates frequency data of the crystal oscillator in the preset period according to the clock data, including: The processor calculates the frequency value of the crystal oscillator in each first sampling period according to the clock data; The processor determines the maximum frequency and the minimum frequency according to a frequency value of each first sampling period within the second sampling period.
6. The method according to claim 5, characterized in that The processor determines the working state of the crystal oscillator according to the frequency data, including: The processor obtains a ratio between the frequency difference data between the maximum frequency and the minimum frequency and a nominal frequency, wherein the nominal frequency is configured to the memory by the ultra-wideband protocol unit and represents a frequency at which the crystal oscillator operates normally; When the ratio is less than a preset threshold, the processor determines that the crystal oscillator is in the stable state; When the ratio is greater than or equal to the preset threshold, the processor determines that the crystal oscillator is in the unstable state.
7. The method according to any one of claims 1 to 6, characterized in that: Before the processor obtains the clock data of the crystal oscillator, the ultra-wideband radio frequency transceiver unit is in a restart state, and the restart state includes any one of power-on, reset, restart, and start.
8. A control system based on ultra-wideband ranging, characterized in that: The system is applied to electronic equipment, and the system includes an ultra-wideband chip, a processor, a crystal oscillator, and a memory. The ultra-wideband chip includes an ultra-wideband protocol unit and an ultra-wideband radio frequency transceiver unit. The ultra-wideband chip is connected to the processor and the crystal oscillator respectively. The processor is also connected to the memory. The processor is used to call the clock detection algorithm built into the memory to perform the following operations, and the operations include: Acquiring clock data of the crystal oscillator; Determine the working state of the crystal oscillator according to the clock data, wherein the working state includes an unstable state; In the unstable state, the processor continues to receive clock data of the crystal oscillator within a maximum sampling period and determines the working state of the crystal oscillator according to the clock data; If the working state is still the unstable state when the maximum sampling period is exceeded, the processor sends a second notification message to the ultra-wideband protocol unit, where the second notification message indicates that the crystal oscillator is in failure.
9. An electronic device, characterized in that: The method comprises an application processor, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the application processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method according to any one of claims 1 to 7.
