Disclosure of Invention
The invention mainly aims to provide a low-frequency vibration sense compensation method, a low-frequency vibration sense compensation device and electronic equipment, so as to solve the problems that in the prior art, the vibration sense generated by a vibration device is small and the touch sense effect is poor due to insufficient low-frequency acceleration response.
To achieve the above object, a first aspect of an embodiment of the present invention provides a low-frequency vibration compensation method, including:
after a vibration device receives a vibration instruction, before the vibration device responds to the vibration instruction, acquiring an original vibration signal for driving the vibration device to vibrate;
setting a starting vibration compensation signal with a target period according to the peak period of the original vibration signal;
the vibration device responds to the vibration instruction, drives the vibration device through the vibration starting compensation signal, and adjusts the waveform peak value of the vibration starting compensation signal so as to enable the vibrator of the vibration device to collide with the shell;
the vibrator of the vibrating device is impacted with the shell and is used for compensating low-frequency vibration sense of the vibrating device;
wherein when the peak period of the original vibration signal is n and the target period of the oscillation starting compensation signal is n×k, the impact frequency of the vibrator and the housing isk is a positive integer.
In combination with the first aspect of the present invention, in a first embodiment of the present invention, the setting of the oscillation starting compensation signal having the target period according to the peak period of the original oscillation signal includes:
setting the target period to be an integer multiple of the peak period of the original vibration signal, and setting each target period of the starting compensation signal to comprise a voltage driving period and a no-signal output period;
wherein, in the voltage driving period, the peak time point of the starting compensation signal coincides with the peak time point of the original vibration signal;
wherein, in the no-signal output period, the vibration device does not receive a signal.
With reference to the first embodiment of the first aspect of the present invention, in a second embodiment of the present invention, when the target period of the oscillation starting compensation signal is n×k and k is a positive integer greater than 1, the duration of the voltage driving output period in one of the target periods isThe duration of the no signal output period is +.>
When the target period of the oscillation starting compensation signal is n multiplied by k and k is 1, the duration of the voltage driving output period in one target period isThe duration of the no signal output period is +.>
In combination with the first aspect of the present invention, in a third embodiment of the present invention, the driving of the vibration device by the vibration start compensation signal in response to the vibration command, and the adjustment of the waveform peak value of the vibration start compensation signal to enable the vibrator of the vibration device to collide with the housing, includes:
obtaining a standard waveform peak value corresponding to vibration sense requirements;
calculating a target input voltage required at a peak time point of the oscillation starting compensation signal according to the standard waveform peak value;
setting a pulse voltage according to the target input voltage and the target period;
inputting the oscillation starting compensation signal and the pulse voltage into the vibrating device so as to enable the vibrator of the vibrating device to collide with the shell;
and the pulse voltage is used for increasing the input voltage of the vibration device to the target input voltage when the vibration device is driven by the vibration starting compensation signal, so that the waveform peak value of the vibration starting compensation signal reaches the standard waveform peak value.
In combination with the first aspect of the present invention, in a fourth embodiment of the present invention, the driving of the vibration device by the vibration start compensation signal in response to the vibration command, and the adjustment of the waveform peak value of the vibration start compensation signal, before the impact between the vibrator of the vibration device and the housing, includes:
acquiring an acceleration section signal corresponding to the original vibration signal, driving the vibration device to vibrate, and acquiring the duration time of the acceleration section signal;
determining the duration of the acceleration segment signal as the time when the vibration device receives the vibration starting compensation signal;
driving the vibration device by the vibration starting compensation signal, and adjusting waveform peak values of the vibration starting compensation signal so as to enable the vibrator of the vibration device to collide with the shell, wherein the vibration device comprises:
driving the vibration device through a vibration starting compensation signal within the duration time of the acceleration section signal, and adjusting the waveform peak value of the vibration starting compensation signal so as to enable the vibrator of the vibration device to collide with the shell;
when the duration of the acceleration section signal ends, the driving of the vibration device is stopped.
With reference to the fourth embodiment of the first aspect, in a fifth embodiment of the present invention, after stopping driving the vibration device when the duration of the acceleration section signal ends, the method includes:
acquiring a brake segment signal corresponding to the original vibration signal and driving the vibration device to stop vibrating;
and driving the vibration device through the brake segment signal.
A second aspect of an embodiment of the present invention provides a low-frequency vibration compensation apparatus, including:
the original vibration signal acquisition module is used for acquiring an original vibration signal for driving the vibration device to vibrate after the vibration device receives the vibration instruction and before the vibration device responds to the vibration instruction;
the vibration starting compensation signal setting module is used for setting a vibration starting compensation signal with a target period according to the peak period of the original vibration signal;
the driving module is used for enabling the vibration device to respond to the vibration instruction, driving the vibration device through the vibration starting compensation signal and adjusting the waveform peak value of the vibration starting compensation signal so as to enable the vibrator of the vibration device to collide with the shell;
the vibrator of the vibrating device is impacted with the shell and is used for compensating low-frequency vibration sense of the vibrating device;
wherein when the peak period of the original vibration signal is n and the target period of the oscillation starting compensation signal is n×k, the impact frequency of the vibrator and the housing isk is a positive integer.
A third aspect of an embodiment of the present invention provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method as provided in the first aspect above when executing the computer program.
A fourth aspect of the embodiments of the present invention provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as provided in the first aspect above.
The embodiment of the invention provides a low-frequency vibration sense compensation method, which is characterized in that after a vibration device receives a vibration instruction, the vibration device responds to the vibration instruction, the vibration device is driven to vibrate based on an original vibration signal, the period and the waveform peak value of the original vibration signal are modified, an adjusted vibration sense compensation signal is obtained, when the vibration device is driven by the signal, a vibrator of the vibration device can collide with a shell to generate a larger acceleration response, and when the peak period of the original vibration signal is n, the target period of the vibration sense compensation signal is n multiplied by k.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this document, suffixes such as "module", "component" or "unit" used to represent elements are used only for facilitating the description of the present invention, and have no particular meaning in themselves. Thus, "module" and "component" may be used in combination.
In the following description, the inventive embodiment numbers are merely for the purpose of description and do not represent the merits and merits of the embodiments.
Example 1
As shown in fig. 1, an embodiment of the present invention provides a low-frequency vibration compensation method, which is improved based on a driving signal of a vibration device to increase the low-frequency vibration of the vibration device, and includes, but is not limited to, the following steps:
s101, after a vibration device receives a vibration instruction, and before the vibration device responds to the vibration instruction, acquiring an original vibration signal for driving the vibration device to vibrate.
In the above step S101, the vibration instruction may be an instruction that the user operates the electronic apparatus to cause the electronic apparatus to transmit to the vibration device, such as a pressing instruction on the display screen of the electronic apparatus.
In a specific application, the vibration device should immediately respond to the operation of the user on the electronic device to generate vibration, but in the embodiment of the invention, before responding to the vibration instruction, the vibration device is further caused to execute step S101 and step S102, and when the vibration device responds to the vibration instruction, the vibration device is caused to execute step S103, so that a stronger vibration feeling is finally generated.
In a specific application, the short signal for driving the vibration device to vibrate is divided into an acceleration section signal and a brake section signal, and the initial value of the acceleration section signal is actually a sinusoidal signal which is not conventional, namely the original vibration signal in the step S101.
S102, setting a starting vibration compensation signal with a target period according to the peak period of the original vibration signal.
In the above step S102, the original vibration signal may be a sinusoidal signal whose peak period has a value substantially the same as that of the function period, and the waveform of the vibration start compensation signal set according to the original vibration signal should be the same as or similar to that of the original vibration signal.
The embodiment of the invention also shows a detailed implementation manner of the step S102, including:
setting the target period to be an integer multiple of a peak period of the original vibration signal, and setting each target period of the starting compensation signal to include a voltage driving period and a no-signal output period.
Wherein, in the voltage driving period, the peak time point of the starting compensation signal coincides with the peak time point of the original vibration signal;
wherein, in the no-signal output period, the vibration device does not receive a signal.
In the embodiment of the invention, only one waveform peak value appears in one target period of the oscillation starting compensation signal, the waveform peak value only appears in the voltage driving period, and the voltage driving period does not exist in other times when the waveform peak value of the original oscillation signal appears.
In one embodiment, when the target period of the oscillation starting compensation signal is n×k and k is a positive integer greater than 1, the duration of the voltage driving output period in one of the target periods isThe duration of the no signal output period is +.>
When the target period of the oscillation starting compensation signal is n multiplied by k and k is 1, the duration of the voltage driving output period in one target period isThe duration of the no signal output period is +.>
As shown in fig. 2 and 3, the embodiments of the present invention further show that when k is 1 and k is 2, according to the peak period of the original vibration signal, the set vibration start compensation signal with the target period:
the upper line of fig. 2 and 3 represents an original vibration signal, the lower line of fig. 2 and 3 represents a start-up compensation signal having a target period, and a voltage driving period a and a no-signal output period B included in one period of the start-up compensation signal are marked in fig. 2, and a voltage driving period a 'and a no-signal output period B' included in one period of the start-up compensation signal are marked in fig. 3.
It can be seen that, in a target period, if the original vibration signal has a waveform peak value and the oscillation starting compensation signal has a waveform peak value, the waveform peak value of the oscillation starting compensation signal coincides with a peak value time point of the original vibration signal. In a target period, if the original vibration signal has a plurality of waveform peaks, the vibration starting compensation signal still has one waveform peak, and then the waveform peak of the vibration starting compensation signal still coincides with a peak time point of the original vibration signal, that is, only one waveform peak of the vibration starting compensation signal is included in the target period, and the vibration starting compensation signal is in a voltage driving period.
S103, enabling the vibration device to respond to the vibration instruction, driving the vibration device through the vibration starting compensation signal, and adjusting the waveform peak value of the vibration starting compensation signal so as to enable the vibrator of the vibration device to collide with the shell.
The vibrator of the vibrating device is impacted with the shell and is used for compensating low-frequency vibration sense of the vibrating device;
wherein when the peak period of the original vibration signal is n and the target period of the oscillation starting compensation signal is n×k, the impact frequency of the vibrator and the housing isk is a positive integer.
In the step S103, the waveform of the oscillation starting compensation signal is the same as or similar to the waveform of the original vibration signal, but the period of the oscillation starting compensation signal is in a multiple relationship, and as can be seen from the above, the frequency of the oscillation starting compensation signal is always smaller than that of the original vibration signal, so that the oscillation sense is not improved by increasing the frequency of the signal in the embodiment of the invention, and the oscillation sense compensation method provided in the embodiment of the invention can be applied under the low-frequency condition.
In step S103, the adjusted oscillation starting compensation signal is based on the original oscillation signal, and the period and the waveform peak value in the period are changed, so that when the oscillation device is driven by the adjusted oscillation starting compensation signal, the input of the original oscillation signal is not blocked, and another driving signal is not input to the oscillation device.
In a specific application, if the target period of the oscillation starting compensation signal is 0.1s, the user will feel the oscillation at intervals of 0.1s, that is to say, the user has the oscillation experience with the frequency of 10 Hz.
In the embodiment of the invention, the waveform peak value of the oscillation starting compensation signal corresponds to the oscillation sensing intensity, the target period of the oscillation starting compensation signal corresponds to the oscillation sensing frequency, and the user can feel the oscillation sensing experience under different frequencies by adjusting the target period.
The embodiment of the invention also shows a detailed implementation manner of the step S103, including:
s1031, obtaining a standard waveform peak value corresponding to vibration sense requirements;
s1032, calculating a target input voltage required at a peak time point of the oscillation starting compensation signal according to the standard waveform peak value;
s1033, setting pulse voltage according to the target input voltage and the target period;
s1034, inputting the vibration starting compensation signal and the pulse voltage into the vibration device so as to enable the vibrator of the vibration device to collide with the shell;
and the pulse voltage is used for increasing the input voltage of the vibration device to the target input voltage when the vibration device is driven by the regulated vibration starting compensation signal, so that the waveform peak value of the vibration starting compensation signal reaches the standard waveform peak value.
In the above steps S1031 to S1034, each waveform peak of the oscillation start compensation signal is raised by the periodic pulse voltage to reach the standard waveform peak corresponding to the oscillation sense requirement.
In a specific application, the standard waveform peak value corresponding to the vibration sense requirement indicates that the corresponding voltage value can enable the vibrator of the vibration device to collide with the shell.
In a specific application, the pulse voltage has periodicity, and the period of the pulse voltage should be the same as the peak period of the oscillation starting compensation signal.
As shown in fig. 4 and 5, the embodiment of the present invention also exemplarily shows a waveform schematic diagram of the oscillation starting compensation signal after adjusting the waveform peak value, and a frequency response curve in the vibration device after driving the vibration device by the oscillation starting compensation signal after adjusting the waveform peak value.
In fig. 4, the oscillation starting compensation signal after the waveform peak value is adjusted has a higher waveform peak value, and the waveform peak value indicates that the corresponding voltage value can enable the vibrator of the vibration device to collide with the shell.
In fig. 5, the curve is the frequency response curve of the vibration device when the low-frequency vibration compensation method provided by the embodiment of the invention is not used, and the front-section response is smaller; in fig. 5, the straight line with an arrow is the frequency response curve of the vibration device after the low-frequency vibration compensation method provided by the embodiment of the invention is used, so that the acceleration response is obviously compensated and enhanced in the previous response time.
According to the low-frequency vibration sense compensation method provided by the embodiment of the invention, after the vibration device receives the vibration command, the vibration device responds to the vibration command, the period and the modification on the waveform peak value are made on the basis of the original vibration signal for driving the vibration device to vibrate, the adjusted vibration sense compensation signal is obtained, when the vibration device is driven by the signal, the vibrator of the vibration device can collide with the shell to generate a larger acceleration response, and when the peak period of the original vibration signal is n, the target period of the vibration sense compensation signal is n multiplied by k, so that the acceleration response of the vibration device is improved on the premise of not improving the frequency of the signal, and the touch sense effect generated by the vibration device under the low-frequency condition is improved.
Example two
In the low-frequency vibration compensation method provided in the first embodiment, the vibration condition in the vibration acceleration section of the vibration device is mainly improved, so that the embodiment of the invention is also based on the first embodiment, and another low-frequency vibration compensation method is provided.
As shown in fig. 6, an embodiment of the present invention provides a low frequency vibration compensation method, which includes steps S601 to S604, wherein steps S601 and S602 are the same as steps S101 and S102 in the above embodiment, and are not described herein, and after step S102 in the first embodiment, that is, after step S602 in the embodiment of the present invention, the method further includes:
s6031, acquiring an acceleration section signal corresponding to the original vibration signal, driving the vibration device to vibrate, and acquiring the duration time of the acceleration section signal;
s6032, determining the duration time of the acceleration section signal as the time when the vibration device receives the vibration starting compensation signal;
step S103 in the first embodiment of the present invention is the following steps:
s604, driving the vibration device through a vibration starting compensation signal within the duration time of the acceleration section signal, and adjusting the waveform peak value of the vibration starting compensation signal so as to enable the vibrator of the vibration device to collide with the shell;
and S605, stopping driving the vibration device when the duration of the acceleration section signal is over.
In a specific application, the short signal is functionally divided into an acceleration section and a brake section, so in the embodiment of the invention, by identifying the duration of the acceleration section signal, the low-frequency vibration sense compensation method provided in the first embodiment is better applied to the vibration device and the electronic equipment, and the improvement mode of the touch sense effect generated by the vibration device under the low-frequency condition is perfected.
In one embodiment, after the step S605, the method may further include:
acquiring a brake segment signal corresponding to the original vibration signal and driving the vibration device to stop vibrating;
and driving the vibration device through the brake segment signal.
Example III
As shown in fig. 7, an embodiment of the present invention provides a low frequency vibration compensation apparatus 70, including:
an original vibration signal acquisition module 71, configured to acquire an original vibration signal for driving the vibration device to vibrate after the vibration device receives the vibration command and before the vibration device responds to the vibration command;
a start-up compensation signal setting module 72 for setting a start-up compensation signal having a target period according to a peak period of the original vibration signal;
a driving module 73 for making the vibration device respond to the vibration command, driving the vibration device through the vibration starting compensation signal, and adjusting the waveform peak value of the vibration starting compensation signal so as to make the vibrator of the vibration device collide with the shell;
wherein, the vibrator of the vibration device collides with the shell and is used for compensating the low-frequency vibration sense of the vibration device;
wherein when the peak period of the original vibration signal is n and the target period of the oscillation starting compensation signal is n×k, the impact frequency of the vibrator and the casing of the vibrator isk is a positive integer.
Therefore, the waveform of the oscillation starting compensation signal is the same as or similar to the waveform of the original vibration signal, but the period of the oscillation starting compensation signal is in a multiple relationship, and the frequency of the oscillation starting compensation signal is always smaller than that of the original vibration signal, so that the oscillation sense is not improved by increasing the frequency of the signal in the embodiment of the invention, and the oscillation sense compensation method provided by the embodiment of the invention can be applied to a low-frequency condition.
In addition, in the embodiment of the invention, the waveform peak value of the oscillation starting compensation signal corresponds to the oscillation sensing intensity, the target period of the oscillation starting compensation signal corresponds to the oscillation sensing frequency, and the user can feel the oscillation sensing experience under different frequencies by adjusting the target period.
The embodiment of the invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein when the processor executes the computer program, the steps in the low-frequency vibration sense compensation method in the first embodiment are realized.
The embodiment of the present invention also provides a storage medium, which is a computer readable storage medium, and has a computer program stored thereon, where the computer program, when executed by a processor, implements the steps in the low frequency vibration sensing compensation method described in the first embodiment.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; while the foregoing embodiments are illustrative of the present invention in detail, those skilled in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.