Design method and device for drive waveform of motor
By setting target parameters and simulation calculations, the waveform data that meets predetermined conditions is automatically determined as the motor drive waveform, which solves the problem of low efficiency in motor drive waveform design in the existing technology and achieves efficient vibration effect generation.
Patent Information
- Application Number
- PCT/CN2023/082979
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2024-09-26
AI Technical Summary
In the existing technology, the efficiency of designing motor drive waveforms is low, and it is difficult to quickly find a drive waveform that meets the expected vibration effect, resulting in time and effort and low operating efficiency.
By setting the drive target parameters, determine the structured waveform parameters, generate waveform data, and use simulation calculations to obtain simulated vibration data, compare the simulated vibration data with the target parameters, and automatically determine the waveform data that meets the predetermined conditions as the drive waveform of the motor.
Significantly improves the efficiency of motor drive waveform design, and can automatically generate appropriate drive waveform data based on the user's desired vibration state, ensuring that the expected vibration state and effect are obtained.
Smart Images

Figure CN2023082979_26092024_PF_FP
Abstract
Description
A motor drive waveform design method and device Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a method and device for designing a motor drive waveform. Background Art
[0002] With the development and popularization of various electronic devices such as smartphones and wearable devices, people's demand for tactile experience is also becoming increasingly rich. Currently, tactile feedback technology is generally achieved through motor vibration. A specific driving waveform is used to stimulate the vibration motor inside the device. The vibration of the vibrator inside the motor is felt by people, thus producing a tactile effect.
[0003] In existing technology, a drive waveform is typically designed first, and then the motor is actually driven to observe whether the motor's vibration effect meets the expected requirements. For example, if the actual response of the motor or equipment tooling does not meet the requirements, the design needs to be modified and the drive is repeated until the output tactile effect meets the requirements. However, this method is time-consuming and labor-intensive, with low operational efficiency, and it is difficult to find a drive waveform that meets the expected vibration effect.
[0004] Summary of the Invention
[0005] The present application is proposed to address the aforementioned technical issues encountered in the prior art. The embodiments of the present application provide a motor drive waveform design method and device, which can automatically calculate appropriate waveform data based on the expected vibration effect and then perform actual drive debugging, thereby improving the efficiency of waveform design.
[0006] According to one aspect of the present application, a method for designing a motor drive waveform is provided, the method comprising: setting drive target parameters; determining structured waveform parameters and generating waveform data based on the waveform parameters; performing simulation calculations using the waveform data to obtain simulated vibration data; and comparing the simulated vibration data with the drive target parameters, and determining the waveform data corresponding to the simulated vibration data that meets predetermined conditions as the drive waveform of the motor.
[0007] In some embodiments, the driving target parameters include one or more of the acceleration, acceleration curve, and acceleration curve envelope of the motor and / or tooling.
[0008] In some embodiments, the structured waveform parameters include waveform type, waveform voltage, and waveform frequency.
[0009] In some embodiments, simulation calculations are performed using the waveform data to obtain simulated vibration data, including: component analysis of the waveform data to decompose the waveform data into one or more component driving waveforms; calculating the vibration data of the motor under each component driving waveform; and synthesizing the calculated vibration data to obtain simulated vibration data of the motor under the waveform data.
[0010] In some embodiments, comparing the simulated vibration data with the driving target parameters, and determining the waveform data corresponding to the simulated vibration data that meets predetermined conditions as the driving waveform of the motor includes: determining the similarity between the simulated vibration data and the driving target parameters; and determining the waveform data corresponding to the simulated vibration data whose similarity is greater than a preset threshold as the driving waveform of the motor.
[0011] In some embodiments, comparing the simulated vibration data with the driving target parameters, and determining the waveform data corresponding to the simulated vibration data that meets predetermined conditions as the driving waveform of the motor includes: after traversing the structured waveform parameters, determining the waveform data corresponding to the simulated vibration data with the highest similarity to the driving target parameters; and determining the corresponding waveform data as the driving waveform of the motor.
[0012] In some embodiments, determining the waveform data corresponding to the simulated vibration data having the highest similarity to the driving target parameters includes: calculating the difference between the simulated vibration data and the driving target parameters, and comparing the difference with a threshold; in response to the difference being less than the threshold, updating the threshold to the difference and saving the corresponding waveform data; otherwise, reselecting the structured waveform parameters and performing simulation calculations; traversing the structured waveform parameters, and determining the last saved waveform data as the waveform data corresponding to the simulated vibration data having the highest similarity to the driving target parameters.
[0013] In some embodiments, determining the waveform data corresponding to the simulated vibration data having the highest similarity to the driving target parameters includes: calculating the similarity between the simulated vibration data and the driving target parameters, and comparing the similarity with a threshold; in response to the similarity being greater than the threshold, updating the threshold to the similarity and saving the corresponding waveform data; otherwise, reselecting the structured waveform parameters and performing simulation calculations; traversing the structured waveform parameters, and determining the last saved waveform data as the waveform data corresponding to the simulated vibration data having the highest similarity to the driving target parameters.
[0014] Another aspect of the present application provides a design device for a motor drive waveform, comprising: a setting unit for setting drive target parameters; a generation unit for determining structured waveform parameters and generating waveform data based on the waveform parameters; a simulation unit for performing simulation calculations using the waveform data to obtain simulated vibration data; and a determination unit for comparing the simulated vibration data with the drive target parameters, and determining the waveform data corresponding to the simulated vibration data that meets predetermined conditions as the drive waveform of the motor.
[0015] Another aspect of the present application provides an electronic device, which includes a memory, a processor, and instructions stored in the memory and executable on the processor. When the instructions are executed by the processor, the processor executes the driving waveform design method described above.
[0016] Another aspect of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor is caused to execute each step in the above-mentioned driving waveform design method.
[0017] Compared with the existing technology, the motor drive waveform design method and design device of the embodiment of the present application can automatically generate structured drive waveform data according to the vibration state or effect expected by the user. The drive waveform data can be used to generate continuous drive waveform data, and the expected vibration state data and vibration effect can be obtained, which significantly improves the efficiency of drive waveform design. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.
[0019] FIG1 is a flow chart showing a method for designing a motor drive waveform according to an embodiment of the present application;
[0020] FIG2 is a flow chart showing a method for obtaining a simulated vibration effect according to an embodiment of the present application;
[0021] FIG3 is a flow chart showing a method for calculating vibration data of a motor under various component drive waveforms according to an embodiment of the present application;
[0022] FIG4 is a schematic diagram showing a flow chart of calculating motor parameters according to an embodiment of the present application;
[0023] FIG5 is a flow chart showing a method for designing a driving waveform according to an embodiment of the present application;
[0024] FIG6 is a flow chart showing a method for designing a driving waveform according to another embodiment of the present application;
[0025] FIG7 is a flow chart showing a method for designing a driving waveform according to another embodiment of the present application;
[0026] FIG8 is a block diagram showing a structure of a device for simulating motor vibration effects according to an embodiment of the present application;
[0027] FIG9 shows a structural block diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] Below, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments of the present application. At the same time, it is not necessary to achieve all of the above advantages at the same time when implementing any example of the embodiments of the present application. It should be understood that the present application should not be limited to the specific details of these example embodiments. Instead, the embodiments of the present application can be implemented without these specific details or using other alternatives without departing from the ideas and principles of the present application defined in the claims.
[0029] FIG1 shows a flow chart of a method for designing a motor driving waveform according to an embodiment of the present application. As shown in FIG1 , the method 100 may begin with step S110 of setting driving target parameters.
[0030] The target parameter may be the vibration state or vibration effect desired by the user, which may include the vibration state of the motor itself or the vibration effect of the motor tooling. For example, the drive target parameter may include one or more of the acceleration, acceleration curve, and acceleration curve envelope of the motor and / or tooling.
[0031] In one embodiment, the drive target parameters can be set by the user, for example, by selecting or inputting relevant vibration effect data via a touch screen. In addition to the drive target parameters, other parameters can also be specified, such as the duration of the drive waveform, which facilitates the subsequent generation of structured drive waveform data with a fixed duration. The waveform duration is the duration of the drive waveform, which can be set by a time length (in milliseconds) or a number of waveform cycles.
[0032] After setting the driving target, the design method of this embodiment may proceed to step 120 to determine structured waveform parameters and generate waveform data according to the waveform parameters.
[0033] The drive signal of the motor is generally a periodic drive waveform. To this end, in one embodiment, the drive waveform can be structured to construct a designed drive waveform. Each structured drive waveform can be determined by a set of waveform parameters such as waveform type, waveform voltage, and waveform frequency. Corresponding waveform data can be generated based on these waveform parameters. The waveform type can include sine waves, square waves, rounded square waves, etc. The waveform voltage can be characterized by peak voltage or mean value, and the two can be equivalently converted. The waveform frequency can be selected to be equal to or close to the resonant frequency f0 of the motor, so that the motor produces a higher vibration level, for example, between 100-200Hz.
[0034] In addition, the driving waveform may also have data dimensions such as waveform starting phase and waveform data sampling rate. The waveform starting phase may be any value between 0-2π, and the waveform data sampling rate may correspond to the sampling rate in the driving chip.
[0035] In one embodiment, waveform parameters such as waveform type, waveform voltage, waveform frequency, and waveform starting phase can be encoded or traversed at a specified step size within a set numerical range to automatically determine multiple structured waveform parameters. For example, the host computer can generate a structured driving waveform based on the user's set time length and the traversed waveform parameters, and each traversed driving waveform corresponds to a different waveform parameter combination.
[0036] Afterwards, step 130 may be performed to perform simulation calculation using the waveform data to obtain simulated vibration data.
[0037] In one embodiment, when the motor parameters are obtained, the waveform data can be input into a simulation vibration model to obtain a simulation vibration response to simulate the vibration of the motor. For example, a simulation calculation can be performed through a transfer function from a driving waveform to a vibration response.
[0038] Because the driving waveforms generated by traversing waveform parameters vary, in order to simulate the vibration effects of the generated arbitrary waveform data, one embodiment of the present application first performs component analysis to convert the waveform data into a combination of component driving waveforms suitable for a linear motor model. That is, each component driving waveform can be calculated and processed using a unified linear motor model. Simulation calculations are then performed for each component driving waveform, and finally, data synthesis is performed to obtain simulated vibration data, as described in detail below.
[0039] After obtaining the simulated vibration data, the design method of the present application may proceed to step S140 to compare the simulated vibration data with the drive target parameters, and determine the waveform data corresponding to the simulated vibration data that meets predetermined conditions as the drive waveform of the motor.
[0040] For example, predetermined conditions can be set based on actual conditions to traverse and search for waveform data that meets the requirements. For example, the simulated vibration data can be compared with the drive target parameters to determine the similarity between the simulated vibration data and the drive target parameters. The waveform data corresponding to the simulated vibration data with a similarity greater than a preset threshold is then determined as the motor drive waveform. In other words, when the simulated vibration data and the drive target parameters are identical or similar, it can be considered that the vibration effect meets the requirements. At this point, the search process can be terminated and the waveform data corresponding to the simulated vibration data can be determined as the motor drive waveform, thereby accelerating the waveform design process.
[0041] In one embodiment, the designed candidate waveform data may be traversed to select the waveform data whose simulated vibration effect is closest to the drive target parameters as the motor drive waveform. For example, after traversing the structured waveform parameters, the waveform data corresponding to the simulated vibration data with the highest similarity to the drive target parameters is determined, and the waveform data is determined as the motor drive waveform.
[0042] Different similarity calculation methods can be set for different vibration target parameter types. For example, for parameters such as vibration displacement and vibration acceleration of a motor or tooling, the similarity between the simulated vibration data and the drive target parameter can be determined based on the difference between the simulated vibration data and the drive target parameter. The smaller the difference, the higher the similarity. For example, determining the waveform data corresponding to the simulated vibration data with the highest similarity to the drive target parameter may include: calculating the difference between the simulated vibration data and the drive target parameter, comparing the difference with a threshold value, and in response to the difference being less than the threshold value, updating the threshold value to the difference value and saving the corresponding waveform data. Otherwise, reselecting the structured waveform parameters and performing simulation calculations. After traversing the structured waveform parameters, the last saved waveform data has the highest similarity to the drive target parameter. Therefore, the last saved waveform data can be determined as the waveform data corresponding to the simulated vibration data with the highest similarity to the drive target parameter. The host computer can generate a drive waveform for the motor based on the corresponding waveform data and the drive duration set by the user, and actually drive the motor to obtain the desired target vibration effect.
[0043] For parameters such as the acceleration curve and acceleration curve envelope of the motor or tooling, the similarity between the two can be determined based on the simulated acceleration curve / curve envelope and the target acceleration curve / curve envelope, and the simulation data with the highest similarity can be determined. For example, determining the waveform data corresponding to the simulated vibration data with the highest similarity to the drive target parameter may include: calculating the similarity between the simulated vibration data and the drive target parameter, and comparing the similarity with a threshold value. In response to the similarity being greater than the threshold value, the threshold value is updated to the similarity, and the corresponding waveform data is saved. Otherwise, the structured waveform parameters are reselected and the simulation calculation is performed. After traversing the structured waveform parameters, the simulation data of the waveform data saved last has the highest similarity to the drive target parameter. Therefore, the waveform data saved last can be determined as the waveform data corresponding to the simulated vibration data with the highest similarity to the drive target parameter. The host computer can generate the drive waveform of the motor based on the corresponding waveform data and the drive duration set by the user to actually drive the motor, and the expected target vibration effect can be obtained.
[0044] FIG2 is a flow chart of a method for obtaining a simulated vibration effect according to an embodiment of the present application. As shown in FIG2 , for the generated structured driving waveform, simulation can be performed according to the following steps:
[0045] In step 210 , component analysis is performed on the driving waveform to decompose the waveform data into one or more component driving waveforms.
[0046] In one embodiment, the generated structured waveform data can be subjected to Fourier decomposition, thereby decomposing the waveform data into a linear combination of one or more harmonics. Each harmonic can be considered a component driving waveform, and its voltage value and frequency can be determined by the coefficients of the corresponding series obtained by Fourier decomposition and the harmonic angular frequency. As a well-known numerical analysis tool, the Fourier transform process is not described in detail in this embodiment.
[0047] In step 220 , vibration data of the motor under each component driving waveform is calculated.
[0048] The calculation process may involve simulating the application of at least a portion of the analytically obtained component drive waveforms to both ends of the motor unit to obtain vibration data. For example, the vibration data may include at least one of the motor vibration displacement (e.g., vibrator displacement), the motor vibration movement speed, and the motor vibration acceleration. In actual applications, the motor unit is generally fixed to the tooling. Applying the drive waveform to the motor unit to generate vibration will also cause the tooling to vibrate in the opposite direction. In one embodiment, the vibration data may also include the acceleration of the tooling.
[0049] For example, when the driving waveform is subjected to Fourier decomposition, the linear motor will move in a quasi-simple harmonic vibration mode under the drive of each component driving waveform. Specifically, the vibration displacement, vibration movement speed, and vibration acceleration of the motor can be calculated by the following formulas (1)-(3) when the motor model parameters are obtained:
[0050] Where x(ω) is the displacement of the motor vibrator under the component drive waveform, u(ω) is the vibrator movement speed under the component drive waveform, and a(ω) is the acceleration of the motor vibrator under the component drive waveform; V vc is the peak voltage of the component drive waveform, which can be determined by the selected waveform voltage and the coefficient of the corresponding series of the component drive waveform. ω is the angular frequency of the component drive waveform signal, which is generally a multiple of the fundamental frequency obtained by Fourier decomposition. Bl is the motor electromagnetic force coefficient, R e is the motor resistance, M ms is the motor mass, ω0 is the motor's resonant angular frequency, Q ts is the Q factor of the motor system. These parameters are inherent parameters of the motor and can be obtained through modeling calculation, which will be described in detail below.
[0051] In one embodiment, the calculation in this step may be performed on some of the n component driving waveforms obtained by Fourier decomposition. For example, the above simulation calculation may be performed only on the component driving waveforms corresponding to the decomposition levels below the first 10 terms obtained by Fourier decomposition, thereby reducing the amount of simulation calculation.
[0052] In step 230 , the calculated vibration data are synthesized to obtain simulated vibration data of the motor under the driving waveform.
[0053] For a linear motor, its mass generally moves in a single axis under the driving waveform, so the calculated vibration data can be linearly superimposed to obtain the final simulated vibration data of the motor. The vibration data may include the motor vibrator displacement x ms 、Motor vibrator moving speed u ms , motor oscillator acceleration a ms By simulating and observing the vibration effect of the motor, it is possible to determine whether the vibration effect is consistent with the expected effect, and then determine whether the generated drive waveform data meets the design requirements.
[0054] In one embodiment, after simulating a waveform for a user-specified drive duration, simulated vibration curve data, such as a motor displacement curve, velocity curve, and acceleration curve, can be obtained that continuously changes in time. By selecting specific sample points (e.g., peak points) on these curves and connecting them to form envelopes, the envelopes can be spliced to form the curve envelope of the corresponding curve.
[0055] In one embodiment, after the motor vibrator acceleration is obtained through simulation, the vibration level of the motor fixture can also be calculated. For example, the vibration data of the motor fixture under each component drive waveform can be calculated first. The vibration level of the motor fixture can be the acceleration at a predetermined position on the fixture, which can be calculated using the following formula:
[0056] Among them, a tool (ω) is the acceleration of the motor fixture at a predetermined position in response to the component drive waveform, M ms is the motor mass, a(ω) is the motor vibration acceleration under the component drive waveform, M tool is the equivalent mass of the tooling.
[0057] After obtaining the fixture data for each component drive, the calculated fixture vibration data can be synthesized to obtain the simulated fixture vibration data for the motor fixture under the specified drive waveform. For example, the calculated fixture vibration data can be linearly superimposed to obtain the final simulated vibration data for the motor fixture.
[0058] Alternatively, after the motor vibrator acceleration is obtained in the final simulation, the vibration level of the motor fixture can be calculated using the following formula:
[0059] Among them, a tool M is the acceleration of the motor fixture at a predetermined position in response to the driving waveform. ms is the motor mass, a ms is the motor vibration acceleration under the driving waveform data, M tool The calculation method of this embodiment can obtain the vibration level of the tooling without installing a vibration sensor on the tooling, and can evaluate whether the tactile effect meets expectations based on the vibration level, thereby improving the efficiency of waveform design.
[0060] FIG3 is a flow chart of a method for calculating vibration data of a motor under various component drive waveforms according to an embodiment of the present application. As shown in FIG3 , obtaining motor response data under the component drive signals may include the following steps:
[0061] Step 310: Determine the model parameters of the motor.
[0062] In one embodiment, in order to perform calculations according to the above equations (1)-(3), the model parameters include at least the motor mass, the motor resistance, and the motor resonant angular frequency, and may also include the motor electromagnetic force coefficient Bl and / or the system Q factor.
[0063] In one embodiment, some model parameters of the motor can be determined based on the response data of the motor to a preset drive signal. For example, the resonant frequency and angular frequency of the motor can be determined based on the frequency point corresponding to the maximum measured value of the vibration acceleration. At the same time, parameters such as the motor resistance and inductance can be determined based on the motor calculation model of voltage and current.
[0064] In one embodiment, the frequency impedance curve of the motor can be obtained based on the voltage and current response data of the motor under a driving signal with multiple frequency points, and then the motor parameters can be directly calculated based on the motor modeling formula, which will be described in detail later.
[0065] Step 320 : Calculate vibration data of the motor under each component driving waveform based on a motor vibration model, wherein the motor vibration model is associated with model parameters of the motor.
[0066] When the motor model parameters are known, the response data of the motor's component drive waveform after analysis of any drive waveform can be calculated using the motor vibration model described above (Formulas 1-3), which will not be repeated here.
[0067] FIG4 is a flow chart showing a method for calculating motor model parameters according to an embodiment of the present invention. As shown in FIG4 , the calculation of motor model parameters can be achieved by the following steps:
[0068] In step 410 , a pre-generated driving signal is used to drive a motor to vibrate, where the driving signal is associated with two or more frequencies.
[0069] Unlike the aforementioned simulation, determining the motor model parameters requires actually driving the motor. For example, a digital signal can be generated on the host computer. After digital-to-analog conversion and power amplification, this digital signal becomes an analog driving signal, which is then applied to both ends of the linear motor. The applied voltage can be preset. Under the driving signal, the motor will vibrate along with the tooling.
[0070] In one embodiment, the driving signal is associated with more than two frequencies, that is, the driving waveform for driving the motor has multiple frequency points, for example, more than 10 or more frequency points, thereby providing a basis for the subsequent acquisition of motor model parameters. The frequency range of the driving signal can be between 20-6000 Hz, and the waveform of the driving signal can be a sine wave, a square wave, a rounded square wave, etc. For example, in response to the modeling enable signal, the waveform type can be selected and a waveform or a waveform group with multiple predetermined frequency points can be generated to drive the motor once or multiple times. Specifically, the host computer can transmit the waveform data to a data exchange device such as a microcontroller. The data exchange device can cache part or all of the waveform data, and then send it to a digital-to-analog conversion device for digital-to-analog conversion and signal amplification processing, and then provide the amplified driving waveform to the linear motor to drive the motor to vibrate.
[0071] Specifically, in one embodiment, two or more frequency points can be selected within a predetermined frequency range, and a fixed-period drive waveform can be generated for each frequency. For example, the predetermined frequency range can be 20-6000 Hz. Within this range, n frequency points are selected, where n can be an integer greater than 10, and drive waveforms having corresponding frequencies are generated. In other words, n drive waveforms are generated, each of which can last for a number of periods, for example, 3-5 periods. These n drive waveforms can be sent to a drive circuit connected to the motor, which then drives the motor n times.
[0072] In another embodiment, a starting frequency and an ending frequency can be selected within a predetermined frequency range, and a continuous drive waveform having more than two frequencies can be generated with a preset frequency step. For example, the predetermined frequency range can be 20-6000 Hz, that is, 20 Hz can be selected as the starting frequency and 6000 Hz as the ending frequency, and a preset frequency step can be set, which can be, for example, 1-20 Hz, so that a set of frequency values can be determined within the preset frequency range. Then, a waveform of several cycles is generated for each frequency point in the set of frequency values, and the waveforms of all frequency points are connected end to end in time sequence to generate a continuous drive waveform having multiple frequency points. It can be seen that in this embodiment, only one drive waveform is generated when making a drive waveform. The drive waveform can be sent to the motor drive circuit, and the drive circuit drives the motor once.
[0073] Step 420: Acquire response data of the motor under the driving signal.
[0074] For example, sensors installed at both ends of the motor or on the tooling can be used to collect response data such as electrical signals and vibration levels generated by the motor during vibration, and corresponding response data can be collected for the driving signal at each frequency point. When there are more than two frequency points in the driving signal, the collected response data will also be associated with the more than two frequencies.
[0075] In one embodiment, the response data includes voltage data and current data. For example, voltage and current sensors may be provided at both ends of the motor so that the voltage across the motor and the current flowing through the motor coils may be monitored in real time.
[0076] In one embodiment, the response data may also include vibration data such as the acceleration of the motor. The vibration of the linear motor will drive the tooling to vibrate in the opposite direction. Therefore, the vibration acceleration of the motor can be measured by a sensor such as a three-axis accelerometer placed close to the tooling near the motor position.
[0077] Although steps 310 and 320 are described separately above, it is understood that driving the motor to vibrate and collecting vibration response data can be performed simultaneously. Specifically, response data for the drive waveform at corresponding frequency points can be collected while the motor is vibrating. The collected data, such as voltage, current, and acceleration, can be transmitted to a host computer for smoothing and other processing to obtain response data for subsequent calculation of motor model parameters.
[0078] Step 430: Calculate the impedance value of the motor at each frequency point based on the response data.
[0079] In one embodiment, when the motor is driven to vibrate sequentially using n driving waveforms, the host computer can calculate the impedance value Z at the kth frequency point based on the voltage and current data collected when the motor vibrates under the driving waveform for the kth (1-n)th waveform data, for example in Furthermore, after obtaining the corresponding impedance value at each of the n frequency points, the calculated impedance value is associated with the corresponding frequency value to obtain the frequency impedance curve of the motor within the set frequency range.
[0080] In another embodiment, when a single continuous driving waveform is used to drive the motor to vibrate, the host computer can calculate the impedance value Z at each frequency point based on the voltage and current data collected when the motor vibrates under the driving waveform, for example in After the drive waveform that drives the motor to vibrate is played, a continuous impedance curve in the time domain can be calculated. Then, through operations such as DFT, the frequency impedance curve of the motor within the set frequency range can be obtained.
[0081] In step 440 , the motor model parameters are calculated using the motor impedance model based on the obtained frequency impedance curve.
[0082] In one embodiment, the obtained frequency impedance curve can be used to perform numerical fitting to calculate the motor model parameters, and the modeling parameters include: motor resistance R e, angular frequency ω, motor inductance L e , motor electromagnetic force coefficient Bl, damping coefficient R ms , motor mass M ms 、Motor force instant C ms , the motor impedance model can be expressed as follows:
[0083] Among them, Z in the above formula vc is the impedance, angular frequency ω=2πf, and f is the frequency of the driving waveform.
[0084] The motor mass M in the above model ms It can be the overall mass of the motor, which can be obtained by weighing, thereby reducing the amount of fitting calculations. Alternatively, the motor mass M ms It can also be the mass of the motor oscillator, which can be obtained through the above model fitting calculation.
[0085] When using the above model for numerical fitting, constraints can be added. When ω is equal to 0, the motor resonant angular frequency ω0 = 2πf0 (f0 is the motor resonant frequency), that is, when M is calculated by fitting ms 、C ms Based on this, the resonant angular frequency ω0 of the motor can be obtained:
[0086] In addition, the motor's Q factor and spring constant K can be calculated based on the following formula:
[0087] Among them, Q es , Q ms Represent the circuit quality factor and mechanical quality factor of the motor respectively, based on Q es , Q ms The motor system Q factor Q can be calculated by the following formula ts :
[0088] It can be seen that this embodiment can directly calculate the motor electromagnetic force coefficient Bl, resonant angular frequency ω0, motor mass M based on the measured frequency impedance curve. ms , motor resistance R e , motor inductance L e , system Q factor Q tsBased on the motor parameters obtained, the motor displacement, velocity and acceleration of the motor under any designed driving waveform signal can be directly simulated and calculated based on the formulas (1)-(3) described above. Then, based on the formulas (4)-(5), the acceleration evaluation value of the motor tooling for the arbitrary driving waveform can be obtained, which speeds up the simulation efficiency of the vibration effect and improves the efficiency of the waveform design.
[0089] The motor drive waveform design method of the present invention is further described below with reference to specific examples and accompanying drawings.
[0090] FIG5 is a flow chart showing a method for designing a driving waveform according to an embodiment of the present application. As shown in FIG5 , the design method may include:
[0091] In step S510 , the user specifies the vibration target acceleration of the motor or tooling.
[0092] The motor's vibration intensity is directly related to its vibrator acceleration. Therefore, the motor's target acceleration can be selected as the target driving parameter for the vibration effect. Alternatively, in actual use, the user perceives the vibration of the tooling driven by the motor, so the tooling's target acceleration can also be selected as the target driving parameter. Furthermore, users can specify the waveform's driving duration.
[0093] In step S511, the waveform parameters to be calculated are traversed, which may include a set of parameters for determining waveform data, such as waveform type, waveform voltage, waveform frequency, waveform starting phase, waveform data sampling rate, etc.
[0094] In step S512, a complete structured driving waveform is temporarily generated. For example, the host computer can generate driving waveform data based on a current set of waveform parameters, and based on the waveform data sampling rate, waveform voltage at each sampling point and other data for simulation calculation can be obtained.
[0095] In step S513, the linear motor vibration is simulated. For example, this can be performed using the method described with reference to FIG2 , which will not be repeated here. Other simulation methods can also be used, as long as they can simulate and calculate the motor vibration acceleration.
[0096] In step S514, the motor or tooling acceleration simulation result data is obtained. For example, the vibration acceleration of the motor or tooling can be calculated based on the formulas (3) and (5) described above as the simulation result data.
[0097] In step S515, the difference between the simulated acceleration and the target acceleration is calculated. For example, the calculated simulated acceleration can be the maximum value of the simulated result data, that is, the maximum intensity of the simulated haptic effect perceived by the user. The smaller the difference between the simulated acceleration and the target acceleration, the closer the desired vibration effect is.
[0098] In step S516, it is determined whether the difference is less than a threshold value. The threshold value can be preset, for example, the initial threshold value can be set to be proportional to the target acceleration, specifically, the threshold value can be set to 0.1-0.3 times the target acceleration.
[0099] In step S517, in response to the difference being less than the threshold, the threshold may be updated to the current difference, and the corresponding structured drive waveform may be saved. For example, the updated threshold and drive waveform may be stored in a register or memory. This drive waveform represents the currently calculated, best-matched motor drive waveform. The process then proceeds to step S518.
[0100] In step S518, regardless of the relationship between the difference and the threshold, it is determined whether the traversal is completed. If the traversal is not completed, the process returns to step S511 to select the next set of waveform parameters and perform simulation calculations and other operations.
[0101] In step S519, if the search is complete, the final stored structured drive waveform data is output. This drive waveform data can be used as the drive waveform for the linear motor. For example, after the drive waveform data is obtained through the search, the relevant drive waveform can be displayed using the information display tool of the host computer. Using this structured drive waveform data (a set of waveform parameters) to generate a continuous drive waveform to actually drive the motor, the desired target acceleration can be achieved.
[0102] FIG6 is a flow chart showing a method for designing a driving waveform according to another embodiment of the present application. As shown in FIG6 , the design method may include:
[0103] In step S610 , target acceleration curve data of a motor or a tool is specified.
[0104] Different from the previous embodiment, the driving target parameter in this embodiment is acceleration curve data. For example, a specified acceleration curve may be discretized to obtain a set of acceleration values as the driving target parameter.
[0105] In step S611, the waveform parameters to be calculated are traversed, which may include a set of parameters for determining waveform data, such as waveform type, waveform voltage, waveform frequency, driving duration, waveform starting phase, waveform data sampling rate, etc.
[0106] In step S612 , a complete structured driving waveform is temporarily generated.
[0107] In step S613 , the linear motor vibration is simulated and calculated.
[0108] In step S614 , motor or tooling acceleration simulation result data is obtained.
[0109] Steps S612, S613, and S614 are substantially the same as steps S512, S513, and S514 in the previous embodiment, and are not described again here.
[0110] In step S615, the similarity between the simulated acceleration curve and the target acceleration curve is calculated. For example, after the acceleration curve is obtained through simulation, the similarity between the simulated acceleration curve and the target acceleration curve can be obtained based on a machine algorithm such as the Euclidean distance calculation method or the dynamic time warping algorithm.
[0111] In step S616, it is determined whether the similarity is greater than a threshold value. The threshold value can be preset, for example, the threshold value can be set to a value within the range of 0.7-0.9.
[0112] In step S617, if the similarity is greater than the threshold, the traversal process can be terminated and the corresponding structured drive waveform can be selected as the motor drive waveform. Alternatively, as shown in Figure 6, the threshold can be updated to the current similarity, and the corresponding structured drive waveform can be saved. For example, the updated threshold and drive waveform can be stored in a register or memory. This drive waveform is the currently calculated and most consistent motor drive waveform. The process then proceeds to step S618.
[0113] In step S618, it is determined whether the traversal is completed. If the traversal is not completed, the process returns to step S611 to select the next set of waveform parameters and perform simulation calculations and other operations.
[0114] In step S619, if the search is complete, the final stored structured drive waveform data is output. This drive waveform data can be used as the drive waveform for the linear motor. For example, after the drive waveform data is searched and obtained, the relevant drive waveform can be displayed using an information display tool on a host computer. Using this structured drive waveform data to generate a continuous drive waveform to actually drive the motor can achieve a vibration effect that closely matches the target vibration sensation.
[0115] FIG7 is a flow chart showing a method for designing a driving waveform according to another embodiment of the present application. As shown in FIG7 , the design method may include:
[0116] In step S710 , target acceleration curve envelope data of the motor or tooling is determined.
[0117] Unlike the previous embodiment, the target drive parameter in this embodiment is the curve envelope data of the target acceleration. For example, this can be formed by connecting the node data of the acceleration curve to form a number of envelopes, and then splicing these envelopes to form the curve envelope of the corresponding curve. Using the acceleration curve envelope data as the target drive parameter can reduce the subsequent calculation amount and improve the efficiency of drive waveform design.
[0118] In step S711, the waveform parameters to be calculated are traversed.
[0119] In step S712 , a complete structured driving waveform is temporarily generated.
[0120] In step S713 , the linear motor vibration is simulated.
[0121] In step S714, motor or tooling acceleration simulation result data is obtained.
[0122] In step S715 , the similarity between the simulated acceleration curve envelope and the target acceleration curve envelope is calculated.
[0123] In step S716, it is determined whether the similarity is greater than a threshold. It is understood that the threshold setting in this embodiment may be different from the threshold setting in the embodiment described in conjunction with Figures 5-6.
[0124] In step S717, in response to the similarity being greater than the threshold, the threshold may be updated to the current similarity, and the corresponding structured driving waveform may be saved, and then the process may jump to step S718.
[0125] In step S718, it is determined whether the traversal is completed. If the traversal is not completed, the process returns to step S711 to select the next set of waveform parameters and perform simulation calculations and other operations.
[0126] In step S719 , if the traversal is completed, the finally stored structured driving waveform data is output.
[0127] Steps S711-S719 are essentially the same as steps S611-S619 in the previous embodiment and are not further described here. This drive waveform data can be used as the drive waveform for the linear motor. For example, after searching for and obtaining this drive waveform data, the relevant drive waveform can be displayed using an information display tool on a host computer. Using this structured drive waveform data to generate a continuous drive waveform for actual motor driving can produce a vibration curve that closely matches the target acceleration curve.
[0128] The embodiments of the present application can automatically generate structured driving waveform data according to the vibration state or effect expected by the user. The driving waveform data can be used to generate continuous driving waveform data, and the expected vibration state data and vibration effect can be obtained, which significantly improves the efficiency of driving waveform design.
[0129] An embodiment of the present invention also provides a device for designing a motor drive waveform. As shown in FIG8 , the device 800 for designing a motor drive waveform according to an embodiment of the present application may include: a setting unit 810 for setting drive target parameters; a generation unit 820 for determining structured waveform parameters and generating waveform data based on the waveform parameters; a simulation unit 830 for performing simulation calculations using the waveform data to obtain simulated vibration data; and a determination unit 840 for comparing the simulated vibration data with the drive target parameters, and determining the waveform data corresponding to the simulated vibration data that meets predetermined conditions as the drive waveform of the motor. The above-mentioned units or modules can be integrated into a host computer, such as a processor with data processing capabilities. The host computer may also include other functional modules such as digital-to-analog conversion.
[0130] In one embodiment, the design device 800 may further include a display unit 850 for displaying the driving waveform data.
[0131] In one embodiment, the driving target parameter includes one or more of the acceleration, acceleration curve, and acceleration curve envelope of the motor and / or tooling.
[0132] In one embodiment, the structured waveform parameters include waveform type, waveform voltage, and waveform frequency.
[0133] In one embodiment, the simulation unit 830 is configured to perform simulation calculations using the waveform data in the following manner to obtain simulated vibration data: perform component analysis on the waveform data to decompose the waveform data into one or more component driving waveforms; calculate the vibration data of the motor under each component driving waveform; and synthesize the calculated vibration data to obtain simulated vibration data of the motor under the waveform data.
[0134] In one embodiment, the determination unit 840 is configured to determine the driving waveform of the motor in the following manner: determining the similarity between the simulated vibration data and the driving target parameters; and determining the waveform data corresponding to the simulated vibration data whose similarity is greater than a preset threshold as the driving waveform of the motor.
[0135] In one embodiment, the determination unit 840 is configured to determine the driving waveform of the motor in the following manner: after traversing the structured waveform parameters, determining the waveform data corresponding to the simulated vibration data with the highest similarity to the driving target parameters; and determining the waveform data as the driving waveform of the motor.
[0136] In one embodiment, the determination unit 840 is configured to determine the waveform data corresponding to the simulated vibration data having the highest similarity to the driving target parameters in the following manner: calculating the difference between the simulated vibration data and the driving target parameters, and comparing the difference with a threshold; in response to the difference being less than the threshold, updating the threshold to the difference and saving the corresponding waveform data; otherwise, reselecting the structured waveform parameters and performing simulation calculations; traversing the structured waveform parameters, and determining the last saved waveform data as the waveform data corresponding to the simulated vibration data having the highest similarity to the driving target parameters.
[0137] In one embodiment, the determination unit 840 is configured to determine the waveform data corresponding to the simulated vibration data having the highest similarity to the driving target parameters in the following manner: calculating the similarity between the simulated vibration data and the driving target parameters, and comparing the similarity with a threshold; in response to the similarity being greater than the threshold, updating the threshold to the similarity and saving the corresponding waveform data; otherwise, reselecting the structured waveform parameters and performing simulation calculations; traversing the structured waveform parameters, and determining the last saved waveform data as the waveform data corresponding to the simulated vibration data having the highest similarity to the driving target parameters.
[0138] The specific functions and operations of the various units and modules in the above-mentioned simulation device 800 have been described in detail in the design method described above with reference to Figures 1-7, so they are only briefly introduced here and unnecessary repeated descriptions are omitted.
[0139] This article also provides a computer-readable storage medium, which stores a design program for a motor drive waveform. When the design program for a motor drive waveform is run by a processor, the steps of the motor drive waveform design method described above are executed. For specific implementation, please refer to the waveform design method described in Figures 1-7, which will not be repeated here.
[0140] An embodiment of this document may also be an electronic device, comprising a memory, a processor, and instructions stored in the memory and executable on the processor, wherein the instructions, when executed by the processor, cause the processor to execute the steps of the motor drive waveform design method as described above. For specific implementation, reference may be made to the waveform design method described in Figures 1-7, which will not be repeated here.
[0141] FIG9 is a block diagram of an electronic device according to an embodiment of the present application. As shown in FIG9 , the electronic device 900 includes a processor 910 and a memory 920 .
[0142] The processor 910 may be a central processing unit (CPU), a microprocessor, or other forms of processing chips having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 900 to perform desired functions.
[0143] Memory 920 can be an internal storage unit of an electronic device, such as non-volatile and / or volatile memory. Memory 920 can store various data, such as motor model parameters, and can include one or more computer program products. These computer program products can include various forms of computer-readable storage media, such as volatile and / or non-volatile memory. These computer-readable storage media can store one or more computer program instructions, which processor 910 can execute to implement the waveform design steps described above and / or other desired functions.
[0144] In one example, the electronic device 900 may further include: an input device 930 and an output device 940, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). For example, the input device 930 may be a camera, an antenna, or a microphone device. In addition, the input device 930 may also include, for example, a keyboard, a mouse, etc. The output device 940 may output various information to the outside. The output device 940 may include, for example, a display, a speaker, a communication network, and a remote output device connected thereto.
[0145] Of course, for the sake of simplicity, FIG9 only shows some of the components of the electronic device 900 that are relevant to the present application, omitting components such as a bus, input / output interfaces, etc. In addition, the electronic device 900 may further include any other appropriate components depending on the specific application.
[0146] The basic principles of the present application have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this application are merely illustrative and not restrictive, and it should not be assumed that these advantages, strengths, and effects are required of each embodiment of this application. In addition, the specific details disclosed above are merely illustrative and facilitating understanding, and are not restrictive. The above details do not limit this application to necessarily being implemented using the above specific details.
[0147] The above description has been provided for the purpose of illustration and description. Furthermore, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A method for designing a motor drive waveform, comprising: Set drive target parameters; Determining structured waveform parameters, and generating waveform data according to the waveform parameters; Performing simulation calculation using the waveform data to obtain simulated vibration data; as well as The simulated vibration data is compared with the drive target parameter, and the waveform data corresponding to the simulated vibration data that meets a predetermined condition is determined as the drive waveform of the motor.
2. The design method according to claim 1, wherein: The driving target parameters include one or more of the acceleration, acceleration curve, and acceleration curve envelope of the motor and / or tooling.
3. The design method according to claim 1, wherein: The structured waveform parameters include waveform type, waveform voltage and waveform frequency.
4. The design method according to claim 1, wherein: Using the waveform data to perform simulation calculations to obtain simulated vibration data includes: Performing component analysis on the waveform data to decompose the waveform data into one or more component driving waveforms; Calculate the vibration data of the motor under each component driving waveform; The various vibration data obtained by calculation are synthesized to obtain simulated vibration data of the motor under the waveform data.
5. The design method according to claim 1, wherein: Comparing the simulated vibration data with the drive target parameter, and determining the waveform data corresponding to the simulated vibration data that meets a predetermined condition as the drive waveform of the motor includes: Determining the similarity between the simulated vibration data and the drive target parameters; The waveform data corresponding to the simulated vibration data having a similarity greater than a preset threshold is determined as the driving waveform of the motor.
6. The design method according to claim 1, wherein: Comparing the simulated vibration data with the drive target parameter, and determining the waveform data corresponding to the simulated vibration data that meets a predetermined condition as the drive waveform of the motor includes: After traversing the structured waveform parameters, determining the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameters; The waveform data is determined as a drive waveform of the motor.
7. The design method according to claim 6, wherein: Determining the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameter includes: Calculating a difference between the simulated vibration data and the drive target parameter, and comparing the difference with a threshold; In response to the difference being smaller than the threshold, updating the threshold to the difference and saving the corresponding waveform data; otherwise, reselecting the structured waveform parameters and performing simulation calculation; The structured waveform parameters are traversed, and the last saved waveform data is determined as the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameters.
8. The design method according to claim 6, wherein: Determining the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameter includes: Calculating the similarity between the simulated vibration data and the drive target parameter, and comparing the similarity with a threshold; In response to the similarity being greater than the threshold, updating the threshold to the similarity and saving the corresponding waveform data; otherwise, reselecting the structured waveform parameters and performing simulation calculation; The structured waveform parameters are traversed, and the last saved waveform data is determined as the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameters.
9. A device for designing a motor drive waveform, comprising: A setting unit, which is used to set driving target parameters; A generating unit, which is used to determine structured waveform parameters and generate waveform data according to the waveform parameters; A simulation unit, which is used to perform simulation calculation using the waveform data to obtain simulated vibration data; as well as a determination unit, configured to compare the simulated vibration data with the drive target parameters, The waveform data corresponding to the simulated vibration data satisfying a predetermined condition is determined as the driving waveform of the motor.
10. An electronic device, comprising a memory, a processor, and instructions stored in the memory and executable on the processor, wherein when the instructions are executed by the processor, the processor: Set drive target parameters; Determining structured waveform parameters, and generating waveform data according to the waveform parameters; Performing simulation calculation using the waveform data to obtain simulated vibration data; as well as The simulated vibration data is compared with the drive target parameter, and the waveform data corresponding to the simulated vibration data that meets a predetermined condition is determined as the drive waveform of the motor.
11. The electronic device according to claim 10, wherein: Using the waveform data to perform simulation calculations to obtain simulated vibration data includes: Performing component analysis on the waveform data to decompose the waveform data into one or more component driving waveforms; Calculate the vibration data of the motor under each component driving waveform; The various vibration data obtained by calculation are synthesized to obtain simulated vibration data of the motor under the waveform data.
12. The electronic device according to claim 10, wherein: Comparing the simulated vibration data with the drive target parameter, and determining the waveform data corresponding to the simulated vibration data that meets a predetermined condition as the drive waveform of the motor includes: Determining the similarity between the simulated vibration data and the drive target parameters; The waveform data corresponding to the simulated vibration data having a similarity greater than a preset threshold is determined as the driving waveform of the motor.
13. The electronic device according to claim 10, wherein: Comparing the simulated vibration data with the drive target parameter, and determining the waveform data corresponding to the simulated vibration data that meets a predetermined condition as the drive waveform of the motor includes: After traversing the structured waveform parameters, determining the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameters; The waveform data is determined as a drive waveform of the motor.
14. The electronic device according to claim 13, wherein: Determining the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameter includes: Calculating a difference between the simulated vibration data and the drive target parameter, and comparing the difference with a threshold; In response to the difference being smaller than the threshold, updating the threshold to the difference and saving the corresponding waveform data; otherwise, reselecting the structured waveform parameters and performing simulation calculation; The structured waveform parameters are traversed, and the last saved waveform data is determined as the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameters.
15. The electronic device according to claim 13, wherein: Determining the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameter includes: Calculating the similarity between the simulated vibration data and the drive target parameter, and comparing the similarity with a threshold; In response to the similarity being greater than the threshold, updating the threshold to the similarity and saving the corresponding waveform data; otherwise, reselecting the structured waveform parameters and performing simulation calculation; The structured waveform parameters are traversed, and the last saved waveform data is determined as the waveform data corresponding to the simulated vibration data having the highest similarity to the drive target parameters.
16. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor is caused to: Set drive target parameters; Determining structured waveform parameters, and generating waveform data according to the waveform parameters; Performing simulation calculation using the waveform data to obtain simulated vibration data; as well as The simulated vibration data is compared with the drive target parameter, and the waveform data corresponding to the simulated vibration data that meets a predetermined condition is determined as the drive waveform of the motor.
Citation Information
Patent Citations
Excitation signal searching method of motor and electronic equipment
CN110058679A
Excitation signal generation method and device, terminal and storage medium
CN111679735A
Apparatus and method for supporting design of driving mechanism, and storage medium
JP2005227858A
Simulation method of synchronous generator system for ships
KR1020170130825A
