WO2021120004A1 - 振动信号的控制方法、存储介质及电子设备 - Google Patents

振动信号的控制方法、存储介质及电子设备 Download PDF

Info

Publication number
WO2021120004A1
WO2021120004A1 PCT/CN2019/126023 CN2019126023W WO2021120004A1 WO 2021120004 A1 WO2021120004 A1 WO 2021120004A1 CN 2019126023 W CN2019126023 W CN 2019126023W WO 2021120004 A1 WO2021120004 A1 WO 2021120004A1
Authority
WO
WIPO (PCT)
Prior art keywords
vibration signal
vibration
expected
acceleration
basic
Prior art date
Application number
PCT/CN2019/126023
Other languages
English (en)
French (fr)
Inventor
郑亚军
Original Assignee
瑞声声学科技(深圳)有限公司
瑞声科技(新加坡)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 瑞声声学科技(深圳)有限公司, 瑞声科技(新加坡)有限公司 filed Critical 瑞声声学科技(深圳)有限公司
Priority to PCT/CN2019/126023 priority Critical patent/WO2021120004A1/zh
Publication of WO2021120004A1 publication Critical patent/WO2021120004A1/zh

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D19/00Control of mechanical oscillations, e.g. of amplitude, of frequency, of phase
    • G05D19/02Control of mechanical oscillations, e.g. of amplitude, of frequency, of phase characterised by the use of electric means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer

Definitions

  • the present invention relates to the technical field of vibration signals, in particular to a control method, storage medium and electronic equipment of vibration signals.
  • the electronic device needs a low-frequency vibration signal to simulate the actual touch; to simulate being hit by a high-speed bullet, the electronic device needs a high-frequency vibration signal to simulate the actual touch.
  • the factors that determine the user's tactile experience are the duration, frequency, and strength of the vibration signal. In practical applications, it is mainly short-term vibration feedback. Therefore, the strength and frequency of the short-duration vibration signal become the main determining factor.
  • the intensity of the vibration signal with a short duration can be controlled in a larger range, and the intensity has been diversified. However, when the intensity is large enough, the control of the frequency cannot achieve diversity, so it cannot adapt to different application scenarios, and cannot meet the user's rich tactile experience needs.
  • the braking time of each vibration should not be too long.
  • the purpose of the present invention is to provide a vibration signal control method, storage medium and electronic device, aiming to solve the problem that the prior art does not have diversity in frequency control of a short-duration vibration signal.
  • the present invention provides a vibration signal control method, the vibration signal is used to drive a motor system to vibrate, and the vibration signal control method includes:
  • the parameters of the basic vibration signal include acceleration section parameters and braking section parameters, the acceleration section parameters Corresponding to driving the motor system to vibrate acceleration, the brake segment parameter corresponds to driving the motor system to vibrate decelerating;
  • step S3 Determine whether the actual vibration frequency is consistent with the expected vibration frequency. If not, optimize the acceleration section parameters to complete the initial optimization of the basic vibration signal, and repeat step S2 and this step, if If they agree, proceed to the next step;
  • step S5 Determine whether the actual braking time is consistent with the expected braking time, if not, optimize the braking section parameters to complete the secondary optimization of the basic vibration signal, and repeat step S4 and this step, If they are consistent, proceed to the next step;
  • step S2 specifically includes:
  • the acceleration segment parameters include a minimum acceleration segment duration
  • the minimum acceleration segment duration represents a minimum duration of an acceleration segment
  • the acceleration section parameters also include the total number of acceleration sections and the total duration of the acceleration sections.
  • the total number of acceleration sections represents the number of acceleration sections set at intervals, and the total time length of the acceleration sections represents the sum of the durations of all the acceleration sections.
  • Maximum value, step S3 also includes:
  • step S4 includes:
  • the actual braking time is obtained according to the continuous decay time of the second vibration signal.
  • Step S5 includes:
  • the total number of braking segments is increased.
  • the motor system is a virtual model of a motor
  • Step S2 is specifically: calculating the basic vibration signal with the parameters of the virtual model to obtain the actual vibration frequency of the virtual model;
  • Step S4 is specifically: calculating the preliminary optimized vibration signal and the parameters of the virtual model to obtain the actual braking time of the virtual model.
  • the basic vibration signal is a voltage signal.
  • the present invention provides a computer-readable storage medium having a vibration signal control program stored on the computer-readable storage medium, and the vibration signal control program is executed by a processor as described in the first aspect. The steps of the control method of the vibration signal.
  • the present invention provides an electronic device that includes a memory, a processor, and a vibration signal control program that is stored in the memory and can run on the processor.
  • the control program is executed by the processor, the steps of the vibration signal control method as described in the first aspect are realized.
  • the present invention sets the corresponding expected vibration frequency and expected braking time in advance, and then according to the expected vibration frequency Set the basic vibration signal; then optimize the basic vibration signal for the first time, and the frequency corresponding to the optimized basic vibration signal is the expected vibration frequency; then perform the second optimization of the basic vibration signal, and the optimized basic vibration signal corresponds to the The braking time will be less than the expected braking time; finally, the corresponding vibration signal can be obtained according to the optimized basic vibration signal.
  • the present invention can realize the diversity of the frequency of the control vibration signal, that is, realize the full frequency control, enrich the vibration effect, and can achieve the expected braking effect.
  • FIG. 1 is a flowchart of a vibration signal control method provided by Embodiment 1 of the present invention
  • FIG. 2 is a specific processing flow chart of the initial optimization of the basic vibration signal in Embodiment 1 of the present invention
  • FIG. 3 is a specific processing flow chart of the second optimization of the basic vibration signal in Embodiment 1 of the present invention.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by Embodiment 2 of the present invention.
  • the control of the vibration signal with a short duration has achieved diversity in intensity, but when the intensity is large enough, the control of the frequency cannot achieve diversity, so it cannot be adapted to different application scenarios. Meet the user's rich tactile experience needs.
  • the frequency of the short-duration vibration signal is optimized twice to realize the diversity of frequency control, so that the short-duration vibration signal can be adapted to different application scenarios and meet the requirements It meets the rich tactile experience needs of users.
  • the implementation of the present invention can be applied to the following scenarios.
  • the user uses a mobile phone to play a simulated racing game. Since the mobile phone applies the embodiment of the present invention, it is possible to realize the diversity of the intensity and frequency of the vibration signal with a shorter duration and provide a richer vibration effect.
  • the vibration feedback of the car hitting different objects at different speeds can be simulated, that is, it can be adapted to different scenes to provide different vibration effects, so it can meet the user's rich tactile experience needs.
  • the vibration signal is used to drive the motor system to vibrate. Please refer to FIG. 1.
  • the method includes the following steps:
  • Step S1 Set the expected vibration frequency and expected braking time of the motor system in advance, and set a basic vibration signal according to the expected vibration frequency.
  • the parameters of the basic vibration signal include acceleration section parameters and braking section parameters.
  • the parameter corresponds to the vibration acceleration of the driving motor system
  • the brake segment parameter corresponds to the vibration deceleration of the driving motor system.
  • different application scenarios correspond to different expected vibration frequencies and expected braking times.
  • the corresponding expected vibration frequency and expected braking time are preset, and according to the expected vibration frequency Pre-set the acceleration section parameters and deceleration section parameters of the basic vibration signal for subsequent optimization processing.
  • the basic vibration signal is a voltage signal.
  • Step S2 Use the basic vibration signal to drive the motor system, and obtain the actual vibration frequency of the motor system.
  • the motor system may be a virtual model of the motor.
  • the motor system model includes a second-order model derived from the electromechanical equation of the motor (linear motor), or a kernel function model established based on excitation and recovery vibrations, etc. . Therefore, step S2 is specifically: calculating the basic vibration signal with the parameters of the virtual model to obtain the actual vibration frequency of the virtual model.
  • the motor system may also be a real motor system. Step S2 is specifically: connecting the drive circuit of the driving motor system, driving the motor system with a basic vibration signal, and then collecting the actual vibration signal through the collector to obtain the real The actual vibration frequency of the motor system.
  • step S2 specifically includes:
  • the first vibration signal is output, and then the first vibration signal is subjected to fast Fourier transform (fast Fourier transform).
  • fast Fourier transform fast Fourier transform
  • Step S3 Determine whether the actual vibration frequency is consistent with the expected vibration frequency. If not, optimize the acceleration section parameters to complete the initial optimization of the basic vibration signal, and repeat step S2 and this step, If they are consistent, proceed to the next step.
  • the actual vibration frequency of the basic vibration signal is obtained, it is compared numerically with the expected vibration frequency, and the acceleration section parameters are optimized according to the comparison result, so that the basic vibration signal completes the initial optimization.
  • the actual vibration frequency corresponding to the basic vibration signal that has completed the initial optimization is the desired vibration frequency.
  • this embodiment initially optimizes the basic vibration signal, that is, performs directional correction of the acceleration section parameters.
  • the frequency corresponding to the optimized basic vibration signal is In order to expect the vibration frequency, so as to realize the diversity of the control vibration signal frequency, that is, realize the full frequency control and enrich the vibration effect.
  • the acceleration segment parameters include a minimum acceleration segment duration
  • the minimum acceleration segment duration represents a minimum duration of an acceleration segment. For example, if the minimum acceleration section duration is 2ms, the duration of each acceleration section in the vibration signal is greater than or equal to 2ms.
  • the minimum acceleration duration after setting the desired vibration frequency (denoted as fn), set the minimum acceleration duration according to the calculation result of the formula 1/(10*fn).
  • step S3 includes: if the actual vibration frequency is greater than the expected vibration frequency, increasing the duration of the minimum acceleration period; if the actual vibration frequency is less than the expected vibration frequency, decreasing the minimum acceleration A period of time.
  • the initial optimization of the basic vibration signal is a cyclic optimization process with exit conditions.
  • the cyclic exit condition is that the actual vibration frequency corresponding to the current basic vibration signal is equal to the expected vibration frequency.
  • the specific cycle processing process is: first obtain the actual vibration frequency of the current basic vibration signal, then compare the actual vibration frequency with the expected vibration frequency numerically, and decide to exit the cycle or perform specific optimization processing according to the comparison result. Specifically, if the comparison result is that the actual vibration frequency is equal to the expected vibration frequency, exit the loop and complete the initial optimization of the basic vibration signal; otherwise, enter the specific optimization process, specifically: if the actual vibration frequency is greater than the expected vibration frequency, Then increase the duration of the minimum acceleration section, and the specific step length can be set reasonably; if the actual vibration frequency is less than the expected vibration frequency, reduce the duration of the minimum acceleration section, and the specific step size can also be set reasonably.
  • start the first cycle get the actual vibration frequency corresponding to the basic vibration signal at this time (denoted as f1), at this time f1 is greater than the expected vibration frequency (denoted as fn), assuming that the set increase step is 0.1ms , Add 0.1ms to the minimum acceleration period at this time, and enter the second cycle;
  • the acceleration section parameters also include the total number of acceleration sections and the total duration of the acceleration sections.
  • the total number of acceleration sections represents the number of acceleration sections set at intervals, and the total time length of the acceleration sections represents the sum of the durations of all the acceleration sections. Maximum value. For example, if the total number of acceleration sections is 3, the vibration signal has three alternating positive and negative acceleration voltages; for example, if the total duration of the acceleration section is 7ms, the total duration of all acceleration sections in the vibration signal is 7ms.
  • step S3 also includes:
  • step S3 if the current actual vibration frequency is greater than the expected vibration frequency, in addition to increasing the minimum acceleration period duration, the total number of acceleration segments can also be reduced, and/or the total number of acceleration segments can be increased. Time length, to assist optimization and speed up the efficiency of optimization.
  • the specific decrease step length of the total number of acceleration sections can be set reasonably, and the specific increase step length of the total time length of the acceleration section can also be set reasonably.
  • the total number of acceleration segments can also be increased, and/or, the total duration of acceleration segments can be reduced to assist in optimization and speed up Optimized efficiency.
  • the specific increase step length of the total number of acceleration sections can be set reasonably, and the specific decrease step length of the total time length of the acceleration section can also be set reasonably.
  • Step S4 Use the current basic vibration signal to drive the motor system, and obtain the actual braking time of the motor system.
  • step S4 is specifically: calculating the basic vibration signal that has been optimized for the first time with the parameters of the virtual model to obtain the actual braking time of the virtual model.
  • step S4 specifically includes:
  • the second vibration signal is output; then the continuous decay time of the second vibration signal is obtained to obtain the current braking time.
  • the time corresponding to the maximum value of the second vibration signal (that is, the value with the largest absolute value) is recorded as the first time.
  • the second vibration signal begins to decay, and the last designated minimum value (that is, designated The time corresponding to the smallest absolute value of) is the second time, so the actual braking time can be obtained by subtracting the first time from the second time.
  • the maximum value in X is Xmax at the first moment
  • the minimum value specified in X is Xmin at the second moment
  • Step S5 Determine whether the actual braking time is less than the expected braking time. If it is greater than or equal to, optimize the braking section parameters to complete the secondary optimization of the basic vibration signal, and repeat step S4 and this Step, if less than, proceed to the next step.
  • this embodiment uses the second optimization of the basic vibration signal, that is, the directional correction of the braking section parameters, so that the optimized basic vibration signal corresponds to The braking time will be less than the expected braking time, and the expected braking effect can be achieved.
  • the brake segment parameters include a total number of brake segments, and the total number of brake segments represents the number of brake segments set at intervals. For example, if the total number of brake segments is 3, the vibration signal has 3 segments of alternating positive and negative brake voltages.
  • the setting of the total number of braking segments is consistent with the setting of the total number of acceleration segments.
  • step S5 includes: if the actual braking time is greater than or equal to the expected braking time, increasing the total number of braking segments.
  • the secondary optimization of the basic vibration signal is a loop optimization process with exit conditions.
  • the loop exit condition is that the current basic vibration signal corresponds to the actual braking time less than the expected braking time.
  • the specific cycle processing process is: first obtain the actual braking time of the current basic vibration signal, then compare the actual braking time with the expected braking time numerically, and decide to exit the cycle or perform specific optimization processing according to the comparison result. Specifically, if the comparison result is that the actual braking time is less than the expected braking time, then exit the loop and complete the secondary optimization of the basic vibration signal; otherwise, enter the specific optimization process, specifically increasing the total braking section in the braking section parameters
  • the specific increase step length can be set reasonably.
  • start the first cycle Obtain the actual braking time of the basic vibration signal at this time (denoted as t1). At this time, t1 is greater than the expected braking time (denoted as t0). Assuming that the set increase step is 1, then The total number of brake segments at this time is added by 1, and the second cycle is entered;
  • Step S6 Output the current basic vibration signal.
  • outputting the current basic vibration signal is the optimized basic vibration signal.
  • the basic vibration signal can be input to the virtual system of the motor system for calculation, and the corresponding vibration signal is output, which contains the expected vibration. Frequency and expected braking time; or the basic vibration signal is amplified by the signal amplifier to excite the real motor system, and the corresponding vibration signal is collected through the collector.
  • the vibration signal also contains the expected vibration frequency and the expected braking time.
  • this embodiment presets the corresponding expected vibration frequencies and expected braking times, and then Set the basic vibration signal according to the desired vibration frequency; then optimize the basic vibration signal for the first time, and the frequency corresponding to the optimized basic vibration signal is the expected vibration frequency; then perform the second optimization of the basic vibration signal to optimize the basic vibration
  • the braking time corresponding to the signal will be less than the expected braking time; finally, the corresponding vibration signal can be obtained according to the optimized basic vibration signal.
  • this embodiment can realize the diversification of the frequency of the vibration signal, that is, the full frequency control is realized, the vibration effect is enriched, and the expected braking effect can be achieved.
  • the embodiment of the present invention also provides a computer storage medium and electronic equipment corresponding to the above vibration signal control method. Because the computer storage medium and electronic equipment in the embodiment of the present invention solve the problem with the principle of the present invention
  • the vibration signal control method described in Embodiment 1 is similar, so its specific implementation can refer to the implementation of the aforementioned vibration signal control method, and the repetition will not be repeated.
  • the computer-readable storage medium provided by this embodiment has a vibration signal control program stored on the computer-readable storage medium, and when the vibration signal control program is run by a processor, the vibration signal control described in the first embodiment is executed Method steps.
  • Method steps For specific implementation, please refer to method embodiment 1, which will not be repeated here.
  • this embodiment also provides an electronic device that includes a processor 21, a memory 22, and a vibration signal control program 23.
  • FIG. 4 only shows some components of the electronic device. .
  • the memory 22 may be an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. In some other embodiments, the memory 22 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital) equipped on the electronic device. Digital, SD) card, flash card (Flash Card), etc. Further, the memory 22 may also include both an internal storage unit of the electronic device and an external storage device. The memory 22 is used to store application software and various data installed in the electronic device, such as the program code of the installed electronic device. The memory 22 can also be used to temporarily store data that has been output or will be output. In an embodiment, a vibration signal control program 23 is stored in the memory 22, and the program 23 can be executed by the processor 21.
  • a vibration signal control program 23 is stored in the memory 22, and the program 23 can be executed by the processor 21.
  • the processor 21 may be a central processing unit (Central Processing Unit) in some embodiments.
  • Central Processing Unit CPU
  • CPU central processing unit
  • microprocessor microprocessor or other data processing chip, used to run the program code or processing data stored in the memory 22.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

