Linear motor driving method, device and storage medium

By processing audio data in the time domain and obtaining and converting it into a backbone waveform, the problem of linear motors being unable to be effectively driven is solved, and the user's vibration experience is improved.

CN115223599BActive Publication Date: 2025-08-08NOLO CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210701423.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-20
Publication Date
2025-08-08
Estimated Expiration
2042-06-20

AI Technical Summary

Technical Problem

In the prior art, when audio data directly drives a linear motor, it is easy to cause the linear motor to become hot or unable to vibrate, especially the high-frequency and low-frequency parts cannot be effectively driven.

Method used

By processing the audio data in the time domain, the backbone waveform is acquired and converted into a sine waveform to drive the linear motor.

Benefits of technology

It realizes the diversity of audio data, effectively drives linear motors, and improves the user's vibration experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115223599B_ABST
    Figure CN115223599B_ABST
Patent Text Reader

Abstract

A linear motor driving method, device and storage medium, the method comprising: obtaining a time-domain audio waveform of audio data used to drive the linear motor and an operating frequency of the linear motor to be driven; processing the audio data based on the time-domain audio waveform and the operating frequency to obtain a main waveform of the audio data, wherein the main waveform has the largest area among all waveforms of the audio data; and driving the linear motor according to the main waveform of the audio data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to the field of spatial positioning, and in particular to a linear motor driving method, device, and storage medium. Background Art

[0002] The sense of touch has permeated a wide range of devices used in technology, including controllers, game consoles, mobile phones, game consoles, and tablets. Haptic actuators, based on linear motors, can achieve customized tactile experiences through the design of specific waveforms, significantly enriching user perception.

[0003] The widespread adoption of linear motors has enhanced user entertainment experiences. Using audio signals to directly drive linear motors allows for a richer, more immersive vibration experience. However, linear motors are sensitive only to a certain frequency range, but audio data contains complex frequency components. When used directly to drive linear motors, frequency components unsuitable for linear motor vibration are applied to the motor. This results in the linear motor overheating due to the very low-frequency components in the audio data, while the high-frequency and ultra-high-frequency components cause the linear motor to produce only sound without vibrating. Using low-pass or band-pass filtering to process audio data eliminates all frequency components, rendering the linear motor inoperable. For example, the audio frequency of an electric drill typically exceeds 1 kHz. Directly driving a linear motor with this audio data will not vibrate. Using low-pass filtering to zero the drill audio data will still not drive the linear motor. Summary of the Invention

[0004] The present application provides a linear motor driving method, device and storage medium. The method processes and converts audio data in the time domain so that the audio data can retain the diversity of audio frequencies after conversion to effectively drive the linear motor.

[0005] The present application provides a linear motor driving method, the method comprising:

[0006] Acquire a time-domain audio waveform of audio data for driving the linear motor and an operating frequency of the linear motor to be driven;

[0007] Processing the audio data based on the time-domain audio waveform and the operating frequency to obtain a main waveform of the audio data, where the main waveform has the largest area among all waveforms of the audio data;

[0008] The linear motor is driven according to the main waveform of the audio data.

[0009] In an exemplary embodiment, the processing of the audio data based on the time-domain audio waveform and the operating frequency to obtain the main waveform of the audio data includes:

[0010] Determining a half-cycle range of effective audio waveform data for driving the linear motor according to the operating frequency of the linear motor;

[0011] Classifying the acquired time-domain audio waveform into different types according to the determined half-cycle range of the valid audio waveform data;

[0012] Based on the division, respectively calculating the area of a graph formed by each type of time-domain audio waveform and the x-axis representing time;

[0013] Converting the time-domain audio waveforms of different areas into sinusoidal waveforms corresponding to the audio data according to the calculated areas and a preset conversion rule;

[0014] The main waveform is determined according to the sinusoidal waveform.

[0015] In an exemplary embodiment, obtaining a time-domain audio waveform of audio data includes:

[0016] Acquire an audio waveform in the time domain, wherein the audio waveform is a waveform formed by discrete data points consisting of time and audio waveform intensity; wherein the x-axis represents the time of the audio waveform data point and the y-axis represents the intensity of the audio waveform data point;

[0017] The x-axis is used as the intensity 0-axis of the audio waveform data points, and adjacent audio discrete data points are connected to form a time domain audio waveform.

[0018] In an exemplary embodiment, determining a half-cycle range of effective audio waveform data for driving the linear motor according to the operating frequency of the linear motor includes:

[0019] Determine an effective frequency range for driving the linear motor to operate as a first frequency to a second frequency;

[0020] determining an upper limit of a half period of effective audio waveform data for driving the linear motor according to the first frequency;

[0021] A lower limit of a half period of effective audio waveform data for driving the linear motor is determined based on the second frequency.

[0022] In an exemplary embodiment, the classifying the acquired time-domain audio waveform data according to the determined half-cycle range of the valid audio waveform data includes:

[0023] An audio waveform that crosses the intensity 0 axis and has a time range greater than the upper limit of a half cycle is defined as a first type of waveform;

[0024] An audio waveform that passes through the intensity 0 axis and whose time range is between the upper limit and the lower limit of the half cycle is defined as a second type of waveform;

[0025] An audio waveform that crosses the intensity 0 axis and has a time range smaller than the second half cycle is defined as a third type of waveform;

[0026] An audio waveform that remains on the intensity 0 axis is defined as a fourth type of waveform.

[0027] In an exemplary embodiment, respectively calculating the area of a graph formed by each type of time-domain audio waveform and an x-axis representing time includes:

[0028] For the first type of waveform, the audio waveform is divided into a plurality of waveform segments according to the upper limit of the half cycle; and the area of the graph formed by each waveform segment and the x-axis representing time is calculated respectively;

[0029] For the second type waveform and the third type waveform, calculate the area of a graph formed by the time domain audio waveform and the x-axis representing time;

[0030] The area of the fourth type of waveform is 0.

[0031] In an exemplary embodiment, converting the time-domain audio waveforms of different areas into sinusoidal waveforms corresponding to the audio data based on the calculated areas and a preset conversion rule includes:

[0032] For the first type of waveform and the second type of waveform, the amplitude of the sine wave form is calculated based on the determined duration and area; and each waveform or waveform segment is restored to a half-cycle sine wave based on the amplitude and duration.

[0033] For the third and fourth type waveforms, the durations of the third and fourth type waveforms are combined and calculated. If the combined duration range is between the lower and upper limits of the half cycle, each third type waveform is restored to a half-cycle sine wave according to the amplitude and duration; if the combined duration range is less than the definition of the second half cycle, both the third and fourth type waveforms are converted into straight lines with an intensity of 0.

[0034] In an exemplary embodiment, the restoration to a half-cycle sine wave includes:

[0035] When the time-domain audio waveform is above the x-axis, the area of the graph formed by the x-axis representing time is positive, and it is restored to a half-cycle sine wave above the x-axis;

[0036] When the time domain audio waveform is below the x-axis, the area of the graph formed by the x-axis representing time is negative, and it is restored to a half-cycle sine wave below the x-axis.

[0037] The present application also provides a linear motor driving device, the device comprising: an acquisition module, a processing module and a driving module;

[0038] The acquisition module is configured to acquire a time-domain audio waveform of audio data for driving the linear motor and an operating frequency of the linear motor to be driven;

[0039] The processing module is configured to process the audio data based on the time-domain audio waveform and the operating frequency to obtain a main waveform of the audio data, where the main waveform has the largest area among all waveforms of the audio data;

[0040] The driving module is used to drive the linear motor according to the main waveform of the audio data.

[0041] The present application also provides a linear motor drive device, which includes: a memory and a processor; wherein the memory is used to store a program for driving the linear motor, and the processor is used to read and execute the program for driving the linear motor, and perform any one of the methods described in the above embodiments.

[0042] The present application also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the linear motor driving method according to any one of the embodiments.

