Method for generating a haptic feedback signal, electronic device, and storage medium
By mapping the initial tactile feedback signal from the time domain to the frequency domain and back to the time domain, and adjusting the amplitude of the harmonic components in the spectrum, the problem of long design time and monotonous effect of tactile feedback signals in the prior art is solved, and a wide variety of tactile feedback effects can be generated quickly.
Patent Information
- Application Number
- CN202211118787.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2042-09-13
AI Technical Summary
In existing technologies, the design time for tactile feedback signals is long and the effects are limited and lack variety.
The initial tactile feedback signal is mapped from the time domain to the frequency domain, the amplitude of the harmonic components in the spectrum is adjusted to obtain the target spectrum, and then mapped from the frequency domain back to the time domain to generate a new tactile feedback signal.
By adjusting the amplitude of the harmonic components in the spectrum, a large number of signals with different tactile feedback effects were generated, which improved the richness of the tactile feedback signals and shortened the design time.
Smart Images

Figure CN115686195B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of tactile feedback, and particularly relates to a method for generating a tactile feedback signal, an electronic device and a storage medium. BACKGROUND
[0002] Tactile feedback technology is a new feedback technology after hearing feedback and visual feedback technology, and is widely applied to various electronic devices, especially consumer electronic devices such as mobile phones and tablet computers. Tactile feedback technology is a tactile feedback mechanism that combines hardware and software and is assisted by actions such as force or vibration, and aims to simulate the real tactile experience of humans, so that users can obtain a real and more intense immersive sensory experience.
[0003] In the related art, many tactile feedback signals are usually stored in an electronic device before it is shipped. These tactile feedback signals are designed by designers in advance and each has a different tactile feedback effect. In actual application, the electronic device can call different tactile feedback signals according to different trigger instructions (such as clicking, long pressing and sliding) input by a user, and input the called tactile feedback signals into a tactile feedback device (such as a motor and a brake), so that the tactile feedback device outputs corresponding tactile feedback actions (such as force and vibration) according to the received tactile feedback signals to provide corresponding tactile feedback effects for the user. However, there are two disadvantages in the process of designing the tactile feedback signals by the designers: first, the designers need a long time to design a large number of tactile feedback signals, and the speed is poor; second, the corresponding tactile feedback effects of the tactile feedback signals are single and not rich.
[0004] Therefore, it is necessary to improve the method for generating the tactile feedback signals. SUMMARY
[0005] The present application aims to provide a method for generating a tactile feedback signal, an electronic device and a storage medium, and aims to solve the problem of single and not rich corresponding tactile feedback effects of the tactile feedback signals in the related art.
[0006] To solve the above technical problems, the first aspect of the present application provides a method for generating a tactile feedback signal, comprising:
[0007] obtaining an initial tactile feedback signal;
[0008] mapping the initial tactile feedback signal from a time domain to a frequency domain to obtain an initial frequency spectrum of the initial tactile feedback signal in the frequency domain;
[0009] adjusting the amplitude of the harmonic component of any frequency band in the initial frequency spectrum to obtain a target frequency spectrum;
[0010] Map the signal corresponding to the target spectrogram from the frequency domain to the time domain to obtain a target haptic feedback signal.
[0011] The second aspect of the embodiment of the present application provides an electronic device, including a memory, and the memory stores a plurality of haptic feedback signals, and the plurality of haptic feedback signals are generated according to the method for generating a haptic feedback signal in the first aspect of the embodiment of the present application.
[0012] The third aspect of the embodiment of the present application provides another electronic device, including a memory and at least one processor, wherein the memory is configured to store at least one program, and when the at least one program is executed by the at least one processor, the at least one processor executes the method for generating a haptic feedback signal in the first aspect of the embodiment of the present application.
[0013] The fourth aspect of the embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores executable instructions, and the executable instructions are executed to execute the method for generating a haptic feedback signal in the first aspect of the embodiment of the present application.
[0014] From the above description, compared with the related art, the beneficial effects of the present application are that:
[0015] First, the obtained initial haptic feedback signal is mapped from the time domain to the frequency domain to obtain an initial spectrogram of the initial haptic feedback signal in the frequency domain; second, the amplitude of the harmonic component of any frequency band in the initial spectrogram is adjusted to obtain a target spectrogram; and finally, the signal corresponding to the target spectrogram is mapped from the frequency domain to the time domain to obtain a target haptic feedback signal, and the haptic feedback device in the electronic device can output a corresponding haptic feedback action according to the target haptic feedback signal to achieve a corresponding haptic feedback effect. As can be seen, the initial spectrogram is composed of a plurality of frequency bands, and the present application converts the initial haptic feedback signal into a new haptic feedback signal (i.e., a target haptic feedback signal) by adjusting the amplitude of the harmonic component of any frequency band (one or more) in the initial spectrogram. It can be understood that the target haptic feedback signal obtained is different when the frequency band is selected during amplitude adjustment, and different target haptic feedback signals correspond to different haptic feedback effects, so the present application can obtain a large number of target haptic feedback signals with different haptic feedback effects by adjusting the amplitude of the harmonic component of any frequency band in the initial spectrogram, thereby effectively improving the richness of the haptic feedback signal. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the related art or the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the related art or the embodiments of the present application. Obviously, the drawings in the following description only represent some of the embodiments of the present application, rather than all the embodiments of the present application. Those skilled in the art can obtain other drawings according to these drawings without any creative effort.
[0017] Figure 1 The flowchart of the method for generating the tactile feedback signal provided by the embodiments of the present application is shown in the figure.
[0018] Figure 2 The initial frequency spectrum provided by the embodiments of the present application is shown in the figure.
[0019] Figure 3 The comparison figure of the initial frequency spectrum and the target frequency spectrum provided by the embodiments of the present application is shown in the figure.
[0020] Figure 4 The module block diagram of the first electronic device provided by the embodiments of the present application is shown in the figure.
[0021] Figure 5 The module block diagram of the second electronic device provided by the embodiments of the present application is shown in the figure.
[0022] Figure 6 The module block diagram of the computer readable storage medium provided by the embodiments of the present application is shown in the figure.
[0023] Figure 7 The flowchart of the method for generating the tactile feedback signal provided by the embodiments of the present application is shown in the figure.
Specific Implementation Ways
[0024] In order to make the purpose, technical solutions and advantages of the present application more obvious and easy to understand, the following will combine the embodiments of the present application and the corresponding drawings to clearly and completely describe the present application, in which the same or similar labels represent the same or similar elements or elements with the same or similar functions throughout the description. It should be understood that the following described embodiments of the present application are only used to explain the present application, and do not limit the present application, that is, based on the various embodiments of the present application, all other embodiments obtained by those skilled in the art without any creative effort are within the scope of protection of the present application. In addition, the technical features involved in the various embodiments of the present application can be combined with each other as long as they do not conflict with each other.
[0025] Please refer to Figure 1 , Figure 1 The flowchart of the method for generating the tactile feedback signal provided by the embodiments of the present application is shown in the figure, and the method for generating the tactile feedback signal includes the following steps 101 to 104.
[0026] Step 101, obtaining an initial haptic feedback signal.
[0027] In the embodiments of the present application, the initial haptic feedback signal needs to be obtained before generating the required haptic feedback signal. The initial haptic feedback signal is generated according to the required haptic feedback effect. For example, in a fighting game, the electronic device needs to provide the user with haptic feedback with a hitting effect. In this case, the initial haptic feedback signal can be generated according to the required hitting effect. For another example, in a shooting game, the electronic device needs to provide the user with haptic feedback with a gun recoil effect. In this case, the initial haptic feedback signal can be generated according to the gun recoil effect. Specifically, the initial haptic feedback signal actually refers to the driving signal required by the haptic feedback device for outputting the haptic feedback action.
[0028] Step 102, mapping the initial haptic feedback signal from time domain to frequency domain to obtain an initial frequency spectrum of the initial haptic feedback signal in the frequency domain.
[0029] In the embodiments of the present application, after obtaining the initial haptic feedback signal, the initial haptic feedback signal needs to be mapped from the current time domain to the frequency domain, so as to obtain the initial frequency spectrum of the initial haptic feedback signal in the frequency domain. Exemplarily, the initial frequency spectrum can be as shown in Figure 2
[0030] Step 103, adjusting the amplitude of the harmonic component of any frequency band in the initial frequency spectrum to obtain a target frequency spectrum.
[0031] In the embodiments of the present application, after obtaining the initial frequency spectrum, the amplitude of the harmonic component of any frequency band (one or more) in the initial frequency spectrum needs to be adjusted, so as to obtain the target frequency spectrum. It can be understood that the initial frequency spectrum corresponds to the initial haptic feedback signal, and the amplitude of the harmonic component of each frequency band in the initial frequency spectrum is certain. When the amplitude of the harmonic component of any frequency band in the initial frequency spectrum is adjusted through step 103, a new frequency spectrum different from the initial frequency spectrum is obtained. The new frequency spectrum no longer corresponds to the initial haptic feedback signal, but corresponds to a new haptic feedback signal, which is the target haptic feedback signal in step 104 described below.
[0032] Exemplarily, if it is desired to obtain more concentrated and crisp haptic feedback, the low-frequency harmonic component in the initial frequency spectrum can be suppressed, and the high-order harmonic component in the initial frequency spectrum can be raised. The comparison chart of the initial frequency spectrum before amplitude adjustment and the target frequency spectrum after amplitude adjustment can be referred to Figure 3 We can select the high harmonic components of the two frequency bands of 400-500Hz and 500-600Hz in the initial spectrogram to adjust the amplitude, and specifically, we can increase the amplitude ratio of the high harmonic components of the two frequency bands.
[0033] Step 104: mapping the signal corresponding to the target spectrogram from the frequency domain to the time domain to obtain a target haptic feedback signal.
[0034] In the embodiments of the present application, after obtaining the target spectrogram, the new haptic feedback signal corresponding to the target spectrogram needs to be mapped from the current frequency domain to the time domain, so as to obtain the new haptic feedback signal, which is called the target haptic feedback signal. It can be understood that the target haptic feedback signal is the final haptic feedback signal, and we can input the target haptic feedback signal into the haptic feedback device in the electronic device, so that the haptic feedback device can output the corresponding haptic feedback action according to the target haptic feedback signal to achieve the corresponding haptic feedback effect.
[0035] As can be seen from the above, the initial spectrogram is composed of multiple frequency bands, and the embodiments of the present application convert the initial haptic feedback signal into a new haptic feedback signal (i.e. the target haptic feedback signal) by adjusting the amplitude of the harmonic components of any frequency band in the initial spectrogram. It can be understood that the target haptic feedback signal obtained by adjusting the amplitude of different frequency bands is different, and different target haptic feedback signals correspond to different haptic feedback effects. Therefore, the embodiments of the present application can obtain a large number of target haptic feedback signals with different haptic feedback effects by adjusting the amplitude of the harmonic components of any frequency band in the initial spectrogram, thereby effectively improving the richness of the haptic feedback signal. At the same time, since this process is realized by a software program, it can be realized within a few seconds or even less time, thereby shortening the time required by the designer when designing a large number of haptic feedback signals, and meeting the rapidity of haptic feedback signal generation.
[0036] As an implementation manner, step 101 can specifically include: obtaining an acceleration signal; converting the acceleration signal into a voltage signal as the initial haptic feedback signal; wherein the acceleration signal is generated according to the required haptic feedback effect. The acceleration signal actually refers to the acceleration required by the haptic feedback device in the electronic device for outputting the haptic feedback action. For example, when the haptic feedback device is a linear motor, the acceleration signal indicates the acceleration required by the linear motor, that is, when the acceleration of the linear motor meets the acceleration signal, the haptic feedback action output by the linear motor can achieve the required haptic feedback effect.
[0037] In one specific implementation, the acceleration signal can be converted into a voltage signal according to an acceleration equalization formula, i.e., the acceleration signal can be converted into a voltage signal according to an electromechanical coupling equation of the vibration system, which is shown as follows:
[0038]
[0039] wherein m is the mass of a mover in the haptic feedback device, c is the mechanical damping of the haptic feedback device, k is the spring coefficient of the haptic feedback device, BL is the electromechanical coupling coefficient, R e is the resistance of a coil in the haptic feedback device, L e is the inductance of the coil, i is the current, u is the voltage, x is the displacement, is the velocity , which means the first derivative of the displacement with respect to time, is the acceleration , which means the second derivative of the displacement with respect to time.
[0040] It can be understood that the electromechanical coupling equation of the vibration system mainly involves the conversion between the voltage and the displacement, and the conversion form includes two kinds, one is displacement response solving, i.e., the voltage is known, and the displacement, velocity or acceleration is solved by the above-mentioned electromechanical coupling equation; the other is equalization algorithm, i.e., the displacement, velocity or acceleration is known, and the voltage is solved by the above-mentioned electromechanical coupling equation. The present specific implementation is based on the equalization algorithm to convert the acceleration signal into the voltage signal.
[0041] As an implementation, the "mapping the initial haptic feedback signal from time domain to frequency domain" in step 102 can specifically include: performing Fourier transform on the initial haptic feedback signal to map the initial haptic feedback signal from the time domain to the frequency domain.
[0042] In one specific implementation, the Fourier transform is represented by the following formula:
[0043]
[0044] wherein represents a rotation factor, k = 0, 1,..., N-1, n = 0, 1,..., N-1.
[0045] Correspondingly, the "mapping the signal corresponding to the target frequency spectrum from frequency domain to time domain" in step 104 can specifically include: performing inverse Fourier transform on the new haptic feedback signal (i.e., the target haptic feedback signal) corresponding to the target frequency spectrum to map the new haptic feedback signal corresponding to the target frequency spectrum from the frequency domain to the time domain.
[0046] As an implementation, the "adjusting the amplitude of the harmonic component of any frequency band in the initial frequency spectrum" in step 103 can specifically include: multiplying the harmonic component of any frequency band in the initial frequency spectrum by a preset weighting function to adjust the amplitude of the harmonic component of the corresponding frequency band. It can be understood that the weight of the harmonic component of the frequency band in the initial frequency spectrum which is not multiplied by the preset weighting function in the embodiment is 1, that is, the amplitude thereof is kept unchanged.
[0047] In one specific implementation, the preset weighting function is a Hanning window function. Of course, in other specific implementations, the preset weighting function can also be selected from other weighting functions commonly used in the art, such as a linear function and a Gaussian window function, etc. It can be understood that the adjustment degree of the amplitude is different when the selected weighting function is different, the adjustment degree of the amplitude is also different when the parameters of the same weighting function itself are different, and the same weighting function can be used or different weighting functions can be used for different frequency bands in the initial frequency spectrum.
[0048] It should be noted that the above embodiment is only a preferred implementation of the present application, and is not the only limitation on the specific process of steps 101-104; therefore, those skilled in the art can flexibly set it according to the actual application scene on the basis of the embodiment of the present application.
[0049] Please refer to Figure 4 , Figure 4 The module block diagram of the first electronic device provided by the embodiment of the present application is provided. The embodiment of the present application also provides an electronic device, which includes a processor, a memory and a haptic feedback device; wherein the memory is used to store a plurality of haptic feedback signals, which are all generated according to the aforementioned haptic feedback signal generation method provided by the embodiment of the present application; the processor is used to select different haptic feedback signals from the memory according to different trigger instructions, and input the selected haptic feedback signals into the haptic feedback device; and the haptic feedback device is used to output corresponding haptic feedback actions according to the received haptic feedback signals. In the embodiment of the present application, the haptic feedback device can include but is not limited to a motor (such as a linear motor and an eccentric rotating mass motor, etc.) and a brake (such as a linear resonant brake and a piezoelectric brake, etc.); and the haptic feedback action can include but is not limited to an acting force and a vibration.
[0050] Further, the electronic device can also include a trigger, which is used to sense a user input trigger instruction and transmit the sensed trigger instruction to the processor. Wherein, the trigger instruction can include but is not limited to clicking, long pressing, short pressing, sliding and drawing of a specific figure.
[0051] Further, the electronic device can further include a driving circuit configured to generate a driving signal according to the haptic feedback signal selected from the memory by the processor to drive the haptic feedback device to output a corresponding haptic feedback action.
[0052] Referring to Figure 5 , Figure 5 a module block diagram of another electronic device provided by an embodiment of the present application is provided.
[0053] As Figure 5 shown, another electronic device 500 is provided by an embodiment of the present application, which includes a memory 510 and at least one processor 520; wherein the memory 510 is configured to store at least one program, and when the at least one program is executed by the at least one processor 520, the at least one processor 520 executes the method for generating a haptic feedback signal provided by an embodiment of the present application.
[0054] In some embodiments, the electronic device 500 can further include a bus 550 for communication connection between the memory 510 and the at least one processor 520.
[0055] Referring to Figure 6 , Figure 6 a module block diagram of a computer readable storage medium provided by an embodiment of the present application is provided.
[0056] As Figure 6 shown, a computer readable storage medium 600 is provided by an embodiment of the present application, and the computer readable storage medium 600 has stored executable instructions 610, and the executable instructions 610 are executed to execute the method for generating a haptic feedback signal provided by an embodiment of the present application.
[0057] In summary, the embodiments of the present application relate to the generation and utilization of a haptic feedback signal, and the process from the generation to the utilization of the haptic feedback signal can refer to Figure 7 , and specifically:
[0058] Step 701, determining a required haptic feedback effect, and generating an acceleration signal required by a haptic feedback device according to the required haptic feedback effect;
[0059] Step 702, converting the acceleration signal into a voltage signal as an initial haptic feedback signal according to an acceleration equalization formula;
[0060] Step 703, inputting the initial haptic feedback signal into an electronic device configured to execute the aforementioned method for generating a haptic feedback signal provided by an embodiment of the present application; wherein the electronic device obtains a target haptic feedback signal different from the initial haptic feedback signal by executing the aforementioned method for generating a haptic feedback signal provided by an embodiment of the present application;
[0061] Step 704, obtaining a target haptic feedback signal output by the electronic device;
[0062] Step 705, inputting the target haptic feedback signal into the haptic feedback device, and the haptic feedback device outputs corresponding haptic feedback action according to the target haptic feedback signal to achieve corresponding haptic feedback effect.
[0063] The more detailed processes of each of steps 701-705 can be found in the foregoing description of the related parts, and the embodiments of the present application will not be described here.
[0064] The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), mass storage, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0065] In the above embodiments, all or part of the embodiments can be realized by software, hardware, firmware, or any combination thereof. When realized by software, all or part of the embodiments can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, all or part of the computer program instructions generate the processes or functions described in the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk), etc.
[0066] It should be noted that each of the embodiments in the present application is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For product class embodiments, since they are similar to method class embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method class embodiment.
[0067] It is also important to note that the use of relational terms, such as first and second, and the like, are used solely to distinguish one from another entity or action without necessarily requiring or implying any actual relationship or order between such entities or actions. Moreover, 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 can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0068] The above description of disclosed embodiments provides enabling concepts for making or using the present content. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the present content. Thus, the present content is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method of generating a haptic feedback signal, characterized by, The method comprises: obtaining an initial haptic feedback signal; performing Fourier transform on the initial haptic feedback signal to map the initial haptic feedback signal from time domain to frequency domain, to obtain an initial frequency spectrum of the initial haptic feedback signal in the frequency domain; adjusting the amplitude of the harmonic component of any frequency band in the initial frequency spectrum to obtain a target frequency spectrum; performing inverse Fourier transform on the signal corresponding to the target frequency spectrum to map the signal corresponding to the target frequency spectrum from the frequency domain to the time domain, to obtain a target haptic feedback signal; wherein the Fourier transform is represented by the following formula: ; wherein denotes a rotation factor, , .
2. The method for generating a tactile feedback signal according to claim 1, wherein, the adjusting the amplitude of the harmonic component of any frequency band in the initial frequency spectrum comprises: multiplying the harmonic component of any frequency band in the initial frequency spectrum by a preset weighting function to adjust the amplitude of the harmonic component of the any frequency band.
3. The method for generating a tactile feedback signal according to claim 2, wherein, The preset weighting function comprises any one of a linear function, a Hanning window function and a Gaussian window function.
4. The method for generating a tactile feedback signal according to claim 1, wherein, The obtaining the initial haptic feedback signal comprises: obtaining an acceleration signal, wherein the acceleration signal indicates the acceleration required by a haptic feedback device for outputting a haptic feedback action in an electronic device, and the acceleration signal is generated according to a required haptic feedback effect; converting the acceleration signal into a voltage signal as the initial haptic feedback signal.
5. A method according to claim 4, wherein the haptic feedback signal is generated by: The converting the acceleration signal into a voltage signal comprises: converting the acceleration signal into a voltage signal according to an electromechanical coupling equation of a vibration system.
6. The method for generating a tactile feedback signal according to claim 5, wherein, The electromechanical coupling equation of the vibration system is as follows: ; wherein m is the mass of the mover in the haptic feedback device, c is the mechanical damping of the haptic feedback device, k is the spring coefficient of the haptic feedback device, BL is the electromechanical coupling coefficient, R e is the resistance of the coil in the haptic feedback device, L e is the inductance of the coil, i is the current, u is the voltage, x is the displacement, is the velocity, is the acceleration.
7. An electronic device, comprising: The electronic device comprises a memory, and a plurality of haptic feedback signals are stored in the memory, wherein the plurality of haptic feedback signals are generated according to the method for generating a haptic feedback signal according to any one of claims 1-6.
8. The electronic device of claim 7, wherein, The electronic device further comprises a processor and a haptic feedback device, wherein: the processor is configured to select different haptic feedback signals from the memory according to different trigger instructions, and input the selected haptic feedback signals into the haptic feedback device; the haptic feedback device is configured to output corresponding haptic feedback actions according to the received haptic feedback signals.
9. The electronic device of claim 8, wherein, The haptic feedback device comprises any one of a motor and a brake.
10. An electronic device, comprising: The electronic device comprises a memory and at least one processor, wherein the memory is configured to store at least one program, and when the at least one program is executed by the at least one processor, the at least one processor is caused to execute the method according to any one of claims 1-6.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores executable instructions, and the executable instructions are executed to execute the method according to any one of claims 1-6.
Citation Information
Patent Citations
Haptic communication system using cutaneous actuators for simulation of continuous human touch
CN110753957A