振动信号的控制方法、存储介质及电子设备,对于不同应用场景的各种期望振动频率和期望刹车时间,通过预先设置相对应的期望振动频率和期望刹车时间,进而根据期望振动频率设置基础振动信号;接着将基础振动信号进行初次优化,优化后的基础振动信号所对应的频率即为该期望振动频率;接着将基础振动信号进行二次优化,优化后的基础振动信号所对应的刹车时间将小于期望刹车时间;最后根据已完成优化的基础振动信号即可得到相对应的振动信号。相较于现有技术,可以实现控制振动信号频率的多样性,即实现了全频率控制,丰富了振动效果,且能达到预期的刹车效果。

Description

振动信号的控制方法、存储介质及电子设备 技术领域
本发明涉及振动信号技术领域,尤其涉及振动信号的控制方法、存储介质及电子设备。
背景技术
如今电子设备中加入了丰富且逼真的振动反馈,给用户带来了一定的触觉体验。例如,模拟被柔软的皮球击打,电子设备需要一种低频的振动信号用来模拟实际触觉;模拟被高速的子弹击中,电子设备需要一种高频的振动信号来模拟实际触觉。
决定用户的触觉体验感的因素为振动信号的时长、频率和强度,在实际应用中主要为短暂的振动反馈,因此时长较短的振动信号的强度与频率成为主要的决定因素。目前对于时长较短的振动信号,强度已经能够在较大范围内进行控制,强度已经实现了多样性。但是在强度足够大的情况下,对于频率的控制还不能实现多样性,因此无法适配不同的应用场景,无法满足用户丰富的触觉体验感需求。另外,为了及时进行高密度的振感切换,提升触觉体验,每一振感的刹车时间也不宜过长。
技术问题
鉴于上述现有技术的不足,本发明的目的在于提供振动信号的控制方法、存储介质及电子设备,旨在解决现有技术对于时长较短的振动信号的频率控制不具备多样性的问题。
技术解决方案
第一方面,本发明提供了一种振动信号的控制方法,所述振动信号用于驱动马达***振动,所述振动信号的控制方法包括:
S1:预先设置所述马达***的期望振动频率和期望刹车时间,并根据所述期望振动频率设置基础振动信号,所述基础振动信号的参数包括加速段参数和刹车段参数,所述加速段参数对应于驱动所述马达***振动加速,所述刹车段参数对应于驱动所述马达***振动减速;
S2:用所述基础振动信号驱动所述马达***,并获取所述马达***的实际振动频率;
S3:判断所述实际振动频率与所述期望振动频率是否一致,若不一致,则对所述加速段参数优化,以完成对所述基础振动信号的初次优化,并重复步骤S2和本步骤,若一致则进行下一步骤;
S4:用当前的基础振动信号驱动所述马达***,并获取所述马达***的实际刹车时间;
S5:判断所述实际刹车时间与所述期望刹车时间是否一致,若不一致,则对所述刹车段参数优化,以完成对所述基础振动信号的二次优化,并重复步骤S4和本步骤,若一致,则进行下一步骤;
S6:输出当前的基础振动信号。
进一步地,步骤S2具体包括:
将所述基础振动信号输入至马达***,以使所述马达***输出对应于所述基础振动信号的第一振动信号;
将所述第一振动信号进行快速傅里叶变换计算,得到所述实际振动频率。
进一步地,所述加速段参数包括最小加速段时长,所述最小加速段时长表示一段加速段的时长最小值,步骤S3包括:
若所述实际振动频率大于所述期望振动频率,则增大所述最小加速段时长;若所述实际振动频率小于所述期望振动频率,则减小所述最小加速段时长。
再进一步地,所述加速段参数还包括加速段总数量和加速段总时长,所述加速段总数量表示间隔设置的加速段的个数,所述加速段总时长表示所有加速段的时长总和最大值,步骤S3还包括:
若所述实际振动频率大于所述期望振动频率,则减小加速段总数量;和/或,增大加速段总时长;
若所述实际振动频率小于所述期望振动频率,则增大加速段总数量;和/或,减小加速段总时长。
进一步地,步骤S4包括:
将所述已完成初次优化的基础振动信号输入至马达***,以使所述马达***输出对应于所述已初次优化的基础振动信号的第二振动信号;
根据所述第二振动信号的持续衰减时间获取所述实际刹车时间。
进一步地,所述刹车段参数包括刹车段总数量,所述刹车段总数量表示间隔设置的刹车段的个数,步骤S5包括:
若所述实际刹车时间大于所述期望刹车时间,则增大所述刹车段总数量。
进一步地,所述马达***为马达的虚拟模型;
步骤S2具体为:将所述基础振动信号与所述虚拟模型的参数运算,获取所述虚拟模型的实际振动频率;
步骤S4具体为:将所述初步优化振动信号与所述虚拟模型的参数运算,获取所述虚拟模型的实际刹车时间。
进一步地,所述基础振动信号为电压信号。
第二方面,本发明提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有振动信号的控制程序,所述振动信号的控制程序被处理器运行时执行如第一方面所述的振动信号的控制方法的步骤。
第三方面,本发明提供了一种电子设备,所述电子设备包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的振动信号的控制程序,所述振动信号的控制程序被所述处理器执行时实现如第一方面所述的振动信号的控制方法的步骤。
有益效果
有益效果:本发明提供的振动信号的控制方法中,对于不同应用场景的各种期望振动频率和期望刹车时间,本发明通过预先设置相对应的期望振动频率和期望刹车时间,进而根据期望振动频率设置基础振动信号;接着将基础振动信号进行初次优化,优化后的基础振动信号所对应的频率即为该期望振动频率;接着将基础振动信号进行二次优化,优化后的基础振动信号所对应的刹车时间将小于期望刹车时间;最后根据已完成优化的基础振动信号即可得到相对应的振动信号。相较于现有技术,本发明可以实现控制振动信号频率的多样性,即实现了全频率控制,丰富了振动效果,且能达到预期的刹车效果。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例1所提供的振动信号的控制方法的流程图;
图2为本发明实施例1中对基础振动信号进行初次优化的具体处理流程图;
图3为本发明实施例1中对基础振动信号进行二次优化的具体处理流程图;
图4为本发明实施例2所提供的电子设备的结构示意图。
本发明的实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
现有技术中对于时长较短的振动信号的控制,强度已经实现了多样性,但是在强度足够大的情况下,对于频率的控制还不能实现多样性,因此无法适配不同的应用场景,无法满足用户丰富的触觉体验感需求。
为了解决上述问题,在本发明实施例中,对时长较短的振动信号的频率进行两次优化,实现对频率控制的多样性,使得时长较短的振动信号能够适配不同的应用场景,满足了用户丰富的触觉体验感需求。
举例说明,本发明实施可以应用到如下所述的场景。在该场景中,用户使用手机玩模拟赛车游戏,由于该手机应用了本发明实施例,因此可以实现对时长较短的振动信号的强度与频率的多样性,可以提供更为丰富的振动效果。如此在游戏进行时,可以模拟出赛车在不同的速度下撞击到不同物体的振动反馈,即可以适配不同的场景提供不同的振动效果,因此能满足用户丰富的触觉体验感需求。
需要注意的是,上述应用场景仅是为了便于理解本发明而示出,本发明的实施方式在此方面不受任何限制。相反,本发明的实施方式可以应用于适用的任何场景。
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请做进一步详细的说明。
实施例1
本实施例提供的振动信号的控制方法,所述振动信号用于驱动马达***振动,请参阅图1,所述方法包括以下步骤:
步骤S1、预先设置所述马达***的期望振动频率和期望刹车时间,并根据所述期望振动频率设置基础振动信号,所述基础振动信号的参数包括加速段参数和刹车段参数,所述加速段参数对应于驱动所述马达***振动加速,所述刹车段参数对应于驱动所述马达***振动减速。
具体来说,不同的应用场景对应不同的期望振动频率和期望刹车时间,本实施例根据不同应用场景的实际设计需求,预先设置相对应的期望振动频率和期望刹车时间,并且根据该期望振动频率预先设置基础振动信号的加速段参数和减速段参数,以用于后续的优化处理。其中基础振动信号为电压信号。
步骤S2、用所述基础振动信号驱动所述马达***,并获取所述马达***的实际振动频率。
其中,所述马达***可以为马达的虚拟模型,具体来说,马达***模型包括根据马达(线性电机)的机电方程推导得到的二阶模型,或根据激励与回采振动量建立的核函数模型等。因此,步骤S2具体为:将所述基础振动信号与所述虚拟模型的参数运算,获取所述虚拟模型的实际振动频率。另外,所述马达***也可以为真实的马达***,步骤S2具体为:连接完成驱动马达***的驱动回路,用基础振动信号驱动马达***,再通过采集器采集实际的振动信号,获取该真实的马达***的实际振动频率。
进一步地,上述步骤S2具体包括:
S21、将所述基础振动信号输入至马达***,以使所述马达***输出对应于所述基础振动信号的第一振动信号;
S22、将所述第一振动信号进行快速傅里叶变换计算,得到所述实际振动频率。
具体来说,将基础振动信号输入至马达***模型中进行计算后,输出第一振动信号,接着将第一振动信号进行快速傅里叶变换(fast Fourier transform,简称FFT)计算,即可得到实际振动频率。
步骤S3、判断所述实际振动频率与所述期望振动频率是否一致,若不一致,则对所述加速段参数优化,以完成对所述基础振动信号的初次优化,并重复步骤S2和本步骤,若一致则进行下一步骤。
具体来说,获取到基础振动信号的实际振动频率后,将其与期望振动频率进行数值比对,并根据比对结果对加速段参数进行优化,使得基础振动信号完成初次优化。如此,已完成初次优化的基础振动信号所对应的实际振动频率即为期望振动频率。可以看出,对于不同应用场景的任意期望振动频率,本实施例通过对基础振动信号进行初次优化,即进行有方向性的修正加速段参数,如此,优化后的基础振动信号所对应的频率即为期望振动频率,从而实现控制振动信号频率的多样性,即实现了全频率控制,丰富了振动效果。
进一步地,所述加速段参数包括最小加速段时长,所述最小加速段时长表示一段加速段的时长最小值。比如最小加速段时长为2ms,则振动信号中每一段加速段的时长均大于或等于2ms。另外,在设置好期望振动频率(记为fn)之后,根据公式1/(10*fn)的计算结果设置最小加速段时长。
进一步地,步骤S3包括:若所述实际振动频率大于所述期望振动频率,则增大所述最小加速段时长;若所述实际振动频率小于所述期望振动频率,则减小所述最小加速段时长。
具体来说,请参阅图2,对基础振动信号的初次优化是一个有退出条件的循环优化过程,循环退出条件为当前基础振动信号所对应的实际振动频率等于期望振动频率。
具体循环的处理过程为:先获取当前基础振动信号的实际振动频率,再将该实际振动频率与期望振动频率进行数值比对,并根据比对结果决定退出循环或者进行具体的优化处理。具体地,若比对结果为该实际振动频率等于期望振动频率,则退出循环,完成对基础振动信号的初次优化;否则进入具体的优化处理,具体为:若该实际振动频率大于期望振动频率,则增大最小加速段时长,具体增大步长可合理设置;若该实际振动频率小于期望振动频率,则减小最小加速段时长,具体减小步长也可合理设置。
举例说明,开始第1次循环:获取此时基础振动信号所对应的实际振动频率(记为f1),此时f1大于期望振动频率(记为fn),假设设置的增大步长为0.1ms,则将此时的最小加速段时长加上0.1ms,进入第2次循环;
开始第2次循环:获取此时基础振动信号所对应的实际振动频率(记为f2),此时f2大于fn,则将此时的最小加速段时长加上0.1ms,进入第Y次循环;
开始第Y(Y为大于2的自然数)次循环:获取此时基础振动信号所对应的实际振动频率(记为fy),此时fy等于fn,则退出循环,已完成对基础振动信号的初次优化。
再进一步地,所述加速段参数还包括加速段总数量和加速段总时长,所述加速段总数量表示间隔设置的加速段的个数,所述加速段总时长表示所有加速段的时长总和最大值。比如加速段总数量为3,则振动信号有3段正负交替的加速电压;再比如加速段总时长为7ms,则振动信号中所有加速段的总时长为7ms。另外,在设置好期望振动频率(记为fn)之后,根据设计需求总时长的一半设置加速段总时长(记为T1),再根据公式2*T1*fn的计算结果设置加速段总数量。
再进一步地,步骤S3还包括:
若所述实际振动频率大于所述期望振动频率,则减小加速段总数量;和/或,增大加速段总时长;
若所述实际振动频率小于所述期望振动频率,则增大加速段总数量;和/或,减小加速段总时长。
具体来说,在步骤S3的优化处理中,若当前实际振动频率大于期望振动频率,除了增大最小加速段时长之外,还可以减小加速段总数量,和/或,增大加速段总时长,以此进行辅助优化,加快优化的效率。其中,加速段总数量的具体减小步长可合理设置,加速段总时长的具体增大步长也可合理设置。
类似的,若当前实际振动频率小于期望振动频率,除了减小最小加速段时长之外,还可以增大加速段总数量,和/或,减小加速段总时长,以此进行辅助优化,加快优化的效率。其中,加速段总数量的具体增大步长可合理设置,加速段总时长的具体减小步长也可合理设置。
步骤S4、用当前的基础振动信号驱动所述马达***,并获取所述马达***的实际刹车时间。
其中,所述马达***为马达的虚拟模型,与步骤S2所述一致。因此,步骤S4具体为:将已完成初次优化的基础振动信号与所述虚拟模型的参数运算,获取所述虚拟模型的实际刹车时间。
进一步地,步骤S4具体包括:
S41、将已完成初次优化的基础振动信号输入至马达***,以使所述马达***输出对应于所述已完成初次优化的基础振动信号的第二振动信号;
S42、根据所述第二振动信号的持续衰减时间获取所述实际刹车时间。
具体来说,将已完成初次优化的基础振动信号输入至马达***中进行计算后,输出第二振动信号;接着获得第二振动信号的持续衰减时间即可获得当前刹车时间。具体地,记第二振动信号的最大数值(即绝对值最大的数值)对应的时刻为第一时刻,在第一时刻之后,第二振动信号开始衰减,记其中最后一个指定最小值(即指定的绝对值最小的数值)对应的时刻为第二时刻,如此将第二时刻减去第一时刻,即可得到实际刹车时间。
举例说明,第二振动信号(记为X),X中的最大数值为第一时刻的Xmax,X中指定最小值(比如0.1*Xmax)为第二时刻的Xmin,如此实际刹车时间等于第二时刻减去第一时刻。
步骤S5、判断所述实际刹车时间是否小于所述期望刹车时间,若大于或等于,则对所述刹车段参数优化,以完成对所述基础振动信号的二次优化,并重复步骤S4和本步骤,若小于,则进行下一步骤。
具体来说,在对基础振动信号完成初次优化后,还需对减速段参数继续进行优化,以使基础振动信号能达到预期的刹车效果,即能尽快停止振动。可以看出,对于不同应用场景的各种期望刹车时间,本实施例通过对基础振动信号进行二次优化,即进行有方向性的修正刹车段参数,如此,优化后的基础振动信号所对应的刹车时间将小于期望刹车时间,能达到预期的刹车效果。
进一步地,所述刹车段参数包括刹车段总数量,所述刹车段总数量表示间隔设置的刹车段的个数。比如刹车段总数量为3,则振动信号有3段正负交替的刹车电压。另外,刹车段总数量的设置与加速段总数量的设置一致。
进一步地,步骤S5包括:若所述实际刹车时间大于或等于所述期望刹车时间,则增大所述刹车段总数量。
具体来说,请参阅图3,对基础振动信号的二次优化是一个有退出条件的循环优化过程,循环退出条件为当前基础振动信号所对应的是实际刹车时间小于期望刹车时间。
具体循环的处理过程为:先获取当前基础振动信号的实际刹车时间,再将该实际刹车时间与期望刹车时间进行数值比对,并根据比对结果决定退出循环或者进行具体的优化处理。具体地,若比对结果为该实际刹车时间小于期望刹车时间,则退出循环,完成对基础振动信号的二次优化;否则进入具体的优化处理,具体为增大刹车段参数中的刹车段总数量,具体增大步长可合理设置。
举例说明,开始第1次循环:获取此时基础振动信号的实际刹车时间(记为t1),此时t1大于期望刹车时间(记为t0),假设设置的增大步长为1,则将此时的刹车段总数量加上1,进入第2次循环;
开始第2次循环:获取此时基础振动信号的实际刹车时间(记为t2),此时t2大于t0,则将此时的刹车段总数量加上1,进入第Z次循环;
开始第Z(Z为大于2的自然数)次循环:获取此时基础振动信号的实际刹车时间(记为tz),此时tz小于t0,则退出循环,已完成对基础振动信号的二次优化。
步骤S6、输出当前的基础振动信号。
具体来说,输出当前的基础振动信号即已经完成优化的基础振动信号,可以将该基础振动信号输入至马达***的虚拟***进行计算,输出相对应的振动信号,该振动信号即包含了期望振动频率和期望刹车时间;或者将该基础振动信号经过信号放大器放大之后激励真实的马达***,通过采集器采集相对应的振动信号,该振动信号也包含了期望振动频率和期望刹车时间。
综上所述,本实施例提供的振动信号的控制方法中,对于不同应用场景的各种期望振动频率和期望刹车时间,本实施例通过预先设置相对应的期望振动频率和期望刹车时间,进而根据期望振动频率设置基础振动信号;接着将基础振动信号进行初次优化,优化后的基础振动信号所对应的频率即为该期望振动频率;接着将基础振动信号进行二次优化,优化后的基础振动信号所对应的刹车时间将小于期望刹车时间;最后根据已完成优化的基础振动信号即可得到相对应的振动信号。相较于现有技术,本实施例可以实现控制振动信号频率的多样性,即实现了全频率控制,丰富了振动效果,且能达到预期的刹车效果。
基于同一发明构思,本发明实施例中还提供了与上述振动信号的控制方法相对应的计算机存储介质和电子设备,由于本发明实施例中的计算机存储介质和电子设备解决问题的原理与本发明实施例1所述的振动信号的控制方法相似,因此其具体实施可以参见前述振动信号的控制方法的实施,重复之处不再赘述。
实施例2
本实施例提供的计算机可读存储介质,所述计算机可读存储介质上存储有振动信号的控制程序,所述振动信号的控制程序被处理器运行时执行上述实施例1描述的振动信号的控制方法的步骤。具体实现可参见方法实施例1,在此不再赘述。
此外,请参阅图4,本实施例还提供了一种电子设备,所述电子设备包括处理器21、存储器22及振动信号的控制程序23,图4仅示出了所述电子设备的部分组件。
所述存储器22在一些实施例中可以是所述电子设备的内部存储单元,例如电子设备的硬盘或内存。所述存储器22在另一些实施例中也可以是所述电子设备的外部存储设备,例如所述电子设备上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器22还可以既包括所述电子设备的内部存储单元也包括外部存储设备。所述存储器22用于存储安装于所述电子设备的应用软件及各类数据,例如所述安装电子设备的程序代码等。所述存储器22还可以用于暂时地存储已经输出或者将要输出的数据。在一实施例中,存储器22上存储有振动信号的控制程序23,该程序23可被处理器21所执行。
所述处理器21在一些实施例中可以是一中央处理器(Central Processing Unit, CPU),微处理器或其他数据处理芯片,用于运行所述存储器22中存储的程序代码或处理数据。
在本实施例中,当处理器21执行所述存储器22中存储的振动信号的控制程序23时执行上述实施例1描述的振动信号的控制方法的步骤。具体实现可参见方法实施例1,在此不再赘述。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims (10)

  1. 振动信号的控制方法,所述振动信号用于驱动马达***振动,其特征在于,所述振动信号的控制方法包括:
    S1:预先设置所述马达***的期望振动频率和期望刹车时间,并根据所述期望振动频率设置基础振动信号,所述基础振动信号的参数包括加速段参数和刹车段参数,所述加速段参数对应于驱动所述马达***振动加速,所述刹车段参数对应于驱动所述马达***振动减速;
    S2:用所述基础振动信号驱动所述马达***,并获取所述马达***的实际振动频率;
    S3:判断所述实际振动频率与所述期望振动频率是否一致,
    若不一致,则对所述加速段参数优化,以完成对所述基础振动信号的初次优化,并重复步骤S2和本步骤,
    若一致则进行下一步骤;
    S4:用当前的基础振动信号驱动所述马达***,并获取所述马达***的实际刹车时间;
    S5:判断所述实际刹车时间是否小于所述期望刹车时间,
    若大于或等于,则对所述刹车段参数优化,以完成对所述基础振动信号的二次优化,并重复步骤S4和本步骤,
    若小于,则进行下一步骤;
    S6:输出当前的基础振动信号。
  2. 根据权利要求1所述的振动信号的控制方法,其特征在于,步骤S2具体包括:
    将所述基础振动信号输入至马达***,以使所述马达***输出对应于所述基础振动信号的第一振动信号;
    将所述第一振动信号进行快速傅里叶变换计算,得到所述实际振动频率。
  3. 根据权利要求1所述的振动信号的控制方法,其特征在于,所述加速段参数包括最小加速段时长,所述最小加速段时长表示一段加速段的时长最小值,步骤S3包括:
    若所述实际振动频率大于所述期望振动频率,则增大所述最小加速段时长;若所述实际振动频率小于所述期望振动频率,则减小所述最小加速段时长。
  4. 根据权利要求3所述的振动信号的控制方法,其特征在于,所述加速段参数还包括加速段总数量和加速段总时长,所述加速段总数量表示间隔设置的加速段的个数,所述加速段总时长表示所有加速段的时长总和最大值,步骤S3还包括:
    若所述实际振动频率大于所述期望振动频率,则减小加速段总数量;和/或,增大加速段总时长;
    若所述实际振动频率小于所述期望振动频率,则增大加速段总数量;和/或,减小加速段总时长。
  5. 根据权利要求1所述的振动信号的控制方法,其特征在于,步骤S4包括:
    将已完成初次优化的基础振动信号输入至马达***,以使所述马达***输出对应于所述已完成初次优化的基础振动信号的第二振动信号;
    根据所述第二振动信号的持续衰减时间获取所述实际刹车时间。
  6. 根据权利要求1所述的振动信号的控制方法,其特征在于,所述刹车段参数包括刹车段总数量,所述刹车段总数量表示间隔设置的刹车段的个数,步骤S5包括:
    若所述实际刹车时间大于或等于所述期望刹车时间,则增大所述刹车段总数量。
  7. 根据权利要求1所述的振动信号的控制方法,其特征在于,所述马达***为马达的虚拟模型,
    步骤S2具体为:将所述基础振动信号与所述虚拟模型的参数运算,获取所述虚拟模型的实际振动频率,
    步骤S4具体为:将已完成初次优化的基础振动信号与所述虚拟模型的参数运算,获取所述虚拟模型的实际刹车时间。
  8. 根据权利要求1所述的振动信号的控制方法,其特征在于,所述基础振动信号为电压信号。
  9. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有振动信号的控制程序,所述振动信号的控制程序被处理器运行时执行如权利要求1-8任一项所述的振动信号的控制方法的步骤。
  10. 一种电子设备,其特征在于,所述电子设备包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的振动信号的控制程序,所述振动信号的控制程序被所述处理器执行时实现如权利要求1-8任一项所述的振动信号的控制方法的步骤。
