Detailed Description
Hereinafter, exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. It will be apparent that the described embodiments are only some of the embodiments of the present application and not all of the embodiments of the present application. Also, not all of the above advantages need be achieved at the same time to practice any of the examples of embodiments of the application. It should be understood that the application should not be limited to the specific details of these example embodiments. Rather, embodiments of the application may be practiced without these specific details or in other alternative ways, without departing from the spirit and principles of the application, which are defined by the claims.
Fig. 1 is a flowchart illustrating a method for simulating the vibration effect of a motor according to an embodiment of the present application, and as shown in fig. 1, the method 100 may begin with step S110, where a driving waveform for simulating the vibration of the motor is provided.
For example, a signal for simulating vibration of the driving motor can be generated at a computer terminal, a digital signal of the driving waveform can be directly subjected to a subsequent simulation step, or can be actually subjected to digital-to-analog conversion after the simulation step and then loaded to two ends of the linear motor for actual measurement so as to verify the simulation accuracy.
In an embodiment, one or more structured waveforms may be selected from a pre-designed structured waveform library, and the one or more structured waveforms are superimposed, thereby obtaining the driving waveform. The structured waveform library may also be referred to as a waveform dataset, which may be stored in a memory, and each structured waveform may be determined by a waveform type, a waveform voltage, a waveform frequency, and the like, where the waveform type may include a sine wave, a square wave, a rounded square wave, and the like, the waveform voltage may be characterized by a peak voltage or an average value, the peak voltage or the average value may be equivalently scaled, and the waveform frequency may be selected to be equal to or close to a resonant frequency f0 of the motor, such that the motor generates a higher vibration level, for example, between 100 Hz and 200 Hz.
In addition, the driving waveform can also have data dimensions such as waveform time length, waveform initial phase, waveform data sampling rate and the like, the waveform time length is the duration of the driving waveform, the waveform time length can be represented by duration (unit ms) or waveform period number, the change curve of motor vibration data in the time domain can be determined through simulation by the parameter, the waveform initial phase can be any value between 0 pi and 2 pi, and the waveform data sampling rate can correspond to the sampling rate in the driving chip.
By structurally characterizing the drive waveform with multiple parameter dimensions, several structured drive waveforms can be pre-designed, each corresponding to a different combination of parameters. Fig. 2 shows a schematic diagram of some structured driving waveforms, as shown in fig. 2, which specifically shows three waveforms (time on the abscissa and voltage on the ordinate), each of which may have the following parameters:
Waveform ID |
Type(s) |
Duration of time |
Peak value |
Phase of |
Frequency of |
Sampling frequency |
1 |
Sine wave |
2 |
127 |
0 |
119.5 |
24k |
2 |
Round corner square wave |
2 |
127 |
0 |
119.5 |
24k |
3 |
Square wave |
2 |
127 |
0 |
119.5 |
24k |
In the above table, the waveform duration is characterized by a number of cycles, the peak value is characterized by a digital quantized value, the waveform frequency, the sampling frequency are in Hz, it is understood that the parameters in the table are merely examples and not limitations. In actual design of the drive waveforms, one or more waveforms may be selected from these structured drive waveforms for timing stitching or waveform stacking, so that any waveform may be designed as desired.
Returning to fig. 1, after designing the motor driving waveform, the simulation method of the present embodiment may proceed to step 120 to perform component analysis on the driving waveform, and decompose the driving waveform into one or more component driving waveforms.
Because the designed driving waveform may be any waveform, in order to achieve the simulation of the vibration effect of the waveform, the embodiment can firstly analyze the component of the waveform to convert the component into the combination of component driving waveforms which can be suitable for the linear motor model, that is, each component driving waveform can be calculated by using a uniform linear motor model.
In one embodiment, the designed drive waveform may be fourier decomposed such that it is decomposed into a linear combination of one or more harmonics, each of which may be considered a component drive waveform, the voltage value and frequency of which may be determined by the coefficients and harmonic angular frequencies of the corresponding series obtained by the fourier decomposition. As a well-known numerical analysis tool, the present embodiment does not describe the fourier transform process in detail.
Thereafter, step 130 may be performed to calculate vibration data of the motor at each component driving waveform.
The calculation process may be to simulate at least part of the driving waveforms of the respective component driving waveforms obtained by analysis applied to both ends of the motor unit to obtain vibration data, and the vibration data may include at least one of motor vibrator displacement, motor vibrator moving speed, and motor vibrator acceleration, for example. In practical applications, the motor unit is generally fixedly disposed on the tool, and applying a driving waveform to the motor unit to generate vibration will also drive the tool to perform reverse vibration.
For example, in the case of fourier decomposition of the driving waveform, the linear motor will move in a mode of similar simple harmonic vibration under the driving of each component driving waveform, specifically, the vibrator displacement, the vibrator moving speed, and the vibrator acceleration of the obtained motor can be calculated by the following formulas (1) to (3) in the case of obtaining the motor model parameters:
Wherein x (ω) is a vibrator displacement under the component driving waveform, u (ω) is a vibrator moving speed under the component driving waveform, and a (ω) is a motor vibrator acceleration under the component driving waveform; v vc is the peak voltage of the component drive waveform, which can be determined by designing coefficients of the voltage and the corresponding progression of the component drive waveform, ω is the angular frequency of the component drive waveform signal, which is typically 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 resonant angular frequency of the motor, Q ts is the motor system Q factor, these parameters are motor intrinsic parameters, which can be obtained by modeling calculations, as will be described in more detail below.
In an embodiment, the calculation of this step may be selected for a part of the n component driving waveforms obtained by fourier decomposition, for example, the above-described analog calculation may be performed for only the component driving waveforms corresponding to the first 10 or less decomposition levels obtained by fourier decomposition, so that the calculation amount of the analog simulation may be reduced.
After performing simulation calculation on each component driving waveform to obtain corresponding vibration data, the simulation method of the embodiment may proceed to step 140, and synthesize each calculated vibration data to obtain simulated vibration data of the motor under the driving waveform.
For a linear motor, the mass block of the linear motor generally moves uniaxially under the driving waveform, so that the calculated vibration data can be linearly superimposed to obtain the final simulated vibration data of the motor. The vibration data may include motor vibrator displacement x ms, motor vibrator moving speed u ms, motor vibrator acceleration a ms. According to the method of the present embodiment, even when there is no actual motor and driving apparatus, the vibration effect of the motor can be simulated and observed after designing the driving waveform.
Fig. 3 shows a schematic diagram of output simulated vibration data provided according to an embodiment of the present application. Wherein, motor model parameters are: motor mass M ms = 0.004768, motor resistance R e = 8.1832, motor resonant frequency f0=119.5, mechanical quality factor Q ms = 8.8084, circuit quality factor Q es = 17.8745, motor inductance l= 0.00010763, tooling mass M tool =0.178, driving voltage V vc =1. The three curves respectively represent the data changes of the displacement, the speed and the acceleration of the motor vibrator obtained by simulation calculation on time sequence, and the vibration effect of the driving waveform is observed through simulation to form a design closed loop, for example, the motor can be subjected to amplitude protection based on the obtained motor vibrator displacement and vibrator displacement speed, and the vibration effect of the motor can be estimated based on the simulated motor acceleration data. Only after the expected result is met, the actual driving debugging is performed, so that the debugging time is saved.
In an embodiment, after the vibrator acceleration of the motor is obtained by calculation, the vibration level of the motor tool may also be calculated. For example, tool vibration data of the motor tool under each component driving waveform may be calculated first, and the vibration level of the motor tool may be acceleration at a predetermined position of the tool, which may be calculated by the following formula:
Wherein a tool (ω) is the acceleration of the motor tooling at the 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, and M tool is the tooling equivalent mass.
After the tool data driven by each component are obtained, the calculated tool vibration data can be synthesized, so that tool simulation vibration data of the motor tool under the driving waveform is obtained. For example, the calculated vibration data of each tool may be linearly superimposed to obtain the final simulated vibration data of the motor tool.
Alternatively, the vibration level of the motor tool may be calculated by the following formula after the final simulation obtains the vibrator acceleration of the motor:
Wherein a tool is the acceleration of the motor tool at a preset position in response to the driving waveform, M ms is the motor mass, a ms is the motor vibration acceleration under the driving waveform, and M tool is the tool equivalent mass. Through the calculation mode of the embodiment, the vibration level of the tool can be obtained without additionally arranging the vibration sensor on the tool, and whether the haptic effect accords with the expectation can be estimated based on the vibration level, so that the operation convenience is improved.
Fig. 4 is a flowchart of a method for calculating vibration data of a motor under each component driving waveform according to an embodiment of the present application, and as shown in fig. 4, obtaining motor response data of the motor under the component driving signal may include the following steps:
at step 310, model parameters of the motor are determined.
In one embodiment, for calculation according to the foregoing formulas (1) - (3), the model parameters include at least motor mass, motor resistance, motor resonant angular frequency, and the like, and may further include a motor electromagnetic force coefficient Bl and/or Q factor.
In an embodiment, the partial model parameters of the motor may be determined based on the response data of the motor to the preset driving signal, for example, the resonant frequency and the angular frequency of the motor may be determined based on the frequency point corresponding to the maximum measured value of the vibration acceleration, and the motor resistance, inductance, etc. parameters may be determined based on the motor calculation model for the voltage and the current.
In an embodiment, the frequency impedance curve of the motor may be obtained based on the voltage and current response data of the motor under the driving signal having a plurality of frequency points, and the motor parameter may be directly calculated based on a motor modeling formula, which will be described later in detail.
At step 320, vibration data of the motor at each component drive waveform is calculated based on a motor vibration model associated with model parameters of the motor.
In the case of knowing the motor model parameters, the response data of the motor to the component driving waveform after the analysis of the arbitrary driving waveform can be obtained through calculation of the motor vibration model (formula 1-3) described above, and will not be described here.
Fig. 5 is a schematic flow chart of calculating parameters of a motor model according to an embodiment of the application. As shown in fig. 5, calculating motor model parameters may be accomplished by:
in step 310, the motor is driven to vibrate using a pre-generated drive signal, the drive signal being associated with more than two frequencies.
Unlike the simulation described above, the actual driving of the motor is required in the process of determining the motor model parameters. For example, a digital signal may be generated at the host computer, and the digital signal may be converted into a driving analog signal by digital-to-analog conversion and power amplification, and then the driving analog signal may be applied to both ends of the linear motor, and the applied voltage may be preset. The motor will drive the tool to vibrate together under the drive signal.
In an embodiment, the driving signal is associated with more than two frequencies, i.e. the driving waveform driving the motor has a plurality of frequency bins, e.g. may have more than 10 or more frequency bins, which may provide a basis for subsequent acquisition of motor model parameters. The frequency range of the drive signal may be between 20-6000Hz, the waveform of the drive signal may take the form of a sine wave, a square wave, a rounded square wave, etc., for example, in response to a modeling enable signal, the waveform type may be selected and a waveform or set of waveforms having a plurality of predetermined frequency points may be generated, driving the motor a single time or multiple times. Specifically, the upper computer can transmit waveform data to a data exchange device such as a microcontroller, the data exchange device can buffer part or whole waveform data, the data exchange device can transmit the data to a digital-to-analog conversion device for digital-to-analog conversion and signal amplification processing, and then the amplified driving waveform is provided to the linear motor to drive the motor to vibrate.
Specifically, in an embodiment, more than two frequency points may be selected within a predetermined frequency range, and a driving waveform of a fixed period may be generated for each frequency. For example, the predetermined frequency range may be 20-6000Hz, within which n frequency points are selected, n may be an integer above 10, and driving waveforms having corresponding frequencies are generated, i.e. n driving waveforms are generated, each of which may last for several cycles, e.g. 3-5 cycles. The n driving waveforms may be sent to driving circuits connected to the motor, respectively, which drives the motor n times.
In another embodiment, the start frequency and the end frequency may be selected within a predetermined frequency range, and a continuous driving waveform having two or more frequencies may be generated in preset frequency steps. For example, the predetermined frequency range may be 20-6000Hz, i.e. 20Hz may be selected as the starting frequency and 6000Hz as the ending frequency, and a preset frequency step may be set, which step may be for example 1-20Hz, whereby a set of frequency values may be determined in the preset frequency range. Then, a waveform of several cycles is generated for each frequency bin in the set of frequency values, and waveforms of all frequency bins are connected end to end in time sequence to generate a continuous driving waveform having a plurality of frequency bins. It can be seen that the fabrication of the driving waveforms in this embodiment generates only one driving waveform. The drive waveform may be sent to a motor drive circuit that drives the motor a single time.
Step 320, obtaining response data of the motor under the driving signal.
For example, the response data of the motor, such as an electric signal, a vibration level and the like generated in the vibration process can be collected through the sensors arranged at the two ends of the motor or on the tooling, the corresponding response data is collected for the driving signals of all the frequency points, and the collected response data is also related to the two or more frequencies when the driving signals have the two or more frequency points.
In one embodiment, the response data includes voltage data and current data, for example, voltage and current sensors may be provided across the motor so that the voltage across the motor, as well as the current flowing through the motor coils, may be monitored in real time.
In an embodiment, the response data may further include vibration data such as acceleration of the motor, and the vibration of the linear motor drives the tool to vibrate reversely, so that the vibration acceleration of the motor can be obtained through measurement of a sensor such as a triaxial accelerometer attached to the tool near the motor.
Although described separately above with respect to steps 310 and 320, it is understood that driving the motor to vibrate and collecting response data of the vibration may be performed simultaneously, i.e., response data of the driving waveform at corresponding frequency points may be collected simultaneously during vibration of the motor. The collected data such as voltage, current and acceleration can be transmitted to an upper computer for smoothing and the like to obtain response data so as to calculate the subsequent motor model parameters.
And 330, determining the parameters of the motor according to the response data.
In one embodiment, as shown in FIG. 5, the parameters of the motor may be determined by:
and step 331, calculating the impedance value of the motor at each frequency point according to the response data.
In one embodiment, when the motor is sequentially driven to vibrate by n driving waveforms, the upper computer can calculate the impedance Z at the kth frequency point based on the voltage and current data acquired by the motor vibrating under the driving waveforms for the kth (1-n) waveform data, for exampleWherein the method comprises the steps ofVoltage and current data, respectively. And, after obtaining the corresponding impedance values at each of all n frequency points, correlating the calculated impedance values with the corresponding frequency values, thereby obtaining the frequency impedance curve of the motor in the set frequency range.
In another embodiment, when the motor is driven to vibrate by a single continuous driving waveform, the upper computer can calculate the impedance Z at each frequency point based on the voltage and current data collected by the motor vibrating under the driving waveform, for exampleWherein the method comprises the steps ofVoltage and current data, respectively. After the driving waveform of the driving motor for vibration is played, a continuous curve of the impedance value in the time domain can be calculated and obtained, and then a frequency impedance curve of the motor in a set frequency range can be obtained through operations such as DFT.
Step 332, calculating model parameters of the motor by using the motor impedance model based on the obtained frequency impedance curve.
In one embodiment, the obtained frequency impedance curve may be used to perform a numerical fit to calculate motor model parameters, including: 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 transient C ms, motor impedance model may have the following expression:
wherein Z vc is impedance, and angular frequency ω=2pi f, f is the frequency of the driving waveform.
The motor mass M ms in the above model may be the overall mass of the motor, which may be obtained by weighing, so that the fitting calculation may be reduced. Alternatively, the motor mass M ms may also be a motor vibrator mass, which may be obtained by the model fitting calculation described above.
In numerical fitting using the above model, constraints can be added, in the above formulaWhen equal to 0, ω will be the motor resonant angular frequency ω 0 =2pi_f0 (f 0 is the motor resonant frequency), i.e. the resonant angular frequency ω 0 of the motor can be obtained on the basis of fitting the calculated M ms、Cms:
in addition, the Q factor and the elastic stiffness coefficient K of the motor can also be calculated based on the following formula:
Wherein, Q es、Qms represents the circuit quality factor and the mechanical quality factor of the motor, respectively, and the Q ts of the motor system can be obtained by the following formula based on Q es、Qms:
As can be seen, the present embodiment can directly calculate and obtain motor parameters including the motor electromagnetic force coefficient Bl, the resonant angular frequency ω 0, the motor mass M ms, the motor resistance R e, the motor inductance L e, the system Q factor Q ts, and the like based on the measured frequency impedance curve, and can directly calculate and obtain the vibrator displacement, the speed and the acceleration of the motor under the driving waveform signal of any design based on the formulas (1) - (3) described above according to the obtained motor parameters, so as to obtain the acceleration evaluation value of the motor tool for the arbitrary driving waveform based on formulas (4) - (5). After the vibration data is calculated, the relevant simulated vibration data may be displayed, for example, in the form of a data graph of fig. 3, using an information display tool of a host computer.
According to the embodiment of the application, the vibration effect can be observed through simulation after the waveform is designed, and the actual driving debugging is performed after the expected result is obtained, so that the waveform design flow can be simplified, and the debugging time can be saved.
The embodiment of the application also provides a simulation device for the motor vibration effect. As shown in fig. 6, the simulation apparatus 400 of the motor vibration effect according to the embodiment of the present application may include: a providing unit 410 for providing a driving waveform for performing a simulated vibration of the motor; an analysis unit 420 for performing component analysis on the driving waveform, and decomposing the driving waveform into one or more component driving waveforms; a calculation unit 430 for calculating vibration data of the motor at the respective component driving waveforms; and a synthesizing unit 440 for synthesizing the calculated respective vibration data to obtain simulated vibration data of the motor under the driving waveform. The above units or modules may be integrated into a host computer, such as a processor with data processing capabilities, and the host computer may further include other functional modules such as digital-to-analog conversion.
In an embodiment, the simulation device 400 may also include a display unit 450 for presenting the simulated vibration data.
In an embodiment, the providing unit 410 is configured to provide a driving waveform for simulating vibration of the motor in the following manner: selecting one or more structured waveforms from a preset structured waveform library, wherein each structured waveform is at least determined by a waveform type, a waveform voltage and a waveform frequency; and superposing the one or more structured waveforms to obtain the driving waveform.
In one embodiment, the calculating unit 430 is configured to calculate vibration data of the motor under each component driving waveform as follows: obtaining model parameters of the motor; vibration data of the motor under each component drive waveform is calculated based on a motor vibration model associated with model parameters of the motor.
In an embodiment, the computing unit 430 may receive model parameters of the motor; alternatively, the computing unit 430 may be configured to determine model parameters of the motor in the following manner including: driving the motor to vibrate using a pre-generated drive signal, the drive signal being associated with more than two frequencies; acquiring response data of the motor under the driving signal; and determining model parameters of the motor according to the response data.
In an embodiment, the vibration data includes at least one of motor vibrator displacement, motor vibrator moving speed, motor vibrator acceleration.
In an embodiment, the calculating unit may be further configured to calculate vibration data of the motor fixture, which may be performed in the following manner: calculating tool vibration data of the motor tool under each component driving waveform; and synthesizing the calculated tool vibration data to obtain tool simulation vibration data of the motor tool under the driving waveform.
The specific functions and operations of the respective units and modules in the above-described simulation apparatus 400 have been described in detail in the evaluation methods described above with reference to fig. 1 to 5, and thus are only briefly described herein, and unnecessary repetitive descriptions are omitted.
Also provided herein is a computer-readable storage medium having stored thereon a simulation program of a motor vibration effect, which when executed by a processor performs the steps of the simulation method of a motor vibration effect as described above, and the simulation calculation method may be specifically implemented with reference to fig. 1 to 5, which will not be described herein.
Embodiments herein may also be an electronic device including a memory, a processor, and instructions stored on the memory and executable on the processor, wherein the instructions, when executed by the processor, cause the processor to perform steps of a method of simulating motor vibration effects as described above, and a specific implementation of the method of simulating calculation may be described with reference to fig. 1-5, which is not repeated herein.
Fig. 7 illustrates a block diagram of an electronic device according to an embodiment of the application. As shown in fig. 7, the electronic device 500 includes a processor 510 and a memory 520.
The processor 510 may be a Central Processing Unit (CPU), microprocessor, or other form of processing chip having data processing and/or instruction execution capabilities, and may control other components in the electronic device 500 to perform desired functions.
Memory 520 may be an internal storage unit of an electronic device, such as non-volatile and/or volatile memory, and the like. The memory 520 may have various types of data, such as motor model parameters, stored thereon, and may comprise one or more computer program products, which may comprise various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by the processor 510 to perform the above-described simulation of the vibration effect of the motor under a pre-designed drive waveform and/or other desired functions.
In one example, the electronic device 500 may further include: an input device 530 and an output device 540, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown). The input means 530 may be, for example, a camera, an antenna or a microphone device. In addition, the input device 530 may also include, for example, a keyboard, a mouse, and the like. The output device 540 may output various information to the outside. The output device 540 may include, for example, a display, speakers, and a communication network and its connected remote output devices, among others.
Of course, only some of the components of the electronic device 500 that are relevant to the present application are shown in fig. 7 for simplicity, components such as buses, input/output interfaces, etc. are omitted. In addition, the electronic device 500 may include any other suitable components depending on the particular application.
The basic principles of the present application have been described above in connection with specific embodiments, but it should be noted that the advantages, benefits, effects, etc. mentioned in the present application are merely examples and not intended to be limiting, and these advantages, benefits, effects, etc. are not to be construed as necessarily possessed by the various embodiments of the application. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, as the application is not necessarily limited to practice with the above described specific details.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.