WO2020259544A1 - 一种确定校准参数的方法及电子设备 - Google Patents

一种确定校准参数的方法及电子设备 Download PDF

Info

Publication number
WO2020259544A1
WO2020259544A1 PCT/CN2020/097951 CN2020097951W WO2020259544A1 WO 2020259544 A1 WO2020259544 A1 WO 2020259544A1 CN 2020097951 W CN2020097951 W CN 2020097951W WO 2020259544 A1 WO2020259544 A1 WO 2020259544A1
Authority
WO
WIPO (PCT)
Prior art keywords
measurement data
accelerometer
electronic device
axis
calibration
Prior art date
Application number
PCT/CN2020/097951
Other languages
English (en)
French (fr)
Inventor
单双
陆枭
朱应成
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2020259544A1 publication Critical patent/WO2020259544A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
    • G01C25/005Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass initial alignment, calibration or starting-up of inertial devices
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass

Definitions

  • This application relates to the field of terminal equipment, and in particular to a method for determining calibration parameters and electronic equipment.
  • An inertial measurement unit is a device that measures the three-axis attitude angle (or angular velocity) and acceleration of an object.
  • the gyroscope and accelerometer are the main components of the IMU, and their accuracy directly affects the accuracy of the inertial system.
  • Dead reckoning, motion state recognition, and other technologies related to user motion are widely used in mobile devices. The implementation effects of these technologies all depend on the accuracy of the output signals of the gyroscope and accelerometer.
  • the main factors affecting the accuracy of their output signals include: the zero point of each axis drifts with time, the zero point of each axis drifts with temperature, and the sensitivity coefficient of each axis drifts with temperature. And random noise caused by the vibration of other components on the same circuit board as the gyroscope or accelerometer.
  • the prior art provides a method for determining calibration parameters.
  • This method uses least squares and iterative solution methods to transform the measured data of the accelerometer in a static state , Get the scale factor and zero offset of the accelerometer, and use the scale factor and zero offset of the accelerometer to calibrate the measurement data of the accelerometer.
  • accelerometers and gyroscopes are devices with high sensitivity, even if the zero point calibration and temperature compensation of each axis of the accelerometer are performed, the influence of random noise caused by the vibration of other components cannot be ignored. No effective solution is given, resulting in low accuracy of data measured by accelerometer and gyroscope.
  • the present application provides a method and electronic equipment for determining calibration parameters, which are used to generate calibration parameters so as to accurately calibrate the measurement data collected by the IMU, so as to reduce the adverse effects of random noise on the IMU and improve the measurement accuracy of the IMU.
  • an embodiment of the present application provides a method for determining calibration parameters.
  • the method is applicable to an electronic device.
  • the method includes: the electronic device first obtains first raw measurement data collected by an IMU, and the first raw measurement data is the electronic device It is collected while in a static state, and then the first original measurement data is subjected to fast Fourier transform to obtain the first frequency domain data, and then the first reference frequency domain data below the set threshold is obtained from the first frequency domain data, Inverse fast Fourier transform is performed on the first reference frequency domain data to obtain the first reference measurement data; finally, the calibration parameters of the IMU are determined according to the first reference measurement data.
  • the electronic device uses the above method to accurately calibrate the measurement data collected by the IMU, so as to reduce the adverse effect of random noise on the IMU and improve the measurement accuracy of the IMU.
  • the electronic device also obtains the second original measurement data collected by the IMU, and then performs fast Fourier transform on the second original measurement data to obtain the second frequency domain data; then, from the second frequency domain data Obtain the second reference frequency domain data below the set threshold, and perform inverse fast Fourier transform on the second reference frequency domain data to obtain the second reference measurement data; finally, according to the calibration parameters, perform the second reference measurement data Calibration, get the measured value after calibration.
  • the measurement data collected by the IMU is filtered first, and the calibration parameters are determined by the above method to calibrate the filtered measurement data to improve the measurement accuracy of the IMU.
  • the calibration parameters of the IMU are determined according to the first reference measurement data, which meets the requirements of the following formula:
  • V [V x ,V y ,V z ] is the first reference measurement data of the accelerometer
  • V x is the first reference measurement data on the x-axis of the accelerometer
  • V y is the first reference measurement data on the y-axis of the accelerometer.
  • the scale factor and zero offset of the accelerometer can be determined by using the foregoing method, so as to accurately calibrate the measurement data collected by the accelerometer.
  • the electronic device can calibrate the second reference measurement data according to the scale factor and zero offset of the accelerometer to obtain the measured value after calibration , Meet the following formula requirements:
  • V [V x ,V y ,V z ] is the second reference measurement data of the accelerometer.
  • V x is the second reference measurement data on the x-axis of the accelerometer, and V y is the second reference on the y-axis of the accelerometer.
  • Measurement data, V z is the corresponding second reference measurement data on the z-axis of the accelerometer; Indicates the measured value after calibration, Is the measured value after calibration on the x-axis of the accelerometer, Is the measured value after calibration on the y-axis of the accelerometer, It is the measured value after calibration on the z-axis of the accelerometer.
  • the electronic device uses the above method to determine the calibration parameters to calibrate the filtered measurement data, so as to improve the measurement accuracy of the IMU.
  • the calibration parameters of the IMU are determined according to the first reference measurement data, which meets the requirements of the following formula:
  • C s is the angular velocity set in the first reference frequency domain data
  • N is the number of angular velocities in the angular velocity set
  • W i is the i-th angular velocity value
  • i is from 1 to N
  • O is the zero bias of the gyroscope
  • ⁇ gt is the actual speed of the gyroscope
  • ⁇ x , ⁇ y , and ⁇ z are the first reference measurement data of the x, y, and z axes respectively collected by the gyroscope when the turntable rotates at a constant speed
  • S z , S y and S Z are the scale factors of the gyroscope on the x, y, and z axes, respectively.
  • the scale factor and zero offset of the gyroscope can be determined by using the above-mentioned method, so that the measurement data collected by the gyroscope can be accurately calibrated.
  • the electronic device calibrates the second reference measurement data according to the calibration parameters to obtain the measured value after calibration, which meets the requirements of the following formula:
  • the electronic device uses the above method to determine the calibration parameters to calibrate the filtered measurement data, so as to improve the measurement accuracy of the IMU.
  • an embodiment of the present application provides an electronic device including a processor and a memory.
  • the memory is used to store one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor, the electronic device can implement any one of the possible design methods in any of the foregoing aspects.
  • an embodiment of the present application also provides a device, which includes a module/unit that executes any one of the possible design methods in any of the foregoing aspects.
  • modules/units can be realized by hardware, or by hardware executing corresponding software.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium includes a computer program.
  • the computer program runs on an electronic device, the electronic device executes any of the above aspects. Possible design methods.
  • the embodiments of the present application also provide a method that includes a computer program product, which when the computer program product runs on a terminal, causes an electronic device to execute any possible design in any of the above-mentioned aspects.
  • FIG. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • FIG. 2 is a schematic flowchart of a method for determining calibration parameters according to an embodiment of the application
  • 3a is a schematic diagram of a time-domain waveform of the first original measurement data provided by an embodiment of the application;
  • 3b is a schematic diagram of a frequency domain waveform of the first frequency domain quantity data provided by an embodiment of the application;
  • 3c is a schematic diagram of a time-domain waveform of the first reference measurement data provided by an embodiment of the application.
  • Figure 4 is a schematic diagram of an application scenario provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of another applicable scenario provided by an embodiment of the application.
  • Figure 6 is a schematic diagram of a map construction process provided by an embodiment of the application.
  • FIG. 7 is a schematic structural diagram of another electronic device provided by an embodiment of the application.
  • AR equipment and VR equipment can be mobile phones, sweeping robots, or smart watches, VR glasses, Some wearable devices such as sports bracelets can also be devices such as unmanned vehicles and drones.
  • Mobile phones, wearable devices and other electronic products are basically micro-electro-mechanical system (MEMS) accelerometers and gyroscopes.
  • MEMS is a collection of micro sensors, micro actuators, micro mechanical structures, and micro power supplies. Micro-energy, signal processing and control circuits, high-performance electronic integrated devices, interfaces, and communications are all micro devices or systems.
  • the embodiments of the present application provide a method for determining calibration parameters, and the method may be applicable to the foregoing electronic equipment with IMU.
  • the method mainly includes: the processor of the electronic device first obtains the first original measurement data collected by the IMU in a static state, and then performs fast Fourier transform on it to obtain frequency domain data, and filters the frequency domain data, and then Perform inverse fast Fourier transform on the filtered frequency domain data to obtain first reference measurement data, and determine the calibration parameters of the IMU based on the first reference measurement data.
  • the data is filtered, it can filter out the random noise caused by the vibration of other devices, so that the accuracy of the calibration parameters obtained based on the filtered data is higher, so as to compensate for the error caused by the vibration noise of the sensor , Improve the measurement accuracy of IMU.
  • the method for determining calibration parameters provided in the embodiments of the present application can be applied to any electronic device with an IMU, such as the various AR devices or VR devices described above.
  • the following describes a structure of an electronic device to which the embodiments of the present application can be applied, and the electronic device can be a mobile phone.
  • FIG. 1 shows a schematic diagram of the structure of the electronic device 100.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a USB interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 151, and a wireless communication module 152 , Audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, SIM card interface 195 and so on.
  • a processor 110 an external memory interface 120, an internal memory 121, a USB interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 151, and a wireless communication module 152 , Audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, SIM card
  • the sensor module 180 may include a gyroscope sensor 180A, an acceleration sensor 180B, a magnetic field sensor 180C, an electric field sensor 180D, a pressure sensor 180E, a proximity light sensor 180G, a fingerprint sensor 180H, a touch sensor 180K, and a hinge sensor 180M (of course, the electronic device 100 also Other sensors may be included, such as temperature sensors, distance sensors, ambient light sensors, air pressure sensors, bone conduction sensors, etc. (not shown in the figure).
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (Neural-network Processing Unit, NPU) Wait.
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may run the computer instructions of the method for determining calibration parameters provided in the embodiments of the present application, so as to improve the measurement accuracy of the IMU.
  • the processor 110 integrates different devices, such as a CPU and a GPU, the CPU and GPU can cooperate to execute the instructions of the method for determining calibration parameters provided in the embodiments of the present application.
  • some of the algorithms in the method for determining calibration parameters are executed by the CPU. Part of the algorithm is executed by the GPU to obtain faster processing efficiency.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the camera 193 (a front camera or a rear camera, or a camera can be used as a front camera or a rear camera) is used to capture still images or videos.
  • the camera 193 may include photosensitive elements such as a lens group and an image sensor, where the lens group includes a plurality of lenses (convex lens or concave lens) for collecting light signals reflected by the object to be photographed and transmitting the collected light signals to the image sensor .
  • the image sensor generates the original image of the object to be photographed according to the light signal.
  • the internal memory 121 may be used to store computer executable program code, and the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store operating system, application program (such as camera application, WeChat application, etc.) codes and so on.
  • the data storage area can store data created during the use of the electronic device 100 (for example, images and videos collected by a camera application) and the like.
  • the internal memory 121 may also store the code of the algorithm for determining the calibration parameter provided in the embodiment of the present application.
  • the processor 110 executes time-frequency conversion on the measurement data, filters the converted data, and calculates calibration parameters based on the filtered data.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • the code of the algorithm provided in the embodiment of the present application can also be stored in an external memory.
  • the processor 110 may run the code of the algorithm stored in the external memory through the external memory interface 120 to implement a response to the user's touch operation.
  • the functions of the sensor module 180 are described below.
  • the gyroscope sensor 180A (or simply referred to as a gyroscope) is a main component of the IMU and can be used to determine the movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes ie, x, y, and z axes
  • the acceleration sensor 180B (or accelerometer for short) is the main component of the IMU and can be used to detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). That is, the acceleration sensor 180B can be used to detect the current motion state of the electronic device 100, such as shaking or static.
  • the magnetic field sensor 180C a device in the IMU, can be used to convert various magnetic fields and their changes into electrical signals.
  • the electric field sensor 180D is a device in the IMU, which refers to a sensor that can sense the intensity of an electric field and convert it into a usable output signal.
  • the pressure sensor 180E is a device in the IMU, used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180E may be provided on the display screen 194.
  • the capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180E, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180E.
  • touch operations that act on the same touch location but have different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity of the touch operation is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device emits infrared light through the light-emitting diode.
  • Electronic devices use photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
  • the gyroscope sensor 180A (or acceleration sensor 180B) may send the detected motion state information (such as angular velocity) to the processor 110.
  • the processor 110 determines whether it is currently in a hand-held state or a tripod state based on the motion state information (for example, when the angular velocity is not 0, it means that the electronic device 100 is in the hand-held state).
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application locks, fingerprint photographs, fingerprint answering calls, etc.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • the visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
  • the display screen 194 of the electronic device 100 displays a main interface, and the main interface includes icons of multiple applications (such as a camera application, a WeChat application, etc.).
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 151, the wireless communication module 152, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 151 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 151 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 151 can receive electromagnetic waves by the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 151 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 151 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 151 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 151 or other functional modules.
  • the wireless communication module 152 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 152 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 152 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 152 can also receive the signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic wave radiation through the antenna 2.
  • the electronic device 100 may implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the electronic device 100 may receive a key 190 input, and generate a key signal input related to user settings and function control of the electronic device 100.
  • the electronic device 100 can use the motor 191 to generate a vibration notification (for example, an incoming call vibration notification).
  • the indicator 192 in the electronic device 100 can be an indicator light, which can be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 in the electronic device 100 is used to connect to a SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
  • the electronic device 100 may include more or less components than those shown in FIG. 1, which is not limited in the embodiment of the present application.
  • Fig. 2 shows a flow chart of the method for determining calibration parameters provided by this application. The method includes the following steps:
  • Step 201 When the electronic device is in a stationary state, the processor 110 of the electronic device obtains the first original measurement data collected by the IMU.
  • the IMU in the embodiment of the present application includes at least one of the following sensors: a gyroscope sensor 180A, an acceleration sensor 180B, a magnetic field sensor 180C, an electric field sensor 180D, a pressure sensor 180E, and so on.
  • the processor 110 of the electronic device may trigger each IMU to collect data according to a set period, or may trigger the corresponding IMU to collect data when it detects that the specified function of the electronic device is called.
  • the designated function it may mean that the posture of the electronic device satisfies the condition that it remains unchanged for a set time period.
  • the posture of the electronic device may remain fixed for a certain period of time in scenarios such as the user answering a call, reading a text message, taking a photo to focus, opening a web browser, searching for wireless signals, and a sweeping robot being charged. Therefore, the function corresponding to this type of business can be artificially set in advance as a designated function that can trigger the IMU to collect data.
  • the electronic device may also use other functions that maintain a fixed posture for a certain period of time as the above-mentioned designated function. This application only uses the above-mentioned function as an example for description, and does not constitute a limitation to this application.
  • the electronic device is in a static state can refer to the electronic device being in a completely static state, or the electronic device is in a close but not completely static state, that is, the electronic device is still relatively small.
  • the range of motion can refer to the electronic device being in a completely static state, or the electronic device is in a close but not completely static state, that is, the electronic device is still relatively small. The range of motion.
  • the first original measurement data collected by the accelerometer includes the accelerometer values in the three axes of x, y, and z; when the IMU is a gyroscope, the first original measurement collected by the gyroscope The data includes the angular velocity values of the x, y and z axes.
  • Step 202 The processor 110 performs fast Fourier transform on the first original measurement data to obtain first frequency domain data.
  • the frequency-domain waveform of the first frequency-domain data after the fast Fourier transform is as shown in Fig. 3b. It can be seen from Fig. 3b that the frequency domain waveform is not stable, and there are some sudden changes. The sudden changes are random noises that may be caused by the vibration of other devices.
  • Step 203 The processor 110 obtains first reference frequency domain data lower than a set threshold from the first frequency domain data, and performs inverse fast Fourier transform on the first reference frequency domain data to obtain first reference measurement data.
  • the processor 110 of the electronic device filters out the frequency domain data greater than or equal to the K value in FIG. 3b, and obtains the first reference frequency domain data less than the K value . Further, the processor 110 of the electronic device performs inverse fast Fourier transform on the filtered first reference frequency domain data to obtain the first reference measurement data corresponding to the time domain waveform (dark area 301) as shown in FIG. 3c . It can be seen from Fig. 3c that the waveform of the time-domain waveform after filtering is smooth and has no sudden changes, which means that the random noise caused by the vibration of other devices has been filtered out.
  • the set threshold can be a frequency value determined artificially through the analysis of the frequency spectrum in advance and stored in the internal memory 121.
  • the electronic device can use a software filter unit with the set threshold to filter out the first Random noise in frequency domain data (that is, the above-mentioned sudden change value).
  • Step 204 The processor 110 determines the calibration parameters of the IMU according to the first reference measurement data.
  • the IMU of the electronic device includes an accelerometer
  • the accelerometer of the VR glasses collects accelerometer values in different static states, and then minimizes the difference between actual acceleration and gravitational acceleration Value to get the accelerometer zero offset and scale factor.
  • the accelerometer calibration model formula [1] can be:
  • V x is the first reference measurement data on the x-axis
  • V y is the first reference measurement data on the y-axis
  • the first reference measurement data of, V z is the corresponding first reference measurement data on the z-axis
  • S is the scale factor
  • O is the zero offset
  • A is the expected value of the accelerometer in a static state
  • the calibration model shown in formula 1 can be replaced with a matrix form, as shown in formula [2].
  • V j,k represents the output of the j-axis accelerometer in the k-th static attitude
  • O j represents the zero offset of the j-axis
  • j is x, y, z
  • S xy ,S xz ,S yz represent the influence factor of crosstalk between xy,xz,yz axis
  • e k represents the k-th static state
  • the error term of g is the actual acceleration of gravity.
  • the IMU of the electronic device includes a gyroscope
  • the gyroscope of the VR glasses collects angular velocity values in different static states, and then the processor 110 substitutes the first reference frequency domain data into the following formula [ 5], get the zero offset O of the gyroscope in the gyroscope;
  • C s is the angular velocity set in the reference frequency domain data
  • N is the number of angular velocities in the angular velocity set
  • W i is the i-th angular velocity value
  • i is from 1 to N.
  • the scaling factor S is set as a diagonal matrix. The value on the diagonal is the scale factor of each axis.
  • the processor 110 substitutes the first reference measurement data into the following formula [6] to obtain the scale factor of each axis of the gyroscope;
  • ⁇ gt is the actual speed of the gyroscope
  • ⁇ x , ⁇ y , and ⁇ z are the reference measurement values of the x, y, and z axes collected by the gyroscope when the turntable rotates at a constant speed
  • S x , S y , S Z is the scale factor of the gyroscope on the x, y, z axis.
  • the electronic device determines the calibration parameters of the IMU, it can also use the calibration parameters to directly calibrate the original measurement data collected by the IMU.
  • the electronic device can also use the calibration parameter to calibrate the measurement data filtered in the above step 203.
  • the electronic device may obtain the second original measurement data collected by the IMU, and then perform fast Fourier transform on the second original measurement data to obtain the second frequency domain data, and obtain the second frequency domain data from the second frequency domain data below the set value. Threshold the second reference frequency domain data, and then perform inverse fast Fourier transform on the second reference frequency domain data to obtain the second reference measurement data.
  • the electronic device uses the calibration parameters obtained in step 204 to calibrate the second reference measurement data to obtain the measured value after calibration.
  • the calibration parameters can be determined first, and then the second original measurement data can be collected, or the second original measurement data can be collected first. After measuring the data and determining the calibration parameters, it can also be executed at the same time.
  • the processor 110 can determine the zero offset O and the scale factor S of the accelerometer in the IMU determined in the above formula, and calculate the second value of the accelerometer in the IMU by the following formula [7] Do calibration with reference to the measurement data to get the measured value after calibration.
  • V [V x ,V y ,V z ] is the second reference measurement data of the accelerometer
  • V x is the second reference measurement data on the x-axis
  • V Y is the second reference measurement data on the y-axis
  • Vz is the corresponding second reference measurement data on the z-axis
  • S is the scale factor
  • O is the zero offset
  • the processor 110 can use the following formula [8] to determine the second reference measurement data of the gyroscope according to the zero offset O and the scaling factor S of the gyroscope in the IMU determined in the above formula Do calibration and get the measured value after calibration.
  • this application may determine it through a specific process.
  • the first step is the measurement data screening process.
  • the electronic device triggers the IMU to collect data according to the set period, or triggers the IMU to collect data when the specified function of the electronic device is called. If the IMU includes an accelerometer and the collected data includes the original measurement data of the accelerometer, the electronic device outputs the accelerometer High-pass filtering is performed on the original measurement data of, and the static component of acceleration due to gravity is filtered out of the original measurement data to obtain the dynamic component of acceleration due to motion. In the same way, if the IMU also includes a gyroscope, the original measurement data output by the gyroscope is also subjected to high-pass filtering to obtain the angular velocity dynamic component of the original measurement data of the gyroscope due to motion.
  • the measurement data of the accelerometer or gyroscope after high-pass filtering can also be smoothed, and the available smoothing processing techniques include low-pass filtering, median filtering, and average filtering.
  • the smoothed signals of the acceleration sensor and the gyroscope can be rectified, thereby flipping the negative half-axis part of the signal waveform output by the acceleration sensor and the gyroscope to the positive half-axis.
  • the second step is the measurement data calculation process.
  • the processor 110 of the electronic device calculates the maximum value and the variance value of the measurement data of the accelerometer after the above processing. Similarly, if the IMU also includes a gyroscope, the maximum value and variance value of the measurement data of the gyroscope after the above-mentioned processing are also calculated.
  • the third step is the static state decision process.
  • the electronic device compares the maximum value and variance value of the above-mentioned extracted accelerometer measurement data with the preset maximum value threshold and variance value threshold respectively. If the maximum value of the accelerometer measurement data is not greater than the preset maximum value If it is determined that the variance value of the measurement data of the acceleration sensor 180B is not greater than the preset variance value threshold, it is determined that the electronic device is always in a stationary state.
  • the maximum value and variance value of the measurement data of the gyroscope extracted above should be compared with the preset second maximum value threshold and the second variance value threshold respectively. If the maximum value and variance value of the measurement data of the accelerometer on the electronic device are not greater than the preset first maximum value threshold and the first variance value threshold, respectively, and the maximum value and the variance value of the measurement data of the gyroscope on the electronic device The variance value is not greater than the preset second maximum value threshold and the second variance value threshold respectively, it is determined that the electronic device is always in a stationary state.
  • the electronic device can simultaneously trigger the IMU to collect the original measurement data of the electronic device in a static state through the above method, and save the original measurement data that meets this part to the internal memory 121.
  • the processor 110 of the electronic device can repeat the above steps 201 to 204 to obtain new calibration parameters, and update the new calibration parameters to the internal memory 121 In the parameter pool.
  • the IMU detects whether the parameter pool is updated regularly or in real time during operation. If the parameter pool has calibration parameters updated, the latest updated calibration parameters are extracted from the parameter pool as the new calibration parameters of the IMU, and the new calibration parameters are used for subsequent If the parameter pool is not updated, continue to use the current calibration parameters to calibrate the subsequent measurement data.
  • the method for determining calibration parameters provided by the embodiments of the present application can be applied to the scenario where the electronic device 100 and the VR glasses 200 are interconnected based on connecting lines as shown in FIG. 4.
  • the electronic device 100 projects its own screen display content into the VR glasses 200, and the user watches photos, videos or plays games through the VR glasses 200, and enjoys the experience of a larger screen.
  • the processor of the VR glasses 200 may first collect the original measurement data measured by the IMU when the VR glasses 200 is in a stationary state according to the method shown in step 201 to step 204 shown in FIG.
  • the VR glasses 200 can use the calibration parameters to calibrate the measurement data subsequently collected by the IMU to improve the VR glasses 200 Accelerometer and gyroscope in the measurement accuracy.
  • the embodiments of the present application can also be separately applied to the electronic device 100.
  • the processor 110 of the electronic device first collects the original measurement data collected by the IMU when the mobile phone is in a stationary state, and then filters the data in the electronic device 100 The interference caused by the noise of the motor and other components to the IMU is then based on the filtered data to determine the calibration parameters.
  • the electronic device 100 can use the calibration parameters to calibrate the measurement data collected by the IMU to improve the accelerometer and gyroscope in the electronic device 100. The measurement accuracy of the instrument.
  • the method for determining calibration parameters provided by the embodiment of the present application can also be applied to the cleaning robot 300 that is performing the cleaning operation as shown in FIG. 5.
  • sweeping robots In order to achieve autonomous obstacle avoidance and route planning, sweeping robots began to use machine vision technology.
  • the sweeping robot based on machine vision can acquire images through the camera, and then plan the path and avoid obstacles based on the acquired images and reasonable algorithms.
  • the sweeping robot on the market adopts simultaneous localization and mapping (SLAM) technology, which can observe the space cleaned by the sweeping robot through a camera, and identify the landmark objects and main features in the space cleaned by the sweeping robot, through the principle of triangulation. Draw a map of the room for navigation to confirm the location of the cleaning space, the cleaned area, and the uncleaned area. Due to the poor visual robustness of sweeping robots in scenes such as fast motion and pure rotation, many algorithms incorporating IMU have appeared in recent years to improve the robustness of SLAM algorithms.
  • SLAM simultaneous localization and mapping
  • Figure 6 shows a SLAM algorithm that tracks the positioning process: when there is an image input, the processor of the sweeping robot will extract feature points for it, and get the initial pose of the camera according to the initial frame. Based on the information collected by the IMU of the sweeping robot, the image can be pre-integrated and filtered to obtain the estimated pose. Finally, the processor merges the two poses, initializes the map, and estimates or relocates the initial state. When more images are input, the processor will calculate the frame-to-frame pose to track the local map. At the end of positioning, it will also be judged whether a new key frame has been inserted.
  • Partial mapping process In turn, select key frames, delete invalid map points, and add valid map points to ensure the quality of the map.
  • a beam adjustment (BA) optimization is also performed on the local map.
  • the processor selects candidate pixels between similar image frames, performs similar transformations based on the candidate points, calculates the posture between the frames, merges the entire loop and optimizes the basic image to ensure the accuracy of the navigation path.
  • the method for determining the calibration parameters is applied to the above tracking and positioning process, that is, the calibration parameters are determined in real time, and the data collected by the IMU is calibrated to achieve accurate attitude estimation or relocation of the initial state.
  • the embodiments of the present application disclose an electronic device.
  • the electronic device may include: a touch screen 701, where the touch screen 701 includes a touch panel 707 and a display screen 708
  • One or more processors 702 may be connected by one or more communication buses 706.
  • the one or more computer programs 704 are stored in the aforementioned memory 703 and are configured to be executed by the one or more processors 702, and the one or more computer programs 704 include instructions, and the aforementioned instructions can be used for execution as shown in FIG. 2 Each step in the corresponding embodiment.
  • the embodiment of the present application also provides a computer storage medium, the computer storage medium stores a computer instruction, when the computer instruction runs on an electronic device, the electronic device executes the above related method steps to realize the determination of the calibration parameter in the above embodiment Methods.
  • the embodiments of the present application also provide a computer program product.
  • the computer program product runs on a computer, the computer is caused to execute the above-mentioned related steps to implement the method for determining the calibration parameters in the above-mentioned embodiment.
  • the embodiments of the present application also provide a device.
  • the device may specifically be a chip, component or module.
  • the device may include a connected processor and a memory; wherein the memory is used to store computer execution instructions.
  • the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the method for determining calibration parameters in the foregoing method embodiments.
  • the electronic devices, computer storage media, computer program products, or chips provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding methods provided above. The beneficial effects of the method are not repeated here.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are only illustrative, for example, the division of modules or units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another device, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the 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 readable storage medium.
  • the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of software products, which are stored in a storage medium It includes several instructions to make a device (may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Gyroscopes (AREA)
  • Navigation (AREA)

Abstract

一种确定校准参数的方法及电子设备(100),该方法应用于具有惯性测量单元IMU的电子设备(100),以便于对IMU的测量数据进行精确校准,以减小随机噪声对IMU的不良影响,提高IMU的测量精度,该方法包括:电子设备(100)先获取IMU采集的第一原始测量数据,第一原始测量数据是电子设备(100)处于静止状态时采集的(S201);处理器(110,702)将第一原始测量数据进行快速傅里叶变换,得到第一频域数据(S202);处理器(110,702)从第一频域数据中获取低于设定阈值的第一参考频域数据,并对第一参考频域数据进行快速傅里叶逆变换,得到第一参考测量数据(S203);处理器(110,702)根据第一参考测量数据,确定IMU的校准参数(S204)。

Description

一种确定校准参数的方法及电子设备
本申请要求在2019年6月27日提交中国国家知识产权局、申请号为201910567545.3的中国专利申请的优先权,发明名称为“一种确定校准参数的方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端设备领域,尤其涉及一种确定校准参数的方法及电子设备。
背景技术
惯性测量单元(inertial measurement unit,IMU)是测量物体三轴姿态角(或角速率)以及加速度的装置。陀螺仪及加速度计是IMU的主要元件,其精度直接影响到惯性系统的精度。航位推算、运动状态识别等与用户运动相关的技术在移动设备中被广泛应用,这些技术的实现效果都依赖于陀螺仪及加速度计输出信号的准确性。而对于移动设备上的陀螺仪及加速度计而言,影响其输出信号准确性的主要因素包括:各轴的零点随时间漂移,各轴的零点随温度漂移、各轴的灵敏度系数随温度漂移,以及与陀螺仪或加速度计处于同一块电路板上的其它元器件震动带来的随机噪声。
目前,针对加速度计的各轴的零点随时间或者温度漂移,现有技术提供一种确定校准参数的方法,该方法利用最小二乘、迭代求解的方法对加速度计静止状态下的测量数据做变换,得到加速度计的标度因子和零偏,从而利用加速度计的标度因子和零偏对加速度计的测量数据进行校准。
但是由于加速度计及陀螺仪都属于灵敏度较高的器件,即使对加速度计的各轴的零点标定和温度补偿,其它元器件震动所带来的随机噪声的影响仍无法忽略,而目前现有技术并没有给出有效的解决方式,导致加速度计及与陀螺仪测量的数据精度不高。
发明内容
本申请提供一种确定校准参数的方法及电子设备,用以生成校准参数,以便于对IMU采集的测量数据进行精确校准,以减小随机噪声对IMU的不良影响,提高IMU的测量精度。
第一方面,本申请实施例提供了一种确定校准参数的方法,该方法适用于电子设备,该方法包括:电子设备先获取IMU采集的第一原始测量数据,第一原始测量数据是电子设备处于静止状态时采集的,然后将第一原始测量数据进行快速傅里叶变换,得到第一频域数据,接着从第一频域数据中获取低于设定阈值的第一参考频域数据,并对第一参考频域数据进行快速傅里叶逆变换,得到第一参考测量数据;最终根据第一参考测量数据,确定IMU的校准参数。
本申请实施例中,电子设备利用上述方法对IMU采集的测量数据进行精确校准,以减小随机噪声对IMU的不良影响,提高IMU的测量精度。
在一种可能的设计中,电子设备还获取IMU采集的第二原始测量数据,然后将第二原始测量数据进行快速傅里叶变换,得到第二频域数据;接着,从第二频域数据中获取低于设定阈值的第二参考频域数据,并对第二参考频域数据进行快速傅里叶逆变换,得到第二参考测量数据;最终根据校准参数,对第二参考测量数据做校准,得到校准之后的测量值。
本申请实施例中,先对IMU采集的测量数据进行过滤,利用上述方法确定出来校准参数对过滤之后的测量数据进行校准,以提高IMU的测量精度。
在一种可能的设计中,若IMU包括加速度计,根据第一参考测量数据,确定IMU的校准参数,符合下述公式要求:
A=S(V-O)
其中,V=[V x,V y,V z]为加速度计的第一参考测量数据,V x为加速度计x轴上的第一参考测量数据,V y为加速度计y轴上的第一参考测量数据、V z为加速度计z轴上对应的第一参考测量数据;S为加速度计的标度因子,O为加速度计的零偏,A表示加速度计在静止状态下的期望值,A=[a x,a y,a z] T能满足
Figure PCTCN2020097951-appb-000001
其中g为实际重力加速度值,a x为加速度计x轴上的期望值,a y为加速度计y轴上的期望值,a Z为加速度计z轴上的期望值。
本申请实施例中,利用上述方法可以确定出加速度计的标度因子和零偏,以便于对加速度计采集的测量数据进行精确校准。
在一种可能的设计中,在确定加速度计的标度因子和零偏之后,电子设备可以根据加速度计的标度因子和零偏,对第二参考测量数据做校准,得到校准之后的测量值,符合下述公式要求:
Figure PCTCN2020097951-appb-000002
其中,V=[V x,V y,V z]为加速度计的第二参考测量数据V x为加速度计x轴上的第二参考测量数据,V y为加速度计y轴上的第二参考测量数据、V z为加速度计z轴上对应的第二参考测量数据;
Figure PCTCN2020097951-appb-000003
表示校准之后的测量值,
Figure PCTCN2020097951-appb-000004
为加速度计x轴上校准之后的测量值,
Figure PCTCN2020097951-appb-000005
为加速度计y轴上校准之后的测量值,
Figure PCTCN2020097951-appb-000006
为加速度计z轴上校准之后的测量值。
本申请实施例中,电子设备利用上述方法确定出来校准参数对过滤之后的测量数据进行校准,以提高IMU的测量精度。
在一种可能的设计中,若IMU包括陀螺仪,根据第一参考测量数据,确定IMU的校准参数,符合下述公式要求:
Figure PCTCN2020097951-appb-000007
其中,C s为第一参考频域数据中的角速度集合,N为角速度集合中的角速度个数,W i为第i个角速度值,i从1到N;O为陀螺仪的零偏;
Figure PCTCN2020097951-appb-000008
其中,ω gt是陀螺仪的实际转速,ω xyz分别为陀螺仪在转台匀速旋转的情况下,分别采集的x,y,z轴的第一参考测量数据,S z、S y、S Z为陀螺仪分别在x,y,z轴的标度因子。
本申请实施例中,利用上述方法可以确定出陀螺仪的标度因子和零偏,以便于对陀螺仪计采集的测量数据进行精确校准。
在一种可能的设计中,在确定陀螺仪的标度因子和零偏之后,电子设备根据校准参数,对第二参考测量数据做校准,得到校准之后的测量值,符合下述公式要求:
w=S(W-O)
其中,w=[w x,w y,w z] T为校准后陀螺仪的x,y,z轴的角速度值,S=S x=S y=S z为陀螺仪分别在x,y,z轴的标度因子。
本申请实施例中,电子设备利用上述方法确定出来校准参数对过滤之后的测量数据进行 校准,以提高IMU的测量精度。
第二方面,本申请实施例提供一种电子设备,包括处理器和存储器。其中,存储器用于存储一个或多个计算机程序;当存储器存储的一个或多个计算机程序被处理器执行时,使得该电子设备能够实现上述任一方面的任意一种可能的设计的方法。
第三方面,本申请实施例还提供一种装置,该装置包括执行上述任一方面的任意一种可能的设计的方法的模块/单元。这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第四方面,本申请实施例中还提供一种计算机可读存储介质,计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得电子设备执行上述任一方面的任意一种可能的设计的方法。
第五方面,本申请实施例还提供一种包含计算机程序产品,当计算机程序产品在终端上运行时,使得电子设备执行上述任一方面的任意一种可能的设计的方法。
本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。
附图说明
图1为本申请实施例提供的一种电子设备的结构示意图;
图2为本申请实施例提供的一种确定校准参数的方法流程示意图;
图3a为本申请实施例提供的第一原始测量数据的时域波形示意图;
图3b为本申请实施例提供的第一频域量数据的频域波形示意图;
图3c为本申请实施例提供的第一参考测量数据的时域波形示意图;
图4为本申请实施例提供的一种适用场景示意图;
图5为本申请实施例提供的另一种适用场景示意图;
图6为本申请实施例提供的一种地图构建流程示意图;
图7为本申请实施例提供的另一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
目前IMU在增强现实(augmented reality,AR)、虚拟现实(virtual reality,VR)、自动化等领域得到了非常广泛的应用,AR设备和VR设备可以是手机,扫地机器人、或智能手表、VR眼镜、运动手环等一些可穿戴设备,还可以是无人驾驶汽车、无人机等设备。手机、可穿戴设备等电子产品上用到的基本都是微机电系统(micro-electro-mechanical system,MEMS)加速度计和陀螺仪,MEMS是集微传感器、微执行器、微机械结构、微电源微能源、信号处理和控制电路、高性能电子集成器件、接口、通信等于一体的微型器件或系统。
由于手机、扫地机器人、VR眼镜等设备中还有可能存在引起震动的元器件,例如,手机中马达工作时会引起震动,扫地机器人中的驱动电机运行时会引起震动,VR眼镜中的光机工作时会引起震动。这些元器件的震动会增加IMU工作环境的随机噪声,从而可能导致降低IMU测量结果的精确度。
针对上述问题,本申请实施例提供一种确定校准参数的方法,该方法可以适用于上述具有IMU的电子设备。该方法主要包括:电子设备的处理器先获取IMU在静止状态下采集的第一原始测量数据,然后对其进行快速傅里叶变换,得到频域数据,并对该频域数据进行滤波,然后对滤波之后的频域数据进行快速傅里叶逆变换,得到第一参考测量数据,基于第一参考测量数据确定IMU的校准参数。因为对数据进行了滤波,所以可以过滤掉其它器件震动所带来的随机噪声,这样基于过滤之后的数据求得的校准参数的准确度较高,以便对传感器因为震动噪声带来的误差进行补偿,提高IMU的测量精度。
本申请实施例提供的确定校准参数的方法可以应用于任何具有IMU的电子设备中,比如上述介绍的各种AR设备或VR设备。以下介绍一种本申请实施例可以应用到的电子设备的结构,以该电子设备可以手机。图1示出了该电子设备100的一种结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,USB接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块151,无线通信模块152,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及SIM卡接口195等。其中传感器模块180可以包括陀螺仪传感器180A,加速度传感器180B,磁场传感器180C、电场传感器180D、压力传感器180E、接近光传感器180G、指纹传感器180H,触摸传感器180K、转轴传感器180M(当然,电子设备100还可以包括其它传感器,比如温度传感器,距离传感器、环境光传感器、气压传感器、骨传导传感器等,图中未示出)。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(Neural-network Processing Unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
处理器110可以运行本申请实施例提供的确定校准参数的方法的计算机指令,以实现提高IMU的测量精度。当处理器110集成不同的器件,比如集成CPU和GPU时,CPU和GPU可以配合执行本申请实施例提供的确定校准参数的方法的指令,比如确定校准参数的方法中部分算法由CPU执行,另一部分算法由GPU执行,以得到较快的处理效率。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed, 量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
摄像头193(前置摄像头或者后置摄像头,或者一个摄像头既可作为前置摄像头,也可作为后置摄像头)用于捕获静态图像或视频。通常,摄像头193可以包括感光元件比如镜头组和图像传感器,其中,镜头组包括多个透镜(凸透镜或凹透镜),用于采集待拍摄物体反射的光信号,并将采集的光信号传递给图像传感器。图像传感器根据光信号生成待拍摄物体的原始图像。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,应用程序(比如相机应用,微信应用等)的代码等。存储数据区可存储电子设备100使用过程中所创建的数据(比如相机应用采集的图像、视频等)等。
内部存储器121还可以存储本申请实施例提供确定校准参数的算法的代码。当内部存储器121中存储的算法的代码被处理器110运行时,处理器110对测量数据进行时频转换,并对转换后的数据进行过滤,基于过滤后的数据计算校准参数。
此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
当然,本申请实施例提供的算法的代码还可以存储在外部存储器中。这种情况下,处理器110可以通过外部存储器接口120运行存储在外部存储器中的算法的代码,实现对用户的触摸操作进行响应。
下面介绍传感器模块180的功能。
陀螺仪传感器180A(或者简称为陀螺仪),为IMU的主要器件,可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180A确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。
加速度传感器180B(或者简称为加速度计),为IMU的主要器件,可以用于检测电子设备100在各个方向上(一般为三轴)加速度的大小。即加速度传感器180B可以用于检测电子设备100当前的运动状态,比如抖动还是静止。
磁场传感器180C,为IMU中的器件,可以用于将各种磁场及其变化的量转变成电信号。
电场传感器180D,为IMU中的器件,指能感受电场强度并转换成可用输出信号的传感器。
压力传感器180E,为IMU中的器件,用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180E可以设置于显示屏194。压力传感器180E的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180E,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180E的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光 二极管可以是红外发光二极管。电子设备通过发光二极管向外发射红外光。电子设备使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备附近有物体。当检测到不充分的反射光时,电子设备可以确定电子设备附近没有物体。
陀螺仪传感器180A(或加速度传感器180B)可以将检测到的运动状态信息(比如角速度)发送给处理器110。处理器110基于运动状态信息确定当前是手持状态还是脚架状态(比如,角速度不为0时,说明电子设备100处于手持状态)。
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
示例性的,电子设备100的显示屏194显示主界面,主界面中包括多个应用(比如相机应用、微信应用等)的图标。用户通过触摸传感器180K点击主界面中扫地机器人应用的图标,触发处理器110启动扫地机器人应用,打开作业地图。显示屏194显示扫地机器人应用的界面,例如作业地图界面。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块151,无线通信模块152,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块151可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块151可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块151可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块151还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块151的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块151的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块151或其他功能模块设置在同一个器件中。
无线通信模块152可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块152可以是集成至少一个通信处理模块的一个或多个器件。无线通信模 块152经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块152还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
另外,电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。电子设备100可以接收按键190输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。电子设备100可以利用马达191产生振动提示(比如来电振动提示)。电子设备100中的指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。电子设备100中的SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。
应理解,在实际应用中,电子设备100可以包括比图1所示的更多或更少的部件,本申请实施例不作限定。
下述以本申请实施例应用在上述图1所示的电子设备中为例,对本申请技术方案进行说明。图2所示为本申请提供的确定校准参数的方法流程图,该方法包括如下步骤:
步骤201,在电子设备处于静止状态时,电子设备的处理器110获取IMU所采集的第一原始测量数据。
具体地,本申请实施例中IMU包括以下至少一种传感器:陀螺仪传感器180A、加速度传感器180B、磁场传感器180C、电场传感器180D和压力传感器180E等。电子设备的处理器110可以按照设定周期触发各个IMU采集数据,也可以在检测到电子设备的指定功能被调用时再触发对应的IMU采集数据。可选的,指定功能被调用时可以指电子设备的姿态满足在设定时长内保持不变的条件。例如,用户在接听电话、阅读短信、拍照对焦、打开网络浏览器、搜索无线信号、扫地机器人正在充电等场景下电子设备的姿态在一定时间内有可能保持姿态固定不变。因此,预先可以人为地将这类业务对应的功能设置为可以触发IMU采集数据的指定功能。当然电子设备也可以将其它在一定时间内保持姿态固定的功能作为上述指定功能,本申请仅以上述功能为例进行说明,并不构成对本申请的限定。
需要说明的是,本申请实施例中电子设备处于静止状态可以指的是电子设备处于一种完全静止的状态,也可以是电子设备处于接近但并非完全静止的状态,即电子设备尚存在比较小的运动幅度。
示例性的,当IMU为加速度计时,加速度计采集的第一原始测量数据包括x、y和z轴三个轴向的加速度计值;当IMU为陀螺仪时,陀螺仪采集的第一原始测量数据包括x、y和z轴三个轴向的角速度值。
步骤202,处理器110将第一原始测量数据进行快速傅里叶变换,得到第一频域数据。
示例性地,假设第一原始测量数据的时域波形如图3a所示,那么经过快速傅里叶变换之后第一频域数据的频域波形如图3b所示。从图3b可见,该频域波形并不平稳,存在一些突变值,该突变值也就是可能由其它器件震动带来的随机噪声。
步骤203,处理器110从第一频域数据中获取低于设定阈值的第一参考频域数据,并对第一参考频域数据进行快速傅里叶逆变换,得到第一参考测量数据。
示例性地,假设设定阈值为图3b中的K值,那么电子设备的处理器110将图3b中的大于等于K值的频域数据过滤掉,获取小于K值的第一参考频域数据。进一步地,电子设备的处理器110对过滤后的第一参考频域数据进行快速傅里叶逆变换,得到如图3c所示的时域波形(深色区域301)对应的第一参考测量数据。从图3c可见,滤波之后的时域波形的波形平 稳,没有突变值,也就是说由其它器件震动所带来的随机噪声已经被过滤掉。
需要说明的是设定阈值可以是预先人为地通过对频谱的分析所确定的频率值并将其存储在内部存储器121中,电子设备可以采用设有该设定阈值的软件滤波单元滤除第一频域数据中的随机噪声(即上述突变值)。
步骤204,处理器110根据第一参考测量数据,确定IMU的校准参数。
具体来说,一方面,假设电子设备是VR眼镜,电子设备的IMU中包括加速度计,VR眼镜的加速度计采集在不同静止状态下的加速度计值,然后通过最小化实际加速度与重力加速度的差值以得到加速度计的零偏和标度因子。一般来说,当温度稳定时,加速度计的校准模型公式[1]可以为:
A=S(V-O)........公式[1]
其中,V=[V x,V y,V z]为实际测得的第一参考测量数据(即加速度计值),V x为x轴上的第一参考测量数据,V y为y轴上的第一参考测量数据、V z为z轴上对应的第一参考测量数据;S为标度因子,O为零偏,A表示加速度计在静止状态下的期望值,A=[a x,a y,a z] T能满足
Figure PCTCN2020097951-appb-000009
其中g为实际重力加速度值,a x为x轴上的期望值,a y为y轴上的期望值,a Z为z轴上的期望值。
也就是说,加速度计的第一参考测量数据通过该公式一进行校准之后,期望校准之后的测量值A=[a x,a y,a z] T能满足
Figure PCTCN2020097951-appb-000010
其中g为实际重力加速度值。一般地,还可以将公式一所示的校准模型替换成矩阵形式,如公式[2]所示。
Figure PCTCN2020097951-appb-000011
假设S为对称矩阵,通过按照如下公式[3]和公式[4]最小化实际加速度与重力加速度之间的差值E,优化变量S与O中的9个变量,最终得到加速度计的零偏和标度因子。
Figure PCTCN2020097951-appb-000012
Figure PCTCN2020097951-appb-000013
其中,V j,k表示第k次静止姿态下的j轴加速度计的输出,O j表示j轴的零偏,j为x,y,z,所以O j即O x,O y,O z,S xx,S yy,S zz表示x,y,z轴的尺度因子,S xy,S xz,S yz表示xy,xz,yz轴间的串扰影响因子,e k表示第k次静止状态下的误差项,g为实际重力加速度值。
另一方面,假设电子设备是VR眼镜,电子设备的IMU中包括陀螺仪,VR眼镜的陀螺仪采集在不同静止状态下的角速度值,然后处理器110将第一参考频域数据代入如下公式[5],得到陀螺仪中的陀螺仪的零偏O;
Figure PCTCN2020097951-appb-000014
其中,C s为参考频域数据中的角速度集合,N为角速度集合中的角速度个数,W i为第i个角速度值,i从1到N。
需要说明的是,传统技术中,在校准陀螺仪时,若想得到标度因子S需要借助匀速转台, 硬件配置较为复杂,本申请实施例中,将标度因子S设为对角矩阵
Figure PCTCN2020097951-appb-000015
对角线上的值为各轴的尺度因子。在转台匀速旋转的情况下,读取陀螺仪的读数,利用公式[6]即可求解出标度因子S x、S y、S Z
也就是说,处理器110将第一参考测量数据代入如下公式[6],得陀螺仪各轴的标度因子;
Figure PCTCN2020097951-appb-000016
其中,ω gt是陀螺仪的实际转速,ω xyz分别为陀螺仪在转台匀速旋转的情况下,分别采集的x,y,z轴的参考测量值,S x、S y、S Z为陀螺仪在x,y,z轴的标度因子。
进一步地,电子设备在确定了IMU的校准参数之后,还可以利用该校准参数对IMU所采集的原始测量数据直接进行校准。当然,电子设备还可以利用该校准参数对上述步骤203中过滤后的测量数据进行校准。具体的,电子设备可以获取IMU采集的第二原始测量数据,然后将第二原始测量数据进行快速傅里叶变换,得到第二频域数据,并从第二频域数据中获取低于设定阈值的第二参考频域数据,然后对第二参考频域数据进行快速傅里叶逆变换,得到第二参考测量数据。最终,电子设备利用上述步骤204中得到的校准参数对第二参考测量数据做校准,得到校准之后的测量值。
需要说明的是,上述确定校准参数的过程与IMU采集第二原始测量数据的过程并不存在严格的先后顺序,可以先确定校准参数,后采集第二原始测量数据,也可以先采集第二原始测量数据,后确定校准参数,也可以同时执行。
比如,针对加速度计来说,处理器110可以根据上述公式中所确定出来的IMU中的加速度计的零偏O和标度因子S,通过如下公式[7]对IMU中的加速度计的第二参考测量数据做校准,得到校准之后的测量值。
Figure PCTCN2020097951-appb-000017
其中,V=[V x,V y,V z]为加速度计的第二参考测量数据,V x为x轴上的第二参考测量数据,V Y为y轴上的第二参考测量数据、Vz为z轴上对应的第二参考测量数据;S为标度因子,O为零偏,
Figure PCTCN2020097951-appb-000018
表示校准之后的测量值,
Figure PCTCN2020097951-appb-000019
为x轴上校准之后的测量值,
Figure PCTCN2020097951-appb-000020
为y轴上校准之后的测量值,
Figure PCTCN2020097951-appb-000021
为z轴上校准之后的测量值。
再比如,针对陀螺仪来说,处理器110可以根据上述公式中所确定的IMU中的陀螺仪的零偏O和标度因子S,通过如下公式[8]对陀螺仪的第二参考测量数据做校准,得到校准之后的测量值。
w=S(W-O)........公式[8]
其中,w=[w x,w y,w z] T为校准后x,y,z轴的角速度值,O为零偏,S=S x=S y=S z为陀螺仪x,y,z轴的标度因子。
示例性的,在上述判断电子设备是否处于静止状态时,本申请可以通过具体具体过程进行确定。
第一步骤,测量数据筛选过程。
电子设备按照设定周期触发IMU采集数据,或是电子设备的指定功能被调用时触发IMU采集数据,若IMU包括加速度计,采集的数据包括加速度计的原始测量数据,那么电子设备对加速度计输出的原始测量数据进行高通滤波,将重力加速度这一加速度静态分量从原始测量数据中滤除,得到由于运动产生的加速度动态分量。同理,若IMU还包括陀螺仪,则同样对陀螺仪输出的原始测量数据进行高通滤波,得到陀螺仪原始测量数据中由于运动产生的角速度动态分量。
进一步地,还可以对加速度计或陀螺仪经过高通滤波后的测量数据进行平滑处理,可用的平滑处理技术手段包括低通滤波、中值滤波和均值滤波等。
更进一步地,还可以对加速度传感器和陀螺仪经过平滑后的信号进行整流,从而将加速度传感器和陀螺仪输出的信号波形的负半轴部分翻转至正半轴。
第二步骤,测量数据计算过程。
电子设备的处理器110计算经过上述处理之后的加速度计的测量数据的最大值和方差值。同理,若IMU还包括陀螺仪,则同样计算陀螺仪的经过上述处理之后的测量数据的最大值和方差值。
第三步骤,静止状态判决过程。
电子设备将上述提取的加速度计的测量数据的最大值和方差值,分别与预设的最大值阈值和方差值阈值作比较,若加速度计的测量数据的最大值不大于预设的最大值阈值,且确定加速度传感器180B的测量数据的方差值不大于预设的方差值阈值,则确定电子设备始终处于静止状态。
同理,若IMU还包括陀螺仪,则还要将上述提取的陀螺仪的测量数据的最大值和方差值,分别与预设的第二最大值阈值和第二方差值阈值作比较,若电子设备上的加速度计的测量数据的最大值和方差值分别不大于预设的第一最大值阈值和第一方差值阈值,以及电子设备上的陀螺仪的测量数据的最大值和方差值分别不大于预设的第二最大值阈值和第二方差值阈值,则确定电子设备始终处于静止状态。
可选的,在上述确定校准参数的过程中,电子设备可以通过上述方法同时触发IMU采集电子设备处于静止状态的原始测量数据,并将满足这部分原始测量数据保存至内部存储器121。一旦内部存储器121中的该原始测量数据的数目满足一定阈值时,触发电子设备的处理器110重复执行上述步骤201至步骤204,得到新的校准参数,并将新的校准参数更新至内部存储器121中的参数池中。IMU在运行过程中定时或实时地检测参数池是否有更新,如果参数池有校准参数的更新,则从参数池提取最近一次更新的校准参数作为IMU新的校准参数,利用新的校准参数对后续的测量数据进行校准;如果参数池没有更新,则继续使用当前的校准参数对后续测量数据进行校准。
以下将结合附图和应用场景,对本申请实施例提供的确定校准参数的方法进行详细介绍。
场景一
本申请实施例所提供的确定校准参数的方法可以应用于如图4所示的电子设备100和VR眼镜200基于连接线互联的场景。在图4所示的场景中,电子设备100将自身的屏幕显示内容投影到VR眼镜200中,用户通过VR眼镜200观看照片、视频或者打游戏,享受更大屏幕的体验。本申请实施例中,VR眼镜200的处理器可以按照上述图2所示的步骤201至步骤204所示的方法,先采集VR眼镜200处于静止状态时IMU测量到的原始测量数据,然后过滤VR眼镜200中的光机等元器件的随机噪声对IMU的干扰,再基于过滤之后测量数据确定 校准参数,VR眼镜200可以利用该校准参数对IMU后续采集的测量数据进行校准,以提高VR眼镜200中的加速度计与陀螺仪的测量精度。
除此之外,本申请实施例也可以单独应用于电子设备100中,具体地,电子设备的处理器110先采集手机处于静止状态时IMU采集到的原始测量数据,然后过滤电子设备100中的马达等元器件的噪声对IMU所造成的干扰,再基于过滤之后数据确定校准参数,电子设备100可以利用该校准参数对IMU采集的测量数据进行校准,以提高电子设备100中的加速度计与陀螺仪的测量精度。
场景二
另一方面,本申请实施例提供的确定校准参数的方法也可以应用于如图5所示的正在执行清扫作业的扫地机器人300中。
扫地机器人为了实现自主避障和规划路线,开始使用机器视觉技术。基于机器视觉的扫地机器人,可以通过摄像头获取图像,再基于获取的图像以及合理的算法实现规划路径、躲避障碍。目前市面上扫地机器人是采用即时定位与地图构建技术(simultaneous localization and mapping,SLAM),能够通过摄像头观测扫地机器人清扫的空间,识别扫地机器人清扫的空间里的标志物体及主要特征,通过三角定位原理绘制出房间地图进行导航,从而确认自身在清扫空间的位置、已清扫区域、未清扫区域等。由于扫地机器人在快速运动和纯旋转等场景下,视觉的鲁棒性较差,近年来出现了许多融合IMU的算法,来提高SLAM算法的鲁棒性。
具体的,图6所示为一种SLAM算法,跟踪定位过程:当有图像输入时,扫地机器人的处理器会对其进行特征点的提取,根据初始帧得到相机的初始位姿。基于扫地机器人的IMU所采集的信息,可以对图像预积分、滤波处理得到估计的位姿。最后处理器对两个位姿再进行融合,初始化地图,对初始状态进行姿态估计或重定位。当有更多的图像输入,则处理器会计算帧与帧之间的姿态以跟踪局部地图。在定位的结尾,还会判断是否插入了新的关键帧。
局部建图过程:依次是选取关键帧,删除无效的地图点,并新增有效地图点以保证地图的质量。可选地,还会对局部地图还会做光束法平差(bundle adjustment,BA)优化。
闭环过程:处理器会在相似图像帧间选取候选的像素点,根据候选点进行相似变换,计算帧之间的姿态,并对整个回环进行融合和优化基本图,以保证导航路径的准确性。
可见,在上述SLAM算法中,如果IMU所采集的信息的测量精度较低,则会较大的影响跟踪定位过程,最终影响所构建的地图可用性。因此,本申请实施例将上述确定校准参数的方法应用于上述跟踪定位过程,也就是实时确定校准参数,并对IMU采集的数据进行校准,以实现准确地对初始状态进行姿态估计或重定位。
在本申请的另一些实施例中,本申请实施例公开了一种电子设备,如图7所示,该电子设备可以包括:触摸屏701,其中,该触摸屏701包括触控面板707和显示屏708;一个或多个处理器702;存储器703;一个或多个应用程序(未示出);以及一个或多个计算机程序704,IMU705、上述各器件可以通过一个或多个通信总线706连接。其中该一个或多个计算机程序704被存储在上述存储器703中并被配置为被该一个或多个处理器702执行,该一个或多个计算机程序704包括指令,上述指令可以用于执行如图2相应实施例中的各个步骤。
本申请实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的确定校准参数的方法。
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的确定校准参数的方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的确定校准参数的方法。
其中,本申请实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其他的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其他的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (14)

  1. 一种确定校准参数的方法,应用于具有惯性测量单元IMU的电子设备,其特征在于,所述方法包括:
    获取所述IMU采集的第一原始测量数据,所述第一原始测量数据是所述电子设备处于静止状态时采集的;
    将所述第一原始测量数据进行快速傅里叶变换,得到第一频域数据;
    从所述第一频域数据中获取低于设定阈值的第一参考频域数据,并对所述第一参考频域数据进行快速傅里叶逆变换,得到第一参考测量数据;
    根据所述第一参考测量数据,确定所述IMU的校准参数。
  2. 根据权利要求1所述的方法,其特征在于,该方法还包括:
    获取所述IMU采集的第二原始测量数据;
    将所述第二原始测量数据进行快速傅里叶变换,得到第二频域数据;
    从所述第二频域数据中获取低于所述设定阈值的第二参考频域数据,并对所述第二参考频域数据进行快速傅里叶逆变换,得到第二参考测量数据;
    根据所述校准参数,对所述第二参考测量数据做校准,得到校准之后的测量值。
  3. 根据权利要求2所述的方法,其特征在于,所述IMU包括加速度计,所述根据所述第一参考测量数据,确定所述IMU的校准参数,符合下述公式要求:
    A=S(V-O)
    其中,V=[V x,V y,V z]为所述加速度计的第一参考测量数据,V x为所述加速度计x轴上的第一参考测量数据,V y为所述加速度计y轴上的第一参考测量数据、V z为所述加速度计z轴上对应的第一参考测量数据;S为所述加速度计的标度因子,O为所述加速度计的零偏,A表示所述加速度计在静止状态下的期望值,A=[a x,a y,a z] T能满足
    Figure PCTCN2020097951-appb-100001
    其中g为实际重力加速度值,a x为所述加速度计x轴上的期望值,a y为所述加速度计y轴上的期望值,a Z为所述加速度计z轴上的期望值。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述校准参数,对所述第二参考测量数据做校准,得到校准之后的测量值,符合下述公式要求:
    Figure PCTCN2020097951-appb-100002
    其中,V=[V x,V y,V z]为所述加速度计的第二参考测量数据V x为所述加速度计x轴上的第二参考测量数据,V y为所述加速度计y轴上的第二参考测量数据、V z为所述加速度计z轴上对应的第二参考测量数据;
    Figure PCTCN2020097951-appb-100003
    表示校准之后的测量值,
    Figure PCTCN2020097951-appb-100004
    为所述加速度计x轴上校准之后的测量值,
    Figure PCTCN2020097951-appb-100005
    为所述加速度计y轴上校准之后的测量值,
    Figure PCTCN2020097951-appb-100006
    为所述加速度计z轴上校准之后的测量值。
  5. 根据权利要求2所述的方法,其特征在于,所述IMU包括陀螺仪,所述根据所述第一参考测量数据,确定所述IMU的校准参数,符合下述公式要求:
    Figure PCTCN2020097951-appb-100007
    其中,C s为所述第一参考频域数据中的角速度集合,N为角速度集合中的角速度个数,W i为第i个角速度值,i从1到N;O为所述陀螺仪的零偏;
    Figure PCTCN2020097951-appb-100008
    其中,ω gt是所述陀螺仪的实际转速,ω xyz分别为所述陀螺仪在转台匀速旋转的情况下,分别采集的x,y,z轴的第一参考测量数据,S x、S y、S Z为所述陀螺仪分别在x,y,z轴的标度因子。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述校准参数,对所述第二参考测量数据做校准,得到校准之后的测量值,符合下述公式要求:
    w=S(W-O)
    其中,w=[w x,w y,w z] T为校准后所述陀螺仪的x,y,z轴的角速度值,S=S x=S y=S z为所述陀螺仪分别在x,y,z轴的标度因子。
  7. 一种电子设备,其特征在于,包括处理器和存储器;
    所述存储器用于存储一个或多个计算机程序;
    当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述电子设备执行:
    获取所述IMU采集的第一原始测量数据,所述第一原始测量数据是所述电子设备处于静止状态时采集的;
    将所述第一原始测量数据进行快速傅里叶变换,得到第一频域数据;
    从所述第一频域数据中获取低于设定阈值的第一参考频域数据,并对所述第一参考频域数据进行快速傅里叶逆变换,得到第一参考测量数据;
    根据所述第一参考测量数据,确定所述IMU的校准参数。
  8. 根据权利要求7所述的电子设备,其特征在于,当所述存储器存储的一个或多个计算机程序被所述处理器执行时,还使得所述电子设备执行:
    获取所述IMU采集的第二原始测量数据;
    将所述第二原始测量数据进行快速傅里叶变换,得到第二频域数据;
    从所述第二频域数据中获取低于所述设定阈值的第二参考频域数据,并对所述第二参考频域数据进行快速傅里叶逆变换,得到第二参考测量数据;
    根据所述校准参数,对所述第二参考测量数据做校准,得到校准之后的测量值。
  9. 根据权利要求7或8所述的电子设备,其特征在于,所述IMU包括加速度计,当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述电子设备具体执行:
    所述根据所述第一参考测量数据,确定所述IMU的校准参数,符合下述公式要求:
    A=S(C-O)
    其中,V=[V x,V y,V z]为所述加速度计的第一参考测量数据,V x为所述加速度计x轴上的第一参考测量数据,V y为所述加速度计y轴上的第一参考测量数据、V z为所述加速度计z轴上对应的第一参考测量数据;S为所述加速度计的标度因子,O为所述加速度计的零偏,A表示所述加速度计在静止状态下的期望值,A=[a x,a y,a z] T能满足
    Figure PCTCN2020097951-appb-100009
    其中g为实际重力加速度值,a x为所述加速度计x轴上的期望值,a y为所述加速度计y轴上的期望值,a Z为所述加速度计z轴上的期望值。
  10. 根据权利要求9所述的电子设备,其特征在于,当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述电子设备具体执行:
    根据所述校准参数,对所述第二参考测量数据做校准,得到校准之后的测量值,符合下述公式要求:
    Figure PCTCN2020097951-appb-100010
    其中,V=[V x,V y,V z]为所述加速度计的第二参考测量数据V x为所述加速度计x轴上的第二参考测量数据,V y为所述加速度计y轴上的第二参考测量数据、V z为所述加速度计z轴上对应的第二参考测量数据;
    Figure PCTCN2020097951-appb-100011
    表示校准之后的测量值,
    Figure PCTCN2020097951-appb-100012
    为所述加速度计x轴上校准之后的测量值,
    Figure PCTCN2020097951-appb-100013
    为所述加速度计y轴上校准之后的测量值,
    Figure PCTCN2020097951-appb-100014
    为所述加速度计z轴上校准之后的测量值。
  11. 根据权利要求7或8所述的电子设备,其特征在于,所述IMU包括陀螺仪,当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述电子设备具体执行:
    所述根据所述第一参考测量数据,确定所述IMU的校准参数,符合下述公式要求:
    Figure PCTCN2020097951-appb-100015
    其中,C s为所述第一参考频域数据中的角速度集合,N为角速度集合中的角速度个数,W i为第i个角速度值,i从1到N;O为所述陀螺仪的零偏;
    Figure PCTCN2020097951-appb-100016
    其中,ω gt是所述陀螺仪的实际转速,ω xyz分别为所述陀螺仪在转台匀速旋转的情况下,分别采集的x,y,z轴的第一参考测量数据,S x、S y、S Z为所述陀螺仪分别在x,y,z轴的标度因子。
  12. 根据权利要求11所述的电子设备,其特征在于,当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述电子设备具体执行:
    根据所述校准参数,对所述第二参考测量数据做校准,得到校准之后的测量值,符合下述公式要求:
    w=S(W-O)
    其中,w=[w x,w y,w z] T为校准后所述陀螺仪的x,y,z轴的角速度值,S=S x=S y=S z为所述陀螺仪分别在x,y,z轴的标度因子。
  13. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1至6任一项所述的确定校准参数的方法。
  14. 一种芯片,其特征在于,所述芯片与存储器耦合,用于执行所述存储器中存储的计算机程序,以执行如权利要求1至6任一项所述的确定校准参数的方法。
PCT/CN2020/097951 2019-06-27 2020-06-24 一种确定校准参数的方法及电子设备 WO2020259544A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910567545.3 2019-06-27
CN201910567545.3A CN112146678B (zh) 2019-06-27 2019-06-27 一种确定校准参数的方法及电子设备

Publications (1)

Publication Number Publication Date
WO2020259544A1 true WO2020259544A1 (zh) 2020-12-30

Family

ID=73868695

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/097951 WO2020259544A1 (zh) 2019-06-27 2020-06-24 一种确定校准参数的方法及电子设备

Country Status (2)

Country Link
CN (1) CN112146678B (zh)
WO (1) WO2020259544A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113001546B (zh) * 2021-03-08 2021-10-29 常州刘国钧高等职业技术学校 一种提高工业机器人运动速度安全性的方法及系统
CN114543844B (zh) * 2021-04-09 2024-05-03 恒玄科技(上海)股份有限公司 无线音频设备的音频播放处理方法、装置及无线音频设备
CN114681904A (zh) * 2021-04-16 2022-07-01 苏州端云创新科技有限公司 一种实现信息校正的方法、装置、计算机存储介质及终端
CN113776575B (zh) * 2021-08-16 2024-09-06 深圳市睿联技术股份有限公司 零点校准方法、设备、装置、电子设备及计算机可读存储介质
CN113932805B (zh) * 2021-10-12 2024-02-23 天翼数字生活科技有限公司 用于提高ar虚拟对象定位准确性与速度的方法
CN114295147B (zh) * 2021-12-17 2024-08-23 杭州海康威视数字技术股份有限公司 云台动态校准方法、装置及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6823279B1 (en) * 2001-07-27 2004-11-23 Trimble Navigation Limted Spectral method for calibrating a multi-axis accelerometer device
CN104164829A (zh) * 2014-08-04 2014-11-26 武汉景行致远科技有限公司 基于移动终端的路面平整度检测方法和智能路面信息实时监测系统
CN106767793A (zh) * 2017-01-19 2017-05-31 东南大学 一种基于sins/usbl紧组合的auv水下导航定位方法
CN107289951A (zh) * 2017-07-31 2017-10-24 电子科技大学 一种基于惯性导航的室内移动机器人定位方法
CN107490378A (zh) * 2017-07-17 2017-12-19 北京工业大学 一种基于mpu6050与智能手机的室内定位与导航的方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9880003B2 (en) * 2015-01-06 2018-01-30 Honeywell International Inc. Helicopter motion detection during inertial reference system leveling
CN105352487B (zh) * 2015-10-13 2018-06-15 上海华测导航技术股份有限公司 一种姿态测量系统的精度校准方法
CN107289930B (zh) * 2016-04-01 2020-09-11 南京理工大学 基于mems惯性测量单元的纯惯性车辆导航方法
US10012517B2 (en) * 2016-08-01 2018-07-03 Infinity Augmented Reality Israel Ltd. Method and system for calibrating components of an inertial measurement unit (IMU) using scene-captured data
US10502807B2 (en) * 2017-09-05 2019-12-10 Fluke Corporation Calibration system for voltage measurement devices
CN108170027B (zh) * 2017-12-05 2020-01-17 深圳市道通智能软件开发有限公司 云台控制器控制参数调整方法、装置、介质和云台控制器
CN108875710B (zh) * 2018-07-24 2021-10-08 杭州电子科技大学 基于能量阈值算法的电梯门运行速度估计方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6823279B1 (en) * 2001-07-27 2004-11-23 Trimble Navigation Limted Spectral method for calibrating a multi-axis accelerometer device
CN104164829A (zh) * 2014-08-04 2014-11-26 武汉景行致远科技有限公司 基于移动终端的路面平整度检测方法和智能路面信息实时监测系统
CN106767793A (zh) * 2017-01-19 2017-05-31 东南大学 一种基于sins/usbl紧组合的auv水下导航定位方法
CN107490378A (zh) * 2017-07-17 2017-12-19 北京工业大学 一种基于mpu6050与智能手机的室内定位与导航的方法
CN107289951A (zh) * 2017-07-31 2017-10-24 电子科技大学 一种基于惯性导航的室内移动机器人定位方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHOU, LINGFENG: "Research on Calibration Technique of Shipborne CNS/INS Integrated Navigation System", CHINA DOCTORAL DISSERTATIONS FULL-TEXT DATABASE, ENGINEERING SCIENCE AND TECHNOLOGY II, no. 06, 15 June 2018 (2018-06-15), ISSN: 1674-022X, DOI: 20200901172213A *

Also Published As

Publication number Publication date
CN112146678B (zh) 2022-10-11
CN112146678A (zh) 2020-12-29

Similar Documents

Publication Publication Date Title
WO2020259544A1 (zh) 一种确定校准参数的方法及电子设备
WO2019205842A1 (zh) 相机姿态追踪过程的重定位方法、装置及存储介质
WO2021013230A1 (zh) 机器人的控制方法、机器人、终端、服务器及控制系统
WO2019205851A1 (zh) 位姿确定方法、装置、智能设备及存储介质
US9417689B1 (en) Robust device motion detection
CN111768454B (zh) 位姿确定方法、装置、设备及存储介质
CN110986930B (zh) 设备定位方法、装置、电子设备及存储介质
CN111127509B (zh) 目标跟踪方法、装置和计算机可读存储介质
CN109166150B (zh) 获取位姿的方法、装置存储介质
CN108616691B (zh) 基于自动白平衡的拍照方法、装置、服务器及存储介质
US11042984B2 (en) Systems and methods for providing image depth information
CN111897429A (zh) 图像显示方法、装置、计算机设备及存储介质
WO2022027972A1 (zh) 一种设备搜寻方法以及电子设备
CN111724412A (zh) 确定运动轨迹的方法、装置及计算机存储介质
WO2019137535A1 (zh) 物距测量方法及终端设备
WO2019134305A1 (zh) 确定姿态的方法、装置、智能设备、存储介质和程序产品
WO2022161011A1 (zh) 生成图像的方法和电子设备
CN111862148A (zh) 实现视觉跟踪的方法、装置、电子设备及介质
WO2022016909A1 (zh) 获取Wi-Fi指纹空间分布的方法、装置和电子设备
CN111928861B (zh) 地图构建方法及装置
CN111127541A (zh) 车辆尺寸的确定方法、装置及存储介质
CN111179628B (zh) 自动驾驶车辆的定位方法、装置、电子设备及存储介质
CN113326800B (zh) 车道线位置确定方法、装置、车载终端及存储介质
CN113432620B (zh) 误差估计方法、装置、车载终端及存储介质
CN112835021B (zh) 定位方法、装置、系统及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20833651

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20833651

Country of ref document: EP

Kind code of ref document: A1