PCT/CN2019/126023 2019-12-17 2019-12-17 振动信号的控制方法、存储介质及电子设备 WO2021120004A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/126023 WO2021120004A1 (zh) 2019-12-17 2019-12-17 振动信号的控制方法、存储介质及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/126023 WO2021120004A1 (zh) 2019-12-17 2019-12-17 振动信号的控制方法、存储介质及电子设备

Publications (1)

Publication Number Publication Date
WO2021120004A1 true WO2021120004A1 (zh) 2021-06-24

Family

ID=76476968

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/126023 WO2021120004A1 (zh) 2019-12-17 2019-12-17 振动信号的控制方法、存储介质及电子设备

Country Status (1)

Country Link
WO (1) WO2021120004A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1376243A (zh) * 1999-09-22 2002-10-23 奥林巴斯光学工业株式会社 载物台装置
US20060015045A1 (en) * 2002-11-08 2006-01-19 Zets Gary A Method and apparatus for generating a vibrational stimulus
CN105204542A (zh) * 2015-09-11 2015-12-30 小米科技有限责任公司 马达的振动控制方法及装置
CN107977077A (zh) * 2017-11-20 2018-05-01 珠海市魅族科技有限公司 振动控制方法、终端、计算机设备及可读存储介质
CN110297538A (zh) * 2012-10-31 2019-10-01 意美森公司 用于模拟具有触觉效果的用户界面上的表面特征的方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1376243A (zh) * 1999-09-22 2002-10-23 奥林巴斯光学工业株式会社 载物台装置
US20060015045A1 (en) * 2002-11-08 2006-01-19 Zets Gary A Method and apparatus for generating a vibrational stimulus
CN110297538A (zh) * 2012-10-31 2019-10-01 意美森公司 用于模拟具有触觉效果的用户界面上的表面特征的方法和装置
CN105204542A (zh) * 2015-09-11 2015-12-30 小米科技有限责任公司 马达的振动控制方法及装置
CN107977077A (zh) * 2017-11-20 2018-05-01 珠海市魅族科技有限公司 振动控制方法、终端、计算机设备及可读存储介质

