CN114021079A - Vibration control method, vibration device and storage medium - Google Patents

Vibration control method, vibration device and storage medium Download PDF

Info

Publication number
CN114021079A
CN114021079A CN202111219936.XA CN202111219936A CN114021079A CN 114021079 A CN114021079 A CN 114021079A CN 202111219936 A CN202111219936 A CN 202111219936A CN 114021079 A CN114021079 A CN 114021079A
Authority
CN
China
Prior art keywords
waveform
data
waveform data
expected
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111219936.XA
Other languages
Chinese (zh)
Inventor
董舒
刘德珩
柯毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Silicon Integrated Co Ltd
Original Assignee
Wuhan Silicon Integrated Co Ltd
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 Wuhan Silicon Integrated Co Ltd filed Critical Wuhan Silicon Integrated Co Ltd
Priority to CN202111219936.XA priority Critical patent/CN114021079A/en
Publication of CN114021079A publication Critical patent/CN114021079A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Algebra (AREA)
  • Evolutionary Biology (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Apparatuses For Generation Of Mechanical Vibrations (AREA)

Abstract

The embodiment of the application provides a vibration control method, a vibration device and a storage medium, comprising the following steps: acquiring a preset waveform signal frequency and an expected waveform signal frequency of waveform data and/or a preset carrier sampling rate and an expected carrier sampling rate; carrying out waveform adaptation on waveform data according to a preset waveform signal frequency and an expected waveform signal frequency and/or a preset carrier sampling rate and an expected carrier sampling rate to obtain expected pulse width or waveform data; determining a sampling period according to the expected carrier sampling rate, and generating a driving signal based on the expected pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal.

Description

Vibration control method, vibration device and storage medium
Technical Field
The present disclosure relates to electronic applications, and in particular, to a vibration control method, a vibration device, and a storage medium.
Background
The electronic device can indicate that a user receives a message or a telephone through vibration, and in order to realize different vibration effects, a designer of the vibration waveform can pre-store some vibration waveforms in a memory of the electronic device, and the electronic device can select different vibration waveforms from different vibration scenes to control a motor to vibrate. However, as the demands of users for vibration sensation become more and more abundant, a large amount of waveform data needs to be stored, and in order to reduce the storage amount of the waveform data, the frequency of the vibration waveform signal is reduced, and a Pulse Width Modulation (PWM) drive signal with a lower frequency is used to drive the motor to vibrate. However, reducing the frequency of the vibration waveform signal and driving the signal with low-frequency PWM results in distortion of the vibration waveform, which in turn results in the motor not vibrating exactly in accordance with the desired vibration waveform, and the vibration effect is poor.
Disclosure of Invention
Embodiments of the present application provide a vibration control method, a vibration device, and a storage medium, which can improve a vibration effect while reducing a storage amount of vibration data.
The technical scheme of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a vibration control method, where the method includes:
acquiring a preset waveform signal frequency and an expected waveform signal frequency of waveform data and/or a preset carrier sampling rate and an expected carrier sampling rate;
carrying out waveform adaptation on the waveform data according to the preset waveform signal frequency and the expected waveform signal frequency and/or the preset carrier sampling rate and the expected carrier sampling rate to obtain expected pulse width or waveform data;
determining a sampling period according to the expected carrier sampling rate, and generating a driving signal based on the expected pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal.
In a second aspect, an embodiment of the present application provides a vibration device, including:
the acquisition unit is used for acquiring the preset waveform signal frequency and the expected waveform signal frequency of the waveform data and/or the preset carrier sampling rate and the expected carrier sampling rate;
the waveform adaptation unit is used for carrying out waveform adaptation on the waveform data according to the preset waveform signal frequency and the expected waveform signal frequency and/or the preset carrier sampling rate and the expected carrier sampling rate to obtain expected pulse width or waveform data;
a signal generating unit for determining a sampling period according to the desired carrier sampling rate and generating a driving signal based on the desired pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal.
In a third aspect, an embodiment of the present application provides a vibration device, where the device includes: a processor, a memory, and a communication bus; the processor implements the vibration control method as described above when executing the operating program stored in the memory.
In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the vibration control method as described above.
The embodiment of the application provides a vibration control method, a vibration device and a storage medium, wherein the method comprises the following steps: acquiring a preset waveform signal frequency and an expected waveform signal frequency of waveform data and/or a preset carrier sampling rate and an expected carrier sampling rate; carrying out waveform adaptation on waveform data according to a preset waveform signal frequency and an expected waveform signal frequency and/or a preset carrier sampling rate and an expected carrier sampling rate to obtain expected pulse width or waveform data; determining a sampling period according to the expected carrier sampling rate, and generating a driving signal based on the expected pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal. By adopting the method implementation scheme, waveform data are processed based on the preset waveform signal frequency and the expected waveform signal frequency and/or the preset carrier sampling rate and the expected carrier sampling rate, the expected pulse width or waveform data are re-determined, more details of the vibration waveform are reserved in the expected pulse width or waveform data, furthermore, the sampling period is adjusted according to the expected carrier sampling rate, and a final driving signal is generated based on the expected pulse width or waveform data and the sampling period, so that when the motor is driven to vibrate by utilizing the expected pulse width or waveform data, the vibration effect can be improved, and the data volume of the stored waveform data is not increased.
Drawings
Fig. 1 is a flowchart of a vibration control method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an exemplary implementation of vibration according to a vibration waveform provided by an embodiment of the present application;
FIG. 3 is a block flow diagram of an exemplary vibration device provided by an embodiment of the present application;
fig. 4 is a block flow diagram of an exemplary sample rate matching unit provided in an embodiment of the present application;
fig. 5 is a first schematic structural diagram of a vibration device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a vibration device according to an embodiment of the present application.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application. And are not intended to limit the present application.
An embodiment of the present application provides a vibration control method, as shown in fig. 1, the method may include:
s101, acquiring a preset waveform signal frequency and an expected waveform signal frequency of waveform data, and/or a preset carrier sampling rate and an expected carrier sampling rate.
The vibration control method provided by the embodiment of the application is suitable for scenes needing vibration, such as message prompt, telephone prompt, alarm prompt and the like.
It should be noted that the vibration device may be any terminal having vibration and data processing functions, such as: vibration devices such as tablet computers, mobile phones, Personal Computers (PCs), notebook computers, cameras, wearable devices, and the like.
It should be noted that, the vibration device may set different vibration waveforms for different vibration scenes, and the vibration device controls the motor to vibrate based on the different vibration waveforms to achieve vibration effects corresponding to the different vibration scenes, in this embodiment of the application, as shown in fig. 2, different expected vibration waveforms are designed in advance, then, the expected vibration waveforms are sampled according to preset waveform signal frequencies, amplitude data corresponding to each discrete point in the expected vibration waveforms are obtained, the amplitude data are waveform data of the expected vibration waveforms, such as a1, a2, a3, and a4 … …, and the waveform data are stored, then, the amplitude data are converted into pulse width data, and the pulse width signals are converted into PWM drive signals based on a preset carrier sampling rate fp, and then, the motor is driven to vibrate according to the expected vibration waveforms based on the PWM drive signals.
In the embodiment of the application, the mismatch of the preset waveform signal frequency and the preset carrier sampling rate can cause waveform distortion, so that the motor cannot vibrate according to the expected vibration waveform completely, and the vibration effect is poor. In the embodiment of the present application, as shown in fig. 3 with reference to fig. 2, the waveform data is stored in a waveform data storage unit, the process of converting the waveform data into the driving signal is implemented by a motor driving unit, and a sampling rate matching unit is added between the waveform data storage unit and the motor driving unit, and is used for implementing the matching process of the preset waveform signal frequency and the preset carrier sampling rate.
Specifically, in the embodiment of the present application, different parameters may be determined based on different frequency conversion processes.
Optionally, if the frequency conversion process is based on the waveform signal frequency, acquiring a preset waveform signal frequency and an expected waveform signal frequency; if the frequency conversion process is based on the carrier sampling rate, acquiring a preset carrier sampling rate and an expected carrier sampling rate; and if the frequency conversion process is based on the waveform signal frequency and the carrier sampling rate, acquiring a preset carrier sampling rate, a preset waveform signal frequency, an expected waveform signal frequency and an expected carrier sampling rate. Wherein the expected carrier sampling rate and the expected waveform signal frequency are the actually output waveform signal frequency and the carrier sampling rate.
S102, carrying out waveform adaptation on the waveform data according to the preset waveform signal frequency and the expected waveform signal frequency and/or the preset carrier sampling rate and the expected carrier sampling rate to obtain expected pulse width or waveform data.
In the embodiment of the application, firstly, a data adjustment quantity corresponding to an expected pulse width or waveform data is determined according to a preset waveform signal frequency and an expected waveform signal frequency and/or a preset carrier sampling rate and an expected carrier sampling rate, and then a specific waveform adaptation mode for the waveform data is determined according to the data adjustment quantity and a preset quantity threshold.
In the embodiment of the present application, if the data adjustment amount is determined according to the preset waveform signal frequency and the expected waveform signal frequency, as shown in formula (1),
Figure BDA0003312201800000041
m is the data adjustment amount, fw is the preset waveform signal frequency, and fw' is the desired waveform signal frequency.
In the embodiment of the present application, if the data adjustment amount is determined according to the preset carrier sampling rate and the expected carrier sampling rate, as shown in formula (2),
Figure BDA0003312201800000051
fp is the preset waveform signal frequency and fp' is the desired waveform signal frequency.
In the embodiment of the present application, if the data adjustment amount is determined according to the preset waveform signal frequency, the expected waveform signal frequency, the preset carrier sampling rate and the expected carrier sampling rate, as shown in formula (3),
Figure BDA0003312201800000052
in an optional embodiment, when the data adjustment number is greater than the preset number threshold, the waveform data is interpolated according to the data adjustment number to obtain interpolated data between every two adjacent waveform data, and the expected pulse width or waveform data is obtained according to the waveform data and the interpolated data.
In the embodiment of the application, waveform data are acquired from the waveform data storage unit, and then interpolation processing is performed on the waveform data based on the previously calculated data adjustment number, so that interpolation data between every two adjacent waveform data are obtained.
In an alternative embodiment, the data adjustment number may be rounded to obtain a first number; then determining an amplitude step value according to the first quantity, the first waveform data and the second waveform data; the first waveform data and the second waveform data are any two adjacent waveform data in the waveform data; then determining a plurality of interpolation data between the first waveform data and the second waveform data according to the first waveform data and the amplitude step value; the number of the plurality of interpolation data is the same as the first number.
Illustratively, the waveform data are a1, a2, a3 … an, 4 interpolation data are inserted between a1 and a2, a2 and a3 … an-1 and an, respectively, taking as an example the insertion of 4 interpolation data between a1 and a2, the magnitude step value step is first calculated according to equation (4),
step=(a2-a1)/4 (4)
then, the first interpolated data between a1 and a2 is a1 plus step, the second interpolated data is a1 plus two steps, the third interpolated data is a1 plus three steps, and the third interpolated data is a1 plus four steps.
In another alternative embodiment, the data adjustment number may be rounded to obtain a first number; then, determining the first waveform data as each interpolation data between the first waveform data and the second waveform data to obtain a plurality of interpolation data; the first waveform data and the second waveform data are any two adjacent waveform data in the waveform data; the number of the plurality of interpolation data is the same as the first number.
Illustratively, the waveform data are a1, a2, a3 … an, 4 pieces of interpolation data are inserted between a1 and a2, a2 and a3 … an-1 and an, respectively, taking as an example that 4 pieces of interpolation data are inserted between a1 and a2, and all four pieces of interpolation data between a1 and a2 are a 1.
In another alternative embodiment, a waveform function corresponding to the waveform data is fitted according to the waveform data; then, according to the data adjustment quantity and the preset waveform signal frequency, determining a time step value; determining the sampling time of each waveform data according to the preset waveform signal frequency, and inputting the sampling time and the time step value of each waveform data into a waveform function to obtain a plurality of interpolation data between every two adjacent waveform data; the number of the plurality of interpolation data is the same as the number of data adjustment.
In the embodiment of the present application, rounding processing is not required to be performed on the data adjustment quantity, that is, the data adjustment quantity may be an integer or a non-integer, and corresponding interpolation data may be determined in the fitted wave function.
In the embodiment of the application, the sampling interval between every two adjacent waveform data can be determined according to the preset waveform signal frequency, and then the time step value is determined according to the sampling interval and the difference value quantity.
Illustratively, the waveform data are a1, a2, a3 … an, 4 interpolation data are inserted between a1 and a2, a2 and a3 … an-1 and an, respectively, taking 4 pieces of interpolation data inserted between a1 and a2 as an example, the first piece of interpolation data between a1 and a2 is data obtained by using the sum of the sampling time and the time step value of a1 as an argument input waveform function, the second piece of interpolation data between a1 and a2 is data obtained by using the sum of the sampling time and two time step values of a1 as an argument input waveform function, the third piece of interpolation data between a1 and a2 is data obtained by using the sum of the sampling time and three time step values of a1 as an argument input waveform function, and the fourth piece of interpolation data between a1 and a2 is data obtained by using the sum of the sampling time and four time step values of a1 as an argument input waveform function.
In another optional embodiment, when the data adjustment number is less than or equal to the preset number threshold, determining a sampling interval according to the data adjustment number; a set of data is filtered from the waveform data based on the sampling interval and determined as a desired pulse width or waveform data.
In this embodiment, the inverse of the data adjustment amount may be determined as a sampling interval, and then, for waveform data, one waveform data is determined at every sampling interval, so as to obtain a set of data.
S103, determining a sampling period according to an expected carrier sampling rate, and generating a driving signal based on an expected pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal.
In the embodiment of the present application, as shown in fig. 4, the sampling rate matching unit is composed of a waveform data reading buffer unit, a waveform data interpolation operation unit, and a driving signal output unit, where the process of calculating to obtain the interpolation data may be implemented by the waveform data interpolation operation unit, and the process of generating the driving signal may be implemented by the driving signal output unit.
It should be noted that, with reference to fig. 4, after the driving signal is generated, the waveform data in the waveform data reading buffer unit may also be updated based on the driving signal, which may be specifically selected and executed according to actual situations, and the embodiment of the present application is not limited specifically.
In the embodiment of the application, the reciprocal of the expected carrier sampling rate is determined as the sampling period, then the sum of each pulse width data and the sampling period is determined as the number of high levels in each sampling period, the rest numbers except the high level data in each sampling period are determined as the number of low levels, then the driving signal is obtained, and finally the motor is driven to vibrate according to the driving signal, so that the corresponding vibration effect is realized.
It should be noted that the driving signal in the embodiment of the present application includes, but is not limited to, a PWM signal, which may be a single-stage PWM signal, a bipolar PWM signal, or other driving manners, and may be specifically selected according to actual situations, and the embodiment of the present application is not limited specifically.
It is understood that waveform data is subjected to waveform data based on a preset waveform signal frequency and a desired waveform signal frequency, and/or a preset carrier sampling rate and a desired carrier sampling rate, desired pulse width or waveform data is newly determined, which retains more details of a vibration waveform, further, a sampling period is adjusted according to the desired carrier sampling rate, and a final driving signal is generated based on the desired pulse width or waveform data and the sampling period, so that when a motor is driven to vibrate by using the desired pulse width or waveform data, a vibration effect can be improved without increasing the data amount of the stored waveform data.
The embodiment of the application provides a vibration device 1. As shown in fig. 5, the apparatus 1 includes:
an acquiring unit 10 that acquires a preset waveform signal frequency and an expected waveform signal frequency of waveform data, and/or a preset carrier sampling rate and an expected carrier sampling rate;
the waveform adapting unit 11 is configured to perform waveform adaptation on the waveform data according to the preset waveform signal frequency and the expected waveform signal frequency, and/or the preset carrier sampling rate and the expected carrier sampling rate, so as to obtain an expected pulse width or waveform data;
a signal generating unit 12, configured to determine a sampling period according to the desired carrier sampling rate, and generate a driving signal based on the desired pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal.
Optionally, the waveform adapting unit 11 is specifically configured to determine a data adjustment amount corresponding to the expected pulse width or waveform data according to the preset waveform signal frequency and the expected waveform signal frequency, and/or the preset carrier sampling rate and the expected carrier sampling rate; under the condition that the data adjustment quantity is larger than a preset quantity threshold value, carrying out interpolation processing on the waveform data according to the data adjustment quantity to obtain interpolation data between every two adjacent waveform data; and obtaining the expected pulse width or waveform data according to the waveform data and the interpolation data.
Optionally, the apparatus further comprises: an interpolation unit;
the interpolation unit is used for rounding the data adjustment quantity to obtain a first quantity; determining an amplitude step value according to the first quantity, the first waveform data and the second waveform data; the first waveform data and the second waveform data are any two adjacent waveform data in the waveform data; determining a plurality of interpolation data between the first waveform data and the second waveform data according to the first waveform data and the amplitude step value; the number of the plurality of interpolation data is the same as the first number.
Optionally, the interpolation unit is further configured to round the data adjustment number to obtain a first number; determining first waveform data as each interpolation data between the first waveform data and second waveform data, resulting in a plurality of interpolation data; the first waveform data and the second waveform data are any two adjacent waveform data in the waveform data; the number of the plurality of interpolation data is the same as the first number.
Optionally, the interpolation unit is further configured to fit a waveform function corresponding to the waveform data according to the waveform data; determining a time step value according to the data adjustment quantity and the preset waveform signal frequency; determining the sampling time of each waveform data according to the preset waveform signal frequency, and inputting the sampling time and the step value of each waveform data into the waveform function to obtain a plurality of interpolation data between every two adjacent waveform data; the number of the plurality of interpolation data is the same as the data adjustment number.
Optionally, the waveform adapting unit 11 is specifically configured to determine a data adjustment amount corresponding to the expected pulse width or waveform data according to the preset waveform signal frequency and the expected waveform signal frequency, and/or the preset carrier sampling rate and the expected carrier sampling rate; determining a sampling interval according to the data adjustment quantity under the condition that the data adjustment quantity is smaller than or equal to a preset quantity threshold value; a set of data is filtered out of the waveform data based on the sampling interval and determined to be the desired pulse width or waveform data.
According to the vibration device provided by the embodiment of the application, the preset waveform signal frequency and the expected waveform signal frequency of waveform data and/or the preset carrier sampling rate and the expected carrier sampling rate are/is acquired; carrying out waveform adaptation on waveform data according to a preset waveform signal frequency and an expected waveform signal frequency and/or a preset carrier sampling rate and an expected carrier sampling rate to obtain expected pulse width or waveform data; determining a sampling period according to the expected carrier sampling rate, and generating a driving signal based on the expected pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal. Therefore, the vibration device provided by the embodiment performs waveform data on waveform data based on a preset waveform signal frequency and an expected waveform signal frequency and/or a preset carrier sampling rate and an expected carrier sampling rate, re-determines expected pulse width or waveform data, wherein the expected pulse width or waveform data retains more details of a vibration waveform, further adjusts a sampling period according to the expected carrier sampling rate, and generates a final driving signal based on the expected pulse width or waveform data and the sampling period, so that when a motor is driven to vibrate by using the expected pulse width or waveform data, a vibration effect can be improved without increasing the data volume of the stored waveform data.
Fig. 6 is a schematic diagram of a composition structure of a vibration device 1 according to an embodiment of the present application, and in practical applications, based on the same disclosure concept of the above embodiment, as shown in fig. 6, the vibration device 1 of the present embodiment includes: a processor 14, a memory 15, and a communication bus 16.
In a Specific embodiment, the obtaining unit 10, the waveform adapting unit 11, the Signal generating unit 12 and the interpolating unit may be implemented by a Processor 14 located on the vibration Device 1, and the Processor 14 may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic image Processing Device (PLD), a Field Programmable Gate Array (FPGA), a CPU, a controller, a microcontroller and a microprocessor. It is understood that the electronic device for implementing the above-mentioned processor function may be other devices, and the embodiment is not limited in particular.
In the embodiment of the present application, the communication bus 16 is used for realizing connection communication between the processor 14 and the memory 15; the processor 14 implements the following vibration control method when executing the operating program stored in the memory 15:
acquiring a preset waveform signal frequency and an expected waveform signal frequency of waveform data and/or a preset carrier sampling rate and an expected carrier sampling rate; carrying out waveform adaptation on the waveform data according to the preset waveform signal frequency and the expected waveform signal frequency and/or the preset carrier sampling rate and the expected carrier sampling rate to obtain expected pulse width or waveform data; determining a sampling period according to the expected carrier sampling rate, and generating a driving signal based on the expected pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal.
Further, the processor 14 is further configured to determine a data adjustment amount corresponding to the expected pulse width or waveform data according to the preset waveform signal frequency and the expected waveform signal frequency, and/or the preset carrier sampling rate and the expected carrier sampling rate; under the condition that the data adjustment quantity is larger than a preset quantity threshold value, carrying out interpolation processing on the waveform data according to the data adjustment quantity to obtain interpolation data between every two adjacent waveform data; and obtaining the expected pulse width or waveform data according to the waveform data and the interpolation data.
Further, the processor 14 is further configured to round the data adjustment quantity to obtain a first quantity; determining an amplitude step value according to the first quantity, the first waveform data and the second waveform data; the first waveform data and the second waveform data are any two adjacent waveform data in the waveform data; determining a plurality of interpolation data between the first waveform data and the second waveform data according to the first waveform data and the amplitude step value; the number of the plurality of interpolation data is the same as the first number.
Further, the processor 14 is further configured to round the data adjustment quantity to obtain a first quantity; determining first waveform data as each interpolation data between the first waveform data and second waveform data, resulting in a plurality of interpolation data; the first waveform data and the second waveform data are any two adjacent waveform data in the waveform data; the number of the plurality of interpolation data is the same as the first number.
Further, the processor 14 is further configured to fit a waveform function corresponding to the waveform data according to the waveform data; determining a time step value according to the data adjustment quantity and the preset waveform signal frequency; determining the sampling time of each waveform data according to the preset waveform signal frequency, and inputting the sampling time and the step value of each waveform data into the waveform function to obtain a plurality of interpolation data between every two adjacent waveform data; the number of the plurality of interpolation data is the same as the data adjustment number.
Further, the processor 14 is further configured to determine a data adjustment amount corresponding to the expected pulse width or waveform data according to the preset waveform signal frequency and the expected waveform signal frequency, and/or the preset carrier sampling rate and the expected carrier sampling rate; determining a sampling interval according to the data adjustment quantity under the condition that the data adjustment quantity is smaller than or equal to a preset quantity threshold value; a set of data is filtered out of the waveform data based on the sampling interval and determined to be the desired pulse width or waveform data.
The embodiment of the application provides a storage medium, wherein a computer program is stored on the storage medium, one or more programs are stored on the computer readable storage medium, the one or more programs can be executed by one or more processors and are applied to a vibration device, and the computer program realizes the method for controlling the vibration.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an image display device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present disclosure.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (10)

1. A vibration control method, characterized in that the method comprises:
acquiring a preset waveform signal frequency and an expected waveform signal frequency of waveform data and/or a preset carrier sampling rate and an expected carrier sampling rate;
carrying out waveform adaptation on the waveform data according to the preset waveform signal frequency and the expected waveform signal frequency and/or the preset carrier sampling rate and the expected carrier sampling rate to obtain expected pulse width or waveform data;
determining a sampling period according to the expected carrier sampling rate, and generating a driving signal based on the expected pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal.
2. The method of claim 1, wherein said waveform adapting said waveform data according to said preset waveform signal frequency and said desired waveform signal frequency, and/or said preset carrier sampling rate and said desired carrier sampling rate, resulting in desired pulse width or waveform data, comprises:
determining the data adjustment quantity corresponding to the expected pulse width or waveform data according to the preset waveform signal frequency and the expected waveform signal frequency and/or the preset carrier sampling rate and the expected carrier sampling rate;
under the condition that the data adjustment quantity is larger than a preset quantity threshold value, carrying out interpolation processing on the waveform data according to the data adjustment quantity to obtain interpolation data between every two adjacent waveform data;
and obtaining the expected pulse width or waveform data according to the waveform data and the interpolation data.
3. The method according to claim 2, wherein the interpolating the waveform data according to the data adjustment amount to obtain interpolated data between every two adjacent waveform data comprises:
rounding the data adjustment quantity to obtain a first quantity;
determining an amplitude step value according to the first quantity, the first waveform data and the second waveform data; the first waveform data and the second waveform data are any two adjacent waveform data in the waveform data;
determining a plurality of interpolation data between the first waveform data and the second waveform data according to the first waveform data and the amplitude step value; the number of the plurality of interpolation data is the same as the first number.
4. The method according to claim 2, wherein the interpolating the waveform data according to the data adjustment amount to obtain interpolated data between every two adjacent waveform data comprises:
rounding the data adjustment quantity to obtain a first quantity;
determining first waveform data as each interpolation data between the first waveform data and second waveform data, resulting in a plurality of interpolation data; the first waveform data and the second waveform data are any two adjacent waveform data in the waveform data; the number of the plurality of interpolation data is the same as the first number.
5. The method according to claim 2, wherein the interpolating the waveform data according to the data adjustment amount to obtain interpolated data between every two adjacent waveform data comprises:
fitting a waveform function corresponding to the waveform data according to the waveform data;
determining a time step value according to the data adjustment quantity and the preset waveform signal frequency;
determining the sampling time of each waveform data according to the preset waveform signal frequency, and inputting the sampling time and the step value of each waveform data into the waveform function to obtain a plurality of interpolation data between every two adjacent waveform data; the number of the plurality of interpolation data is the same as the data adjustment number.
6. The method of claim 1, wherein said waveform adapting said waveform data according to said preset waveform signal frequency and said desired waveform signal frequency, and/or said preset carrier sampling rate and said desired carrier sampling rate, resulting in desired pulse width or waveform data, comprises:
determining the data adjustment quantity corresponding to the expected pulse width or waveform data according to the preset waveform signal frequency and the expected waveform signal frequency and/or the preset carrier sampling rate and the expected carrier sampling rate;
determining a sampling interval according to the data adjustment quantity under the condition that the data adjustment quantity is smaller than or equal to a preset quantity threshold value;
a set of data is filtered out of the waveform data based on the sampling interval and determined to be the desired pulse width or waveform data.
7. A vibratory apparatus, the apparatus comprising:
the acquisition unit is used for acquiring the preset waveform signal frequency and the expected waveform signal frequency of the waveform data and/or the preset carrier sampling rate and the expected carrier sampling rate;
the waveform adaptation unit is used for carrying out waveform adaptation on the waveform data according to the preset waveform signal frequency and the expected waveform signal frequency and/or the preset carrier sampling rate and the expected carrier sampling rate to obtain expected pulse width or waveform data;
a signal generating unit for determining a sampling period according to the desired carrier sampling rate and generating a driving signal based on the desired pulse width or waveform data and the sampling period; to drive the motor to vibrate based on the drive signal.
8. The apparatus of claim 7,
the waveform adapting unit is specifically configured to determine a data adjustment quantity corresponding to the expected pulse width or waveform data according to the preset waveform signal frequency and the expected waveform signal frequency, and/or the preset carrier sampling rate and the expected carrier sampling rate; under the condition that the data adjustment quantity is larger than a preset quantity threshold value, carrying out interpolation processing on the waveform data according to the data adjustment quantity to obtain interpolation data between every two adjacent waveform data; and obtaining the expected pulse width or waveform data according to the waveform data and the interpolation data.
9. A vibratory apparatus, the apparatus comprising: a processor, a memory, and a communication bus; the processor, when executing the execution program stored in the memory, implements the method of any of claims 1-6.
10. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202111219936.XA 2021-10-20 2021-10-20 Vibration control method, vibration device and storage medium Pending CN114021079A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111219936.XA CN114021079A (en) 2021-10-20 2021-10-20 Vibration control method, vibration device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111219936.XA CN114021079A (en) 2021-10-20 2021-10-20 Vibration control method, vibration device and storage medium

Publications (1)

Publication Number Publication Date
CN114021079A true CN114021079A (en) 2022-02-08

Family

ID=80056757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111219936.XA Pending CN114021079A (en) 2021-10-20 2021-10-20 Vibration control method, vibration device and storage medium

Country Status (1)

Country Link
CN (1) CN114021079A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090289588A1 (en) * 2008-05-22 2009-11-26 Rohm Co., Ltd. Apparatus and method for driving a motor
CN102404675A (en) * 2010-09-10 2012-04-04 安森美半导体贸易公司 Drive control circuit for vibration speaker
US20130334988A1 (en) * 2012-06-15 2013-12-19 Canon Kabushiki Kaisha Driving device and driving circuit for a vibration actuator
US20150331229A1 (en) * 2013-01-29 2015-11-19 Olympus Corporation Scanning observation apparatus and control method thereof
CN110011591A (en) * 2018-12-31 2019-07-12 瑞声科技(新加坡)有限公司 Motor drive signal generation method, electronic equipment and storage medium
CN112269895A (en) * 2020-11-06 2021-01-26 Oppo广东移动通信有限公司 Vibration control method and device and computer readable storage medium
CN112286165A (en) * 2020-09-30 2021-01-29 上海艾为电子技术股份有限公司 Method for calibrating drive waveform data of linear motor and electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090289588A1 (en) * 2008-05-22 2009-11-26 Rohm Co., Ltd. Apparatus and method for driving a motor
CN102404675A (en) * 2010-09-10 2012-04-04 安森美半导体贸易公司 Drive control circuit for vibration speaker
US20130334988A1 (en) * 2012-06-15 2013-12-19 Canon Kabushiki Kaisha Driving device and driving circuit for a vibration actuator
US20150331229A1 (en) * 2013-01-29 2015-11-19 Olympus Corporation Scanning observation apparatus and control method thereof
CN110011591A (en) * 2018-12-31 2019-07-12 瑞声科技(新加坡)有限公司 Motor drive signal generation method, electronic equipment and storage medium
CN112286165A (en) * 2020-09-30 2021-01-29 上海艾为电子技术股份有限公司 Method for calibrating drive waveform data of linear motor and electronic device
CN112269895A (en) * 2020-11-06 2021-01-26 Oppo广东移动通信有限公司 Vibration control method and device and computer readable storage medium

Similar Documents

Publication Publication Date Title
US10431057B2 (en) Method, system, and device for converting audio signal to one or more haptic effects
US11320907B2 (en) Audio-haptic signal generator
JP6391724B2 (en) Sound-tactile effect conversion system using waveform
CN111478630B (en) Motor steady-state single-frequency distortion compensation method and device
US10283134B2 (en) Sound-mixing processing method, apparatus and device, and storage medium
CN107395149B (en) Audio signal processing method, device and integrated circuit
CN111694437B (en) Method and apparatus for implementing haptic effects
CN114006565A (en) Motor control method, device, equipment and computer readable storage medium
CN113992106A (en) Motor control method, device, equipment and computer readable storage medium
CN108347209B (en) Overshoot response cancellation system and method
CN115242157A (en) Displacement limiting method and device for motor oscillator, terminal device and storage medium
CN113170260A (en) Audio processing method and device, storage medium and electronic equipment
CN110782884B (en) Far-field pickup noise processing method, device, equipment and storage medium
CN114021079A (en) Vibration control method, vibration device and storage medium
WO2019114151A1 (en) Waveform generating device
EP2660816B1 (en) Audio signal processing method and electronic device supporting the same
CN110380665A (en) A kind of generation method, electronic equipment and storage medium controlling signal
CN113992107B (en) Motor control method, apparatus, device, and computer-readable storage medium
US20200209967A1 (en) Haptic Effect Signal Processing
CN110795170A (en) Interactive information processing method and device, computer storage medium and terminal
CN112688544A (en) Harmonic compensation method and device of inverter circuit and terminal equipment
CN116707446A (en) White noise signal generation method and device
JP2012175125A (en) Data processing apparatus, data processing system, data processing method and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination