Motor driving method, motor driving apparatus, and electronic device

The amplitude difference of the audio signal is processed through Fourier transform and low-pass filtering, and a tactile driving signal synchronized with the audio rhythm is generated, which solves the problem of lack of synchronization between motor vibration and sound effects in the prior art, and realizes efficient synchronization of audio signals and motor vibration.

WO2025044832A1PCT designated stage expired Publication Date: 2025-03-06GOERTEK INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/113244
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-25
Filing Date
2024-08-20
Publication Date
2025-03-06

AI Technical Summary

Technical Problem

In existing game scenarios, the vibration of the linear motor is usually performed simultaneously with the sound effect output, but there is a lack of a technical solution that can drive the motor vibration according to the rhythm of the audio signal.

Method used

By acquiring multiple data frames of the audio signal, Fourier transform processing is performed, the amplitude difference of the first frequency point is extracted, low-pass filtering is performed, tactile driving signals are generated, and motor vibration is driven.

Benefits of technology

The synchronization of the audio signal and the motor vibration is achieved, and the conversion efficiency and synchronization of the audio signal to the tactile signal is improved, so that the motor can vibrate with the audio rhythm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024113244_06032025_PF_FP_ABST
    Figure CN2024113244_06032025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a motor driving method and apparatus, and an electronic device. The method comprises: obtaining M data frames of an audio signal, wherein each data frame comprises initial waveform data of L sampling moments, M is a positive integer, and L is a positive integer; traversing the M data frames, and performing Fourier transform processing on the currently traversed data frame to obtain first amplitudes corresponding to first frequency points in the currently traversed data frame; obtaining a reference amplitude of the currently traversed data frame on the basis of the first amplitudes corresponding to the first frequency points in the currently traversed data frame and first amplitudes corresponding to first frequency points in a previous data frame of the currently traversed data frame; performing low-pass filtering processing on a reference amplitude signal to obtain a tactile signal, wherein the reference amplitude signal is obtained on the basis of the reference amplitudes of the M data frames; generating a tactile driving signal on the basis of the tactile signal; and on the basis of the tactile driving signal, driving a motor to vibrate.
Need to check novelty before this filing date? Find Prior Art

Description

Motor driving method, motor driving device and electronic equipment Technical Field

[0001] The present invention relates to the field of data processing technology, and more particularly, to a motor driving method, a motor driving device, and an electronic device. Background Art

[0002] Linear Resonant Actuator (LRA) has been widely used in various vibration applications in consumer electronics, especially gaming and AR / VR products, due to its advantages such as strong, rich, crisp vibration and low energy consumption.

[0003] In existing gaming scenarios, the vibration of a linear motor is usually accompanied by the output of sound effects. Therefore, it is very valuable to propose a solution that drives the motor to vibrate according to the rhythm of an audio signal.

[0004] Summary of the Invention

[0005] One purpose of an embodiment of the present invention is to provide a new technical solution that can drive a motor to vibrate according to the rhythm of an audio signal.

[0006] According to a first aspect of the present disclosure, there is provided a motor driving method, comprising:

[0007] Acquire M data frames of the audio signal, each data frame including initial waveform data at L sampling moments, where M is a positive integer and L is a positive integer;

[0008] Traversing the M data frames, performing Fourier transform processing on the currently traversed data frame to obtain a first amplitude corresponding to a first frequency point in the currently traversed data frame; obtaining a reference amplitude of the currently traversed data frame based on the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in a data frame before the currently traversed data frame;

[0009] Performing low-pass filtering on the reference amplitude signal to obtain a tactile signal; the reference amplitude signal is obtained based on the reference amplitudes of the M data frames;

[0010] generating a tactile driving signal according to the tactile signal;

[0011] The motor is driven to vibrate according to the haptic driving signal.

[0012] Optionally, obtaining the reference amplitude of the currently traversed data frame according to the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in a data frame before the currently traversed data frame includes:

[0013] Obtaining an amplitude difference corresponding to the first frequency point in the currently traversed data frame according to the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame;

[0014] The reference amplitude of the currently traversed data frame is obtained according to the amplitude difference corresponding to the first frequency point in the currently traversed data frame.

[0015] Optionally, obtaining the reference amplitude of the currently traversed data frame according to the amplitude difference corresponding to the first frequency point in the currently traversed data frame includes:

[0016] The average value or median value of the amplitude difference corresponding to the first frequency point in the currently traversed data frame is determined as the reference amplitude value of the currently traversed data frame.

[0017] Optionally, when the audio signal does not contain a data frame preceding the currently traversed data frame,

[0018] The obtaining, based on the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame, an amplitude difference corresponding to the first frequency point in the currently traversed data frame includes:

[0019] The first amplitude corresponding to the first frequency point in the currently traversed data frame is used as the amplitude difference corresponding to the first frequency point in the currently traversed data frame.

[0020] Optionally, generating a tactile driving signal according to the tactile signal includes:

[0021] determining a target time interval during which the amplitude of the tactile signal is greater than or equal to a set threshold;

[0022] The haptic driving signal is generated according to the target time interval and the set sinusoidal signal.

[0023] Optionally, generating a tactile driving signal according to the tactile signal includes:

[0024] When a signal edge appears in the haptic signal, the haptic drive signal is generated according to a set sinusoidal signal.

[0025] Optionally, generating a tactile driving signal according to the tactile signal includes:

[0026] obtaining a resonant frequency of the motor;

[0027] A sinusoidal signal having a frequency equal to the resonant frequency is constructed according to the tactile signal as the tactile driving signal.

[0028] Optionally, acquiring M data frames of the audio signal includes:

[0029] Get audio signal;

[0030] The audio signal is segmented according to the set segmentation frequency to obtain the M data frames.

[0031] According to a second aspect of the present disclosure, there is provided a motor drive device, comprising:

[0032] A data frame acquisition module is used to acquire M data frames of the audio signal, each data frame including initial waveform data at L sampling moments, where M is a positive integer and L is a positive integer;

[0033] a data frame processing module, configured to traverse the M data frames, perform Fourier transform processing on the currently traversed data frame, and obtain a first amplitude corresponding to a first frequency point in the currently traversed data frame; and obtain a reference amplitude of the currently traversed data frame based on the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in a data frame preceding the currently traversed data frame;

[0034] a low-pass filtering module, configured to perform low-pass filtering on the reference amplitude signal to obtain a tactile signal; the reference amplitude signal is obtained based on the reference amplitudes of the M data frames;

[0035] a driving signal generating module, configured to generate a tactile driving signal according to the tactile signal;

[0036] The motor driving module is used to drive the motor to vibrate according to the tactile driving signal.

[0037] According to a third aspect of the present disclosure, an electronic device is provided, including a processor and a memory, wherein the memory is used to store a computer program, and the computer program is used to control the processor to execute the method described in the first aspect of the present disclosure.

[0038] Through the embodiments of the present disclosure, the audio rhythm is detected by utilizing the fluctuations in the frequency domain amplitude difference between adjacent data frames. Large fluctuations in the frequency domain amplitude difference between adjacent data frames indicate the presence of a rhythm in the audio data. Appropriate conversion of the reference amplitude signal can generate a tactile signal synchronized with the audio rhythm, thereby improving the efficiency and synchronization of the audio-to-tactile signal conversion. Furthermore, a tactile drive signal generated based on a tactile signal synchronized with the audio rhythm can be used to drive a motor, causing the motor to vibrate in time with the audio rhythm.

[0039] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0041] FIG1 is a block diagram showing a hardware configuration of an electronic device 1000 that can implement an embodiment of the present disclosure;

[0042] FIG2 is a flow chart of a motor driving method according to an embodiment of the present disclosure;

[0043] FIG3 is a waveform diagram of an audio signal provided according to an embodiment of the present disclosure;

[0044] FIG4 is a waveform diagram of an amplitude difference according to an embodiment of the present disclosure;

[0045] FIG5 is a schematic diagram of a waveform of a reference amplitude signal provided according to an embodiment of the present disclosure;

[0046] FIG6 is a waveform diagram of a tactile signal provided according to an embodiment of the present disclosure;

[0047] FIG7 is a flow chart of an example of a motor driving method according to an embodiment of the present disclosure;

[0048] FIG8 is a block diagram of a motor driving device according to an embodiment of the present disclosure;

[0049] FIG9 is a block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0050] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention.

[0051] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0052] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0053] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0054] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0055] <Hardware Configuration>

[0056] FIG. 1 is a block diagram illustrating a hardware configuration of an electronic device 1000 that may implement an embodiment of the present disclosure.