[0043] Compared to related technologies, the present application provides a linear motor driving method, device, and storage medium. The method comprises: obtaining a time-domain audio waveform of audio data used to drive the linear motor and the operating frequency of the linear motor to be driven; processing the audio data based on the time-domain audio waveform and the operating frequency to obtain a main waveform of the audio data, wherein the main waveform is the waveform with the largest area among all waveforms in the audio data; and driving the linear motor based on the main waveform of the audio data. Through the technical solution of the present invention, the method processes and converts audio data in the time domain, so that the converted audio data retains the diversity of audio frequencies, effectively driving the linear motor.

[0044] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. Other advantages of the present application can be realized and obtained through the solutions described in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0046] Figure 1 This is a flow chart of a linear motor driving method according to an embodiment of the present application;

[0047] Figure 2 Schematic diagram of audio waveform in some exemplary embodiments;

[0048] Figure 3 A schematic diagram of a partially enlarged waveform of an audio waveform in some exemplary embodiments;

[0049] Figure 4 FIG. 1 is a schematic diagram of dividing time-domain audio waveform data into first-type waveforms in some exemplary embodiments;

[0050] Figure 5 Schematic diagram of dividing time-domain audio waveform data into second-type waveforms in some exemplary embodiments

[0051] Figure 6 FIG4 is a schematic diagram of dividing time-domain audio waveform data into a third type of waveform in some exemplary embodiments;

[0052] Figure 7 FIG4 is a schematic diagram of classifying time-domain audio waveform data into a fourth type of waveform in some exemplary embodiments;

[0053] Figure 8A This is an effect diagram of the first type waveform before conversion in some exemplary embodiments;

[0054] Figure 8B Schematic diagram of the effect after the first type of waveform conversion in some exemplary embodiments;

[0055] Figure 9A This is an effect diagram of the second type waveform before conversion in some exemplary embodiments;

[0056] Figure 9B is a diagram showing the effect of the second type waveform conversion in some exemplary embodiments;

[0057] Figure 10A Schematic diagram of the effects of the third and fourth types of waveforms before conversion in some exemplary embodiments;

[0058] Figure 10B Schematic diagram of the effect of conversion between the third type and the fourth type of waveform in some exemplary embodiments;

[0059] Figure 11 A schematic diagram of restoring a positive period and a negative period of a half-cycle sine wave according to the positive and negative areas of the waveform in some exemplary embodiments;

[0060] Figure 12 A schematic diagram of area calculation for waveform data in some exemplary embodiments;

[0061] Figure 13A Schematic diagram of the effect before audio data conversion in some exemplary embodiments;

[0062] Figure 13B Schematic diagram of the effect after audio data conversion in some exemplary embodiments;

[0063] Figure 14 A schematic diagram of a linear motor driving device according to an embodiment of the present application;

[0064] Figure 15 Schematic diagram of a linear motor driving device according to an embodiment of the present application. DETAILED DESCRIPTION

[0065] This application describes multiple embodiments, but this description is exemplary rather than restrictive, and it will be apparent to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described herein. Although many possible feature combinations are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.

[0066] This application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features, and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive solution defined by the claims. Any features or elements of any embodiment may also be combined with features or elements from other inventive solutions to form another unique inventive solution defined by the claims. Therefore, it should be understood that any feature shown and / or discussed in this application may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the appended claims and their equivalents, the embodiments are not subject to other limitations. In addition, various modifications and changes may be made within the scope of protection of the appended claims.

[0067] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps in the specific order described. As will be understood by those skilled in the art, other orders of steps are also possible. Therefore, the specific order of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to performing their steps in the order written, and those skilled in the art can readily understand that these orders can be changed and still remain within the spirit and scope of the embodiments of the present application.

[0068] Linear motors can vibrate using analog input signals (such as those connected to headphones) and waveforms (such as square waves and sine waves), or using a dedicated vibration driver. Dedicated vibration drivers generally support analog signals, digital signals (connected via I2C, SPI, UART, etc.), and PWM signal input methods. When the vibration signal source is audio data, the audio data must be analog or converted to an analog signal. This can be achieved by converting a specific external audio signal into an analog signal (such as audio input from Bluetooth or an audio interface (such as a 3.55mm port)).

