WO2021120101A1 - Signal calibration method, apparatus and device, and storage medium - Google Patents

Signal calibration method, apparatus and device, and storage medium Download PDF

Info

Publication number
WO2021120101A1
WO2021120101A1 PCT/CN2019/126591 CN2019126591W WO2021120101A1 WO 2021120101 A1 WO2021120101 A1 WO 2021120101A1 CN 2019126591 W CN2019126591 W CN 2019126591W WO 2021120101 A1 WO2021120101 A1 WO 2021120101A1
Authority
WO
WIPO (PCT)
Prior art keywords
frequency
signal
sampling
coordinate
index
Prior art date
Application number
PCT/CN2019/126591
Other languages
French (fr)
Chinese (zh)
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 瑞声声学科技(深圳)有限公司
Priority to PCT/CN2019/126591 priority Critical patent/WO2021120101A1/en
Publication of WO2021120101A1 publication Critical patent/WO2021120101A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer

Definitions

  • the present invention relates to the technical field of signal processing, in particular to a method, device, equipment and storage medium for signal calibration.
  • the tactile feedback technology makes the user feel the changes in tactile sensation by changing the force, vibration and other methods.
  • Tactile feedback technology can be applied to the auxiliary creation and control of virtual scenes or virtual objects in smart phones, tablet computers, etc. Among them, loading a specific excitation signal on an actuator (ie, a motor) to output a specific vibration effect is a main way to realize haptic feedback.
  • the excitation signal of the motor is only aimed at a specific motor frequency, so that it outputs a specific vibration effect.
  • the excitation signal due to the differences between different motor units, such as obvious differences in resonance frequency, it will cause the excitation signal to be mismatched with the motor units, causing the difference in vibration effects and failing to output specific vibrations. effect.
  • a signal calibration method includes:
  • the signal to be processed is processed according to the integer coordinate index and the decimal coordinate index, and a target calibration signal is generated and output.
  • the method further includes: controlling the motor to vibrate, and performing the step of obtaining the resonant frequency of the motor as the second frequency; after the step of generating and outputting the target calibration signal, further including: The motor is controlled to vibrate according to the target calibration signal.
  • the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency further includes: determining according to the ratio of the first frequency and the second frequency The sampling interval between the sampling points; the number of sampling points of the several sampling points is determined according to the signal to be processed; the coordinates of each sampling point are determined according to the sampling interval and the number of sampling points, and according to the sampling point The coordinates construct the sampling coordinate index.
  • the method further includes: performing length cropping on the sampling coordinate index to obtain a target calibration signal The index coordinates of the sampling point.
  • the method further includes: rounding each sampling point coordinate contained in the sampling coordinate index to obtain the integer of each sampling point coordinate In the part, the integer part is length-cut to generate an integer coordinate index; the difference between the sampling point index coordinate and the integer coordinate index is obtained to generate a decimal coordinate index.
  • the step of processing the signal to be processed according to the integer coordinate index and the decimal coordinate index further includes: according to a preset interpolation formula, the integer coordinate index and the decimal coordinate The index performs interpolation processing on the signal to be processed.
  • Y is the target calibration signal.
  • the method further includes: judging whether the first frequency and the second frequency are consistent; In the case where the second frequencies are not consistent, the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency is performed. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
  • a signal calibration device comprising:
  • An obtaining module configured to obtain the first frequency corresponding to the signal to be processed, and obtain the resonant frequency of the motor as the second frequency;
  • a determining module configured to determine sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency when the first frequency and the second frequency are inconsistent;
  • a calculation module configured to perform preset processing on the sampling coordinate index, and obtain the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index;
  • the generating module is configured to process the signal to be processed according to the integer coordinate index and the decimal coordinate index to generate and output a target calibration signal.
  • the device further includes: an excitation module for controlling the motor to vibrate and performing the step of obtaining the resonant frequency of the motor as the second frequency; and controlling the motor according to the target calibration signal Vibrate.
  • the determining module further includes: a first determining unit, configured to determine the sampling distance between the sampling points according to the ratio of the first frequency and the second frequency; and determine the sampling distance between the sampling points according to the signal to be processed The number of sampling points of the several sampling points; the second determining unit is configured to determine the coordinates of each sampling point according to the sampling distance and the number of sampling points, and construct a sampling coordinate index according to the sampling point coordinates.
  • the calculation module further includes: a preprocessing unit, configured to perform length cropping on the sampling coordinate index to obtain the sampling point index coordinates of the target calibration signal.
  • the calculation module further includes: a first calculation unit, configured to perform rounding processing on each sampling point coordinate contained in the sampling coordinate index, to obtain the integer part of each sampling point coordinate, and to calculate the integer Partial length cutting is performed to generate an integer coordinate index; the second calculation unit is used to obtain the difference between the sampling point index coordinate and the integer coordinate index to generate a decimal coordinate index.
  • the generating module further includes: an interpolation processing unit, configured to perform interpolation processing on the signal to be processed according to a preset interpolation formula, the integer coordinate index, and the decimal coordinate index.
  • the acquisition module further includes: a judging unit, configured to judge whether the first frequency and the second frequency are consistent; in the case where the first frequency and the second frequency are not consistent, The step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency is performed. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
  • a computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps:
  • the signal to be processed is processed according to the integer coordinate index and the decimal coordinate index, and a target calibration signal is generated and output.
  • a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps:
  • the signal to be processed is processed according to the integer coordinate index and the decimal coordinate index, and a target calibration signal is generated and output.
  • the signal calibration method, device, equipment and storage medium of the present invention first obtain the first frequency corresponding to the signal to be processed, and obtain the resonant frequency of the motor as the second frequency; in the case where the first frequency and the second frequency are inconsistent, Determine the sampling coordinate index corresponding to several sampling points according to the first frequency and the second frequency; then perform preset processing on the sampling coordinate index to obtain the integer coordinate index and decimal coordinate index corresponding to the sampling coordinate index; finally according to the integer coordinate index And the decimal coordinate index to process the signal to be processed to generate and output a target calibration signal.
  • the present invention calibrates the first frequency of the signal to be processed according to the second frequency, so that the frequency when the generated target calibration signal excites the motor is matched with the second frequency, and the generated target calibration signal is adapted to the motor.
  • Fig. 1 is an application environment diagram of a signal calibration method in an embodiment
  • Figure 2 is a flowchart of a signal calibration method in an embodiment
  • Figure 3 is a flowchart of a signal calibration method in an embodiment
  • Figure 4 is a structural block diagram of a signal calibration device in an embodiment
  • Fig. 5 is a structural block diagram of a signal calibration device in an embodiment
  • Fig. 6 is a structural block diagram of a determining module in an embodiment
  • Fig. 7 is a structural block diagram of a calculation module in an embodiment
  • Fig. 8 is a structural block diagram of a computer device that executes the foregoing signal calibration method in an embodiment.
  • Fig. 1 is an application environment diagram of a signal calibration method in an embodiment.
  • the signal calibration method is applied to a motor excitation system.
  • the motor excitation system includes a terminal 110 and a server 120.
  • the terminal 110 and the server 120 are connected through a network.
  • the terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be a device for acquiring signals and/or signal frequencies.
  • the server 120 may be implemented as an independent server or a server cluster composed of multiple servers.
  • the terminal 110 is used to obtain the frequency of the excitation signal and the resonance frequency of the motor, and the server 120 is used to process the excitation signal according to the resonance frequency of the motor.
  • the above-mentioned signal calibration method can also be performed based on a terminal device that can obtain the frequency of the excitation signal and the resonance frequency of the motor, and then process the excitation signal according to the resonance frequency of the motor.
  • this embodiment is applied to the terminal as an example.
  • a signal calibration method is provided.
  • the signal calibration method specifically includes the following steps S202-S210:
  • step S202 the first frequency corresponding to the signal to be processed is acquired, and the resonance frequency of the motor is acquired as the second frequency.
  • the signal to be processed is a voltage signal that requires adjustment of parameters such as frequency and amplitude.
  • the first frequency is the motor frequency pre-specified during the design of the signal to be processed, and the second frequency is the reference resonant frequency used to adjust the frequency of the signal.
  • the desired resonance frequency is the frequency of the signal.
  • the signal to be processed is the excitation signal required to excite the motor. If the first frequency and the second frequency are inconsistent, the signal to be processed needs to be adjusted so that the signal to be processed corresponding to the first frequency corresponds to the excitation signal required by the motor. Therefore, after acquiring the first frequency and the second frequency, it is also necessary to detect and judge whether the first frequency and the second frequency are consistent. In the case that the first frequency and the second frequency are inconsistent, perform the signal calibration of steps S204-S208 In the step, when the first frequency and the second frequency are the same, directly output the signal to be processed.
  • Step S204 In a case where the first frequency and the second frequency are not consistent, determine sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency.
  • the sampling coordinate index may be a collection of sampling point coordinates corresponding to several sampling points, may be an array containing sampling point coordinates, or may be a sequence containing sampling point coordinates.
  • the sampling coordinate index corresponding to the several sampling points is determined by first determining the several sampling points through the first frequency and the second frequency, and then generating the sampling coordinate index according to the coordinates of the sampling points.
  • sampling distance and the number of sampling points can be determined according to the first frequency, the second frequency and the signal to be processed, and then the coordinates of several sampling points are determined in the signal to be processed, and the corresponding sampling coordinate index is generated according to the coordinates of the sampling points.
  • the sampling distance between the sampling points is determined according to the ratio of the first frequency and the second frequency; the number of sampling points of the several sampling points is determined according to the signal to be processed; according to the The sampling interval and the number of sampling points determine the coordinates of each sampling point, and the sampling coordinate index is constructed according to the sampling point coordinates.
  • the sampling interval is the distance between adjacent sampling points in the signal to be processed
  • the number of sampling points is the total number of sampling points in the signal to be processed.
  • the sampling point coordinates can be calculated, and then the corresponding sampling coordinate index Lcoef_tmp can be generated:
  • N represents the number of sampling points of the signal to be processed
  • f 0 represents the first frequency corresponding to the signal to be processed
  • 0, L, 2L, 3L, etc. are the signal to be processed
  • the coordinates of the sampling point In this embodiment, several sampling points on the signal to be processed are determined by calculation of the first frequency and the second frequency.
  • sampling coordinate index determined according to the sampling interval and the number of sampling points may exceed the length of the signal to be processed. Therefore, the sampling coordinate index needs to be clipped.
  • length cropping is performed on the sampling coordinate index to obtain the sampling point index coordinates of the target calibration signal.
  • the length trimming is to trim the number of sample points of the signal to be processed, which can be to retain only the value part less than the number of sample points of the signal to be processed minus a preset constant. For example, it can only retain the value less than the number of sample points of the signal to be processed minus one Numerical part.
  • the length clipping of the sampling coordinate index can prevent the selection of sampling points from exceeding the length range of the signal to be processed. Length cropping can also crop the number of sampling points according to the required signal length range, which can reduce the amount of subsequent calculations on the coordinates of the sampling points.
  • sampling coordinate index Lcoef_tmp is length-cut to obtain the sampling point index coordinate Lcoef of the target calibration signal.
  • the sampling point index coordinates Lcoef of the target calibration signal may be a collection of sampling point coordinates corresponding to several sampling points, an array containing sampling point coordinates, or a sequence containing sampling point coordinates.
  • Step S206 performing preset processing on the sampling coordinate index, and obtaining integer coordinate indexes and decimal coordinate indexes corresponding to the sampling coordinate indexes.
  • the integer coordinate index refers to a collection of the integer part of the coordinates corresponding to a number of sampling points, and it may be an array containing the integer part of the sampling point or a sequence containing the integer part of the sampling point.
  • the decimal coordinate index refers to the collection of the decimal part of the coordinates of a number of sampling points, which can be an array containing the coordinates of the sampling point, or a sequence containing the coordinates of the sampling point.
  • the preset processing is to obtain the integer part and the decimal part of the coordinate of the sampling point in the sampling coordinate index according to the preset algorithm, and then generate the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index.
  • the sampling coordinate index Lcoef_tmp is rounded to obtain the integer part Intcoef_tmp of the sampling point coordinate, and then the decimal part can be determined according to the sampling point coordinate and the integer part, and then the corresponding integer coordinate index Intcoef and the decimal coordinate index Fracoef are generated.
  • rounding is performed on each sampling point coordinate included in the sampling coordinate index, and the integer part Intcoef_tmp of each sampling point coordinate is obtained and then cropped to generate an integer coordinate index Intcoef; and each sampling point index coordinate is obtained The difference between Lcoef and the corresponding integer coordinate index Intcoef generates the decimal coordinate index Fracoef.
  • the rounding process is to obtain the integer part of the sampling point coordinate in the sampling coordinate index.
  • the sampling point coordinate is 5.3
  • the decimal part the sampling point coordinates-the integer part
  • the corresponding integer coordinates are generated according to the integer part and the decimal part of each sampling point coordinate
  • the index and the decimal coordinate index can be subsequently processed according to the integer coordinate index and the decimal coordinate index to process the signal to be processed.
  • Step S208 Process the signal to be processed according to the integer coordinate index and the decimal coordinate index to generate and output a target calibration signal.
  • the target calibration signal is a signal adjusted on the basis of the signal to be processed, and can be used as the final motor excitation signal.
  • the processing of the signal to be processed according to the integer coordinate index and the decimal coordinate index may be interpolation processing of the signal to be processed.
  • interpolation processing is performed on the signal to be processed according to a preset interpolation formula, the integer coordinate index and the decimal coordinate index.
  • the preset interpolation formula may be linear interpolation formula, Lagrangian interpolation formula, Newton interpolation formula, and/or Emilt interpolation formula, but is not limited to a certain interpolation formula. Perform interpolation processing on the signal to be processed according to the preset interpolation formula to obtain the target calibration signal.
  • the preset interpolation formula may be a linear interpolation formula, and the signal to be processed is interpolated according to the linear interpolation formula to obtain the target calibration signal.
  • X is the signal to be processed
  • Intcoef is the integer coordinate index
  • Fracoef is the decimal coordinate index
  • Y is a target calibration signal.
  • the integer part corresponding to the sampling point index coordinate Lcoef is a
  • the difference between the signal to be processed corresponding to the coordinates of a+k 1 sampling point and the signal to be processed corresponding to the coordinates of a+k 2 sampling point is calculated, and the difference is multiplied by
  • the above is the product of the fractional part in the decimal coordinate index corresponding to the obtained integer coordinate a
  • the sum of the product and the signal to be processed corresponding to the a+k 3 sampling point coordinate is obtained as the target calibration signal at the sampling point index coordinate Lcoef .
  • the target calibration signal is obtained by calculation with a linear interpolation formula.
  • the target calibration signal is calculated on the basis of the signal to be processed, and is used as a voltage signal for the final excitation of the motor. Therefore, after the target calibration signal is generated, the motor is controlled to vibrate according to the target calibration signal, so that the frequency of the motor to which the target calibration signal is adapted is close to the second frequency, which improves the consistency of the vibration effect corresponding to the excitation signal and improves the user experience.
  • the motor is controlled to vibrate, and the step of obtaining the resonant frequency of the motor as the second frequency is performed; after the target calibration signal is generated and output, the motor is controlled to vibrate according to the target calibration signal .
  • the target calibration signal is used as an excitation signal to excite the motor to control the vibration of the motor.
  • the actual resonance frequency of the motor under the target calibration signal is periodically detected. If the actual resonance frequency is different from the second frequency, the target calibration signal will be recalculated. If the actual resonance frequency is the same as the second frequency, the target calibration signal will continue to be used to excite the motor.
  • the method further includes: judging whether the first frequency and the second frequency are consistent; In the case where it is inconsistent with the second frequency, step S204 is performed: determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency. In the case where the first frequency and the second frequency are consistent, step S208 is performed: generating and outputting a target calibration signal.
  • the calculation to determine the sampling coordinate index is performed; when the first frequency and the second frequency are consistent, the signal to be processed is directly output as the target calibration signal.
  • the signal to be processed is directly output as the target calibration signal.
  • a signal calibration device is proposed, and the device includes:
  • the obtaining module 402 is configured to obtain the first frequency corresponding to the signal to be processed, and obtain the resonant frequency of the motor as the second frequency;
  • the determining module 404 is configured to determine sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency when the first frequency and the second frequency are inconsistent;
  • the calculation module 406 is configured to perform preset processing on the sampling coordinate index, and obtain the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index;
  • the generating module 408 is configured to process the signal to be processed according to the integer coordinate index and the decimal coordinate index to generate and output a target calibration signal.
  • the device further includes: an excitation module 409, configured to control the motor to vibrate and execute the step of obtaining the resonant frequency of the motor as the second frequency;
  • the target calibration signal controls the motor to vibrate.
  • the determining module 404 further includes: a first determining unit, configured to determine the sampling between the sampling points according to the ratio of the first frequency and the second frequency Spacing; determine the number of sampling points of the plurality of sampling points according to the signal to be processed; a second determining unit for determining the coordinates of each sampling point according to the sampling interval and the number of sampling points, and according to the sampling point coordinates Build the sampling coordinate index.
  • the calculation module 406 further includes: a preprocessing unit, configured to perform length-cutting on the sampling coordinate index to obtain the sampling point index coordinates of the target calibration signal.
  • the calculation module 406 further includes: a first calculation unit, configured to perform rounding processing on the coordinates of each sampling point contained in the sampling coordinate index, and obtain the coordinates of each sampling point.
  • the integer part is used for length-cutting the integer part to generate an integer coordinate index;
  • the second calculation unit is used for obtaining the difference between the sampling point index coordinate and the integer coordinate index to generate a decimal coordinate index.
  • the generating module 408 further includes: an interpolation processing unit, configured to perform interpolation processing on the signal to be processed according to a preset interpolation formula, the integer coordinate index, and the decimal coordinate index.
  • the acquiring unit 402 further includes: a judging unit for judging whether the first frequency and the second frequency are consistent; in the case where the first frequency and the second frequency are not consistent Execute the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
  • Fig. 8 shows an internal structure diagram of a computer device in an embodiment.
  • the computer device may specifically be a terminal or a server.
  • the computer device includes a processor, a memory, and a network interface connected through a system bus.
  • the memory includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium of the computer device stores an operating system, and may also store a computer program.
  • the processor can implement a signal calibration method.
  • a computer program may also be stored in the internal memory, and when the computer program is executed by the processor, the processor can execute the signal calibration method.
  • FIG. 8 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps: Process the first frequency corresponding to the signal, and obtain the resonant frequency of the motor as the second frequency; in the case where the first frequency and the second frequency are inconsistent, determine several frequencies based on the first frequency and the second frequency
  • the sampling coordinate index corresponding to the sampling point performing preset processing on the sampling coordinate index to obtain the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index; according to a pair of the integer coordinate index and the decimal coordinate index
  • the signal to be processed is processed to generate and output a target calibration signal.
  • the method further includes: controlling the motor to vibrate, and performing the step of obtaining the resonant frequency of the motor as the second frequency; after the step of generating and outputting a target calibration signal, further including: The motor is controlled to vibrate according to the target calibration signal.
  • the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency further includes: determining according to the ratio of the first frequency and the second frequency The sampling interval between the sampling points; the number of sampling points of the several sampling points is determined according to the signal to be processed; the coordinates of each sampling point are determined according to the sampling interval and the number of sampling points, and according to the sampling point The coordinates construct the sampling coordinate index.
  • the method further includes: performing length cropping on the sampling coordinate index to obtain a target calibration signal The index coordinates of the sampling point.
  • the method further includes: rounding each sampling point coordinate contained in the sampling coordinate index to obtain the integer of each sampling point coordinate In the part, the integer part is length-cut to generate an integer coordinate index; the difference between the sampling point index coordinate and the integer coordinate index is obtained to generate a decimal coordinate index.
  • the step of processing the signal to be processed according to the integer coordinate index and the decimal coordinate index further includes: according to a preset interpolation formula, the integer coordinate index and the decimal coordinate The index performs interpolation processing on the signal to be processed.
  • Y is the target calibration signal.
  • the method further includes: judging whether the first frequency and the second frequency are consistent; In the case where the second frequencies are not consistent, the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency is performed. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
  • a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps: obtaining a first frequency corresponding to a signal to be processed, Acquiring the resonance frequency of the motor as the second frequency; in the case where the first frequency and the second frequency are inconsistent, determining the sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency; Performing preset processing on the sampling coordinate index to obtain integer coordinate indexes and decimal coordinate indexes corresponding to the sampling coordinate index; processing the signal to be processed according to the integer coordinate index and the decimal coordinate index, Generate and output the target calibration signal.
  • the method further includes: controlling the motor to vibrate, and performing the step of obtaining the resonant frequency of the motor as the second frequency; after the step of generating and outputting a target calibration signal, further including: The motor is controlled to vibrate according to the target calibration signal.
  • the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency further includes: determining according to the ratio of the first frequency and the second frequency The sampling interval between the sampling points; the number of sampling points of the several sampling points is determined according to the signal to be processed; the coordinates of each sampling point are determined according to the sampling interval and the number of sampling points, and according to the sampling point The coordinates construct the sampling coordinate index.
  • the method further includes: performing length cropping on the sampling coordinate index to obtain a target calibration signal The index coordinates of the sampling point.
  • the method further includes: rounding each sampling point coordinate contained in the sampling coordinate index to obtain the integer of each sampling point coordinate In the part, the integer part is length-cut to generate an integer coordinate index; the difference between the sampling point index coordinate and the integer coordinate index is obtained to generate a decimal coordinate index.
  • the step of processing the signal to be processed according to the integer coordinate index and the decimal coordinate index further includes: according to a preset interpolation formula, the integer coordinate index and the decimal coordinate The index performs interpolation processing on the signal to be processed.
  • Y is the target calibration signal.
  • the method further includes: judging whether the first frequency and the second frequency are consistent; In the case where the second frequencies are inconsistent, the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency is performed. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
  • the signal calibration method, device, equipment and storage medium of the present invention first obtain the first frequency corresponding to the signal to be processed, and obtain the resonant frequency of the motor as the second frequency; when the first frequency and the second frequency are inconsistent, Determine the sampling coordinate index corresponding to several sampling points according to the first frequency and the second frequency; then perform preset processing on the sampling coordinate index to obtain the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index; finally according to the integer coordinate index And the decimal coordinate index to process the signal to be processed to generate and output a target calibration signal.
  • the present invention calibrates the first frequency of the signal to be processed according to the second frequency, so that the frequency when the generated target calibration signal excites the motor is matched with the second frequency, and the generated target calibration signal is adapted to the motor.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synch l) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Channel
  • memory bus Radbus direct RAM
  • RDRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Abstract

Disclosed in embodiments of the present invention is a signal calibration method. The method comprises: obtaining a first frequency corresponding to a signal to be processed, and obtaining a resonant frequency of a motor as a second frequency; under the condition that the first frequency and the second frequency are inconsistent, determining sampling coordinate indexes corresponding to a plurality of sampling points according to the first frequency and the second frequency; performing preset processing on the sampling coordinate indexes to obtain integer coordinate indexes and decimal coordinate indexes corresponding to the sampling coordinate indexes; and processing the signal to be processed according to the integer coordinate indexes and the decimal coordinate indexes to generate a target calibration signal, and outputting the target calibration signal. By adopting the signal calibration method provided by the invention, a vibration effect difference caused by a performance or parameter difference of different motor units can be reduced, the consistency of the vibration effect corresponding to an excitation signal is improved, and the user experience is improved. In addition, also provided are a signal calibration apparatus and device, and a storage medium.

Description

信号校准的方法、装置、设备及存储介质Signal calibration method, device, equipment and storage medium 技术领域Technical field
本发明涉及信号处理技术领域,尤其涉及一种信号校准的方法、装置、设备及存储介质。The present invention relates to the technical field of signal processing, in particular to a method, device, equipment and storage medium for signal calibration.
背景技术Background technique
触觉反馈技术是通过改变作用力、振动等方式使得使用者感受触感变化。触觉反馈技术可被应用于智能手机、平板电脑等的虚拟场景或者虚拟对象的辅助创建和控制。其中,将特定的激励信号加载于致动器(即马达),使其输出特定的振动效果,是触觉反馈的一种主要的实现方式。The tactile feedback technology makes the user feel the changes in tactile sensation by changing the force, vibration and other methods. Tactile feedback technology can be applied to the auxiliary creation and control of virtual scenes or virtual objects in smart phones, tablet computers, etc. Among them, loading a specific excitation signal on an actuator (ie, a motor) to output a specific vibration effect is a main way to realize haptic feedback.
通常情况下,马达的激励信号仅针对特定的马达频率,使其输出特定的振动效果。而在实际应用场景中,由于不同的马达单体之间存在差异,例如明显的谐振频率的差异,会导致激励信号与马达单体的不适配,引起振动效果的差异,无法输出特定的振动效果。Normally, the excitation signal of the motor is only aimed at a specific motor frequency, so that it outputs a specific vibration effect. However, in actual application scenarios, due to the differences between different motor units, such as obvious differences in resonance frequency, it will cause the excitation signal to be mismatched with the motor units, causing the difference in vibration effects and failing to output specific vibrations. effect.
因此,亟需一种调整激励信号与马达适配的方法。Therefore, there is an urgent need for a method to adjust the excitation signal and the motor.
发明内容Summary of the invention
基于此,有必要针对上述问题,提出了一种信号校准的方法、装置、计算机设备及存储介质。Based on this, it is necessary to propose a signal calibration method, device, computer equipment, and storage medium to address the above-mentioned problems.
一种信号校准的方法,所述方法包括:A signal calibration method, the method includes:
获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;Acquiring the first frequency corresponding to the signal to be processed, and acquiring the resonant frequency of the motor as the second frequency;
在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引;In a case where the first frequency and the second frequency are not consistent, determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency;
对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引;Performing preset processing on the sampling coordinate index, and obtaining integer coordinate indexes and decimal coordinate indexes corresponding to the sampling coordinate index;
根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。The signal to be processed is processed according to the integer coordinate index and the decimal coordinate index, and a target calibration signal is generated and output.
在一个实施例中,所述方法还包括:控制所述马达进行振动,并执行所述获取马达的谐振频率作为第二频率的步骤;所述生成目标校准信号并输出的步骤之后,还包括:根据所述目标校准信号控制所述马达进行振动。In one embodiment, the method further includes: controlling the motor to vibrate, and performing the step of obtaining the resonant frequency of the motor as the second frequency; after the step of generating and outputting the target calibration signal, further including: The motor is controlled to vibrate according to the target calibration signal.
在一个实施例中,所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤还包括:根据所述第一频率和所述第二频率的比值确定所述采样点之间的采样间距;根据待处理信号确定所述若干个采样点的采样点数量;根据所述采样间距和所述采样点数量确定每一个采样点坐标,并根据所述采样点坐标构建采样坐标索引。In an embodiment, the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency further includes: determining according to the ratio of the first frequency and the second frequency The sampling interval between the sampling points; the number of sampling points of the several sampling points is determined according to the signal to be processed; the coordinates of each sampling point are determined according to the sampling interval and the number of sampling points, and according to the sampling point The coordinates construct the sampling coordinate index.
在一个实施例中,所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤之后,还包括:对所述采样坐标索引进行长度裁剪获得目标校准信号的采样点索引坐标。In an embodiment, after the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency, the method further includes: performing length cropping on the sampling coordinate index to obtain a target calibration signal The index coordinates of the sampling point.
在一个实施例中,所述并根据所述采样点坐标构建采样坐标索引的步骤之后,还包括:对采样坐标索引包含的每一个采样点坐标进行取整处理,获取每一个采样点坐标的整数部分,对所述整数部分进行长度裁剪生成整数坐标索引;获取所述采样点索引坐标与整数坐标索引的差值生成小数坐标索引。In one embodiment, after the step of constructing a sampling coordinate index based on the sampling point coordinates, the method further includes: rounding each sampling point coordinate contained in the sampling coordinate index to obtain the integer of each sampling point coordinate In the part, the integer part is length-cut to generate an integer coordinate index; the difference between the sampling point index coordinate and the integer coordinate index is obtained to generate a decimal coordinate index.
在一个实施例中,所述根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理的步骤还包括:根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理。In an embodiment, the step of processing the signal to be processed according to the integer coordinate index and the decimal coordinate index further includes: according to a preset interpolation formula, the integer coordinate index and the decimal coordinate The index performs interpolation processing on the signal to be processed.
在一个实施例中,所述根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理的步骤,还包括:根据公式Y=Fracoef×(X<Intcoef+k 1>-X<Intcoef+k 2>)+X<Intcoef+k 3>计算所述待处理信号,其中,X为待处理信号,Intcoef为整数坐标索引,Fracoef为小数坐标索引,k 1、k 2、k 3为常数项且k 2=k 3,X<Intcoef+k i>(i=1,2,3)是在整数坐标索引Intcoef+k i(i=1,2,3)下的待处理信号,Y是目标校准信号。 In one embodiment, the step of performing interpolation processing on the signal to be processed according to the preset interpolation formula, the integer coordinate index and the decimal coordinate index further includes: according to the formula Y=Fracoef×(X< Intcoef+k 1 >-X<Intcoef+k 2 >)+X<Intcoef+k 3 > calculate the signal to be processed, where X is the signal to be processed, Intcoef is the integer coordinate index, Fracoef is the decimal coordinate index, and k 1, k 2, k 3 is a constant term and k 2 = k 3, X < Intcoef + k i> (i = 1,2,3) are the coordinates in an integer index Intcoef + k i (i = 1,2,3 The signal to be processed under ), Y is the target calibration signal.
在一个实施例中,所述获取待校准设备对应的谐振频率作为第二频率的步骤之后,还包括:判断所述第一频率和所述第二频率是否一致;在所述第一频率和所述第二频率不一致的情况下,执行所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤。在所述第一频率和所述第二频率一致的情况下,执行所述生成目标校准信号并输出的步骤。In an embodiment, after the step of obtaining the resonant frequency corresponding to the device to be calibrated as the second frequency, the method further includes: judging whether the first frequency and the second frequency are consistent; In the case where the second frequencies are not consistent, the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency is performed. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
一种信号校准的装置,所述装置包括:A signal calibration device, said device comprising:
获取模块,用于获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;An obtaining module, configured to obtain the first frequency corresponding to the signal to be processed, and obtain the resonant frequency of the motor as the second frequency;
确定模块,用于在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引;A determining module, configured to determine sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency when the first frequency and the second frequency are inconsistent;
计算模块,用于对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引;A calculation module, configured to perform preset processing on the sampling coordinate index, and obtain the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index;
生成模块,用于根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。The generating module is configured to process the signal to be processed according to the integer coordinate index and the decimal coordinate index to generate and output a target calibration signal.
在一个实施例中,所述装置还包括:激励模块,用于控制所述马达进行振动,并执行所述获取马达的谐振频率作为第二频率的步骤;根据所述目标校准信号控制所述马达进行振动。In one embodiment, the device further includes: an excitation module for controlling the motor to vibrate and performing the step of obtaining the resonant frequency of the motor as the second frequency; and controlling the motor according to the target calibration signal Vibrate.
在一个实施例中,所述确定模块还包括:第一确定单元,用于根据所述第一频率和所述第二频率的比值确定所述采样点之间的采样间距;根据待处理信号确定所述若干个采样点的采样点数量;第二确定单元,用于根据所述采样间距和所述采样点数量确定每一个采样点坐标,并根据所述采样点坐标构建采样坐标索引。In an embodiment, the determining module further includes: a first determining unit, configured to determine the sampling distance between the sampling points according to the ratio of the first frequency and the second frequency; and determine the sampling distance between the sampling points according to the signal to be processed The number of sampling points of the several sampling points; the second determining unit is configured to determine the coordinates of each sampling point according to the sampling distance and the number of sampling points, and construct a sampling coordinate index according to the sampling point coordinates.
在一个实施例中,所述计算模块还包括:预处理单元,用于对所述采样坐标索引进行长度裁剪获得目标校准信号的采样点索引坐标。In an embodiment, the calculation module further includes: a preprocessing unit, configured to perform length cropping on the sampling coordinate index to obtain the sampling point index coordinates of the target calibration signal.
在一个实施例中,所述计算模块还包括:第一计算单元,用于对采样坐标索引包含的每一个采样点坐标进行取整处理,获取每一个采样点坐标的整数部分,对所述整数部分进行长度裁剪生成整数坐标索引;第二计算单元,用于获取所述采样点索引坐标与整数坐标索引的差值生成小数坐标索引。In an embodiment, the calculation module further includes: a first calculation unit, configured to perform rounding processing on each sampling point coordinate contained in the sampling coordinate index, to obtain the integer part of each sampling point coordinate, and to calculate the integer Partial length cutting is performed to generate an integer coordinate index; the second calculation unit is used to obtain the difference between the sampling point index coordinate and the integer coordinate index to generate a decimal coordinate index.
在一个实施例中,所述生成模块还包括:插值处理单元,用于根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理。In an embodiment, the generating module further includes: an interpolation processing unit, configured to perform interpolation processing on the signal to be processed according to a preset interpolation formula, the integer coordinate index, and the decimal coordinate index.
在一个实施例中,所述插值处理单元还包括:插值计算子模块,用于根据公式Y=Fracoef×(X<Intcoef+k 1>-X<Intcoef+k 2>)+X<Intcoef+k 3>计算所述待处理信号,其中,X为待处理信号,Intcoef为整数坐标索引,Fracoef为小数坐标索引,k 1、k 2、k 3为常数项且k 2=k 3,X<Intcoef+k i>(i=1,2,3)是在整数坐标索引Intcoef+k i(i=1,2,3)下的待处 理信号,Y是目标校准信号。 In an embodiment, the interpolation processing unit further includes: an interpolation calculation sub-module for calculating according to the formula Y=Fracoef×(X<Intcoef+k 1 >-X<Intcoef+k 2 >)+X<Intcoef+k 3 >Calculate the signal to be processed, where X is the signal to be processed, Intcoef is the integer coordinate index, Fracoef is the decimal coordinate index, k 1 , k 2 , and k 3 are constant terms and k 2 =k 3 , X<Intcoef + k i> (i = 1,2,3 ) are the coordinates in an integer index Intcoef + k i in the signal to be processed (i = 1,2,3), Y is a target calibration signal.
在一个实施例中,所述获取模块还包括:判断单元,用于判断所述第一频率和所述第二频率是否一致;在所述第一频率和所述第二频率不一致的情况下,执行所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤。在所述第一频率和所述第二频率一致的情况下,执行所述生成目标校准信号并输出的步骤。In an embodiment, the acquisition module further includes: a judging unit, configured to judge whether the first frequency and the second frequency are consistent; in the case where the first frequency and the second frequency are not consistent, The step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency is performed. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行以下步骤:A computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps:
获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;Acquiring the first frequency corresponding to the signal to be processed, and acquiring the resonant frequency of the motor as the second frequency;
在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引;In a case where the first frequency and the second frequency are not consistent, determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency;
对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引;Performing preset processing on the sampling coordinate index, and obtaining integer coordinate indexes and decimal coordinate indexes corresponding to the sampling coordinate index;
根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。The signal to be processed is processed according to the integer coordinate index and the decimal coordinate index, and a target calibration signal is generated and output.
一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行以下步骤:A computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps:
获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;Acquiring the first frequency corresponding to the signal to be processed, and acquiring the resonant frequency of the motor as the second frequency;
在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引;In a case where the first frequency and the second frequency are not consistent, determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency;
对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引;Performing preset processing on the sampling coordinate index, and obtaining integer coordinate indexes and decimal coordinate indexes corresponding to the sampling coordinate index;
根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。The signal to be processed is processed according to the integer coordinate index and the decimal coordinate index, and a target calibration signal is generated and output.
采用本发明的信号校准的方法、装置、设备及存储介质,首先获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;在第一频率和第二频率不一致的情况下,根据第一频率和第二频率确定若干个采样点对应的采样坐标索引;接着对采样坐标索引进行预设的处理,获取与采样坐标索引对应的整数坐标索引和小数坐标索引;最后根据整数坐标索引和小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。本发明根据第二频率对待处理信号的第一频率进行校准,使得生成的目标校准信号对马达进行激励时的频率与第二频率匹配、生成的目标校准信号与马达适配。采用本发明的信号校准的方法、装置、设备及存储介质之后,能降低不同马达单体的性能或参数差异造成的振动效果差异,提高了激励信号对应的振动效果的一致性,提升了用户体验。Using the signal calibration method, device, equipment and storage medium of the present invention, first obtain the first frequency corresponding to the signal to be processed, and obtain the resonant frequency of the motor as the second frequency; in the case where the first frequency and the second frequency are inconsistent, Determine the sampling coordinate index corresponding to several sampling points according to the first frequency and the second frequency; then perform preset processing on the sampling coordinate index to obtain the integer coordinate index and decimal coordinate index corresponding to the sampling coordinate index; finally according to the integer coordinate index And the decimal coordinate index to process the signal to be processed to generate and output a target calibration signal. The present invention calibrates the first frequency of the signal to be processed according to the second frequency, so that the frequency when the generated target calibration signal excites the motor is matched with the second frequency, and the generated target calibration signal is adapted to the motor. After adopting the signal calibration method, device, equipment and storage medium of the present invention, the difference in vibration effect caused by the performance or parameter difference of different motor monomers can be reduced, the consistency of the vibration effect corresponding to the excitation signal is improved, and the user experience is improved .
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
其中:among them:
图1为一个实施例中信号校准的方法的应用环境图;Fig. 1 is an application environment diagram of a signal calibration method in an embodiment;
图2为一个实施例中信号校准的方法的流程图;Figure 2 is a flowchart of a signal calibration method in an embodiment;
图3为一个实施例中信号校准的方法的流程图;Figure 3 is a flowchart of a signal calibration method in an embodiment;
图4为一个实施例中信号校准的装置的结构框图;Figure 4 is a structural block diagram of a signal calibration device in an embodiment;
图5为一个实施例中信号校准的装置的结构框图;Fig. 5 is a structural block diagram of a signal calibration device in an embodiment;
图6为一个实施例中确定模块的结构框图;Fig. 6 is a structural block diagram of a determining module in an embodiment;
图7为一个实施例中计算模块的结构框图;Fig. 7 is a structural block diagram of a calculation module in an embodiment;
图8为一个实施例中执行前述信号校准的方法的计算机设备的结构框图。Fig. 8 is a structural block diagram of a computer device that executes the foregoing signal calibration method in an embodiment.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
图1为一个实施例中信号校准的方法的应用环境图。参照图1,该信号校准的方法应用于马达激励系统。该马达激励系统包括终端110和服务器120。终端110和服务器120通过网络连接,终端110具体可以是台式终端或移动终端,移动终端具体可以是获取信号和/或信号频率的设备。服务器120可以用独立的服务器或者是多个服务器组成的服务器集群来实现。终端110用于获取激励信号的频率和马达的谐振频率,服务器120用于根据马达的谐振频率对激励信号进行处理。Fig. 1 is an application environment diagram of a signal calibration method in an embodiment. Referring to Figure 1, the signal calibration method is applied to a motor excitation system. The motor excitation system includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be a device for acquiring signals and/or signal frequencies. The server 120 may be implemented as an independent server or a server cluster composed of multiple servers. The terminal 110 is used to obtain the frequency of the excitation signal and the resonance frequency of the motor, and the server 120 is used to process the excitation signal according to the resonance frequency of the motor.
在另一个实施例中,上述信号校准的方法的执行还可以是基于一终端设备,该终端可获取激励信号的频率和马达的谐振频率,之后根据马达的谐振频率对激励信号进行处理。In another embodiment, the above-mentioned signal calibration method can also be performed based on a terminal device that can obtain the frequency of the excitation signal and the resonance frequency of the motor, and then process the excitation signal according to the resonance frequency of the motor.
考虑到该方法既可以应用于终端,也可以应用于服务器,且在具体的信号校准的过程是相同的,本实施例以应用于终端举例说明。Considering that this method can be applied to both the terminal and the server, and the specific signal calibration process is the same, this embodiment is applied to the terminal as an example.
如图2所示,在一个实施例中,提供了一种信号校准的方法。该信号校准的方法具体包括如下步骤S202-S210:As shown in Fig. 2, in one embodiment, a signal calibration method is provided. The signal calibration method specifically includes the following steps S202-S210:
步骤S202,获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率。In step S202, the first frequency corresponding to the signal to be processed is acquired, and the resonance frequency of the motor is acquired as the second frequency.
具体的,待处理信号是需要对频率和振幅等参数进行调整的电压信号,第一频率是待处理信号在设计时预先指定的马达频率,第二频率是调整信号频率使用的参考谐振频率,是期望得到的谐振频率。Specifically, the signal to be processed is a voltage signal that requires adjustment of parameters such as frequency and amplitude. The first frequency is the motor frequency pre-specified during the design of the signal to be processed, and the second frequency is the reference resonant frequency used to adjust the frequency of the signal. The desired resonance frequency.
如果第一频率和第二频率一致,则不需要对待处理信号的第一频率进行调整,待处理信号是激励马达所需的激励信号。如果第一频率和第二频率不一致,则需要待处理信号进行调整,以使第一频率对应的待处理信号和马达所需的激励信号相对应。因此在获取第一频率、第二频率之后,还需要对第一频率与第二频率是否一致进行检测和判断,在第一频率和第二频率不一致的情况下,执行步骤S204-S208的信号校准的步骤,在第一频率和第二频率一致的情况下,直接输出待处理信号。If the first frequency and the second frequency are the same, there is no need to adjust the first frequency of the signal to be processed, and the signal to be processed is the excitation signal required to excite the motor. If the first frequency and the second frequency are inconsistent, the signal to be processed needs to be adjusted so that the signal to be processed corresponding to the first frequency corresponds to the excitation signal required by the motor. Therefore, after acquiring the first frequency and the second frequency, it is also necessary to detect and judge whether the first frequency and the second frequency are consistent. In the case that the first frequency and the second frequency are inconsistent, perform the signal calibration of steps S204-S208 In the step, when the first frequency and the second frequency are the same, directly output the signal to be processed.
步骤S204,在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引。Step S204: In a case where the first frequency and the second frequency are not consistent, determine sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency.
具体的,采样坐标索引可以是若干个采样点对应的采样点坐标的集合,可以是包含采样点坐标的数组,也可以是包含采样点坐标的序列。根据第一频率和第二频率确定若干个采样点对应的采样坐标索引是先通过第一频率和第二频率确定若干个采样点,然后根据采样点的 坐标生成采样坐标索引。Specifically, the sampling coordinate index may be a collection of sampling point coordinates corresponding to several sampling points, may be an array containing sampling point coordinates, or may be a sequence containing sampling point coordinates. According to the first frequency and the second frequency, the sampling coordinate index corresponding to the several sampling points is determined by first determining the several sampling points through the first frequency and the second frequency, and then generating the sampling coordinate index according to the coordinates of the sampling points.
根据第一频率、第二频率和待处理信号可以确定采样点的采样间距和采样点数量,进而在待处理信号中确定若干采样点的坐标,根据采样点的坐标生成对应的采样坐标索引。The sampling distance and the number of sampling points can be determined according to the first frequency, the second frequency and the signal to be processed, and then the coordinates of several sampling points are determined in the signal to be processed, and the corresponding sampling coordinate index is generated according to the coordinates of the sampling points.
在一个实施例中,根据所述第一频率和所述第二频率的比值确定所述采样点之间的采样间距;根据待处理信号确定所述若干个采样点的采样点数量;根据所述采样间距和所述采样点数量确定每一个采样点坐标,并根据所述采样点坐标构建采样坐标索引。In one embodiment, the sampling distance between the sampling points is determined according to the ratio of the first frequency and the second frequency; the number of sampling points of the several sampling points is determined according to the signal to be processed; according to the The sampling interval and the number of sampling points determine the coordinates of each sampling point, and the sampling coordinate index is constructed according to the sampling point coordinates.
其中,采样间距是待处理信号中相邻采样点之间的距离,采样点数量是待处理信号中采样点的总数。明确了待处理信号的采样间距和采样点数量之后,可以确定采样点坐标,根据采样点坐标的集合构建采样坐标索引。Among them, the sampling interval is the distance between adjacent sampling points in the signal to be processed, and the number of sampling points is the total number of sampling points in the signal to be processed. After clarifying the sampling interval and the number of sampling points of the signal to be processed, the sampling point coordinates can be determined, and the sampling coordinate index can be constructed according to the collection of the sampling point coordinates.
根据第一频率和第二频率可以计算得到采样点坐标,进而生成对应的采样坐标索引Lcoef_tmp:According to the first frequency and the second frequency, the sampling point coordinates can be calculated, and then the corresponding sampling coordinate index Lcoef_tmp can be generated:
Lcoef_tmp={0,L,2L,3L,…,N}Lcoef_tmp={0,L,2L,3L,...,N}
L=f 0/f 0L=f 0 /f 0
其中,N表示待处理信号的采样点数量,f 0表示待处理信号对应的第一频率,f 0’表示马达的谐振频率即第二频率;0,L,2L,3L等为待处理信号的采样点坐标。本实施例通过第一频率和第二频率的计算确定了在待处理信号上的若干采样点。 Among them, N represents the number of sampling points of the signal to be processed, f 0 represents the first frequency corresponding to the signal to be processed, f 0 'represents the resonant frequency of the motor, that is, the second frequency; 0, L, 2L, 3L, etc. are the signal to be processed The coordinates of the sampling point. In this embodiment, several sampling points on the signal to be processed are determined by calculation of the first frequency and the second frequency.
根据采样间距和采样点数量确定的采样坐标索引,可能超出了待处理信号的长度,因此,需要对采样坐标索引进行裁剪。The sampling coordinate index determined according to the sampling interval and the number of sampling points may exceed the length of the signal to be processed. Therefore, the sampling coordinate index needs to be clipped.
在一个实施例中,对所述采样坐标索引进行长度裁剪获得目标校准信号的采样点索引坐标。In an embodiment, length cropping is performed on the sampling coordinate index to obtain the sampling point index coordinates of the target calibration signal.
其中,长度剪裁是对待处理信号的采样点数量进行裁剪,可以是仅保留小于待处理信号采样点数量减预设的常数的数值部分,例如,可以仅保留小于待处理信号采样点数量减一的数值部分。对采样坐标索引进行长度裁剪能够防止采样点的选取超出待处理信号的长度范围。长度裁剪也可以根据需要得到的信号长度范围对采样点数量进行裁剪,可以减少后续对采样点坐标的计算量。Among them, the length trimming is to trim the number of sample points of the signal to be processed, which can be to retain only the value part less than the number of sample points of the signal to be processed minus a preset constant. For example, it can only retain the value less than the number of sample points of the signal to be processed minus one Numerical part. The length clipping of the sampling coordinate index can prevent the selection of sampling points from exceeding the length range of the signal to be processed. Length cropping can also crop the number of sampling points according to the required signal length range, which can reduce the amount of subsequent calculations on the coordinates of the sampling points.
具体的,对采样坐标索引Lcoef_tmp进行长度裁剪,得到目标校准信号的采样点索引坐标Lcoef。目标校准信号的采样点索引坐标Lcoef可以是若干个采样点对应的采样点坐标的集合,可以是包含采样点坐标的数组,也可以是包含采样点坐标的序列。Specifically, the sampling coordinate index Lcoef_tmp is length-cut to obtain the sampling point index coordinate Lcoef of the target calibration signal. The sampling point index coordinates Lcoef of the target calibration signal may be a collection of sampling point coordinates corresponding to several sampling points, an array containing sampling point coordinates, or a sequence containing sampling point coordinates.
步骤S206,对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引。Step S206, performing preset processing on the sampling coordinate index, and obtaining integer coordinate indexes and decimal coordinate indexes corresponding to the sampling coordinate indexes.
具体的,整数坐标索引是指若干采样点对应的坐标的整数部分的集合,可以是包含采样点整数部分的数组,也可以是包含采样点整数部分的序列。小数坐标索引是指若干采样点的坐标的小数部分的集合,可以是包含采样点坐标的数组,也可以是包含采样点坐标的序列。预设的处理是按照预设的算法获取采样坐标索引中采样点的坐标的整数部分和小数部分,进而生成采样坐标索引对应的整数坐标索引和小数坐标索引。Specifically, the integer coordinate index refers to a collection of the integer part of the coordinates corresponding to a number of sampling points, and it may be an array containing the integer part of the sampling point or a sequence containing the integer part of the sampling point. The decimal coordinate index refers to the collection of the decimal part of the coordinates of a number of sampling points, which can be an array containing the coordinates of the sampling point, or a sequence containing the coordinates of the sampling point. The preset processing is to obtain the integer part and the decimal part of the coordinate of the sampling point in the sampling coordinate index according to the preset algorithm, and then generate the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index.
在一个具体的实施例中,对整数坐标索引和小数坐标索引的获取过程进行详细的说明。In a specific embodiment, the process of obtaining the integer coordinate index and the decimal coordinate index is described in detail.
首先对采样坐标索引Lcoef_tmp进行取整处理,获取采样点坐标的整数部分Intcoef_tmp,然后根据采样点坐标和整数部分可以确定小数部分,进而生成分别对应的整数坐标索引Intcoef和小数坐标索引Fracoef。First, the sampling coordinate index Lcoef_tmp is rounded to obtain the integer part Intcoef_tmp of the sampling point coordinate, and then the decimal part can be determined according to the sampling point coordinate and the integer part, and then the corresponding integer coordinate index Intcoef and the decimal coordinate index Fracoef are generated.
在一个实施例中,对采样坐标索引包含的每一个采样点坐标进行取整处理,获取每一个 采样点坐标的整数部分Intcoef_tmp后对其进行裁剪生成整数坐标索引Intcoef;获取每一个采样点索引坐标Lcoef与对应的整数坐标索引Intcoef的差值生成小数坐标索引Fracoef。In one embodiment, rounding is performed on each sampling point coordinate included in the sampling coordinate index, and the integer part Intcoef_tmp of each sampling point coordinate is obtained and then cropped to generate an integer coordinate index Intcoef; and each sampling point index coordinate is obtained The difference between Lcoef and the corresponding integer coordinate index Intcoef generates the decimal coordinate index Fracoef.
其中,取整处理是获取采样坐标索引中的采样点坐标的整数部分,例如,采样点坐标为5.3,对采样点进行取整处理可以是[5.3]=5,得到采样点坐标的整数部分5。获取采样点坐标与对应的整数部分的差值得到采样点坐标的小数部分,即小数部分=采样点坐标-整数部分,再根据每一个采样点坐标的整数部分和小数部分分别生成对应的整数坐标索引和小数坐标索引,后续可以根据整数坐标索引和小数坐标索引对待处理信号进行处理。Among them, the rounding process is to obtain the integer part of the sampling point coordinate in the sampling coordinate index. For example, the sampling point coordinate is 5.3, and the rounding process for the sampling point can be [5.3]=5 to obtain the integer part of the sampling point coordinate 5. . Obtain the difference between the sampling point coordinates and the corresponding integer part to obtain the decimal part of the sampling point coordinates, that is, the decimal part = the sampling point coordinates-the integer part, and then the corresponding integer coordinates are generated according to the integer part and the decimal part of each sampling point coordinate The index and the decimal coordinate index can be subsequently processed according to the integer coordinate index and the decimal coordinate index to process the signal to be processed.
步骤S208,根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。Step S208: Process the signal to be processed according to the integer coordinate index and the decimal coordinate index to generate and output a target calibration signal.
具体的,目标校准信号是在待处理信号的基础上调整得到的信号,可以作为最终的马达激励信号。Specifically, the target calibration signal is a signal adjusted on the basis of the signal to be processed, and can be used as the final motor excitation signal.
根据整数坐标索引和小数坐标索引对待处理信号进行处理可以是对待处理信号进行插值处理。The processing of the signal to be processed according to the integer coordinate index and the decimal coordinate index may be interpolation processing of the signal to be processed.
在一个实施例中,根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理。In an embodiment, interpolation processing is performed on the signal to be processed according to a preset interpolation formula, the integer coordinate index and the decimal coordinate index.
其中,预设的插值公式可以是线性插值公式、拉格朗日插值公式、牛顿插值公式和/或埃米尔特插值公式等插值公式,但不限于某一种插值公式。根据预设的插值公式对待处理信号进行插值处理得到目标校准信号。The preset interpolation formula may be linear interpolation formula, Lagrangian interpolation formula, Newton interpolation formula, and/or Emilt interpolation formula, but is not limited to a certain interpolation formula. Perform interpolation processing on the signal to be processed according to the preset interpolation formula to obtain the target calibration signal.
具体的,预设的插值公式可以是线性插值公式,根据线性插值公式对待处理信号进行插值处理,进而得到目标校准信号。Specifically, the preset interpolation formula may be a linear interpolation formula, and the signal to be processed is interpolated according to the linear interpolation formula to obtain the target calibration signal.
在一个实施例中,根据线性插值公式In one embodiment, according to the linear interpolation formula
Y=Fracoef×(X<Intcoef+k 1>-X<Intcoef+k 2>)+X<Intcoef+k 3> Y=Fracoef×(X<Intcoef+k 1 >-X<Intcoef+k 2 >)+X<Intcoef+k 3 >
计算待处理信号,其中,X为待处理信号,Intcoef为整数坐标索引,Fracoef为小数坐标索引,k 1、k 2、k 3为常数项且k 2=k 3,X<Intcoef+k i>(i=1,2,3)是在整数坐标索引Intcoef+k i(i=1,2,3)下的待处理信号,Y是目标校准信号。其中,典型的插值方式为相邻点线性插值,此时,k 1=2,k 2=k 3=1。 Calculate the signal to be processed, where X is the signal to be processed, Intcoef is the integer coordinate index, Fracoef is the decimal coordinate index, k 1 , k 2 , and k 3 are constant terms and k 2 =k 3 , X<Intcoef+k i > (i = 1,2,3) are the coordinates in an integer index Intcoef + k i in the signal to be processed (i = 1,2,3), Y is a target calibration signal. Among them, a typical interpolation method is linear interpolation between adjacent points. In this case, k 1 =2 and k 2 =k 3 =1.
具体的,采样点索引坐标Lcoef对应的整数部分为a,计算a+k 1采样点坐标对应的待处理信号与a+k 2采样点坐标对应的待处理信号的差值,获取该差值乘上与取得的整数坐标a对应的小数坐标索引中的小数部分的乘积,获取该乘积与a+k 3采样点坐标对应的待处理信号的和值作为在采样点索引坐标Lcoef处的目标校准信号。遍历所有采样点对应的整数坐标索引和小数坐标索引对待处理信号进行插值处理,得到目标校准信号。本实施例通过线性插值公式进行计算得到了目标校准信号。 Specifically, the integer part corresponding to the sampling point index coordinate Lcoef is a, the difference between the signal to be processed corresponding to the coordinates of a+k 1 sampling point and the signal to be processed corresponding to the coordinates of a+k 2 sampling point is calculated, and the difference is multiplied by The above is the product of the fractional part in the decimal coordinate index corresponding to the obtained integer coordinate a, and the sum of the product and the signal to be processed corresponding to the a+k 3 sampling point coordinate is obtained as the target calibration signal at the sampling point index coordinate Lcoef . Traverse the integer coordinate index and decimal coordinate index corresponding to all sampling points to perform interpolation processing on the signal to be processed to obtain the target calibration signal. In this embodiment, the target calibration signal is obtained by calculation with a linear interpolation formula.
目标校准信号在待处理信号的基础上计算所得,用于最终激励马达的电压信号。因此在生成目标校准信号之后,根据目标校准信号控制马达进行振动,使得目标校准信号所适配的马达频率接近第二频率,提高了激励信号对应的振动效果的一致性,提升了用户体验。The target calibration signal is calculated on the basis of the signal to be processed, and is used as a voltage signal for the final excitation of the motor. Therefore, after the target calibration signal is generated, the motor is controlled to vibrate according to the target calibration signal, so that the frequency of the motor to which the target calibration signal is adapted is close to the second frequency, which improves the consistency of the vibration effect corresponding to the excitation signal and improves the user experience.
在一个实施例中,控制所述马达进行振动,并执行所述获取马达的谐振频率作为第二频率的步骤;在生成目标校准信号并输出之后,根据所述目标校准信号控制所述马达进行振动。In one embodiment, the motor is controlled to vibrate, and the step of obtaining the resonant frequency of the motor as the second frequency is performed; after the target calibration signal is generated and output, the motor is controlled to vibrate according to the target calibration signal .
其中,将目标校准信号作为激励信号激励马达,控制马达的振动。定时检测目标校准信号下的马达实际的谐振频率,若实际的谐振频率与第二频率不相同,将重新计算目标校准信号。若实际的谐振频率与第二频率相同,将继续使用目标校准信号激励马达。Among them, the target calibration signal is used as an excitation signal to excite the motor to control the vibration of the motor. The actual resonance frequency of the motor under the target calibration signal is periodically detected. If the actual resonance frequency is different from the second frequency, the target calibration signal will be recalculated. If the actual resonance frequency is the same as the second frequency, the target calibration signal will continue to be used to excite the motor.
如图3所示,在一个实施例中,上述获取马达的谐振频率作为第二频率的步骤之后,还包括:判断所述第一频率和所述第二频率是否一致;在所述第一频率和所述第二频率不一致的情况下,执行步骤S204:根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引。在所述第一频率和所述第二频率一致的情况下,执行步骤S208:生成目标校准信号并输出。As shown in FIG. 3, in one embodiment, after the step of obtaining the resonant frequency of the motor as the second frequency, the method further includes: judging whether the first frequency and the second frequency are consistent; In the case where it is inconsistent with the second frequency, step S204 is performed: determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency. In the case where the first frequency and the second frequency are consistent, step S208 is performed: generating and outputting a target calibration signal.
其中,在第一频率和第二频率不一致的情况下,进行确定采样坐标索引的计算;在第一频率和第二频率一致的情况下,直接将待处理信号作为目标校准信号输出。本实施例通过对第一频率和第二频率是否一致进行判断,避免在第一频率和第二频率一致的情况下进行多余的计算和调整。Wherein, when the first frequency and the second frequency are inconsistent, the calculation to determine the sampling coordinate index is performed; when the first frequency and the second frequency are consistent, the signal to be processed is directly output as the target calibration signal. In this embodiment, by judging whether the first frequency and the second frequency are consistent, to avoid unnecessary calculations and adjustments when the first frequency and the second frequency are consistent.
如图4所示,提出了一种信号校准的装置,所述装置包括:As shown in Figure 4, a signal calibration device is proposed, and the device includes:
获取模块402,用于获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;The obtaining module 402 is configured to obtain the first frequency corresponding to the signal to be processed, and obtain the resonant frequency of the motor as the second frequency;
确定模块404,用于在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引;The determining module 404 is configured to determine sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency when the first frequency and the second frequency are inconsistent;
计算模块406,用于对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引;The calculation module 406 is configured to perform preset processing on the sampling coordinate index, and obtain the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index;
生成模块408,用于根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。The generating module 408 is configured to process the signal to be processed according to the integer coordinate index and the decimal coordinate index to generate and output a target calibration signal.
如图5所示,在一个实施例中,所述装置还包括:激励模块409,用于控制所述马达进行振动,并执行所述获取马达的谐振频率作为第二频率的步骤;根据所述目标校准信号控制所述马达进行振动。As shown in FIG. 5, in one embodiment, the device further includes: an excitation module 409, configured to control the motor to vibrate and execute the step of obtaining the resonant frequency of the motor as the second frequency; The target calibration signal controls the motor to vibrate.
如图6所示,在一个实施例中,所述确定模块404还包括:第一确定单元,用于根据所述第一频率和所述第二频率的比值确定所述采样点之间的采样间距;根据待处理信号确定所述若干个采样点的采样点数量;第二确定单元,用于根据所述采样间距和所述采样点数量确定每一个采样点坐标,并根据所述采样点坐标构建采样坐标索引。As shown in FIG. 6, in an embodiment, the determining module 404 further includes: a first determining unit, configured to determine the sampling between the sampling points according to the ratio of the first frequency and the second frequency Spacing; determine the number of sampling points of the plurality of sampling points according to the signal to be processed; a second determining unit for determining the coordinates of each sampling point according to the sampling interval and the number of sampling points, and according to the sampling point coordinates Build the sampling coordinate index.
如图7所示,在一个实施例中,所述计算模块406还包括:预处理单元,用于对所述采样坐标索引进行长度裁剪获得目标校准信号的采样点索引坐标。As shown in FIG. 7, in one embodiment, the calculation module 406 further includes: a preprocessing unit, configured to perform length-cutting on the sampling coordinate index to obtain the sampling point index coordinates of the target calibration signal.
如图7所示,在一个实施例中,所述计算模块406还包括:第一计算单元,用于对采样坐标索引包含的每一个采样点坐标进行取整处理,获取每一个采样点坐标的整数部分,对所述整数部分进行长度裁剪生成整数坐标索引;;第二计算单元,用于获取所述采样点索引坐标与整数坐标索引的差值生成小数坐标索引。As shown in FIG. 7, in an embodiment, the calculation module 406 further includes: a first calculation unit, configured to perform rounding processing on the coordinates of each sampling point contained in the sampling coordinate index, and obtain the coordinates of each sampling point. The integer part is used for length-cutting the integer part to generate an integer coordinate index; the second calculation unit is used for obtaining the difference between the sampling point index coordinate and the integer coordinate index to generate a decimal coordinate index.
在一个实施例中,所述生成模块408还包括:插值处理单元,用于根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理。In one embodiment, the generating module 408 further includes: an interpolation processing unit, configured to perform interpolation processing on the signal to be processed according to a preset interpolation formula, the integer coordinate index, and the decimal coordinate index.
在一个实施例中,所述插值处理单元还包括:插值计算子模块,用于根据公式Y=Fracoef×(X<Intcoef+k 1>-X<Intcoef+k 2>)+X<Intcoef+k 3>计算所述待处理信号,其中,X为待处理信号,Intcoef为整数坐标索引,Fracoef为小数坐标索引,k 1、k 2、k 3为常数项且k 2=k 3,X<Intcoef+k i>(i=1,2,3)是在整数坐标索引Intcoef+k i(i=1,2,3)下的待处理信号,Y是目标校准信号。 In an embodiment, the interpolation processing unit further includes: an interpolation calculation sub-module for calculating according to the formula Y=Fracoef×(X<Intcoef+k 1 >-X<Intcoef+k 2 >)+X<Intcoef+k 3 >Calculate the signal to be processed, where X is the signal to be processed, Intcoef is the integer coordinate index, Fracoef is the decimal coordinate index, k 1 , k 2 , and k 3 are constant terms and k 2 =k 3 , X<Intcoef + k i> (i = 1,2,3 ) are the coordinates in an integer index Intcoef + k i in the signal to be processed (i = 1,2,3), Y is a target calibration signal.
在一个实施例中,所述获取单元402还包括:判断单元,用于判断所述第一频率和所述第二频率是否一致;在所述第一频率和所述第二频率不一致的情况下,执行所述根据所述第 一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤。在所述第一频率和所述第二频率一致的情况下,执行所述生成目标校准信号并输出的步骤。In an embodiment, the acquiring unit 402 further includes: a judging unit for judging whether the first frequency and the second frequency are consistent; in the case where the first frequency and the second frequency are not consistent Execute the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
图8示出了一个实施例中计算机设备的内部结构图。该计算机设备具体可以是终端,也可以是服务器。如图8所示,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,存储器包括非易失性存储介质和内存储器。该计算机设备的非易失性存储介质存储有操作系统,还可存储有计算机程序,该计算机程序被处理器执行时,可使得处理器实现信号校准的方法。该内存储器中也可储存有计算机程序,该计算机程序被处理器执行时,可使得处理器执行信号校准的方法。本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Fig. 8 shows an internal structure diagram of a computer device in an embodiment. The computer device may specifically be a terminal or a server. As shown in Figure 8, the computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store a computer program. When the computer program is executed by the processor, the processor can implement a signal calibration method. A computer program may also be stored in the internal memory, and when the computer program is executed by the processor, the processor can execute the signal calibration method. Those skilled in the art can understand that the structure shown in FIG. 8 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
在一个实施例中,提出了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行以下步骤:获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引;对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引;根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。In one embodiment, a computer device is provided, including a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps: Process the first frequency corresponding to the signal, and obtain the resonant frequency of the motor as the second frequency; in the case where the first frequency and the second frequency are inconsistent, determine several frequencies based on the first frequency and the second frequency The sampling coordinate index corresponding to the sampling point; performing preset processing on the sampling coordinate index to obtain the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index; according to a pair of the integer coordinate index and the decimal coordinate index The signal to be processed is processed to generate and output a target calibration signal.
在一个实施例中,所述方法还包括:控制所述马达进行振动,并执行所述获取马达的谐振频率作为第二频率的步骤;所述生成目标校准信号并输出的步骤之后,还包括:根据所述目标校准信号控制所述马达进行振动。In one embodiment, the method further includes: controlling the motor to vibrate, and performing the step of obtaining the resonant frequency of the motor as the second frequency; after the step of generating and outputting a target calibration signal, further including: The motor is controlled to vibrate according to the target calibration signal.
在一个实施例中,所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤还包括:根据所述第一频率和所述第二频率的比值确定所述采样点之间的采样间距;根据待处理信号确定所述若干个采样点的采样点数量;根据所述采样间距和所述采样点数量确定每一个采样点坐标,并根据所述采样点坐标构建采样坐标索引。In an embodiment, the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency further includes: determining according to the ratio of the first frequency and the second frequency The sampling interval between the sampling points; the number of sampling points of the several sampling points is determined according to the signal to be processed; the coordinates of each sampling point are determined according to the sampling interval and the number of sampling points, and according to the sampling point The coordinates construct the sampling coordinate index.
在一个实施例中,所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤之后,还包括:对所述采样坐标索引进行长度裁剪获得目标校准信号的采样点索引坐标。In an embodiment, after the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency, the method further includes: performing length cropping on the sampling coordinate index to obtain a target calibration signal The index coordinates of the sampling point.
在一个实施例中,所述并根据所述采样点坐标构建采样坐标索引的步骤之后,还包括:对采样坐标索引包含的每一个采样点坐标进行取整处理,获取每一个采样点坐标的整数部分,对所述整数部分进行长度裁剪生成整数坐标索引;获取所述采样点索引坐标与整数坐标索引的差值生成小数坐标索引。In one embodiment, after the step of constructing a sampling coordinate index based on the sampling point coordinates, the method further includes: rounding each sampling point coordinate contained in the sampling coordinate index to obtain the integer of each sampling point coordinate In the part, the integer part is length-cut to generate an integer coordinate index; the difference between the sampling point index coordinate and the integer coordinate index is obtained to generate a decimal coordinate index.
在一个实施例中,所述根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理的步骤还包括:根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理。In an embodiment, the step of processing the signal to be processed according to the integer coordinate index and the decimal coordinate index further includes: according to a preset interpolation formula, the integer coordinate index and the decimal coordinate The index performs interpolation processing on the signal to be processed.
在一个实施例中,所述根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理的步骤,还包括:根据公式Y=Fracoef×(X<Intcoef+k 1>-X<Intcoef+k 2>)+X<Intcoef+k 3>计算所述待处理信号,其中,X为待处理信号,Intcoef为整数坐标索引,Fracoef为小数坐标索引,k 1、k 2、k 3为常数项且k 2=k 3,X<Intcoef+k i>(i=1,2,3)是在整数坐标索引Intcoef+k i(i=1,2,3)下的待处 理信号,Y是目标校准信号。 In one embodiment, the step of performing interpolation processing on the signal to be processed according to the preset interpolation formula, the integer coordinate index and the decimal coordinate index further includes: according to the formula Y=Fracoef×(X< Intcoef+k 1 >-X<Intcoef+k 2 >)+X<Intcoef+k 3 > calculate the signal to be processed, where X is the signal to be processed, Intcoef is the integer coordinate index, Fracoef is the decimal coordinate index, and k 1, k 2, k 3 is a constant term and k 2 = k 3, X < Intcoef + k i> (i = 1,2,3) are the coordinates in an integer index Intcoef + k i (i = 1,2,3 The signal to be processed under ), Y is the target calibration signal.
在一个实施例中,所述获取待校准设备对应的谐振频率作为第二频率的步骤之后,还包括:判断所述第一频率和所述第二频率是否一致;在所述第一频率和所述第二频率不一致的情况下,执行所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤。在所述第一频率和所述第二频率一致的情况下,执行所述生成目标校准信号并输出的步骤。In an embodiment, after the step of obtaining the resonant frequency corresponding to the device to be calibrated as the second frequency, the method further includes: judging whether the first frequency and the second frequency are consistent; In the case where the second frequencies are not consistent, the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency is performed. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
在一个实施例中,提出了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行以下步骤:获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引;对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引;根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。In one embodiment, a computer-readable storage medium is provided that stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps: obtaining a first frequency corresponding to a signal to be processed, Acquiring the resonance frequency of the motor as the second frequency; in the case where the first frequency and the second frequency are inconsistent, determining the sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency; Performing preset processing on the sampling coordinate index to obtain integer coordinate indexes and decimal coordinate indexes corresponding to the sampling coordinate index; processing the signal to be processed according to the integer coordinate index and the decimal coordinate index, Generate and output the target calibration signal.
在一个实施例中,所述方法还包括:控制所述马达进行振动,并执行所述获取马达的谐振频率作为第二频率的步骤;所述生成目标校准信号并输出的步骤之后,还包括:根据所述目标校准信号控制所述马达进行振动。In one embodiment, the method further includes: controlling the motor to vibrate, and performing the step of obtaining the resonant frequency of the motor as the second frequency; after the step of generating and outputting a target calibration signal, further including: The motor is controlled to vibrate according to the target calibration signal.
在一个实施例中,所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤还包括:根据所述第一频率和所述第二频率的比值确定所述采样点之间的采样间距;根据待处理信号确定所述若干个采样点的采样点数量;根据所述采样间距和所述采样点数量确定每一个采样点坐标,并根据所述采样点坐标构建采样坐标索引。In an embodiment, the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency further includes: determining according to the ratio of the first frequency and the second frequency The sampling interval between the sampling points; the number of sampling points of the several sampling points is determined according to the signal to be processed; the coordinates of each sampling point are determined according to the sampling interval and the number of sampling points, and according to the sampling point The coordinates construct the sampling coordinate index.
在一个实施例中,所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤之后,还包括:对所述采样坐标索引进行长度裁剪获得目标校准信号的采样点索引坐标。In an embodiment, after the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency, the method further includes: performing length cropping on the sampling coordinate index to obtain a target calibration signal The index coordinates of the sampling point.
在一个实施例中,所述并根据所述采样点坐标构建采样坐标索引的步骤之后,还包括:对采样坐标索引包含的每一个采样点坐标进行取整处理,获取每一个采样点坐标的整数部分,对所述整数部分进行长度裁剪生成整数坐标索引;获取所述采样点索引坐标与整数坐标索引的差值生成小数坐标索引。In one embodiment, after the step of constructing a sampling coordinate index based on the sampling point coordinates, the method further includes: rounding each sampling point coordinate contained in the sampling coordinate index to obtain the integer of each sampling point coordinate In the part, the integer part is length-cut to generate an integer coordinate index; the difference between the sampling point index coordinate and the integer coordinate index is obtained to generate a decimal coordinate index.
对采样坐标索引包含的每一个采样点坐标进行取整处理,获取每一个采样点坐标的整数部分生成整数坐标索引;获取每一个采样点坐标与对应的整数部分的差值生成小数坐标索引。Perform rounding processing on each sampling point coordinate contained in the sampling coordinate index, obtain the integer part of each sampling point coordinate to generate an integer coordinate index; obtain the difference between each sampling point coordinate and the corresponding integer part to generate a decimal coordinate index.
在一个实施例中,所述根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理的步骤还包括:根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理。In an embodiment, the step of processing the signal to be processed according to the integer coordinate index and the decimal coordinate index further includes: according to a preset interpolation formula, the integer coordinate index and the decimal coordinate The index performs interpolation processing on the signal to be processed.
在一个实施例中,所述根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理的步骤,还包括:根据公式Y=Fracoef×(X<Intcoef+k 1>-X<Intcoef+k 2>)+X<Intcoef+k 3>计算所述待处理信号,其中,X为待处理信号,Intcoef为整数坐标索引,Fracoef为小数坐标索引,k 1、k 2、k 3为常数项且k 2=k 3,X<Intcoef+k i>(i=1,2,3)是在整数坐标索引Intcoef+k i(i=1,2,3)下的待处理信号,Y是目标校准信号。 In one embodiment, the step of performing interpolation processing on the signal to be processed according to the preset interpolation formula, the integer coordinate index and the decimal coordinate index further includes: according to the formula Y=Fracoef×(X< Intcoef+k 1 >-X<Intcoef+k 2 >)+X<Intcoef+k 3 > calculate the signal to be processed, where X is the signal to be processed, Intcoef is the integer coordinate index, Fracoef is the decimal coordinate index, and k 1, k 2, k 3 is a constant term and k 2 = k 3, X < Intcoef + k i> (i = 1,2,3) are the coordinates in an integer index Intcoef + k i (i = 1,2,3 The signal to be processed under ), Y is the target calibration signal.
在一个实施例中,所述获取待校准设备对应的谐振频率作为第二频率的步骤之后,还包括:判断所述第一频率和所述第二频率是否一致;在所述第一频率和所述第二频率不一致的情况下,执行所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引 的步骤。在所述第一频率和所述第二频率一致的情况下,执行所述生成目标校准信号并输出的步骤。In one embodiment, after the step of obtaining the resonant frequency corresponding to the device to be calibrated as the second frequency, the method further includes: judging whether the first frequency and the second frequency are consistent; In the case where the second frequencies are inconsistent, the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency is performed. In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
采用本发明的信号校准的方法、装置、设备及存储介质,首先获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;在第一频率和第二频率不一致的情况下,根据第一频率和第二频率确定若干个采样点对应的采样坐标索引;接着对采样坐标索引进行预设的处理,获取与采样坐标索引对应的整数坐标索引和小数坐标索引;最后根据整数坐标索引和小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。本发明根据第二频率对待处理信号的第一频率进行校准,使得生成的目标校准信号对马达进行激励时的频率与第二频率匹配、生成的目标校准信号与马达适配。采用本发明的信号校准的方法、装置、设备及存储介质之后,能降低不同马达单体的性能或参数差异造成的振动效果差异,提高了激励信号对应的振动效果的一致性,提升了用户体验。Using the signal calibration method, device, equipment and storage medium of the present invention, first obtain the first frequency corresponding to the signal to be processed, and obtain the resonant frequency of the motor as the second frequency; when the first frequency and the second frequency are inconsistent, Determine the sampling coordinate index corresponding to several sampling points according to the first frequency and the second frequency; then perform preset processing on the sampling coordinate index to obtain the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index; finally according to the integer coordinate index And the decimal coordinate index to process the signal to be processed to generate and output a target calibration signal. The present invention calibrates the first frequency of the signal to be processed according to the second frequency, so that the frequency when the generated target calibration signal excites the motor is matched with the second frequency, and the generated target calibration signal is adapted to the motor. After adopting the signal calibration method, device, equipment and storage medium of the present invention, the difference in vibration effect caused by the performance or parameter difference of different motor monomers can be reduced, the consistency of the vibration effect corresponding to the excitation signal is improved, and the user experience is improved .
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synch l ink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer readable storage medium. Here, when the program is executed, it may include the procedures of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database, or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synch l) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered as the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and their descriptions are more specific and detailed, but they should not be understood as a limitation to the scope of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (11)

  1. 一种信号校准的方法,其特征在于,所述方法包括:A signal calibration method, characterized in that the method includes:
    获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;Acquiring the first frequency corresponding to the signal to be processed, and acquiring the resonant frequency of the motor as the second frequency;
    在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引;In a case where the first frequency and the second frequency are not consistent, determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency;
    对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引;Performing preset processing on the sampling coordinate index, and obtaining integer coordinate indexes and decimal coordinate indexes corresponding to the sampling coordinate index;
    根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。The signal to be processed is processed according to the integer coordinate index and the decimal coordinate index, and a target calibration signal is generated and output.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    控制所述马达进行振动,并执行所述获取马达的谐振频率作为第二频率的步骤;Controlling the motor to vibrate, and performing the step of obtaining the resonant frequency of the motor as the second frequency;
    所述生成目标校准信号并输出的步骤之后,还包括:After the step of generating and outputting the target calibration signal, the method further includes:
    根据所述目标校准信号控制所述马达进行振动。The motor is controlled to vibrate according to the target calibration signal.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤还包括:The method according to claim 1, wherein the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency further comprises:
    根据所述第一频率和所述第二频率的比值确定所述采样点之间的采样间距;Determining the sampling interval between the sampling points according to the ratio of the first frequency and the second frequency;
    根据待处理信号确定所述若干个采样点的采样点数量;Determining the number of sampling points of the several sampling points according to the signal to be processed;
    根据所述采样间距和所述采样点数量确定每一个采样点坐标,并根据所述采样点坐标构建采样坐标索引。The coordinates of each sampling point are determined according to the sampling interval and the number of sampling points, and a sampling coordinate index is constructed according to the sampling point coordinates.
  4. 根据权利要求1所述的方法,其特征在于,所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤之后,还包括:The method according to claim 1, wherein after the step of determining sampling coordinate indexes corresponding to a plurality of sampling points according to the first frequency and the second frequency, the method further comprises:
    对所述采样坐标索引进行长度裁剪获得目标校准信号的采样点索引坐标。The sampling coordinate index is length-cut to obtain the sampling point index coordinates of the target calibration signal.
  5. 根据权利要求3所述的方法,其特征在于,所述并根据所述采样点坐标构建采样坐标索引的步骤之后,还包括:The method according to claim 3, wherein after the step of constructing a sampling coordinate index according to the sampling point coordinates, the method further comprises:
    对采样坐标索引包含的每一个采样点坐标进行取整处理,获取每一个采样点坐标的整数部分,对所述整数部分进行长度裁剪生成整数坐标索引;Performing rounding processing on each sampling point coordinate included in the sampling coordinate index, obtaining the integer part of each sampling point coordinate, and performing length clipping on the integer part to generate an integer coordinate index;
    获取所述采样点索引坐标与整数坐标索引的差值生成小数坐标索引。Obtaining the difference between the sampling point index coordinate and the integer coordinate index to generate a decimal coordinate index.
  6. 根据权利要求1所述的方法,其特征在于,所述根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理的步骤还包括:The method according to claim 1, wherein the step of processing the signal to be processed according to the integer coordinate index and the decimal coordinate index further comprises:
    根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理。Perform interpolation processing on the signal to be processed according to a preset interpolation formula, the integer coordinate index and the decimal coordinate index.
  7. 根据权利要求6所述的方法,其特征在于,所述根据预设的插值公式、所述整数坐标索引和所述小数坐标索引对所述待处理信号进行插值处理的步骤,还包括:The method according to claim 6, wherein the step of performing interpolation processing on the signal to be processed according to a preset interpolation formula, the integer coordinate index, and the decimal coordinate index, further comprises:
    根据公式According to the formula
    Y=Fracoef×(X<Intcoef+k 1>-X<Intcoef+k 2>)+X<Intcoef+k 3> Y=Fracoef×(X<Intcoef+k 1 >-X<Intcoef+k 2 >)+X<Intcoef+k 3 >
    计算所述待处理信号,其中,X为待处理信号,Intcoef为整数坐标索引,Fracoef为小数坐标索引,k 1、k 2、k 3为常数项且k 2=k 3,X<Intcoef+k i>(i=1,2,3)是在整数坐标索引Intcoef+k i(i=1,2,3)下的待处理信号,Y是目标校准信号。 Calculate the signal to be processed, where X is the signal to be processed, Intcoef is the integer coordinate index, Fracoef is the decimal coordinate index, k 1 , k 2 , and k 3 are constant terms and k 2 =k 3 , X<Intcoef+k i> (i = 1,2,3) are the coordinates in an integer index Intcoef + k i in the signal to be processed (i = 1,2,3), Y is a target calibration signal.
  8. 根据权利要求1所述的方法,其特征在于,所述获取待校准设备对应的谐振频率作为 第二频率的步骤之后,还包括:The method according to claim 1, wherein after the step of obtaining the resonant frequency corresponding to the device to be calibrated as the second frequency, the method further comprises:
    判断所述第一频率和所述第二频率是否一致;Judging whether the first frequency and the second frequency are consistent;
    在所述第一频率和所述第二频率不一致的情况下,执行所述根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引的步骤;In a case where the first frequency and the second frequency are not consistent, performing the step of determining sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency;
    在所述第一频率和所述第二频率一致的情况下,执行所述生成目标校准信号并输出的步骤。In the case where the first frequency and the second frequency are the same, the step of generating and outputting a target calibration signal is performed.
  9. 一种信号校准的装置,其特征在于,所述装置包括:A signal calibration device, characterized in that the device comprises:
    获取模块,用于获取待处理信号对应的第一频率,获取马达的谐振频率作为第二频率;An obtaining module, configured to obtain the first frequency corresponding to the signal to be processed, and obtain the resonant frequency of the motor as the second frequency;
    确定模块,用于在所述第一频率和所述第二频率不一致的情况下,根据所述第一频率和所述第二频率确定若干个采样点对应的采样坐标索引;A determining module, configured to determine sampling coordinate indexes corresponding to several sampling points according to the first frequency and the second frequency when the first frequency and the second frequency are inconsistent;
    计算模块,用于对所述采样坐标索引进行预设的处理,获取与所述采样坐标索引对应的整数坐标索引和小数坐标索引;A calculation module, configured to perform preset processing on the sampling coordinate index, and obtain the integer coordinate index and the decimal coordinate index corresponding to the sampling coordinate index;
    生成模块,用于根据所述整数坐标索引和所述小数坐标索引对所述待处理信号进行处理,生成目标校准信号并输出。The generating module is configured to process the signal to be processed according to the integer coordinate index and the decimal coordinate index to generate and output a target calibration signal.
  10. 一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如权利要求1至8中任一项所述方法的步骤。A computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor executes the steps of the method according to any one of claims 1 to 8.
  11. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至8中任一项所述方法的步骤。A computer device, comprising a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to A step of.