[0057] Electronic device 1000 may be a laptop, desktop computer, mobile phone, tablet computer, speaker, headset, etc. As shown in FIG1 , electronic device 1000 may include a processor 1100, memory 1200, interface device 1300, communication device 1400, display device 1500, input device 1600, speaker 1700, microphone 1800, etc. Processor 1100 may be a CPU, microprocessor MCU, etc. Memory 1200 may include, for example, ROM (read-only memory), RAM (random access memory), or non-volatile memory such as a hard disk. Interface device 1300 may include, for example, a USB port or headphone jack. Communication device 1400 may be capable of wired or wireless communication, specifically Wi-Fi, Bluetooth, 2G / 3G / 4G / 5G, etc. Display device 1500 may be, for example, an LCD display or a touchscreen display. Input device 1600 may include, for example, a touchscreen, a keyboard, or somatosensory input. Users may input and output voice information through speaker 1700 and microphone 1800.

[0058] The electronic device shown in Figure 1 is merely illustrative and in no way implies any limitation on the present disclosure, its application or use. In the embodiments of the present disclosure, the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to operate to perform any one of the motor driving methods provided in the embodiments of the present disclosure. It should be understood by those skilled in the art that although multiple devices are shown for the electronic device 1000 in Figure 1, the present disclosure may only involve some of the devices therein, for example, the electronic device 1000 only involves the processor 1100 and the storage device 1200. Technicians can design instructions based on the scheme disclosed in the present disclosure. How instructions control the processor to operate is well known in the art, so it will not be described in detail here.

[0059] This embodiment provides a motor driving method, which can be implemented by an electronic device. The motor driving system can be the electronic device 1000 shown in FIG1 .

[0060] FIG2 is a flow chart of a motor driving method according to an embodiment of the present disclosure. As shown in FIG2 , the method may include steps S2100 to S2500 as follows:

[0061] Step S2100 , obtaining M data frames of an audio signal, each data frame including initial waveform data at L sampling moments.

[0062] Wherein, M is a positive integer, and L is a positive integer. In one example, L may be an even number.

[0063] In one embodiment of the present disclosure, obtaining M data frames of an audio signal may include: obtaining an audio signal; and dividing the audio signal according to a set division frequency to obtain M data frames.

[0064] The audio signal in this embodiment can be pre-set based on the application scenario or specific needs. For example, the audio signal can be customized based on the game scenario, or it can be obtained by performing a series of operations on the sound effects actually output by the game application, or it can be the game sound effect itself. The waveform of the audio signal can be as shown in Figure 3. The horizontal axis of Figure 3 is time, and the vertical axis is voltage.

[0065] In this embodiment, the audio signal may include initial waveform data at multiple sampling moments. The sampling frequency of the audio signal is greater than the segmentation frequency, so that each data frame obtained by segmentation includes initial waveform data at L sampling moments.

[0066] In one embodiment, the splitting frequency may be pre-determined based on the number of sampling moments of the audio signal. Specifically, the ratio of the number of sampling moments in the audio signal to M may be determined to obtain the number L of sampling moments in each data frame; the splitting frequency may then be obtained based on L. For example, the splitting frequency may be the quotient obtained by dividing the sampling frequency by L.

[0067] Specifically, the audio signal may be evenly divided into M data frames, so that the number of sampling moments contained in each of the M data frames is the same.

[0068] In another embodiment, the splitting frequency may be pre-set based on an application scenario or specific requirements. On this basis, the number of sampling moments L included in each data frame may be obtained based on the splitting frequency and the sampling frequency of the audio signal, and the number of data frames M may be obtained based on the number of sampling moments L included in each data frame and the number of sampling moments included in the audio signal.

[0069] In one embodiment, in order to make the number of sampling moments included in each data frame the same, the sampling frequency of the audio signal may be determined to be an integer multiple of the division frequency.

[0070] Step S2200, traverse M data frames, perform Fourier transform processing on the currently traversed data frame, obtain the first amplitude corresponding to the first frequency point in the currently traversed data frame, and obtain the reference amplitude of the currently traversed data frame based on the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame.

[0071] When the traversal of M data frames is completed, the traversal is stopped and step S2300 is continued.

[0072] In one embodiment, by performing Fourier transform processing on the currently traversed data frame, the amplitudes corresponding to the L frequency points of the currently traversed data frame can be obtained. On this basis, the L frequency points can be taken as the first frequency points, and the amplitude corresponding to each frequency point can be taken as the first amplitude. The L first frequency points are 0, Fs / L, 2Fs / L, ..., (L-1)Fs / L, and the corresponding first amplitudes are expressed as A1, A2, ..., A L Where Fs is the split frequency of the audio signal.