[0069] The present disclosure provides a linear motor driving method, such as Figure 1 As shown, the method includes steps S110-S130:

[0070] S110. Acquire a time domain audio waveform of audio data for driving the linear motor and an operating frequency of the linear motor to be driven;

[0071] S120. Based on the time-domain audio waveform and the operating frequency, the audio data is processed to obtain a main waveform of the audio data, where the main waveform is the waveform with the largest area among all waveforms of the audio data;

[0072] S130. Drive the linear motor according to the main waveform of the audio data.

[0073] In this embodiment, using an audio signal to directly drive a linear motor allows for a richer, more immersive vibration experience, enhancing the user's entertainment experience. This involves acquiring the time-domain audio waveform of the audio data, which is the original audio data and contains complex frequency components. Each linear motor has a different sensitive or effective operating frequency. First, the sensitive or effective operating frequency of the linear motor to be driven is determined. Based on the obtained sensitive or effective operating frequency, the audio data is then de-energized to remove invalid frequencies.

[0074] In an exemplary embodiment, obtaining a time domain audio waveform includes: obtaining an audio waveform in the time domain, wherein the audio waveform is a waveform formed by discrete data points consisting of time and audio waveform intensity; wherein the x-axis represents the time of the audio waveform data point, and the y-axis represents the intensity of the audio waveform data point; using the x-axis as the intensity 0 axis of the audio waveform data point, and connecting adjacent audio discrete data points to form an audio waveform. Figure 2 As shown, the horizontal axis is the x-axis and the vertical axis is the y-axis; the x-axis is the intensity 0-axis of the audio waveform data point, and connecting each adjacent discrete data point is an audio waveform that continuously crosses, crosses, or returns to the x-axis (0-axis). Figure 2 The audio waveform shown is partially enlarged and displayed, as shown in Figure 3 shown.

[0075] In an exemplary embodiment, the audio data is processed based on the time-domain audio waveform and the operating frequency to obtain a main waveform of the audio data, including: determining a half-cycle range of effective audio waveform data for driving the linear motor according to the operating frequency of the linear motor; dividing the acquired time-domain audio waveform into types according to the determined half-cycle range of the effective audio waveform data; based on the division, calculating the area of a figure formed by each type of time-domain audio waveform and the x-axis representing time; converting time-domain audio waveforms of different areas into sinusoidal waveforms corresponding to the audio data according to the calculated areas and preset conversion rules; and determining the main waveform based on the sinusoidal waveform.

[0076] In an exemplary embodiment, determining the half-cycle range of effective audio waveform data for driving the linear motor based on the operating frequency of the linear motor includes: determining the effective frequency range for driving the linear motor to be between a first frequency and a second frequency; determining an upper limit for the half-cycle of the effective audio waveform data for driving the linear motor based on the first frequency; and determining a lower limit for the half-cycle of the effective audio waveform data for driving the linear motor based on the second frequency. In this embodiment, the frequency range to which the linear motor is sensitive is 80 Hz-200 Hz, i.e., the first frequency is 80 Hz and the second frequency is 200 Hz. The upper limit for the half-cycle of the effective audio waveform data for driving the linear motor, determined based on the first frequency, is 6.25 ms, and the lower limit for the half-cycle of the effective audio waveform data for driving the linear motor, determined based on the second frequency, is 2.5 ms.

[0077] In an exemplary embodiment, the acquired time-domain audio waveform data is classified into types according to the determined half-cycle range of the valid audio waveform data, including: defining an audio waveform that crosses the intensity 0 axis and has a time range greater than the upper limit of the half-cycle as a first-type waveform; defining an audio waveform that crosses the intensity 0 axis and has a time range between the upper limit and the lower limit of the half-cycle as a second-type waveform; defining an audio waveform that crosses the intensity 0 axis and has a time range less than the second half-cycle as a third-type waveform; and defining an audio waveform that continues on the intensity 0 axis as a fourth-type waveform. In this embodiment, if the upper limit of the half-cycle of the determined valid audio waveform data is 6.25ms and the lower limit of the half-cycle of the valid audio waveform data is 2.5ms, the time-domain audio waveform data is classified into types, and the audio waveform that crosses the intensity 0 axis and has a time range greater than 6.25ms is defined as the first-type waveform, as shown in FIG. Figure 4 As shown; the audio waveform that passes through the intensity 0 axis and has a time range between 2.5ms-6.25ms is defined as the second type of waveform, as Figure 5 As shown; the audio waveform that passes through the intensity 0 axis and has a time range of less than 2.5ms is defined as the third type of waveform, Figure 6 As shown; the audio waveform that continues at the intensity 0 axis is defined as the fourth type of waveform, such as Figure 7 shown.

[0078] In an exemplary embodiment, the area of the figure formed by each type of time-domain audio waveform and the x-axis representing time is calculated separately, including: for the first type of waveform, the audio waveform is divided into multiple waveform segments according to the upper limit of the half cycle; the area of the figure formed by each waveform segment and the x-axis representing time is calculated separately; for the second type of waveform and the third type of waveform, the area of the figure formed by the time-domain audio waveform and the x-axis representing time is calculated; the area of the fourth type of waveform is 0.

[0079] In an exemplary embodiment, time-domain audio waveforms of different areas are converted into corresponding sinusoidal waveforms for driving linear motors according to the calculated areas and pre-set conversion rules, including: for the first type of waveform and the second type of waveform, the amplitude of the sinusoidal wave form is calculated according to the determined duration and area; each waveform or waveform segment is restored to a half-cycle sinusoidal wave according to the amplitude and duration; for the third type of waveform and the fourth type of waveform, the duration of the third type of waveform and the fourth type of waveform is combined and calculated, and if the combined duration range is between the lower limit and the upper limit of the half cycle, each third type of waveform is restored to a half-cycle sinusoidal wave according to the amplitude and duration; if the combined duration range is less than the second half cycle definition, the third and fourth types of waveforms are converted into straight lines with an intensity of 0. For example: start processing the waveform from the beginning of the audio, for the first type of waveform, truncate it every time it exceeds 6.25ms, and then calculate the area of the audio waveform and the x-axis of each segment, as shown before conversion. Figure 8A As shown, the effect after conversion is as follows Figure 8B As shown; for the second type of waveform, the area can be calculated directly, and the amplitude of the sine wave form can be calculated based on the determined duration and area; each waveform or waveform segment can be restored to a half-cycle sine wave based on the amplitude and duration, as shown before conversion. Figure 9A As shown, the effect after conversion is as follows Figure 9B As shown; for the third type waveform and the fourth type waveform, before conversion Figure 10A As shown, the effect after conversion is as follows Figure 10B shown.

[0080] In an exemplary embodiment, the restoration to a half-period sine wave includes: when the time-domain audio waveform is above the x-axis, the area of the figure formed by the waveform and the x-axis representing time is positive, and the waveform is restored to a half-period sine wave above the x-axis; when the time-domain audio waveform is below the x-axis, the area of the figure formed by the waveform and the x-axis representing time is negative, and the waveform is restored to a half-period sine wave below the x-axis. In this embodiment, the area of each waveform is the area between the waveform and the x-axis. Once the area and duration are known, the waveform can be restored to a half-period of the sine waveform. If the area is positive, the waveform is restored to a positive period, and if the area is negative, the waveform is restored to a negative period. Figure 11 shown.

[0081] In an exemplary embodiment, a method for calculating the area of a graph formed by each type of time-domain audio waveform and the x-axis representing time may employ the following steps:

[0082] Step 1: Calculate the area of the basic figure: x∈[0,1], sinx≥0,

[0083] S_sinx=∫[0,1]sinπxdx=-cosπx|[0,1]=2 / π

[0084] The second step is Figure 12 As shown, assuming the audio waveform sampling rate is 12000 Hz, 16 bits (value range -32768 to 32767), the area of a segment of the original waveform (a total of n points, each point corresponds to the value f(n))) is:

[0085] S_wave=∫[0,n]f(n)dn

[0086] The third step is to calculate the average area between every two points according to the following formula:

[0087] S_ave=S_wave / (n-1)

[0088] The fourth step is to calculate the proportional coefficient k:

[0089] k=S_ave / S_sinx

[0090] Step 5: Generate 1000 points based on x=0:0.001:1, and then get an array of 1000 points sindata[] based on y=10000*sinπx, which is used as a lookup table.

[0091] When restoring the waveform, use the proportional coefficient k and the total number of points n of the waveform to calculate the number of steps.

[0092] Step = 1000 / n, i∈[0,n];

[0093] Step 5: The calculation formula for each point value of the restored waveform is:

[0094] Val=k*sindata[Step*i] / 10000

[0095] The Val set is the restored waveform, and connecting all the waveforms together is the processed audio waveform that can drive the linear motor.

[0096] In the embodiment of the present application, the audio data is processed and converted in the time domain so that the audio data can retain the diversity of the audio frequency after conversion. Figure 13A As shown, the audio data is converted as Figure 13B As shown, from Figure 13A and 13B In comparison, the waveform after conversion is exactly equal to the waveform before conversion in terms of time, and the converted audio can be used to directly drive the linear motor.

[0097] The present disclosure also provides a linear motor drive device, such as Figure 14 As shown, the device includes: an acquisition module 1410, a processing module 1420 and a driving module 1430;

[0098] The acquisition module 1410 is used to acquire a time domain audio waveform of audio data for driving the linear motor and an operating frequency of the linear motor to be driven;

[0099] The processing module 1420 is configured to process the audio data based on the time-domain audio waveform and the operating frequency to obtain a main waveform of the audio data, where the main waveform has the largest area among all waveforms of the audio data.

[0100] The driving module 1430 is configured to drive the linear motor according to the main waveform of the audio data.

[0101] The present disclosure also provides a linear motor drive device, such as Figure 15 As shown, the device includes: a memory 1510 and a processor 1520; wherein, the memory is used to store the program for linear motor driving, and the processor is used to read and execute the program for linear motor driving, and execute the linear motor driving method described in any one of the above embodiments.

[0102] The embodiments of the present disclosure further provide a computer storage medium, in which computer executable instructions are stored. The computer executable instructions are used to execute the linear motor driving method according to any one of the embodiments.

[0103] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

Claims

1. A linear motor driving method, characterized in that: The method comprises: Acquire a time-domain audio waveform of audio data for driving the linear motor and an operating frequency of the linear motor to be driven; The audio data is processed based on the time-domain audio waveform and the operating frequency to obtain a main waveform of the audio data, including: determining a half-cycle range of effective audio waveform data for driving the linear motor based on the operating frequency of the linear motor; classifying the acquired time-domain audio waveform into types based on the determined half-cycle range of the effective audio waveform data; based on the classification, calculating the area of a graph formed by each type of time-domain audio waveform and an x-axis representing time; converting the time-domain audio waveforms of different areas into sinusoidal waveforms corresponding to the audio data based on the calculated areas and a preset conversion rule; and determining the main waveform based on the sinusoidal waveform, wherein the main waveform has the largest area among all waveforms of the audio data. The linear motor is driven according to the main waveform of the audio data.

2. The linear motor driving method according to claim 1, wherein: The obtaining of a time-domain audio waveform of audio data for driving the linear motor includes: Acquire an audio waveform in the time domain, wherein the audio waveform is a waveform formed by discrete data points consisting of time and audio waveform intensity; wherein the x-axis represents the time of the audio waveform data point and the y-axis represents the intensity of the audio waveform data point; The x-axis is used as the intensity 0-axis of the audio waveform data points, and adjacent audio discrete data points are connected to form a time domain audio waveform.