PCT/CN2019/126591 2019-12-19 2019-12-19 Signal calibration method, apparatus and device, and storage medium WO2021120101A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/126591 WO2021120101A1 (en) 2019-12-19 2019-12-19 Signal calibration method, apparatus and device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/126591 WO2021120101A1 (en) 2019-12-19 2019-12-19 Signal calibration method, apparatus and device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021120101A1 true WO2021120101A1 (en) 2021-06-24

Family

ID=76478381

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/126591 WO2021120101A1 (en) 2019-12-19 2019-12-19 Signal calibration method, apparatus and device, and storage medium

Country Status (1)

Country Link
WO (1) WO2021120101A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819475A (en) * 2011-06-08 2012-12-12 鸿富锦精密工业(深圳)有限公司 System and method for calibrating touch screen of electronic device
US20180152173A1 (en) * 2015-08-05 2018-05-31 Innovationszentrum fur Telekommunikationstechnik GmbH IZT Apparatus for modifying a sampling rate, system including an apparatus for modifying a sampling rate and method for modifying a sampling rate
CN108183654A (en) * 2018-01-15 2018-06-19 上海艾为电子技术股份有限公司 The calibration method and device of linear vibrator resonant frequency
CN109274309A (en) * 2018-09-28 2019-01-25 Oppo广东移动通信有限公司 Motor control method, device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819475A (en) * 2011-06-08 2012-12-12 鸿富锦精密工业(深圳)有限公司 System and method for calibrating touch screen of electronic device
US20180152173A1 (en) * 2015-08-05 2018-05-31 Innovationszentrum fur Telekommunikationstechnik GmbH IZT Apparatus for modifying a sampling rate, system including an apparatus for modifying a sampling rate and method for modifying a sampling rate
CN108183654A (en) * 2018-01-15 2018-06-19 上海艾为电子技术股份有限公司 The calibration method and device of linear vibrator resonant frequency
CN109274309A (en) * 2018-09-28 2019-01-25 Oppo广东移动通信有限公司 Motor control method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111158473B (en) Signal calibration method, device, equipment and storage medium
JP5465283B2 (en) Hierarchical control path to limit audio dynamics processing
CN111062884B (en) Image enhancement method and device, storage medium and terminal equipment
CN111491204B (en) Video repair method, video repair device, electronic equipment and computer-readable storage medium
US10270412B2 (en) Sound-field correction device, sound-field correction method, and sound-field correction program
WO2021223447A1 (en) Method and apparatus for adjusting touch capacitance data, and electronic device, and storage medium
US9609304B2 (en) 3-dimensional data processing apparatus and method
WO2021120101A1 (en) Signal calibration method, apparatus and device, and storage medium
CN111160159B (en) Motor electric signal parameterization description method, device, equipment and medium
KR20130057327A (en) Preprocessing apparatus in stereo matching system
CN111405081B (en) DNS (Domain name Server) adjusting method and device based on decision tree, computer equipment and storage medium
CN111552420A (en) Touch interaction method and device, terminal equipment and storage medium
CN111178024B (en) Data table splicing method, device, computer equipment and storage medium
JP2013025467A (en) Approximation operation circuit for logarithmic function
CN111797483A (en) Method and apparatus for correcting motor balanced electrical signal, and computer readable storage medium
CN107977923B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
WO2021120034A1 (en) Motor electrical signal parameterized description method, apparatus, and device, and medium
CN109213431B (en) Consistency detection method and device for multi-copy data and electronic equipment
CN111552380B (en) Haptic vibration self-adjustment method, apparatus, device and medium
US6882735B2 (en) Dynamic range compression of an audio signal
CN114185510A (en) Sound box volume adjusting method and system, sound equipment and storage medium
CN110442433B (en) Method, equipment and storage medium for executing SQL (structured query language) task
CN110544306B (en) Three-dimensional terrain data acquisition method, three-dimensional terrain data acquisition device, computer equipment and storage medium
CN109829019B (en) Data conversion method and device of vector data and electronic equipment
CN107066030B (en) Signal source and multi-frequency output compensation method and system thereof

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: 19956219

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: 19956219

Country of ref document: EP

Kind code of ref document: A1