[0073] In another embodiment, by performing Fourier transform processing on the currently traversed data frame, the amplitudes corresponding to the L frequency points of the currently traversed data frame can be obtained. When L is an even number, the amplitudes of the first L / 2 frequency points are the same as the amplitudes of the corresponding frequency points in the last L / 2 frequency points. Therefore, only the first L / 2 frequency points can be used as the first frequency points, and the amplitudes corresponding to the first L / 2 frequency points can be used as the first amplitudes. The L / 2 first frequency points can be 0, Fs / L, 2Fs / L, ..., (L / 2-1)Fs / L, and the corresponding first amplitudes are expressed as A1, A2, ..., A L / 2 .

[0074] In this embodiment, the previous data frame is the data frame before the currently traversed data frame.

[0075] The first amplitude corresponding to the first frequency point in the previous data frame may be obtained during the process of traversing the previous data frame. The method for determining the first amplitude corresponding to the first frequency point in the previous data frame may be the same as the method for determining the first amplitude corresponding to the first frequency point in the currently traversed data frame, and is not further described here.

[0076] In one embodiment of the present disclosure, obtaining a reference amplitude of the currently traversed data frame according to a first amplitude corresponding to a first frequency point in the currently traversed data frame and a first amplitude corresponding to a first frequency point in a previous data frame may include steps S2210 to S2220 as follows:

[0077] Step S2210 , obtaining an amplitude difference corresponding to the first frequency point in the currently traversed data frame according to the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame.

[0078] In this embodiment, the amplitude difference corresponding to the j-th frequency point (j is a positive integer less than or equal to L / 2) in the currently traversed data frame is the difference between the first amplitude corresponding to the j-th frequency point in the currently traversed data frame and the first amplitude corresponding to the j-th frequency point in the previous data frame.

[0079] For example, the first amplitude corresponding to the jth frequency point in the currently traversed data frame is The first amplitude corresponding to the jth frequency point in the previous data frame is Then, the amplitude difference corresponding to the jth frequency point in the currently traversed data frame can be

[0080] In one embodiment of the present disclosure, when the audio signal does not include a data frame previous to the currently traversed data frame, obtaining the amplitude difference corresponding to the first frequency point in the currently traversed data frame based on the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame may include:

[0081] The first amplitude corresponding to the j-th frequency point in the currently traversed data frame is used as the amplitude difference corresponding to the j-th frequency point in the currently traversed data frame.

[0082] In one embodiment of the present disclosure, the waveform of the amplitude difference corresponding to M data frames can be as shown in Figure 4. This waveform reflects the fluctuation in the frequency domain distribution of two adjacent frames of audio data. The magnitude of this fluctuation is somewhat synchronized with the audio rhythm, but it is relatively chaotic and cannot be directly extracted. The abscissa of Figure 4 is time, and the ordinate is voltage.

[0083] Step S2220 , obtaining a reference amplitude of the currently traversed data frame according to the amplitude difference corresponding to the first frequency point in the currently traversed data frame.

[0084] In one embodiment of the present disclosure, the average value or median value of the amplitude difference corresponding to the first frequency point in the currently traversed data frame may be determined as the reference amplitude value of the currently traversed data frame.

[0085] In another embodiment of the present disclosure, the maximum amplitude difference corresponding to the first frequency point in the currently traversed data frame may be determined, and the product of the maximum amplitude difference and a first set value may be calculated as the reference amplitude of the currently traversed data frame. The first set value may be a positive number less than 1 that is pre-set based on the application scenario or specific requirements. For example, the first set value may be 1 / 2 or 1 / 3.

[0086] In another embodiment of the present disclosure, the minimum value of the amplitude difference corresponding to the first frequency point in the currently traversed data frame may be determined, and the product of the minimum value and a second set value may be calculated as the reference amplitude of the currently traversed data frame. The second set value may be a positive number greater than 1 that is pre-set based on the application scenario or specific requirements. For example, the second set value may be 1.1 or 1.2.

[0087] Step S2300 : performing low-pass filtering on the reference amplitude signal to obtain a tactile signal.

[0088] The reference amplitude signal is obtained based on the reference amplitudes of the M data frames. The reference amplitude signal can be as shown in Figure 5. The abscissa of Figure 5 represents time, and the ordinate represents voltage. The reference amplitude signal shown in Figure 5 is more orderly than the amplitude difference signal of the M data frames shown in Figure 4.

[0089] In one example, in the reference amplitude signal, the amplitudes at L sampling moments in each data frame are all reference amplitudes of the corresponding data frame.

