Linear motor driving method, device, terminal equipment and computer medium
By detecting and reconstructing the driving voltage signal of the linear motor, the high-frequency component is transferred to the low-frequency area, which solves the problem of weak vibration of the linear motor when driven at high frequency, and achieves the effect of still producing strong vibration at high frequency.
Patent Information
- Application Number
- CN202310359020.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2043-03-31
AI Technical Summary
The linear motor has a weak vibration feeling when driving signals at high frequencies, which affects the user experience.
By detecting the frequency components of the initial driving voltage signal, filtering out the high-frequency and low-frequency components, and mapping the high-frequency components to the low-frequency area, the target driving voltage signal is reconstructed to enhance the vibration sensation.
When driving signals at high frequencies, the linear motor can still generate vibrations of sufficient intensity to enhance the user experience.
Smart Images

Figure CN116345983B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of linear motors, and in particular to a driving method, apparatus, terminal device, and computer-readable storage medium for a linear motor. Background Art
[0002] With the development of the consumer electronics industry, linear resonant actuators (LRAs) have been widely used in various situations requiring vibration feedback through consumer electronic products due to their advantages such as strong, rich, crisp vibration and low energy consumption. In particular, in AR (Augmented Reality) / VR (Virtual Reality) products, linear motors can achieve very rich, realistic and strong vibration feedback by constructing diverse driving voltage signals.
[0003] However, since the vibration frequency response curve of the linear motor has the characteristics of higher amplitude in the medium and low frequency bands and lower amplitude in the high frequency band, when the driving signal frequency in the linear motor is high, the vibration of the linear motor will be weak, which greatly reduces the user experience. Summary of the Invention
[0004] The main purpose of this application is to provide a driving method, apparatus, terminal device and computer-readable storage medium for a linear motor, aiming to enable the linear motor to still generate a vibration of sufficient intensity when the frequency of the driving signal input to the linear motor is high.
[0005] To achieve the above objectives, the present application provides a method for driving a linear motor, the method comprising the following steps:
[0006] Obtaining an initial driving voltage signal input into the linear motor, and detecting each frequency component contained in the initial driving voltage signal;
[0007] Determining high-frequency components and low-frequency components in each of the frequency components, determining a high-frequency component number corresponding to each of the high-frequency components, and determining a low-frequency component number corresponding to each of the low-frequency components;
[0008] Mapping each high-frequency component to a low-frequency region corresponding to each low-frequency component based on the high-frequency component number and the low-frequency component number to obtain a target low-frequency region, and modifying the high-frequency complex number combination corresponding to each high-frequency component to 0 to obtain a target high-frequency region;
[0009] A target driving voltage signal is obtained by performing signal reconstruction based on the target high-frequency region and the target low-frequency region, and the target driving voltage signal is input to the linear motor so that the linear motor is driven according to the target driving voltage signal.
[0010] Furthermore, the step of determining the high-frequency component and the low-frequency component in each of the initial frequency components includes:
[0011] determining a high-frequency region and a low-frequency region contained in the initial driving voltage signal;
[0012] The frequency components are screened based on the high-frequency region and the low-frequency region to determine the frequency components in the high-frequency region as high-frequency components and to determine the frequency components in the low-frequency region as low-frequency components.
[0013] Furthermore, the step of mapping each high-frequency component to a low-frequency region corresponding to each low-frequency component based on each high-frequency component number and each low-frequency component number to obtain a target low-frequency region includes:
[0014] Determining a maximum high-frequency component and a minimum high-frequency component contained in the high-frequency area, and determining boundary high-frequency component numbers corresponding to the maximum high-frequency component and the minimum high-frequency component;
[0015] Determining a maximum low-frequency component and a minimum low-frequency component contained in the low-frequency area, and determining boundary low-frequency component numbers corresponding to the maximum low-frequency component and the minimum low-frequency component respectively;
[0016] determining a frequency transfer ratio between the high-frequency region and the low-frequency region based on each of the boundary high-frequency component numbers and each of the boundary low-frequency component numbers;
[0017] A mapping relationship between each of the high-frequency component numbers and each of the low-frequency component numbers is determined based on the frequency transfer ratio, and each of the high-frequency components is mapped to the low-frequency region according to the mapping relationship to obtain a target low-frequency region.
[0018] Furthermore, the step of determining the boundary high-frequency component numbers corresponding to the maximum high-frequency component and the minimum high-frequency component respectively includes:
[0019] Determining a sampling rate and a single-frame data length corresponding to the initial driving voltage signal, and determining a frequency resolution value based on the sampling rate and the single-frame data length;
[0020] Determining a first frequency value corresponding to the maximum high-frequency component based on the frequency resolution value, calculating the first frequency value and the frequency resolution value based on a preset number calculation formula to obtain a first calculation result, and taking an integer of the first calculation result to obtain a boundary high-frequency component number corresponding to the maximum high-frequency component;
[0021] A second frequency value corresponding to the minimum high-frequency component is determined based on the frequency resolution value, and the second frequency value and the frequency resolution value are calculated based on the number calculation formula to obtain a second calculation result, and an integer is taken for the second calculation result to obtain the boundary high-frequency component number corresponding to the minimum high-frequency component.
[0022] Furthermore, the step of determining the boundary low-frequency component numbers corresponding to the maximum low-frequency component and the minimum low-frequency component respectively includes:
[0023] determining a third frequency value corresponding to the maximum low-frequency component based on the frequency resolution value, calculating the third frequency value and the frequency resolution value based on the number calculation formula to obtain a third calculation result, and taking an integer of the third calculation result to obtain a boundary low-frequency component number corresponding to the maximum low-frequency component;
[0024] A fourth frequency value corresponding to the minimum low-frequency component is determined based on the frequency resolution value, and the fourth frequency value and the frequency resolution value are calculated based on the number calculation formula to obtain a fourth calculation result. An integer is taken from the fourth calculation result to obtain a boundary low-frequency component number corresponding to the minimum low-frequency component.
[0025] Furthermore, the step of determining the frequency transfer ratio between the high-frequency region and the low-frequency region based on the numbers of the boundary high-frequency components and the numbers of the boundary low-frequency components includes:
[0026] Obtain a preset frequency transfer ratio calculation formula;
[0027] The frequency transfer ratio between the high-frequency region and the low-frequency region is obtained based on the frequency transfer ratio calculation formula, the numbers of the boundary high-frequency components, and the numbers of the boundary low-frequency components.
[0028] Furthermore, the step of mapping each of the high-frequency components to the low-frequency region according to the mapping relationship to obtain a target low-frequency region includes:
[0029] Determine, according to the mapping relationship, the low-frequency component number corresponding to each of the high-frequency component numbers in the low-frequency region;
[0030] The low-frequency complex combinations corresponding to the low-frequency component numbers and the high-frequency complex combinations corresponding to the low-frequency component numbers are added to obtain target low-frequency complex combinations, and the target low-frequency complex combinations are integrated to obtain a target low-frequency region.
[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a linear motor driving device, the device comprising:
[0032] a signal detection module, configured to obtain an initial driving voltage signal input into the linear motor and detect frequency components contained in the initial driving voltage signal;
[0033] a number determination module, configured to determine a high-frequency component and a low-frequency component in each of the frequency components, determine a high-frequency component number corresponding to each of the high-frequency components, and determine a low-frequency component number corresponding to each of the low-frequency components;
[0034] a frequency reconstruction module, configured to map each high-frequency component to a low-frequency region corresponding to each low-frequency component based on the high-frequency component number and the low-frequency component number to obtain a target low-frequency region, and modify the high-frequency complex number combination corresponding to each high-frequency component to 0 to obtain a target high-frequency region;
[0035] A signal reconstruction module is used to reconstruct a signal based on the target high-frequency region and the target low-frequency region to obtain a target driving voltage signal, and input the target driving voltage signal to the linear motor so that the linear motor is driven according to the target driving voltage signal.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a terminal device, which includes: a memory, a processor, and a driver program for a linear motor stored on the memory and runnable on the processor. When the driver program for the linear motor is executed by the processor, the steps of the linear motor driving method as described above are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a driver program for a linear motor is stored. When the driver program for the linear motor is executed by a processor, the steps of the driving method of the linear motor as described above are implemented.
[0038] The driving method, apparatus, terminal device and computer-readable storage medium of a linear motor provided by the embodiments of the present application obtain an initial driving voltage signal input into the linear motor and detect the frequency components contained in the initial driving voltage signal; determine high-frequency components and low-frequency components in each of the frequency components, determine the high-frequency component number corresponding to each of the high-frequency components, and determine the low-frequency component number corresponding to each of the low-frequency components; map each of the high-frequency components to a low-frequency region corresponding to each of the low-frequency components based on the high-frequency component number and the low-frequency component number to obtain a target low-frequency region, and modify the high-frequency complex combination corresponding to each of the high-frequency components to 0 to obtain a target high-frequency region; perform signal reconstruction based on the target high-frequency region and the target low-frequency region to obtain a target driving voltage signal, and input the target driving voltage signal to the linear motor so that the linear motor is driven according to the target driving voltage signal.
[0039] In this embodiment, when the terminal device is running, it first detects the linear motor to obtain the initial driving voltage signal input into the linear motor, and detects the initial driving voltage signal to determine the frequency components contained in the initial driving voltage signal. After that, the terminal device screens the frequency components to determine the high-frequency components in the high-frequency area and the low-frequency components in the low-frequency area in each frequency component. The terminal device further determines the high-frequency component number corresponding to each high-frequency component and the low-frequency component number corresponding to each low-frequency component. After that, the terminal device maps each high-frequency component based on the high-frequency component number and the low-frequency component number. To the low-frequency area where the low-frequency component is located, thereby forming a new target low-frequency area. At the same time, the terminal device modifies the high-frequency complex combination corresponding to each high-frequency component to 0 to obtain the target high-frequency area. Finally, the terminal device reconstructs the driving signal based on the target low-frequency area and the target high-frequency area to obtain the target driving voltage signal. The terminal device inputs the target driving voltage signal into the amplifier configured in the terminal device, amplifies the target driving voltage signal through the amplifier, and inputs the amplified target driving voltage signal into the linear motor, so that the linear motor is driven according to the amplified target driving voltage signal to provide vibration feedback to the user.
[0040] In this way, the present application is based on the fact that the vibration frequency response curve of the linear motor has a higher amplitude in the medium and low frequency bands. By transferring the high-frequency components contained in the driving voltage signal to the low-frequency region, the target driving voltage signal is reconstructed, thereby achieving the technical effect of allowing the linear motor to still generate a vibration of sufficient intensity when the frequency of the driving signal input to the linear motor is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1It is a structural diagram of a terminal device in the hardware operating environment involved in the embodiment of the present application;
[0042] Figure 2 This is a flow chart of a first embodiment of a method for driving a linear motor according to the present application;
[0043] Figure 3 This is a flow chart of a preferred embodiment of a method for driving a linear motor according to the present application;
[0044] Figure 4 Schematic diagram of an initial driving voltage signal according to an embodiment of a driving method for a linear motor of the present application;
[0045] Figure 5 This is a schematic diagram of a target driving voltage signal involved in an embodiment of a driving method for a linear motor of the present application;
[0046] Figure 6 Schematic diagram showing comparison of driving voltage signals involved in an embodiment of the driving method of the linear motor of the present application;
[0047] Figure 7 Schematic diagram of functional modules involved in an embodiment of the linear motor driving method of the present application.
[0048] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0049] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0050] Reference Figure 1 , Figure 1 This is a schematic diagram of the terminal device structure of the hardware operating environment involved in the embodiment of the present application.
[0051] It should be noted that Figure 1 The terminal device of the embodiment of the present invention may be a device that executes the linear motor driving method of the present invention, and the terminal device may specifically be a mobile terminal, a data storage control terminal, a PC, or a portable computer.
[0052] like Figure 1As shown, the terminal device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0053] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0054] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a driver program for a linear motor.
[0055] exist Figure 1 In the terminal device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the terminal device of the present application can be set in the terminal device, and the terminal device calls the linear motor driver stored in the memory 1005 through the processor 1001 and executes the linear motor driving method provided in the embodiment of the present application.
[0056] Based on the above-mentioned terminal device, various embodiments of the driving method of the linear motor of the present invention are provided.
[0057] Please refer to Figure 2 , Figure 2 FIG. 1 is a flow chart of a first embodiment of a method for driving a linear motor according to the present invention.
[0058] It should be understood that although a logical sequence is shown in the flowchart, in some cases, the linear motor driving method of the present invention may also execute the steps shown or described in a different order than that shown here.
[0059] In this embodiment, the driving method of the linear motor of the present invention may include the following steps:
[0060] Step S10: obtaining an initial driving voltage signal input into the linear motor, and detecting each frequency component contained in the initial driving voltage signal;
[0061] In this embodiment, when the terminal device is running, it first detects the linear motor to obtain the initial driving voltage signal input into the linear motor. At the same time, the terminal device obtains the fast Fourier transform algorithm preset by the technician, and detects the initial driving voltage signal through the fast Fourier transform algorithm to determine the various frequency components contained in the initial driving voltage signal, and determines the complex combination corresponding to each frequency component.
[0062] For example, when a user connects a gaming device or AR / VR device via a handle equipped with a linear motor, the gaming device or AR / VR device generates an initial driving voltage signal and inputs the initial driving voltage signal to the linear motor to cause the linear motor to vibrate, thereby providing vibration feedback to the user. Figure 4 , Figure 4 This is a schematic diagram of an initial driving voltage signal involved in an embodiment of the driving method of the linear motor of the present application, as shown in FIG. Figure 4 As shown, the initial driving voltage signal generated by the gaming device or AR / VR device has more high-frequency components. At this time, if the linear motor is directly driven by the initial driving voltage signal, the vibration feedback generated by the linear motor will be weak.
[0063] Therefore, when the terminal device is running, it first detects the linear motor through the detection module to obtain the initial driving voltage signal input into the linear motor. At the same time, the terminal device obtains the fast Fourier transform algorithm preset by the technician and detects the initial driving voltage signal through the fast Fourier transform algorithm to determine the various frequency components contained in the initial driving voltage signal and the amplitude and phase corresponding to each frequency component. After that, the terminal device combines the amplitude and phase corresponding to each frequency component to generate a complex combination c i .
[0064] It should be noted that, in this embodiment, the waveform corresponding to the driving voltage signal can be a broadband signal customized according to the game scene, or it can be a broadband signal obtained by performing a series of operations on the sound effects actually output by the game application.
[0065] Step S20: determining high-frequency components and low-frequency components in each of the frequency components, determining a high-frequency component number corresponding to each of the high-frequency components, and determining a low-frequency component number corresponding to each of the low-frequency components;
[0066] In this embodiment, the terminal device first determines the high-frequency components in the high-frequency area and the low-frequency components in the low-frequency area among the frequency components, and determines the high-frequency component number corresponding to each high-frequency component and the low-frequency component number corresponding to each low-frequency component.
[0067] For example, the terminal device first determines the frequency components in the high frequency region [f H1 , f H2 ], and the high-frequency components in the low-frequency region [f L1 , f L2 ] each low-frequency component within, and then, the terminal device determines the high-frequency component number corresponding to each high-frequency component and the low-frequency component number corresponding to each low-frequency component based on the frequency component number corresponding to each frequency component.
[0068] Furthermore, in a feasible embodiment, the step of “determining high-frequency components and low-frequency components in each of the frequency components” in the above step S20 may specifically include:
[0069] Step S201: determining a high-frequency region and a low-frequency region contained in the initial driving voltage signal;
[0070] Step S202: screening the frequency components based on the high-frequency region and the low-frequency region to determine the frequency components in the high-frequency region as high-frequency components, and determining the frequency components in the low-frequency region as low-frequency components;
[0071] For example, the terminal device first determines that the high frequency region contained in the initial driving voltage signal is [f H1 , f H2 ], and determine the low-frequency region contained in the initial driving voltage signal as [f L1 , f L2 ], then the terminal device is based on the high frequency area [f H1 , f H2 ] and the low frequency region is [f L1 , f L2 ] filters each frequency component, thereby filtering the high frequency region [f H1 , f H2 ] are determined as high-frequency components, and at the same time, the frequency components in the low-frequency region are determined as [f L1 , f L2 ] are determined as low-frequency components.
[0072] Step S30: mapping each high-frequency component to a low-frequency region corresponding to each low-frequency component based on the high-frequency component number and the low-frequency component number to obtain a target low-frequency region, and modifying the high-frequency complex combination corresponding to each high-frequency component to 0 to obtain a target high-frequency region;
[0073] In this embodiment, the terminal device maps each high-frequency component to the low-frequency area where each low-frequency component is located based on the number of each high-frequency component and the number of each low-frequency component, thereby forming a target low-frequency area. At the same time, the terminal device modifies the high-frequency complex combination corresponding to each high-frequency component, thereby modifying each high-frequency complex combination to 0 to obtain the target high-frequency area.
[0074] For example, the terminal device divides the high frequency region [f H1 , f H2 ] are mapped to the low-frequency region [f L1 , f L2 ] to obtain a new target low-frequency area. At the same time, the terminal device combines the high-frequency complex number c corresponding to each high-frequency component H1 、c H1+1 ,...,c H2 Set to 0+j0 to obtain the target high-frequency area, and determine the target high-frequency complex combinations c′ contained in the target high-frequency area iH1 , c′ iH1+1 ,...,c′ H2 The values of are all 0.
[0075] Furthermore, in a feasible embodiment, the step of “mapping each of the high-frequency components to a low-frequency region corresponding to each of the low-frequency components to obtain a target low-frequency region based on the high-frequency component numbers and the low-frequency component numbers” in the above step S30 may specifically include:
[0076] Step S301: determining the maximum high-frequency component and the minimum high-frequency component contained in the high-frequency area, and determining the boundary high-frequency component numbers corresponding to the maximum high-frequency component and the minimum high-frequency component respectively;
[0077] In this embodiment, the terminal device determines the maximum high-frequency component and the minimum high-frequency component contained in the high-frequency area, and determines the frequency values corresponding to the maximum high-frequency component and the minimum high-frequency component, thereby determining the boundary high-frequency component numbers corresponding to the maximum high-frequency component and the minimum high-frequency component based on each frequency value.
[0078] Step S305: determining the maximum low-frequency component and the minimum low-frequency component contained in the low-frequency area, and determining the boundary low-frequency component numbers corresponding to the maximum low-frequency component and the minimum low-frequency component respectively;
[0079] In this embodiment, the terminal device determines the maximum low-frequency component and the minimum low-frequency component contained in the low-frequency area, and determines the frequency values corresponding to the maximum low-frequency component and the minimum low-frequency component, thereby determining the boundary low-frequency component numbers corresponding to the maximum low-frequency component and the minimum low-frequency component based on each frequency value.
[0080] Step S303: determining a frequency transfer ratio between the high-frequency region and the low-frequency region based on the numbers of the boundary high-frequency components and the numbers of the boundary low-frequency components;
[0081] In this embodiment, the terminal device calculates each boundary high frequency component number and each boundary low frequency component number based on a preset frequency transfer ratio calculation formula to determine the frequency transfer ratio between the high frequency area and the low frequency area.
[0082] Step S304: determining a mapping relationship between each of the high-frequency component numbers and each of the low-frequency component numbers based on the frequency transfer ratio, and mapping each of the high-frequency components to the low-frequency region according to the mapping relationship to obtain a target low-frequency region;
[0083] In this embodiment, the terminal device determines the mapping relationship between the high-frequency component numbers in the high-frequency area and the low-frequency component numbers in the low-frequency area based on the obtained frequency transfer ratio, and the terminal device then maps each high-frequency component to the low-frequency area according to the mapping relationship to construct the target low-frequency area.
[0084] For example, the terminal device first obtains a preset frequency calculation formula and determines the high frequency area [f H1 , f H2 ], the terminal device then determines that the maximum high frequency component corresponds to the maximum high frequency complex combination c H2 , and determine the maximum high-frequency complex combination c based on the preset frequency calculation formula H2 The corresponding frequency value f H2 , then the terminal device is based on the frequency value f H2 Determine the boundary high-frequency component number i corresponding to the maximum high-frequency component H2 ;
[0085] Similarly, the terminal device determines the high frequency area [f H1 , f H2 ] and determine the minimum high-frequency complex combination c corresponding to the minimum high-frequency component H1 , and determine the minimum high-frequency complex combination c based on the frequency calculation formula H1 The corresponding frequency value f H1 , then the terminal device is based on the frequency value f H1 Determine the boundary high-frequency component number i corresponding to the minimum high-frequency componentH1 ;
[0086] Similarly, the terminal device determines the low frequency area [f L1 , f L2 ] and determine the maximum low-frequency complex combination c corresponding to the maximum low-frequency component L2 , and determine the maximum low-frequency complex combination c based on the frequency calculation formula L2 The corresponding frequency value f L2 , then the terminal device is based on the frequency value f L2 Determine the boundary low-frequency component number i corresponding to the maximum low-frequency component L2 ;
[0087] Similarly, the terminal device determines the low frequency area [f L1 , f L2 ] and determine the minimum low-frequency complex combination c corresponding to the minimum low-frequency component L1 , and determine the minimum low-frequency complex combination c based on the frequency calculation formula L1 The corresponding frequency value f L1 , then the terminal device is based on the frequency value f L1 Determine the boundary low-frequency component number i corresponding to the minimum low-frequency component L1 ;
[0088] Afterwards, the terminal device obtains the frequency transfer ratio calculation formula preset by the technician, and numbers the boundary high frequency components i based on the frequency transfer ratio calculation formula. H2 , boundary high frequency component number i H1 , boundary low-frequency component number i L2 , boundary low-frequency component number i L1 The frequency transfer ratio calculation formula determines the high frequency region [f H1 , f H2 ] and low frequency region [f L1 , f L2 ] between the frequency transfer ratio k, and finally, the terminal device determines the number i of each high frequency component based on the frequency transfer ratio k H and each low-frequency component number i L The mapping relationship between them is established, and based on the mapping relationship, each high-frequency component is mapped to the low-frequency region to obtain the target low-frequency region.
[0089] Furthermore, in a feasible embodiment, the step of “determining the boundary high-frequency component numbers corresponding to the maximum high-frequency component and the minimum high-frequency component” in the above step S301 may specifically include:
[0090] Step S3011: determining a sampling rate and a single-frame data length corresponding to the initial driving voltage signal, and determining a frequency resolution value based on the sampling rate and the single-frame data length;
[0091] Step S3012: determining a first frequency value corresponding to the maximum high-frequency component based on the frequency resolution value, calculating the first frequency value and the frequency resolution value based on a preset number calculation formula to obtain a first calculation result, and taking an integer of the first calculation result to obtain a boundary high-frequency component number corresponding to the maximum high-frequency component;
[0092] Step S3013: determining a second frequency value corresponding to the minimum high-frequency component based on the frequency resolution value, calculating the second frequency value and the frequency resolution value based on the number calculation formula to obtain a second calculation result, and taking an integer of the second calculation result to obtain the boundary high-frequency component number corresponding to the minimum high-frequency component;
[0093] For example, in this embodiment, the terminal device first determines the sampling rate Fs and the single frame data length L corresponding to the initial driving voltage signal. At the same time, the terminal device obtains the frequency resolution calculation formula preset by the technician: f b =Fs / L, and based on the frequency resolution calculation formula, the sampling rate Fs and the single frame data length L are calculated to obtain the frequency resolution value f b , then the terminal device obtains the frequency calculation formula: f i =f b *(i-1), and based on the frequency calculation formula for the high frequency area [f H1 , f H2 ] corresponds to the high-frequency complex combination c of the maximum high-frequency component contained in H2 Calculate to get the first frequency value f corresponding to the maximum high frequency component H2 After that, the terminal device obtains the preset number calculation formula: i=(f / f b +1), and based on the first frequency value f H2 and frequency resolution value f b The first calculation result is obtained by calculation, and the terminal device then takes an integer of the first calculation result to obtain the boundary high-frequency component number i corresponding to the maximum high-frequency component. H2 ;
[0094] Similarly, the terminal equipment calculates the high frequency area [f H1 , f H2 ] corresponds to the high-frequency complex combination c of the minimum high-frequency component contained in H1 Calculate to obtain the second frequency value f corresponding to the minimum high frequency component H1 After that, the terminal device calculates the second frequency value f based on the number calculation formulaH1 and frequency resolution value f b The second calculation result is obtained by calculation, and the terminal device further integers the second calculation result to obtain the boundary high-frequency component number i corresponding to the minimum high-frequency component. H1 .
[0095] Furthermore, in a feasible embodiment, the step of “determining the boundary low-frequency component numbers corresponding to the maximum low-frequency component and the minimum low-frequency component” in the above step S302 may specifically include:
[0096] Step S3021: determining a third frequency value corresponding to the maximum low-frequency component based on the frequency resolution value, calculating the third frequency value and the frequency resolution value based on the number calculation formula to obtain a third calculation result, and taking an integer of the third calculation result to obtain a boundary low-frequency component number corresponding to the maximum low-frequency component;
[0097] Step S3022: determining a fourth frequency value corresponding to the minimum low-frequency component based on the frequency resolution value, calculating the fourth frequency value and the frequency resolution value based on the number calculation formula to obtain a fourth calculation result, and taking an integer of the fourth calculation result to obtain a boundary low-frequency component number corresponding to the minimum low-frequency component;
[0098] For example, the terminal device calculates the frequency of the low frequency region [f L1 , f L2 The low-frequency complex combination c corresponding to the maximum low-frequency component contained in ] L2 Calculate to get the third frequency value f corresponding to the maximum low-frequency component L2 After that, the terminal device calculates the third frequency value f based on the above number calculation formula. L2 and frequency resolution value f b The third calculation result is obtained by calculation, and the terminal device further integers the third calculation result to obtain the boundary low-frequency component number i corresponding to the maximum low-frequency component. H2 ;
[0099] Similarly, the terminal device calculates the frequency of the low frequency area [f L1 , f L2 The low-frequency complex combination c corresponding to the minimum low-frequency component contained in ] L1 Calculate to obtain the fourth frequency value f corresponding to the minimum low-frequency component L1 After that, the terminal device calculates the fourth frequency value f based on the number calculation formula L1 and frequency resolution value f bThe fourth calculation result is obtained by calculation, and the terminal device further integers the fourth calculation result to obtain the boundary low-frequency component number i corresponding to the minimum low-frequency component. L1 .
[0100] Furthermore, in a feasible embodiment, the above step S303 may specifically include:
[0101] Step S3031: Obtain a preset frequency transfer ratio calculation formula;
[0102] Step S3032: obtaining a frequency transfer ratio between the high-frequency region and the low-frequency region based on the frequency transfer ratio calculation formula, the numbers of the boundary high-frequency components, and the numbers of the boundary low-frequency components;
[0103] For example, the terminal device first obtains the frequency transfer ratio calculation formula that can be preset by technicians: k = [(f H2 -f H1 ) / (f L2 -f L1 )], then the terminal device numbers the boundary high frequency component i based on the frequency transfer ratio calculation formula H2 The corresponding first frequency value f H2 , boundary high frequency component number i H1 The corresponding second frequency value f H1 , boundary low-frequency component number i L2 The corresponding third frequency value f L2 and the boundary low-frequency component number i L1 The corresponding fourth frequency value f L1 The fifth calculation result is obtained by calculation, and the terminal device further integers the fifth calculation result to obtain the high frequency area [f H1 , f H2 ] and low frequency region [f L1 , f L2 ] is the frequency transfer ratio k between .
[0104] Furthermore, in a feasible embodiment, the step of “mapping each of the high-frequency components to the low-frequency region to obtain a target low-frequency region according to the mapping relationship” in the above step S304 may specifically include:
[0105] Step S3041: determining the low-frequency component number corresponding to each of the high-frequency component numbers in the low-frequency region according to the mapping relationship;
[0106] Step S3042: adding the low-frequency complex combinations corresponding to the low-frequency component numbers and the high-frequency complex combinations corresponding to the low-frequency component numbers to obtain a target low-frequency complex combination, and integrating the target low-frequency complex combinations to obtain a target low-frequency region;
[0107] For example, the terminal device first sorts the high frequency components according to their corresponding high frequency component numbers to obtain a sorting result, and the terminal device determines the order of the high frequency component numbers as i according to the sorting result. H1 、i H1+1 、...、i Hk , then, the terminal device determines the number of each high frequency component based on the mapping relationship, i H1 、i H1+1 、...、i H1+k-1 and low-frequency component number i L1 Correspondingly, similarly, the i in each high frequency component number H1+k 、i H1+k+1 、...、i H1+2k-1 and low-frequency component number i L1+1 Correspondingly, similarly, the i in each high-frequency component number H1+2k 、i H1+2k+1 、...、i H1+3k-1 The i with the low frequency component number L1+2 Correspondingly, by analogy, the terminal device determines the low-frequency component number corresponding to each high-frequency component number in the low-frequency area, and then the terminal device assigns the high-frequency component number i H1 、i H1+1 、...、i H1+k-1 The corresponding high-frequency complex combination c iH1 、c iH1+1 ,...,c iH1+k-1 and low-frequency component number i L1 The corresponding low-frequency complex combination c iL1 Add and get the target low-frequency complex combination c′ iL1 =(c iH1 +c iH1+1 +...+c iH1+k-1 )+c iL1 , and so on, the terminal device then determines the target low-frequency complex combination c′ iL1+1 , c′ iL1+2 ,...,c′ iL1+n , the terminal device then calculates the target complex combination c′ iL1+1 , c′ iL1+2 ,...,c′ iL1+n The target low-frequency region is obtained by integration.
[0108] Step S40: reconstructing a signal based on the target high-frequency region and the target low-frequency region to obtain a target driving voltage signal, and inputting the target driving voltage signal to the linear motor to drive the linear motor according to the target driving voltage signal;
[0109] In this embodiment, the terminal device obtains a preset inverse fast Fourier transform algorithm, and processes the target high-frequency area and the target low-frequency area through the inverse fast Fourier transform algorithm to reconstruct a target driving voltage signal. The terminal device then inputs the constructed target driving voltage signal into a preset power amplifier circuit in the terminal device, and the target driving voltage signal is power amplified by the power amplifier circuit. The terminal device then inputs the amplified target driving voltage signal into the linear motor to drive the linear motor and provide vibration feedback to the user.
[0110] For example, the terminal device first reads the inverse fast Fourier transform algorithm, and performs a calculation on each target high-frequency complex combination c′ contained in the target high-frequency region according to the inverse fast Fourier transform algorithm. iH1 , c′ iH1+1 ,...,c′ H2 , and the target low-frequency complex combinations c′ contained in the target low-frequency region iL1+1 , c′ iL1+2 ,...,c′ iL1+n The drive voltage signal is processed to reconstruct the drive voltage signal, thereby generating a target drive voltage signal. After that, the terminal device inputs the constructed target drive voltage signal into a preset Class A amplifier in the terminal device, thereby amplifying the target drive voltage signal through the Class A amplifier. After that, the terminal device inputs the amplified target drive voltage signal into the linear motor, so that the linear motor is driven according to the amplified target drive voltage signal, thereby providing corresponding vibration feedback to the user.
[0111] It should be noted that, in this embodiment, in addition to selecting a Class A amplifier, the power amplifier circuit may also select a common Class B, Class AB or Class D driver, and this application does not impose any restrictions on this.
[0112] In addition, please refer to Figure 5 and Figure 6 ,in, Figure 5 Schematic diagram of a target driving voltage signal according to an embodiment of a driving method for a linear motor of the present application. Figure 6 This is a schematic diagram comparing the driving voltage signals involved in an embodiment of the driving method of the linear motor of the present application, combined with Figure 5 and Figure 4 From the perspective of the reconstructed target driving voltage signal and Figure 4 The initial drive voltage signals shown have similar intensity trends, thus achieving a rhythmic intensity similar to the input signal. Simultaneously, the target drive voltage signal contains significantly fewer high-frequency components and significantly more low-frequency components. Therefore, when the linear motor is driven based on the waveform corresponding to the target drive voltage signal, it can produce a vibration of sufficient intensity.
[0113] In addition, through Figure 6 It can be found that the initial driving voltage signal (i.e. Figure 6 The input signal in the signal distribution is distributed in the range of 200Hz-4kHz, especially in the high frequency band of 500Hz-4kHz, there are many components, and the target driving voltage signal (i.e. Figure 6 The reconstructed driving signal in the 500Hz-4kHz high-frequency band has significantly reduced components, and the low-frequency band components below 200Hz have significantly increased components. Therefore, the purpose of transferring the high-frequency components contained in the initial driving voltage signal to the low-frequency region is achieved.
[0114] In this embodiment, when the terminal device is running, it first detects the linear motor to obtain the initial driving voltage signal input into the linear motor. At the same time, the terminal device obtains the fast Fourier transform algorithm preset by the technician, and detects the initial driving voltage signal through the fast Fourier transform algorithm to determine the frequency components contained in the initial driving voltage signal, and determines the complex combination corresponding to each frequency component. After that, the terminal device first determines each high-frequency component in the high-frequency area and each low-frequency component in the low-frequency area of each frequency component, and determines the high-frequency component number corresponding to each high-frequency component and the low-frequency component number corresponding to each low-frequency component. After that, the terminal device maps each high-frequency component based on the high-frequency component number and the low-frequency component number. to the low-frequency area where each low-frequency component is located, thereby forming a target low-frequency area. At the same time, the terminal device modifies the high-frequency complex combination corresponding to each high-frequency component, thereby modifying each high-frequency complex combination to 0 to obtain a target high-frequency area. Finally, the terminal device obtains a preset inverse fast Fourier transform algorithm, and processes the target high-frequency area and the target low-frequency area through the inverse fast Fourier transform algorithm to reconstruct a target driving voltage signal. The terminal device then inputs the constructed target driving voltage signal into a preset power amplifier circuit in the terminal device, and the target driving voltage signal is power amplified by the power amplifier circuit. The terminal device then inputs the amplified target driving voltage signal into the linear motor to drive the linear motor to provide vibration feedback to the user.
[0115] In this way, the present application is based on the fact that the vibration frequency response curve of the linear motor has a higher amplitude in the medium and low frequency bands. By transferring the high-frequency components contained in the driving voltage signal to the low-frequency region, the target driving voltage signal is reconstructed, thereby achieving the technical effect of allowing the linear motor to still generate a vibration of sufficient intensity when the frequency of the driving signal input to the linear motor is high.
[0116] Further, please refer to Figure 3 , Figure 3 Schematic diagram of a flow chart of a preferred embodiment of a linear motor driving method of the present application.
[0117] Based on the first embodiment of the driving method of the linear motor of the present application, a preferred embodiment of the driving method of the linear motor of the present application is proposed here;
[0118] When a user connects a gaming device or AR / VR device via a handle equipped with a linear motor, the gaming device or AR / VR device generates an initial driving voltage signal. In this embodiment, the terminal device first performs a signal input step. During the signal input step, the terminal device detects the linear motor using an internal detection module, thereby obtaining the initial driving voltage signal input into the linear motor.
[0119] Afterwards, the terminal device performs a frequency component detection step. In the frequency component detection step, the terminal device obtains a fast Fourier transform algorithm preset by the technician and detects the initial driving voltage signal using the fast Fourier transform algorithm to determine the complex combination c corresponding to each frequency component contained in the initial driving voltage signal. i ;
[0120] Afterwards, the terminal device performs a frequency component reconstruction step. In the frequency component reconstruction step, the terminal device first determines the high frequency region [f H1 , f H2 ], and determine that it is in the high frequency area [f H1 , f H2 ], and at the same time, the terminal device determines the low frequency region [f L1 , f L2 ], and determine that it is in the low frequency area [f L1 , f L2 ], then the terminal device determines the high frequency area [f H1 , f H2 ] corresponds to the boundary high-frequency component number i of the maximum high-frequency component contained in H2 , and, the boundary high-frequency component number i corresponding to the minimum high-frequency component H1 , and, low frequency region [f L1 , f L2 ] corresponds to the boundary low-frequency component number i of the maximum low-frequency component contained in L2 , and, the boundary low-frequency component number i corresponding to the minimum low-frequency component L1 The terminal device then numbers the boundary high frequency component i H2 , boundary high frequency component number i H1 , boundary low-frequency component number i L2 , boundary low-frequency component number i L1 Determine the high frequency area [f H1 , f H2 ] and low frequency region [fL1 , f L2 ] and determine the frequency transfer ratio k between each high frequency component according to the frequency transfer ratio k H and each low-frequency component number i L Finally, the terminal device maps each high-frequency component to the low-frequency region based on the mapping relationship to form the target low-frequency region. At the same time, the terminal device maps each high-frequency component to the corresponding high-frequency complex combination c H1 、c H1+1 ,...,c H2 Set to 0+j0 to obtain the target high-frequency area;
[0121] Then, the terminal device performs a driving signal reconstruction step. In the driving signal reconstruction step, the terminal device obtains the fast Fourier inverse transform algorithm preset by the technician, and uses the fast Fourier inverse transform algorithm to reconstruct each target high-frequency complex combination c′ contained in the target high-frequency area. iH1 , c′ iH1+1 ,...,c′ H2 , and the target low-frequency complex combinations c′ contained in the target low-frequency region iL1+1 , c′ iL1+2 ,...,c′ iL1+n The driving voltage signal is processed to reconstruct the driving voltage signal, thereby generating a target driving voltage signal.
[0122] Finally, the terminal device performs a power amplification and driving step. In the power amplification and driving step, the terminal device first inputs the generated target driving voltage signal into a Class A amplifier configured in the terminal device, and amplifies the target driving voltage through the Class A amplifier. After that, the terminal device inputs the amplified target driving voltage into the linear motor to drive the linear motor according to the amplified target driving voltage, thereby providing corresponding vibration feedback to the user.
[0123] Furthermore, in order to achieve the above purpose, the present application also provides a driving device of a linear motor, please refer to Figure 7 , Figure 7 This is a schematic diagram of the functional modules involved in an embodiment of the linear motor driving method of the present application. Figure 7 As shown, the device includes:
[0124] a signal detection module 10 for acquiring an initial driving voltage signal input into the linear motor and detecting frequency components contained in the initial driving voltage signal;
[0125] a number determination module 20, configured to determine a high-frequency component and a low-frequency component in each of the frequency components, determine a high-frequency component number corresponding to each of the high-frequency components, and determine a low-frequency component number corresponding to each of the low-frequency components;
[0126] A frequency reconstruction module 30 is configured to map each high-frequency component to a low-frequency region corresponding to each low-frequency component based on the high-frequency component number and the low-frequency component number to obtain a target low-frequency region, and modify the high-frequency complex number combination corresponding to each high-frequency component to 0 to obtain a target high-frequency region;
[0127] The signal reconstruction module 40 is used to reconstruct the signal based on the target high-frequency region and the target low-frequency region to obtain a target driving voltage signal, and input the target driving voltage signal to the linear motor so that the linear motor is driven according to the target driving voltage signal.
[0128] Furthermore, the number determination module 20 includes:
[0129] a region determining unit, configured to determine a high-frequency region and a low-frequency region contained in the initial driving voltage signal;
[0130] The frequency screening unit is configured to screen the frequency components based on the high frequency region and the low frequency region to determine the frequency components in the high frequency region as high frequency components and determine the frequency components in the low frequency region as low frequency components.
[0131] Furthermore, the frequency reconstruction module 30 includes:
[0132] a high-frequency boundary determining unit, configured to determine a maximum high-frequency component and a minimum high-frequency component contained in the high-frequency area, and determine boundary high-frequency component numbers corresponding to the maximum high-frequency component and the minimum high-frequency component;
[0133] a low-frequency boundary determining unit, configured to determine a maximum low-frequency component and a minimum low-frequency component contained in the low-frequency region, and determine boundary low-frequency component numbers corresponding to the maximum low-frequency component and the minimum low-frequency component;
[0134] a transfer ratio determination unit, configured to determine a frequency transfer ratio between the high-frequency region and the low-frequency region based on the numbers of the boundary high-frequency components and the numbers of the boundary low-frequency components;
[0135] The high frequency component transfer unit is configured to determine a mapping relationship between each high frequency component number and each low frequency component number based on the frequency transfer ratio, and map each high frequency component to the low frequency region according to the mapping relationship to obtain a target low frequency region.
[0136] Furthermore, the high-frequency boundary determination unit includes:
[0137] a frequency resolution determining subunit, configured to determine a sampling rate and a single-frame data length corresponding to the initial driving voltage signal, and determine a frequency resolution value based on the sampling rate and the single-frame data length;
[0138] a first number calculation subunit, configured to determine a first frequency value corresponding to the maximum high-frequency component based on the frequency resolution value, calculate the first frequency value and the frequency resolution value based on a preset number calculation formula to obtain a first calculation result, and take an integer of the first calculation result to obtain a boundary high-frequency component number corresponding to the maximum high-frequency component;
[0139] A second number calculation subunit is used to determine a second frequency value corresponding to the minimum high-frequency component based on the frequency resolution value, calculate the second frequency value and the frequency resolution value based on the number calculation formula to obtain a second calculation result, and take an integer of the second calculation result to obtain the boundary high-frequency component number corresponding to the minimum high-frequency component.
[0140] Furthermore, the low-frequency boundary determination unit includes:
[0141] a third number calculation subunit, configured to determine a third frequency value corresponding to the maximum low-frequency component based on the frequency resolution value, calculate the third frequency value and the frequency resolution value based on the number calculation formula to obtain a third calculation result, and take an integer of the third calculation result to obtain a boundary low-frequency component number corresponding to the maximum low-frequency component;
[0142] a fourth number calculation subunit, configured to determine a fourth frequency value corresponding to the minimum low-frequency component based on the frequency resolution value, calculate the fourth frequency value and the frequency resolution value based on the number calculation formula to obtain a fourth calculation result, and take an integer of the fourth calculation result to obtain a boundary low-frequency component number corresponding to the minimum low-frequency component.
[0143] Furthermore, the transfer ratio determination unit includes:
[0144] A formula acquisition subunit, used to obtain a preset frequency transfer ratio calculation formula;
[0145] The ratio calculation subunit is configured to obtain the frequency transfer ratio between the high-frequency region and the low-frequency region based on the frequency transfer ratio calculation formula, the numbers of the boundary high-frequency components, and the numbers of the boundary low-frequency components.
[0146] Furthermore, the high-frequency component transfer unit includes:
[0147] A number mapping subunit, configured to determine, according to the mapping relationship, a low-frequency component number corresponding to each of the high-frequency component numbers in the low-frequency region;
[0148] The complex summing subunit is configured to add the low-frequency complex combinations corresponding to the low-frequency component numbers and the high-frequency complex combinations corresponding to the low-frequency component numbers to obtain a target low-frequency complex combination, and integrate the target low-frequency complex combinations to obtain a target low-frequency region.
[0149] In addition, the present application also provides a terminal device having a driver program for a linear motor that can run on a processor. When the terminal device executes the driver program for the linear motor, the steps of the linear motor driving method described in any of the above embodiments are implemented.
[0150] The specific embodiments of the terminal device of the present application are basically the same as the embodiments of the driving method of the linear motor described above, and will not be described in detail here.
[0151] In addition, the present application also provides a computer-readable storage medium, which stores a driver program for a linear motor. When the driver program for the linear motor is executed by a processor, the steps of the linear motor driving method described in any of the above embodiments are implemented.
[0152] The specific embodiments of the computer-readable storage medium of the present invention are substantially the same as the embodiments of the driving method of the linear motor described above, and are not described in detail here.
[0153] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0154] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0155] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, or of course by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, or optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a device that executes the linear motor driving method of the present invention, and the terminal device can specifically be a mobile terminal, a data storage control terminal, a PC, or a portable computer) to execute the methods of the various embodiments of the present application.
[0156] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for driving a linear motor, characterized in that: The driving method of the linear motor comprises the following steps: Obtaining an initial driving voltage signal input into the linear motor, and detecting each frequency component contained in the initial driving voltage signal; Determining high-frequency components and low-frequency components in each of the frequency components, determining a high-frequency component number corresponding to each of the high-frequency components, and determining a low-frequency component number corresponding to each of the low-frequency components; Mapping each high-frequency component to a low-frequency region corresponding to each low-frequency component based on the high-frequency component number and the low-frequency component number to obtain a target low-frequency region, and modifying the high-frequency complex number combination corresponding to each high-frequency component to 0 to obtain a target high-frequency region; A target driving voltage signal is obtained by performing signal reconstruction based on the target high-frequency region and the target low-frequency region, and the target driving voltage signal is input to the linear motor so that the linear motor is driven according to the target driving voltage signal.
2. The method for driving a linear motor according to claim 1, wherein: The step of determining the high-frequency component and the low-frequency component in each of the frequency components comprises: determining a high-frequency region and a low-frequency region contained in the initial driving voltage signal; The frequency components are screened based on the high-frequency region and the low-frequency region to determine the frequency components in the high-frequency region as high-frequency components and to determine the frequency components in the low-frequency region as low-frequency components.
3. The method for driving a linear motor according to claim 2, wherein: The step of mapping each high-frequency component to a low-frequency region corresponding to each low-frequency component based on the high-frequency component number and the low-frequency component number to obtain a target low-frequency region includes: Determining a maximum high-frequency component and a minimum high-frequency component contained in the high-frequency area, and determining boundary high-frequency component numbers corresponding to the maximum high-frequency component and the minimum high-frequency component; Determining a maximum low-frequency component and a minimum low-frequency component contained in the low-frequency area, and determining boundary low-frequency component numbers corresponding to the maximum low-frequency component and the minimum low-frequency component respectively; determining a frequency transfer ratio between the high-frequency region and the low-frequency region based on each of the boundary high-frequency component numbers and each of the boundary low-frequency component numbers; A mapping relationship between each of the high-frequency component numbers and each of the low-frequency component numbers is determined based on the frequency transfer ratio, and each of the high-frequency components is mapped to the low-frequency region according to the mapping relationship to obtain a target low-frequency region.
4. The method for driving a linear motor according to claim 3, wherein: The step of determining the boundary high-frequency component numbers corresponding to the maximum high-frequency component and the minimum high-frequency component respectively includes: Determining a sampling rate and a single-frame data length corresponding to the initial driving voltage signal, and determining a frequency resolution value based on the sampling rate and the single-frame data length; Determining a first frequency value corresponding to the maximum high-frequency component based on the frequency resolution value, calculating the first frequency value and the frequency resolution value based on a preset number calculation formula to obtain a first calculation result, and taking an integer of the first calculation result to obtain a boundary high-frequency component number corresponding to the maximum high-frequency component; A second frequency value corresponding to the minimum high-frequency component is determined based on the frequency resolution value, and the second frequency value and the frequency resolution value are calculated based on the number calculation formula to obtain a second calculation result, and an integer is taken for the second calculation result to obtain the boundary high-frequency component number corresponding to the minimum high-frequency component.
5. The method for driving a linear motor according to claim 4, wherein: The step of determining the boundary low-frequency component numbers corresponding to the maximum low-frequency component and the minimum low-frequency component respectively includes: determining a third frequency value corresponding to the maximum low-frequency component based on the frequency resolution value, calculating the third frequency value and the frequency resolution value based on the number calculation formula to obtain a third calculation result, and taking an integer of the third calculation result to obtain a boundary low-frequency component number corresponding to the maximum low-frequency component; A fourth frequency value corresponding to the minimum low-frequency component is determined based on the frequency resolution value, and the fourth frequency value and the frequency resolution value are calculated based on the number calculation formula to obtain a fourth calculation result. An integer is taken from the fourth calculation result to obtain a boundary low-frequency component number corresponding to the minimum low-frequency component.
6. The method for driving a linear motor according to claim 3, wherein: The step of determining the frequency transfer ratio between the high-frequency region and the low-frequency region based on the numbers of the boundary high-frequency components and the numbers of the boundary low-frequency components includes: Obtain a preset frequency transfer ratio calculation formula; The frequency transfer ratio between the high-frequency region and the low-frequency region is obtained based on the frequency transfer ratio calculation formula, the numbers of the boundary high-frequency components, and the numbers of the boundary low-frequency components.
7. The method for driving a linear motor according to claim 3, wherein: The step of mapping each of the high-frequency components to the low-frequency region according to the mapping relationship to obtain a target low-frequency region includes: Determine, according to the mapping relationship, the low-frequency component number corresponding to each of the high-frequency component numbers in the low-frequency region; The low-frequency complex combinations corresponding to the low-frequency component numbers and the high-frequency complex combinations corresponding to the low-frequency component numbers are added to obtain target low-frequency complex combinations, and the target low-frequency complex combinations are integrated to obtain a target low-frequency region.
8. A linear motor driving device, characterized in that: The device comprises: a signal detection module, configured to obtain an initial driving voltage signal input into the linear motor and detect frequency components contained in the initial driving voltage signal; a number determination module, configured to determine a high-frequency component and a low-frequency component in each of the frequency components, determine a high-frequency component number corresponding to each of the high-frequency components, and determine a low-frequency component number corresponding to each of the low-frequency components; a frequency reconstruction module, configured to map each high-frequency component to a low-frequency region corresponding to each low-frequency component based on the high-frequency component number and the low-frequency component number to obtain a target low-frequency region, and modify the high-frequency complex number combination corresponding to each high-frequency component to 0 to obtain a target high-frequency region; A signal reconstruction module is used to reconstruct a signal based on the target high-frequency region and the target low-frequency region to obtain a target driving voltage signal, and input the target driving voltage signal to the linear motor so that the linear motor is driven according to the target driving voltage signal.
9. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a driver program for a linear motor stored in the memory and executable on the processor. When the driver program for the linear motor is executed by the processor, the steps of the driving method for the linear motor as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a driver program for the linear motor. When the driver program for the linear motor is executed by the processor, the steps of the method for driving the linear motor according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Vibration control method of terminal equipment, terminal equipment and storage medium
CN112933590A
Providing enhanced haptic feedback effects
US20020030663A1