Vibration signal modulation method and system based on particle swarm optimization, and related device
Through the vibration signal modulation method based on particle swarm optimization, the particle swarm algorithm is used to conduct iterative searches within the parameter range of the brake segment, which solves the problems of poor vibration signal modulation effect and low efficiency in the prior art, and achieves efficient signal modulation.
Patent Information
- Application Number
- PCT/CN2023/100584
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2024-12-19
AI Technical Summary
The existing vibration signal modulation methods cannot establish an adaptive mechanism model based on the application object, resulting in poor effect of the final modulated vibration signal and low efficiency of the modulation process.
Using the vibration signal modulation method based on particle swarm optimization, by setting the signal acceleration section and brake section parameters, the particle swarm algorithm is used to iteratively search within the brake section parameter range to obtain the optimal brake parameters and superimpose them with the signal acceleration section parameters. , generate the final vibration signal adapted to the application object.
The output vibration signal is optimized and adjusted according to the application object, which improves the signal modulation effect and efficiency, and can quickly obtain the vibration signal adapted to the current application object.
Smart Images

Figure CN2023100584_19122024_PF_FP_ABST
Abstract
Description
Vibration signal modulation method, system and related equipment based on particle swarm optimization
Technical field
[0001] The present invention relates to the technical field of signal modulation, and in particular to a vibration signal modulation method based on particle swarm optimization. [Background Technology]
[0002] As the application scenarios of vibration devices are increasing, applications of vibration devices can be seen not only in mobile phones and handles, but also on car steering wheels and screens.
[0003] In the application scenarios of vibration devices, different application objects have different structures. In order to make the vibration devices perfectly adapt to different structures, it is necessary to establish corresponding mechanism models according to different application objects to express vibration transmission. This is a challenge for the method and efficiency of designing vibration signals.
[0004] However, the vibration signal modulation method of the related technology is limited by the modulation process and the limitations of the application equipment. It is impossible to establish an adaptive mechanism model according to the application object during the signal modulation stage, resulting in poor effect of the final modulated vibration signal and low efficiency of the modulation process.
[0005] Therefore, it is necessary to provide a new vibration signal modulation method to solve the above problems.
[0006] [Summary of the invention]
[0007] The technical problem to be solved by the present invention is to provide a modulation method, system and related equipment that can optimize and adjust the output vibration signal according to the application object.
[0008] To solve the above technical problems, in a first aspect, the present invention provides a vibration signal modulation method based on particle swarm optimization, the vibration signal modulation method comprising the following steps:
[0009] Set the signal acceleration segment parameters according to the expected vibration signal of the application object;
[0010] Setting corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, constructing initial particle parameters for the braking segment of the particle swarm optimization algorithm based on the signal braking segment parameter range, and performing an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain the optimal braking parameters;
[0011] The signal corresponding to the optimal braking parameter is superimposed with the signal corresponding to the signal acceleration segment parameter to obtain a final vibration signal for the application object.
[0012] Preferably, the particle swarm parameters include: maximum iteration number, preset iteration termination condition, population size, number of variables, and update constant;
[0013] The default configuration parameters for the particle swarm algorithm include: signal sampling rate, driver resonant frequency, oscillator maximum displacement and driver parameters;
[0014] The signal acceleration section parameters include: signal production frequency, acceleration section period, acceleration section voltage, etc.;
[0015] The signal braking section parameters include: braking cycle, braking voltage and braking starting position.
[0016] Preferably, the step of setting corresponding signal braking segment parameters and signal braking segment parameter range according to the signal acceleration segment parameters, constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter range, and performing an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain the optimal braking parameters includes the following sub-steps:
[0017] Setting corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, and constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter ranges;
[0018] The excitation electrical signal is obtained by superimposing a single-frequency signal generated by the signal acceleration segment parameters on a single-frequency signal generated by the signal braking segment parameters, driving the excitation electrical signal on the application object to obtain an acceleration waveform, and calculating a tail ratio of the acceleration waveform;
[0019] Determining a contemporary optimal particle of the particle swarm algorithm based on the tail ratio, the contemporary optimal particle includes a global optimal particle and an individual optimal particle, and setting a signal braking segment parameter range for constraining the signal braking segment parameter. If the number of iterations of the particle swarm algorithm is 1, the initial particle parameter of the braking segment is used as the individual optimal particle, and the individual optimal particle with the smallest tail ratio is used as the global optimal particle;
[0020] Within the signal braking segment parameter range, the update speed and update position of the current particle are calculated according to the contemporary optimal particle to obtain the next-generation particle, and the tail ratio corresponding to the next-generation particle is calculated to obtain the next-generation optimal particle;
[0021] Determine whether the tail ratio of the next-generation optimal particle meets the preset iteration termination condition:
[0022] If not, the global optimal particle and the individual optimal particle are updated with the next-generation optimal particle as the new contemporary optimal particle to iteratively perform update search;
[0023] If so, the optimal particle of the next generation is output as the optimal braking parameter.
[0024] Preferably, the update speed is defined as V k , the update position is pop k , and satisfy the following relationship: V k =w·V k-1 +c1·rand(pbest-pop k-1 )+c2·rand(gbest-pop k-1 ); pop k =pop k-1 +V k ;
[0025] Wherein, gbest is the global optimal particle, pbest is the individual optimal particle, k is the iterative algebra of the particle swarm algorithm, rand() is the random number generation function, c1 and c2 are the update constants, and w is the preset weight. The preset weight w satisfies:
[0026] maxgen is the maximum number of iterations.
[0027] Preferably, an excitation signal is obtained by integrating the updated position and the signal acceleration segment parameters, and the vibrator displacement of the application object is calculated. If the vibrator displacement is greater than the maximum vibrator displacement, then:
[0028] compressing the braking cycle and the braking voltage; or
[0029] Perform reverse variation processing on the brake voltage.
[0030] Preferably, the preset iteration termination condition is specifically:
[0031] The tail ratio corresponding to the optimal particle of the next generation meets the preset termination ratio, or the current iteration generation meets the maximum iteration generation.
[0032] In a second aspect, the present invention further provides a vibration signal modulation system based on particle swarm optimization, comprising:
[0033] A parameter setting module is used to set the signal acceleration section parameters according to the expected vibration signal of the application object;
[0034] a particle swarm optimization module, configured to set corresponding signal braking segment parameters and a signal braking segment parameter range according to the signal acceleration segment parameters, construct initial braking segment particle parameters for a particle swarm algorithm based on the signal braking segment parameter range, and perform an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain optimal braking parameters;
[0035] The output module is used to superimpose the signal corresponding to the optimal braking parameter and the signal corresponding to the signal acceleration segment parameter to obtain a final vibration signal for the application object.
[0036] Preferably, the particle swarm parameters include: maximum iteration number, preset iteration termination condition, population size, number of variables, and update constant;
[0037] The default configuration parameters for the particle swarm algorithm include: signal sampling rate, driver resonant frequency, oscillator maximum displacement and driver parameters;
[0038] The signal acceleration section parameters include: signal production frequency, acceleration section period, acceleration section voltage;
[0039] The particle swarm optimization module is specifically used for:
[0040] Setting corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, and constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter ranges;
[0041] The excitation electrical signal is obtained by superimposing a single-frequency signal generated by the signal acceleration segment parameters on a single-frequency signal generated by the signal braking segment parameters, driving the excitation electrical signal on the application object to obtain an acceleration waveform, and calculating a tail ratio of the acceleration waveform;
[0042] Determine the contemporary optimal particle of the particle swarm algorithm, the contemporary optimal particle includes a global optimal particle and an individual optimal particle, and set the signal braking segment parameter range for constraining the signal braking segment parameter, wherein, if the number of iterations of the particle swarm algorithm is 1, the initial particle parameter of the braking segment is used as the individual optimal particle, and the individual optimal particle with the smallest tail ratio is used as the global optimal particle;
[0043] Within the signal braking segment parameter range, the update speed and update position of the current particle are calculated according to the contemporary optimal particle to obtain the next-generation particle, and the tail ratio corresponding to the next-generation particle is calculated to obtain the next-generation optimal particle;
[0044] Determine whether the tail ratio of the next-generation optimal particle meets the preset iteration termination condition:
[0045] If not, the global optimal particle and the individual optimal particle are updated with the next-generation optimal particle as the new contemporary optimal particle to iteratively perform update search;
[0046] If so, the optimal particle of the next generation is output as the optimal braking parameter.
[0047] In a third aspect, the present invention also provides a computer device comprising: a memory, a processor, and a vibration signal modulation program based on particle swarm optimization stored in the memory and executable on the processor, wherein when the processor executes the vibration signal modulation program based on particle swarm optimization, the steps in the vibration signal modulation method based on particle swarm optimization as described above are implemented.
[0048] In a fourth aspect, the present invention also provides a computer-readable storage medium, on which a vibration signal modulation program based on particle swarm optimization is stored. When the vibration signal modulation program based on particle swarm optimization is executed by a processor, the steps in the vibration signal modulation method based on particle swarm optimization as described above are implemented.
[0049] Compared with related technologies, the vibration signal modulation method based on particle swarm optimization of the present invention includes the following steps: setting the signal acceleration segment parameters according to the expected vibration signal of the application object; setting the corresponding signal braking segment parameter range according to the signal acceleration segment parameters, constructing the initial particle parameters of the braking segment for the particle swarm algorithm based on the signal braking segment parameter range, and performing an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain the optimal braking parameters; superimposing the optimal braking parameters and the signals corresponding to the respective signal acceleration segment parameters to obtain the final vibration signal for the application object. By setting the signal acceleration segment parameters and setting the particle swarm to be optimized based on the existing parameters, and searching the braking segment parameters through the particle swarm optimization method, a vibration signal suitable for the current application object can be quickly obtained.
Brief Description of the Drawings
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive work, among which:
[0051] FIG1 is a flowchart of the steps of a vibration signal modulation method based on particle swarm optimization provided by an embodiment of the present invention;
[0052] 2 is a schematic diagram of the convergence of a particle swarm optimization algorithm of a vibration signal modulation method based on particle swarm optimization provided in an embodiment of the present invention;
[0053] FIG3 is a schematic diagram of a waveform of a final vibration signal provided by an embodiment of the present invention;
[0054] 4 is a schematic structural diagram of a vibration signal modulation system based on particle swarm optimization according to an embodiment of the present invention;
[0055] FIG5 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. [Specific implementation method]
[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0057] Example 1
[0058] Please refer to FIG1 , which is a flowchart of a vibration signal modulation method based on particle swarm optimization according to an embodiment of the present invention. The vibration signal modulation method includes the following steps:
[0059] S1. Set the signal acceleration segment parameters according to the expected vibration signal of the application object.
[0060] S2. Set corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, construct initial particle parameters for the braking segment of the particle swarm optimization algorithm based on the signal braking segment parameter range, and perform an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain the optimal braking parameters.
[0061] Preferably, the particle swarm parameters include: maximum iteration number, preset iteration termination condition, population size, number of variables, and update constant;
[0062] The default configuration parameters for the particle swarm algorithm include: signal sampling rate, driver resonant frequency, oscillator maximum displacement and driver parameters;
[0063] The signal acceleration section parameters include: signal production frequency, acceleration section period, acceleration section voltage;
[0064] The signal braking section parameters include: braking cycle, braking voltage and braking starting position.
[0065] The signal acceleration segment parameters and the signal braking segment parameters in the embodiment of the present invention are relative to the vibration motor. That is, the embodiment of the present invention controls the acceleration and braking parameters of the vibration motor to achieve motor control and generate corresponding vibration signals. That is, in the above-mentioned default configuration parameters, the driver resonant frequency and the driver parameters correspond to the motor resonant frequency and motor parameters, respectively.
[0066] Preferably, the step of setting corresponding signal braking segment parameters and signal braking segment parameter range according to the signal acceleration segment parameters, constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter range, and performing an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain the optimal braking parameters includes the following sub-steps:
[0067] Setting corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, and constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter ranges;
[0068] The excitation electrical signal is obtained by superimposing a single-frequency signal generated by the signal acceleration segment parameters on a single-frequency signal generated by the signal braking segment parameters, driving the excitation electrical signal on the application object to obtain an acceleration waveform, and calculating a tail ratio of the acceleration waveform;
[0069] Determining a contemporary optimal particle of the particle swarm algorithm based on the tail ratio, the contemporary optimal particle includes a global optimal particle and an individual optimal particle, and setting a signal braking segment parameter range for constraining the signal braking segment parameter. If the number of iterations of the particle swarm algorithm is 1, the initial particle parameter of the braking segment is used as the individual optimal particle, and the individual optimal particle with the smallest tail ratio is used as the global optimal particle;
[0070] Within the signal braking segment parameter range, the update speed and update position of the current particle are calculated according to the contemporary optimal particle to obtain the next-generation particle, and the tail ratio corresponding to the next-generation particle is calculated to obtain the next-generation optimal particle;
[0071] Determine whether the tail ratio of the next-generation optimal particle meets the preset iteration termination condition:
[0072] If not, the global optimal particle and the individual optimal particle are updated with the next-generation optimal particle as the new contemporary optimal particle to iteratively perform update search;
[0073] If so, the optimal particle of the next generation is output as the optimal braking parameter.
[0074] The tail ratio in the embodiment of the present invention is a parameter used to judge the optimized vibration signal and the vibration signal before optimization. In the actual implementation process, the acceleration generated by the motor through the superimposed signal can be compared through the signal acquisition equipment. For example, the superimposed signal of the signal acceleration segment parameters and the initial particle parameters of the braking segment is defined. The tail ratio of the recovery acceleration of the vibration device applied to the actual object is r, then r = Glast / Gpp, where Glast is the peak value of the acceleration after the vibration of the vibration device ends, that is, the tail size; Gpp is the peak-to-peak value of the acceleration corresponding to the entire signal driving the vibration device. The purpose of the search in the embodiment of the present invention is to minimize the tail ratio of the corresponding acceleration of the target excitation signal on the application object to produce the best vibration experience.
[0075] Preferably, the update speed is defined as V k , the update position is pop k , and satisfy the following relationship: V k =w·V k-1 +c1·rand(pbest-pop k-1 )+c2·rand(gbest-pop k-1 ); pop k =pop k-1 +V k ;
[0076] Wherein, gbest is the global optimal particle, pbest is the individual optimal particle, k is the iterative algebra of the particle swarm algorithm, rand() is the random number generation function, c1 and c2 are the update constants, and w is the preset weight. The preset weight w satisfies:
[0077] maxgen is the maximum number of iterations.
[0078] Preferably, an excitation signal is obtained by integrating the updated position and the signal acceleration segment parameters, and the oscillator displacement of the application object is calculated. The updated position is the updated braking segment parameter. If the oscillator displacement is greater than the maximum oscillator displacement, then:
[0079] compressing the braking cycle and the braking voltage;
[0080] or:
[0081] Perform reverse variation processing on the brake voltage.
[0082] This step provides displacement protection for the application object, namely the motor device, and is used to properly adjust the updated particle position. Specifically, it determines whether the excitation signal generated by the updated position, when used to drive the motor, will exceed the given maximum displacement of the motor vibrator. If so, the updated position is adjusted as described above. It should be noted that this operation is required both when initializing the particle position and when subsequently iterating to update the particle position.
[0083] Preferably, the preset iteration termination condition is specifically:
[0084] The tail ratio corresponding to the optimal particle of the next generation meets the preset termination ratio, or the current iteration generation meets the maximum iteration generation.
[0085] S3. Superimposing the optimal braking parameter and the signal acceleration segment parameter to obtain a final vibration signal for the application object.
[0086] Exemplarily, the particle swarm optimization parameters in the embodiment of the present invention are designed as follows: the maximum iteration number maxgen is 100, the preset iteration termination condition stopratio (termination ratio) is 0.05, the population size is 50, the number of variables n is 3, and the update constant c1=c2=2. Figures 2 and 3 are schematic diagrams of the convergence status and the waveform of the final vibration signal, respectively. It can be seen that the embodiment of the present invention can obtain a vibration signal that matches the acceleration of the application object through the particle swarm optimization method.
[0087] Compared with related technologies, the vibration signal modulation method based on particle swarm optimization of the present invention includes the following steps: setting the signal acceleration segment parameters according to the expected vibration signal of the application object; setting the corresponding signal braking segment parameter range according to the signal acceleration segment parameters, constructing the initial particle parameters of the braking segment for the particle swarm algorithm based on the signal braking segment parameter range, and performing an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain the optimal braking parameters; superimposing the optimal braking parameters and the signals corresponding to the respective signal acceleration segment parameters to obtain the final vibration signal for the application object. By setting the signal acceleration segment parameters and setting the particle swarm to be optimized based on the existing parameters, and searching the braking segment parameters through the particle swarm optimization method, a vibration signal suitable for the current application object can be quickly obtained.
[0088] Example 2
[0089] The present invention further provides a vibration signal modulation system based on particle swarm optimization. Please refer to FIG4 , which is a structural diagram of a vibration signal modulation system based on particle swarm optimization provided by an embodiment of the present invention. The vibration signal modulation system based on particle swarm optimization 200 includes:
[0090] The parameter setting module 201 is used to set the signal acceleration section parameters according to the expected vibration signal of the application object;
[0091] a particle swarm optimization module 202 for setting corresponding signal braking segment parameters and a signal braking segment parameter range according to the signal acceleration segment parameters, constructing initial braking segment particle parameters for a particle swarm algorithm based on the signal braking segment parameter range, and performing an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain optimal braking parameters;
[0092] The output module 203 is configured to superimpose the signal corresponding to the optimal braking parameter and the signal corresponding to the signal acceleration segment parameter to obtain a final vibration signal for the application object.
[0093] The particle swarm parameters include: maximum iteration number, preset iteration termination condition, population size, number of variables, and update constant;
[0094] The default configuration parameters for the particle swarm algorithm include: signal sampling rate, driver resonant frequency, oscillator maximum displacement and driver parameters;
[0095] Preferably, the signal acceleration section parameters include: signal production frequency, acceleration section period, acceleration section voltage;
[0096] The particle swarm optimization module is specifically used for:
[0097] Setting corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, and constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter ranges;
[0098] The excitation electrical signal is obtained by superimposing a single-frequency signal generated by the signal acceleration segment parameters on a single-frequency signal generated by the signal braking segment parameters, driving the excitation electrical signal on the application object to obtain an acceleration waveform, and calculating a tail ratio of the acceleration waveform;
[0099] Determining a contemporary optimal particle of the particle swarm algorithm based on the tail ratio, the contemporary optimal particle includes a global optimal particle and an individual optimal particle, and setting a signal braking segment parameter range for constraining the signal braking segment parameter. If the number of iterations of the particle swarm algorithm is 1, the initial particle parameter of the braking segment is used as the individual optimal particle, and the individual optimal particle with the smallest tail ratio is used as the global optimal particle;
[0100] Within the signal braking segment parameter range, the update speed and update position of the current particle are calculated according to the contemporary optimal particle to obtain the next-generation particle, and the tail ratio corresponding to the next-generation particle is calculated to obtain the next-generation optimal particle;
[0101] Determine whether the tail ratio of the next-generation optimal particle meets the preset iteration termination condition:
[0102] If not, the global optimal particle and the individual optimal particle are updated with the next-generation optimal particle as the new contemporary optimal particle to iteratively perform update search;
[0103] If so, the optimal particle of the next generation is output as the optimal braking parameter.
[0104] Preferably, the update speed is defined as V k , the update position is pop k , and satisfy the following relationship: V k =w·V k-1 +c1·rand(pbest-pop k-1 )+c2·rand(gbest-pop k-1 ); pop k =pop k-1 +V k ;
[0105] Wherein, gbest is the global optimal particle, pbest is the individual optimal particle, k is the iterative algebra of the particle swarm algorithm, rand() is the random number generation function, c1 and c2 are the update constants, and w is the preset weight. The preset weight w satisfies:
[0106] maxgen is the maximum number of iterations.
[0107] Preferably, an excitation signal is obtained by integrating the updated position and the signal acceleration segment parameters, and the vibrator displacement of the application object is calculated. If the vibrator displacement is greater than the maximum vibrator displacement, then:
[0108] compressing the braking cycle and the braking voltage; or
[0109] Perform reverse variation processing on the brake voltage.
[0110] Preferably, the preset iteration termination condition is specifically:
[0111] The tail ratio corresponding to the optimal particle of the next generation meets the preset termination ratio, or the current iteration generation meets the maximum iteration generation.
[0112] The vibration signal modulation system 200 based on particle swarm optimization can implement the steps in the vibration signal modulation method based on particle swarm optimization in the above embodiment, and can achieve the same technical effects. Please refer to the description in the above embodiment and will not be repeated here.
[0113] Example 3
[0114] An embodiment of the present invention further provides a computer device. Please refer to Figure 5, which is a structural diagram of the computer device provided by an embodiment of the present invention. The computer device 300 includes: a memory 302, a processor 301, and a computer program stored in the memory 302 and executable on the processor 301.
[0115] The processor 301 calls the computer program stored in the memory 302 to execute the steps of the vibration signal modulation method based on particle swarm optimization provided in the embodiment of the present invention. Referring to FIG1 , the method specifically includes the following steps:
[0116] S1. Set the signal acceleration segment parameters according to the expected vibration signal of the application object.
[0117] S2. Set corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, construct initial particle parameters for the braking segment of the particle swarm optimization algorithm based on the signal braking segment parameter range, and perform an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain the optimal braking parameters.
[0118] Preferably, the particle swarm parameters include: maximum iteration number, preset iteration termination condition, population size, number of variables, and update constant;
[0119] The default configuration parameters for the particle swarm algorithm include: signal sampling rate, driver resonant frequency, oscillator maximum displacement and driver parameters;
[0120] The signal acceleration section parameters include: signal production frequency, acceleration section period, acceleration section voltage;
[0121] The signal braking section parameters include: braking cycle, braking voltage and braking starting position.
[0122] Preferably, the step of setting corresponding signal braking segment parameters and signal braking segment parameter range according to the signal acceleration segment parameters, constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter range, and performing an iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain the optimal braking parameters includes the following sub-steps:
[0123] Setting corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, and constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter ranges;
[0124] The excitation electrical signal is obtained by superimposing a single-frequency signal generated by the signal acceleration segment parameters on a single-frequency signal generated by the signal braking segment parameters, driving the excitation electrical signal on the application object to obtain an acceleration waveform, and calculating a tail ratio of the acceleration waveform;
[0125] Determining a contemporary optimal particle of the particle swarm algorithm based on the tail ratio, the contemporary optimal particle includes a global optimal particle and an individual optimal particle, and setting a signal braking segment parameter range for constraining the signal braking segment parameter. If the number of iterations of the particle swarm algorithm is 1, the initial particle parameter of the braking segment is used as the individual optimal particle, and the individual optimal particle with the smallest tail ratio is used as the global optimal particle;
[0126] Within the signal braking segment parameter range, the update speed and update position of the current particle are calculated according to the contemporary optimal particle to obtain the next-generation particle, and the tail ratio corresponding to the next-generation particle is calculated to obtain the next-generation optimal particle;
[0127] Determine whether the tail ratio of the next-generation optimal particle meets the preset iteration termination condition:
[0128] If not, the optimal particle of the next generation is used as the new optimal particle of the current generation to iteratively perform an update search;
[0129] If so, the optimal particle of the next generation is output as the optimal braking parameter.
[0130] Preferably, the update speed is defined as V k , the update position is pop k , and satisfy the following relationship: V k =w·V k-1 +c1·rand(pbest-pop k-1 )+c2·rand(gbest-pop k-1 ); pop k =pop k-1 +V k ;
[0131] Wherein, gbest is the global optimal particle, pbest is the individual optimal particle, k is the iterative algebra of the particle swarm algorithm, rand() is the random number generation function, c1 and c2 are the update constants, and w is the preset weight. The preset weight w satisfies:
[0132] maxgen is the maximum number of iterations.
[0133] Preferably, an excitation signal is obtained by integrating the updated position and the signal acceleration segment parameters, and the vibrator displacement of the application object is calculated. If the vibrator displacement is greater than the maximum vibrator displacement, then:
[0134] compressing the braking cycle and the braking voltage; or
[0135] Perform reverse variation processing on the brake voltage.
[0136] Preferably, the preset iteration termination condition is specifically:
[0137] The tail ratio corresponding to the optimal particle of the next generation meets the preset termination ratio, or the current iteration generation meets the maximum iteration generation.
[0138] S3. Superimpose the signal corresponding to the optimal braking parameter and the signal corresponding to the signal acceleration segment parameter to obtain a final vibration signal for the application object.
[0139] The computer device 300 provided in an embodiment of the present invention can implement the steps in the vibration signal modulation method based on particle swarm optimization in the above embodiment, and can achieve the same technical effects. Please refer to the description in the above embodiment and will not be repeated here.
[0140] Example 4
[0141] An embodiment of the present invention also provides a computer-readable storage medium, on which a vibration signal modulation program based on particle swarm optimization is stored. When the vibration signal modulation program based on particle swarm optimization is executed by a processor, the various processes and steps in the vibration signal modulation method based on particle swarm optimization provided in an embodiment of the present invention are implemented, and the same technical effects can be achieved. To avoid repetition, they will not be described here.
[0142] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0143] The above description is only an embodiment of the present invention. It should be pointed out that those skilled in the art can make improvements without departing from the creative concept of the present invention, but these improvements all fall within the scope of protection of the present invention.
Claims
1. A vibration signal modulation method based on particle swarm optimization, characterized in that: The vibration signal modulation method comprises the following steps: Set the signal acceleration segment parameters according to the expected vibration signal of the application object; According to the signal acceleration segment parameter setting, the corresponding signal braking segment parameter and the signal braking segment parameter range are constructed, based on the signal braking segment parameter range, the braking segment initial particle parameters for the particle swarm algorithm are constructed, and based on the particle swarm optimization algorithm, an iterative search is performed within the signal braking segment parameter range to obtain the optimal braking parameters; The signal corresponding to the optimal braking parameter is superimposed with the signal corresponding to the signal acceleration segment parameter to obtain a final vibration signal for the application object.
2. The vibration signal modulation method based on particle swarm optimization according to claim 1, characterized in that: The particle swarm parameters include: maximum iteration number, preset iteration termination condition, population size, number of variables, and update constant; The default configuration parameters for the particle swarm algorithm include: signal sampling rate, driver resonance frequency, oscillator maximum displacement and driver parameters; The signal acceleration section parameters include: signal production frequency, acceleration section period, acceleration section voltage; The signal braking section parameters include: braking cycle, braking voltage and braking starting position.
3. The vibration signal modulation method based on particle swarm optimization according to claim 2, characterized in that: The step of setting the corresponding signal braking segment parameters and the signal braking segment parameter range according to the signal acceleration segment parameters, constructing the braking segment initial particle parameters for the particle swarm algorithm based on the signal braking segment parameter range, and performing iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain the optimal braking parameters includes the following sub-steps: Setting corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, and constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter ranges; The single-frequency signal generated by the signal acceleration section parameters is superimposed on the single-frequency signal generated by the signal braking section parameters to obtain an excitation electrical signal. The excitation electrical signal drives the device and is connected to the Applying the object, obtaining an acceleration waveform, and calculating a tail ratio of the acceleration waveform; Based on the tailing ratio, the contemporary optimal particle of the particle swarm algorithm is determined, the contemporary optimal particle includes a global optimal particle and an individual optimal particle, and the signal brake segment parameter range used to constrain the signal brake segment parameter is set, wherein, if the number of iterations of the particle swarm algorithm is 1, the initial particle parameter of the brake segment is taken as the individual optimal particle, and the individual optimal particle with the smallest tailing ratio is taken as the global optimal particle; Within the signal braking section parameter range, the particle swarm algorithm is updated and searched with the contemporary optimal particle, the update speed and update position of the current particle are calculated according to the contemporary optimal particle to obtain the next-generation particle, and the tail ratio corresponding to the next-generation particle is calculated to obtain the next-generation optimal particle; Determine whether the tail ratio of the next-generation optimal particle meets the preset iteration termination condition: If not, the global optimal particle and the individual optimal particle are updated with the next-generation optimal particle as the new contemporary optimal particle to iteratively perform update search; If so, the next-generation optimal particle is output as the optimal braking parameter.
4. The vibration signal modulation method based on particle swarm optimization according to claim 3 is characterized in that: Define the update rate as V k , the update position is pop k , and satisfy the following relationship: V k =w·V k-1 +c1·rand(pbest-pop k-1 )+c2·rand(gbest-pop k-1 ); pop k =pop k-1 +V k ; Wherein, gbest is the global optimal particle, pbest is the individual optimal particle, k is the iterative algebra of the particle swarm algorithm, rand() is the random number generation function, c1 and c2 are the update constants, and w is the preset weight. The preset weight w satisfies: maxgen is the maximum number of iterations.
5. The vibration signal modulation method based on particle swarm optimization according to claim 3, It is characterized in that an excitation signal is obtained by integrating the update position and the signal acceleration segment parameter, and the vibrator displacement of the application object is calculated. If the vibrator displacement is greater than the maximum displacement of the vibrator, then: compressing the braking cycle and the braking voltage; or, The brake voltage is subjected to reverse variation processing.
6. The vibration signal modulation method based on particle swarm optimization according to claim 3, characterized in that: The preset iteration termination condition is specifically: The tail ratio corresponding to the optimal particle of the next generation satisfies the preset termination ratio, or the current iteration number satisfies the maximum iteration number.
7. A vibration signal modulation system based on particle swarm optimization, characterized in that: include: A parameter setting module, used to set the signal acceleration section parameters according to the expected vibration signal of the application object; A particle swarm optimization module is used to set corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, construct initial particle parameters of the braking segment for the particle swarm algorithm based on the signal braking segment parameter range, and perform iterative search within the signal braking segment parameter range based on the particle swarm optimization algorithm to obtain optimal braking parameters; The output module is used to superimpose the signal corresponding to the optimal braking parameter with the signal corresponding to the signal acceleration segment parameter to obtain a final vibration signal for the application object.
8. The vibration signal modulation system based on particle swarm optimization according to claim 7, characterized in that: The particle swarm parameters include: maximum iteration number, preset iteration termination condition, population size, number of variables, and update constant; The default configuration parameters for the particle swarm algorithm include: signal sampling rate, driver resonance frequency, oscillator maximum displacement and driver parameters; The signal acceleration section parameters include: signal production frequency, acceleration section period, acceleration section voltage; The particle swarm optimization module is specifically used for: Setting corresponding signal braking segment parameters and signal braking segment parameter ranges according to the signal acceleration segment parameters, and constructing braking segment initial particle parameters for a particle swarm algorithm based on the signal braking segment parameter ranges; The single-frequency signal generated by the signal acceleration segment parameters is superimposed on the signal braking segment parameters. The single-frequency signal is integrated to obtain an excitation electrical signal, the excitation electrical signal is driven on the application object to obtain an acceleration waveform, and a tail ratio of the acceleration waveform is calculated; Determine the contemporary optimal particle of the particle swarm algorithm, the contemporary optimal particle includes a global optimal particle and an individual optimal particle, and set the signal brake segment parameter range used to constrain the signal brake segment parameter, wherein, if the number of iterations of the particle swarm algorithm is 1, the initial particle parameter of the brake segment is taken as the individual optimal particle, and the individual optimal particle with the smallest tail ratio is taken as the global optimal particle; Within the signal braking section parameter range, the particle swarm algorithm is updated and searched with the contemporary optimal particle, the update speed and update position of the current particle are calculated according to the contemporary optimal particle to obtain the next-generation particle, and the tail ratio corresponding to the next-generation particle is calculated to obtain the next-generation optimal particle; Determine whether the tail ratio of the next-generation optimal particle meets the preset iteration termination condition: If not, the global optimal particle and the individual optimal particle are updated with the next-generation optimal particle as the new contemporary optimal particle to iteratively perform update search; If so, the next-generation optimal particle is output as the optimal braking parameter.
9. A computer device, characterized in that: include: A memory, a processor, and a vibration signal modulation program based on particle swarm optimization stored in the memory and executable on the processor, wherein when the processor executes the vibration signal modulation program based on particle swarm optimization, the steps of the vibration signal modulation method based on particle swarm optimization as described in any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a vibration signal modulation program based on particle swarm optimization, and when the vibration signal modulation program based on particle swarm optimization is executed by a processor, the steps in the vibration signal modulation method based on particle swarm optimization as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Linear motor braking method and device as well as tactile feedback system
CN107024985A
Vibration signal control method, storage medium and electronic equipment
CN111552369A
Driving electric signal adjusting method, driving method, driving circuit and electronic equipment
CN113283152A
Driving circuit of vibration motor, its calibration method, vibration device and electronic apparatus
JP2018143961A
System and method generating motor driving signal and method controlling vibration
US20140015652A1