[0090] In another example, in the reference amplitude signal, the amplitudes at L sampling moments in each data frame are all absolute values ​​of the reference amplitude of the corresponding data frame.

[0091] In this embodiment, the absolute values ​​of the reference amplitudes of the M data frames may be determined first, and then a reference amplitude signal may be obtained based on the absolute values ​​of the reference amplitudes of the M data frames. The reference amplitude signal may then be low-pass filtered to obtain a tactile signal.

[0092] In this embodiment, the reference amplitude signal is subjected to low-frequency filtering to obtain a smooth tactile signal. The waveform of the obtained tactile signal may be as shown in FIG6 . The horizontal axis of FIG6 is time, and the vertical axis is voltage.

[0093] As shown in Figures 5 and 6, the tactile signal has a certain amplitude compared to the reference amplitude signal at each rhythm generation moment, and its amplitude is reduced to 0 during the period when the rhythm disappears. It can be seen that this embodiment can accurately detect the audio rhythm, and then generate a tactile signal based on the detected audio rhythm, without the need to customize the filter parameters according to the audio signal, so that this solution has good versatility and can also reduce the workload of debuggers.

[0094] In this embodiment, the audio rhythm is detected by utilizing the fluctuation of the frequency domain amplitude difference between adjacent data frames. When the fluctuation of the frequency domain amplitude difference between adjacent data frames is large, it indicates that a rhythm has appeared in the audio data. By appropriately converting the reference amplitude signal, a tactile signal synchronized with the audio rhythm can be formed.

[0095] Step S2400 : generating a haptic driving signal according to the haptic signal.

[0096] In a first embodiment of the present disclosure, generating a tactile drive signal based on a tactile signal may include: determining a target time interval in which the amplitude of the tactile signal is greater than or equal to a set threshold; and generating the tactile drive signal based on the target time interval and a set sinusoidal signal.

[0097] The threshold value may be set in advance according to an application scenario or specific requirements. For example, the threshold value may be 0.

[0098] In this embodiment, the frequency and amplitude of the sinusoidal signal may be pre-set according to the application scenario or specific requirements. For example, the frequency of the sinusoidal signal may be the resonant frequency of the motor, and the amplitude of the sinusoidal signal may be determined according to the maximum vibration amplitude of the motor.

[0099] Furthermore, a sinusoidal signal with T1 cycles within the target time interval may be used as the haptic driving signal, wherein T1 may be the ratio between the duration of the target time interval and the cycle duration of the sinusoidal signal.

[0100] A sine signal is generated, and a tactile driving signal is generated according to the target time interval and the generated sine signal, so that the tactile driving signal is a sine signal within the target time interval and a zero signal outside the target time interval.

[0101] This embodiment can generate a sinusoidal signal with a duration equal to the target time interval as a tactile drive signal when the amplitude of the tactile signal in the target time interval is greater than or equal to a set threshold. Based on the tactile drive signal, the motor can be driven to maintain vibration in the target time interval.

[0102] In a second embodiment of the present disclosure, generating a haptic drive signal according to a haptic signal may include: generating the haptic drive signal according to a set sinusoidal signal when a signal edge appears in the haptic signal.

[0103] In this embodiment, the signal edge may include a rising edge and / or a falling edge.

[0104] Furthermore, when a signal edge appears in the tactile signal, a sinusoidal signal with T2 cycles can be generated as the tactile drive signal. T2 can be a positive number pre-set based on the application scenario or specific requirements. For example, T2 can be 1 or 0.5.

[0105] In this embodiment, when a signal edge appears in the tactile signal, a sinusoidal signal with T2 cycles can be generated as a tactile driving signal. Based on the tactile driving signal, the motor can be driven to generate a vibration.

[0106] In a third embodiment of the present disclosure, generating a haptic drive signal according to a haptic signal may include:

[0107] The resonant frequency of the motor is obtained; and a sinusoidal signal with a frequency equal to the resonant frequency is constructed according to the tactile signal as a tactile driving signal.

[0108] In this embodiment, a sinusoidal signal having a resonant frequency may be first constructed, and then the amplitude of the sinusoidal signal may be adjusted so that the amplitudes of the sinusoidal signal and the tactile signal are equal at the same sampling moment, thereby obtaining a tactile driving signal.

[0109] Specifically, the frequency of the haptic drive signal is equal to the resonant frequency of the motor, and the amplitude of the haptic drive signal at any sampling moment is equal to the amplitude of the haptic signal at the sampling moment.