Similar Documents

Publication Publication Date Title
US10613635B2 (en) Method and apparatus for generating motor brake signal
CN108845673B (zh) 使用映射的声音-触觉效应转换***
CN103714836A (zh) 一种播放音频信息的方法及电子设备
CN110334801A (zh) 一种卷积神经网络的硬件加速方法、装置、设备及***
WO2020125533A1 (zh) 一种线性谐振装置及其刹车方法
US11238709B2 (en) Non linear predictive model for haptic waveform generation
JP6562695B2 (ja) 触覚効果の動的変更
JP2021192535A5 (zh)
US11579697B2 (en) Haptic effect encoding and rendering system
CN111603776B (zh) 音频数据中枪声的识别方法、马达的驱动方法及相关装置
CN104506114A (zh) 一种移动终端中的马达控制方法及装置
WO2021208121A1 (zh) 振动***快速停止的方法、装置、计算机设备及存储介质
CN109687769B (zh) 一种lra马达的刹车方法及装置
CN110827789A (zh) 音乐生成方法、电子装置及计算机可读存储介质
WO2021120004A1 (zh) 振动信号的控制方法、存储介质及电子设备
JP6471825B1 (ja) 情報処理装置および情報処理方法
CN111552369B (zh) 振动信号的控制方法、存储介质及电子设备
US11392204B2 (en) Haptics adaptive duty cycle
CN114327040A (zh) 振动信号生成方法、装置、电子设备及存储介质
CN103473415A (zh) 风力发电机组的噪声仿真方法
CN106527700A (zh) 一种声音振动反馈方法和***及一种虚拟现实头盔
CN112486034B (zh) 验证轨迹规划的方法、电子设备及存储介质
CN110837396A (zh) 语音唤醒的方法、装置及计算机存储介质
TW201406124A (zh) 具有提示當前運行程式功能的電子裝置及提示方法
CN108170181A (zh) 控制方法、控制装置以及电子烟

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19956548

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19956548

Country of ref document: EP

Kind code of ref document: A1