3. The linear motor driving method according to claim 1, wherein: Determining a half-cycle range of effective audio waveform data for driving the linear motor according to the operating frequency of the linear motor includes: Determine an effective frequency range for driving the linear motor to operate as a first frequency to a second frequency; determining an upper limit of a half period of effective audio waveform data for driving the linear motor according to the first frequency; A lower limit of a half period of effective audio waveform data for driving the linear motor is determined based on the second frequency.

4. The linear motor driving method according to claim 2, wherein: The classifying the acquired time-domain audio waveform data according to the determined half-cycle range of the valid audio waveform data includes: An audio waveform that crosses the intensity 0 axis and has a time range greater than the upper limit of a half cycle is defined as a first type of waveform; An audio waveform that passes through the intensity 0 axis and whose time range is between the upper limit and the lower limit of the half cycle is defined as a second type of waveform; An audio waveform that crosses the intensity 0 axis and has a time range smaller than the second half cycle is defined as a third type of waveform; An audio waveform that remains on the intensity 0 axis is defined as a fourth type of waveform.

5. The linear motor driving method according to claim 4, wherein: The step of calculating the area of a graph formed by each type of time-domain audio waveform and the x-axis representing time includes: For the first type of waveform, the audio waveform is divided into a plurality of waveform segments according to the upper limit of the half cycle; and the area of the graph formed by each waveform segment and the x-axis representing time is calculated respectively; For the second type waveform and the third type waveform, calculate the area of a graph formed by the time domain audio waveform and the x-axis representing time; The area of the fourth type of waveform is 0.

6. The linear motor driving method according to claim 5, wherein: The step of converting the time-domain audio waveforms of different areas into sinusoidal waveforms corresponding to the audio data according to the calculated areas and a preset conversion rule includes: For the first type of waveform and the second type of waveform, the amplitude of the sine wave form is calculated based on the determined duration and area; and each waveform or waveform segment is restored to a half-cycle sine wave based on the amplitude and duration. For the third and fourth type waveforms, the durations of the third and fourth type waveforms are combined and calculated. If the combined duration range is between the lower and upper limits of the half cycle, each third type waveform is restored to a half-cycle sine wave according to the amplitude and duration; if the combined duration range is less than the definition of the second half cycle, both the third and fourth type waveforms are converted into straight lines with an intensity of 0.

7. The linear motor driving method according to claim 6, wherein: The restoration to a half-cycle sine wave includes: When the time domain audio waveform is above the x-axis, the area of the graph formed by the x-axis representing time is positive, and it is restored to a half-cycle sine wave above the x-axis; When the time domain audio waveform is below the x-axis, the area of the graph formed by the x-axis representing time is negative, and it is restored to a half-cycle sine wave below the x-axis.

8. A linear motor drive device, characterized in that: The device comprises: an acquisition module, a processing module and a driving module; The acquisition module is configured to acquire a time-domain audio waveform of audio data for driving the linear motor and an operating frequency of the linear motor to be driven; The processing module is configured to process the audio data based on the time-domain audio waveform and the operating frequency to obtain a main waveform of the audio data, including: determining a half-cycle range of effective audio waveform data for driving the linear motor according to the operating frequency of the linear motor; classifying the acquired time-domain audio waveform into types according to the determined half-cycle range of the effective audio waveform data; based on the classification, calculating the area of a graph formed by each type of time-domain audio waveform and an x-axis representing time; converting the time-domain audio waveforms of different areas into sinusoidal waveforms corresponding to the audio data according to the calculated areas and a preset conversion rule; and determining the main waveform based on the sinusoidal waveform, wherein the main waveform has the largest area among all waveforms of the audio data. The driving module is used to drive the linear motor according to the main waveform of the audio data.

9. A linear motor drive device, characterized in that: The device includes: a memory and a processor; wherein the memory is used to store a linear motor driving program, and the processor is used to read the linear motor driving program and execute the method according to any one of claims 1 to 7.

10. A computer storage medium, wherein computer executable instructions are stored in the computer storage medium, and the computer executable instructions are used to execute the linear motor driving method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Motor control method and device in mobile terminal

    CN104506114A

  • Vibration intensity control method and device, electronic equipment and storage medium

    CN112114674A