[0110] This embodiment can drive the motor to vibrate based on the tactile drive signal, so that the motor vibration amplitude is consistent with the amplitude of the tactile signal, and further synchronize the motor vibration amplitude with the audio rhythm of the audio signal.

[0111] Step S2500 : driving the motor to vibrate according to the tactile driving signal.

[0112] In this embodiment, the tactile driving signal may be power-amplified to drive the motor to generate vibration feedback.

[0113] In the disclosed embodiments, the audio rhythm is detected by utilizing the fluctuations in the frequency-domain amplitude difference between adjacent data frames. Large fluctuations in the frequency-domain amplitude difference between adjacent data frames indicate the presence of a rhythm in the audio data. Appropriate conversion of the reference amplitude signal can generate a tactile signal synchronized with the audio rhythm, improving the efficiency and synchronization of the audio-to-tactile signal conversion. Furthermore, a tactile drive signal generated based on a tactile signal synchronized with the audio rhythm can be used to drive a motor, causing it to vibrate in time with the audio rhythm.

[0114] FIG7 is a flow chart of an example of a motor driving method provided by an embodiment of the present disclosure.

[0115] As shown in FIG7 , the motor driving method may include the following steps:

[0116] Step S7001: Acquire an audio signal.

[0117] Step S7002: Segment the audio signal according to the set segmentation frequency to obtain M data frames, each data frame including initial waveform data of L sampling moments, where M is a positive integer and L is a positive integer.

[0118] Step S7003, traverse M data frames.

[0119] Step S7004: Perform Fourier transform processing on the currently traversed data frame to obtain a first amplitude corresponding to the first frequency point in the currently traversed data frame.

[0120] Step S7005 , obtaining the amplitude difference corresponding to the first frequency point in the currently traversed data frame according to the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame.

[0121] Step S7006 , obtaining a reference amplitude of the currently traversed data frame according to the amplitude difference corresponding to the first frequency point in the currently traversed data frame.

[0122] For example, the average value or median value of the amplitude difference corresponding to the first frequency point in the currently traversed data frame may be determined as the reference amplitude value of the currently traversed data frame.

[0123] For another example, the maximum amplitude difference corresponding to the first frequency point in the currently traversed data frame may be determined, and the product of the maximum amplitude difference and the first set value may be calculated as the reference amplitude of the currently traversed data frame.

[0124] For another example, the minimum value of the amplitude difference corresponding to the first frequency point in the currently traversed data frame may be determined, and the product of the minimum value and the second set value may be calculated as the reference amplitude of the currently traversed data frame.

[0125] Step S7007, determine whether the currently traversed data frame is the last data frame, if yes, execute step S7008, if not, continue to execute step S7003.

[0126] Step S7008 : determining the absolute values ​​of the reference amplitudes of the M data frames, and obtaining a reference amplitude signal according to the absolute values ​​of the reference amplitudes of the M data frames.

[0127] Step S7009: low-pass filter the reference amplitude signal to obtain a tactile signal.

[0128] Step S7010: Generate a haptic driving signal according to the haptic signal.

[0129] For example, when the amplitude of the tactile signal in the target time interval is greater than or equal to the set threshold, a sinusoidal signal with a duration equal to the target time interval is generated as a tactile drive signal, and based on the tactile drive signal, the motor can be driven to maintain vibration in the target time interval.

[0130] For another example, when a signal edge appears in the tactile signal, a sinusoidal signal with T2 cycles can be generated as a tactile driving signal, and based on the tactile driving signal, a motor can be driven to generate a vibration.

[0131] For another example, a sinusoidal signal with a resonant frequency can be constructed first, and then the amplitude of the sinusoidal signal can be adjusted so that the amplitudes of the sinusoidal signal and the tactile signal are equal at the same sampling time, thereby obtaining a tactile drive signal. This tactile drive signal can be used to drive the motor to vibrate, aligning the motor vibration amplitude with the amplitude of the tactile signal and, in turn, synchronizing the motor vibration amplitude with the audio rhythm of the audio signal.

[0132] Step S7011 : driving the motor to vibrate according to the tactile driving signal.

[0133] This embodiment also provides a motor drive device. Figure 8 is a block diagram of a motor drive device according to an embodiment of the present disclosure. As shown in Figure 8, the motor drive device 8000 may include a data frame acquisition module 8100, a data frame processing module 8200, a low-pass filtering module 8300, a drive signal generation module 8400, and a motor drive module 8500.

[0134] The data frame acquisition module 8100 is used to acquire M data frames of the audio signal, each data frame including initial waveform data at L sampling moments, where M is a positive integer and L is a positive integer.

[0135] The data frame processing module 8200 is used to traverse the M data frames, perform Fourier transform processing on the currently traversed data frame, and obtain the first amplitude corresponding to the first frequency point in the currently traversed data frame; based on the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame of the currently traversed data frame, the reference amplitude of the currently traversed data frame is obtained.

[0136] The low-pass filtering module 8300 is used to perform low-pass filtering on the reference amplitude signal to obtain a tactile signal; the reference amplitude signal is obtained according to the reference amplitudes of the M data frames.

[0137] The driving signal generating module 8400 is configured to generate a haptic driving signal according to the haptic signal.

[0138] The motor driving module 8500 is configured to drive the motor to vibrate according to the tactile driving signal.

[0139] In one embodiment of the present disclosure, obtaining the reference amplitude of the currently traversed data frame according to the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the data frame before the currently traversed data frame includes:

[0140] Obtaining an amplitude difference corresponding to the first frequency point in the currently traversed data frame according to the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame;

[0141] The reference amplitude of the currently traversed data frame is obtained according to the amplitude difference corresponding to the first frequency point in the currently traversed data frame.

[0142] In one embodiment of the present disclosure, obtaining the reference amplitude of the currently traversed data frame according to the amplitude difference corresponding to the first frequency point in the currently traversed data frame includes:

[0143] The average value or median value of the amplitude difference corresponding to the first frequency point in the currently traversed data frame is determined as the reference amplitude value of the currently traversed data frame.

[0144] In one embodiment of the present disclosure, when the audio signal does not contain a data frame preceding the currently traversed data frame,

[0145] The obtaining, based on the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame, an amplitude difference corresponding to the first frequency point in the currently traversed data frame includes:

[0146] The first amplitude corresponding to the first frequency point in the currently traversed data frame is used as the amplitude difference corresponding to the first frequency point in the currently traversed data frame.

[0147] In one embodiment of the present disclosure, the driving signal generating module 8400 is further configured to:

[0148] determining a target time interval during which the amplitude of the tactile signal is greater than or equal to a set threshold;

[0149] The haptic driving signal is generated according to the target time interval and the set sinusoidal signal.

[0150] In one embodiment of the present disclosure, the driving signal generating module 8400 is further configured to:

[0151] When a signal edge appears in the haptic signal, the haptic drive signal is generated according to a set sinusoidal signal.

[0152] In one embodiment of the present disclosure, the driving signal generating module 8400 is further configured to:

[0153] obtaining a resonant frequency of the motor;

[0154] A sinusoidal signal having a frequency equal to the resonant frequency is constructed according to the tactile signal as the tactile driving signal.

[0155] In one embodiment of the present disclosure, the data frame acquisition module 8100 is further configured to:

[0156] Get audio signal;

[0157] The audio signal is segmented according to the set segmentation frequency to obtain the M data frames.

[0158] This embodiment also provides an electronic device. FIG9 is a block diagram of the electronic device provided according to an embodiment of the present disclosure.

[0159] As shown in FIG9 , the electronic device 9000 may include a processor 9100 and a memory 9200 . The memory 9200 is used to store a computer program. The computer program is used to control the processor 9100 to execute the method described in the aforementioned embodiment.

[0160] The above embodiments mainly focus on the differences from other embodiments, but it should be clear to those skilled in the art that the above embodiments can be used alone or in combination with each other as needed.

[0161] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments, but it should be clear to those skilled in the art that the above embodiments can be used alone or in combination with each other as needed. In addition, for the device embodiment, since it corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the corresponding part of the method embodiment. The system embodiment described above is merely illustrative, and the modules described as separate components may or may not be physically separated.

[0162] The present invention may be an apparatus, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0163] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical compression device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.

[0164] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0165] The computer program instructions for performing the operation of the present invention can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. The computer readable program instructions can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), is personalized by utilizing the state information of the computer readable program instructions, and the electronic circuit can execute the computer readable program instructions, thereby realizing various aspects of the present invention.

[0166] Various aspects of the present invention are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0167] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0168] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0169] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of an instruction, and the module, program segment or part of the instruction contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.

[0170] While various embodiments of the present invention have been described above, the foregoing description is intended to be illustrative, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technical improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.

Claims

1. A motor driving method, characterized in that: include: Acquire M data frames of the audio signal, each data frame including initial waveform data at L sampling moments, where M is a positive integer and L is a positive integer; Traversing the M data frames, performing Fourier transform processing on the currently traversed data frame, and obtaining a first amplitude corresponding to a first frequency point in the currently traversed data frame; Obtaining a reference amplitude of the currently traversed data frame according to a first amplitude corresponding to a first frequency point in the currently traversed data frame and a first amplitude corresponding to a first frequency point in a data frame before the currently traversed data frame; Performing low-pass filtering on the reference amplitude signal to obtain a tactile signal; The reference amplitude signal is obtained according to the reference amplitudes of the M data frames; generating a tactile driving signal according to the tactile signal; The motor is driven to vibrate according to the haptic driving signal.

2. The method according to claim 1, characterized in that The step of obtaining a reference amplitude of the currently traversed data frame according to a first amplitude corresponding to a first frequency point in the currently traversed data frame and a first amplitude corresponding to a first frequency point in a data frame before the currently traversed data frame comprises: According to the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame, the amplitude difference corresponding to the first frequency point in the currently traversed data frame is obtained; The reference amplitude of the currently traversed data frame is obtained according to the amplitude difference corresponding to the first frequency point in the currently traversed data frame.

3. The method according to claim 2, characterized in that The obtaining the reference amplitude of the currently traversed data frame according to the amplitude difference corresponding to the first frequency point in the currently traversed data frame comprises: The average value or median value of the amplitude difference corresponding to the first frequency point in the currently traversed data frame is determined as the reference amplitude value of the currently traversed data frame.

4. The method according to claim 2, characterized in that: In the case where the audio signal does not contain a data frame preceding the currently traversed data frame, The step of obtaining the amplitude difference corresponding to the first frequency point in the currently traversed data frame according to the first amplitude corresponding to the first frequency point in the currently traversed data frame and the first amplitude corresponding to the first frequency point in the previous data frame includes: The first amplitude corresponding to the first frequency point in the currently traversed data frame is used as the amplitude difference corresponding to the first frequency point in the currently traversed data frame.

5. The method according to claim 1, characterized in that The step of generating a tactile driving signal according to the tactile signal comprises: Determine a target time interval in which the amplitude of the tactile signal is greater than or equal to a set threshold; The tactile driving signal is generated according to the target time interval and the set sinusoidal signal.

6. The method according to claim 1, characterized in that The step of generating a tactile driving signal according to the tactile signal comprises: When a signal edge appears in the haptic signal, the haptic driving signal is generated according to a set sinusoidal signal.

7. The method according to claim 1, characterized in that The step of generating a tactile driving signal according to the tactile signal comprises: Obtaining the resonant frequency of the motor; According to the tactile signal, a sinusoidal signal with a frequency equal to the resonant frequency is constructed as the tactile driving signal.

8. The method according to claim 1, characterized in that The step of obtaining M data frames of an audio signal comprises: Get audio signal; The audio signal is segmented according to the set segmentation frequency to obtain the M data frames.

9. A motor drive device, characterized in that: include: A data frame acquisition module, used to acquire M data frames of the audio signal, each data frame includes initial waveform data at L sampling moments, M is a positive integer, and L is a positive integer; A data frame processing module, used for traversing the M data frames, performing Fourier transform processing on the currently traversed data frame, and obtaining a first amplitude corresponding to a first frequency point in the currently traversed data frame; Obtaining a reference amplitude of the currently traversed data frame according to a first amplitude corresponding to a first frequency point in the currently traversed data frame and a first amplitude corresponding to a first frequency point in a data frame before the currently traversed data frame; A low-pass filtering module, used for performing low-pass filtering on the reference amplitude signal to obtain a tactile signal; The reference amplitude signal is obtained according to the reference amplitudes of the M data frames; A driving signal generating module, configured to generate a tactile driving signal according to the tactile signal; The motor driving module is used to drive the motor to vibrate according to the tactile driving signal.

10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, and the computer program is used to control the processor to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Shell display state control method and device, electronic equipment and storage medium

    CN112667193A

  • Motor control circuit capable of jumping along with notes and electronic equipment

    CN113054874A

  • Displacement limiting method and device of motor oscillator, terminal equipment and storage medium

    CN115242157A

  • Motor driving method, motor driving device and electronic equipment

    CN117220556A

  • Actuator vibration control method and apparatus, and computer device and storage medium

    WO2023109274A1