WO2024124992A1 - 一种线性马达的老化测试方法及终端设备 - Google Patents
一种线性马达的老化测试方法及终端设备 Download PDFInfo
- Publication number
- WO2024124992A1 WO2024124992A1 PCT/CN2023/117816 CN2023117816W WO2024124992A1 WO 2024124992 A1 WO2024124992 A1 WO 2024124992A1 CN 2023117816 W CN2023117816 W CN 2023117816W WO 2024124992 A1 WO2024124992 A1 WO 2024124992A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- vibration
- linear motor
- parameters
- waveform
- test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/34—Testing dynamo-electric machines
- G01R31/343—Testing dynamo-electric machines in operation
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/34—Testing dynamo-electric machines
Definitions
- the present application relates to the field of testing technology, and in particular to an aging test method and terminal equipment for a linear motor.
- mobile phones, tablets and other terminal devices generally use linear motors.
- some applications use extended vibration interfaces to achieve broadband vibration of linear motors, so as to provide users with rich vibration touch and achieve tactile interaction.
- the terminal device can vibrate when the user releases a skill, giving the user tactile feedback.
- the embodiments of the present application provide an aging test method and terminal device for a linear motor, which can control the vibration of the linear motor in different driving modes to test the vibration conditions of the linear motor in different usage scenarios.
- the present application provides an aging test method for a linear motor, which is applied to a terminal device, wherein the terminal device includes a vibration chip and a linear motor, and the method includes: generating test parameters based on vibration parameters corresponding to a plurality of driving modes, wherein the test parameters are vibration parameters corresponding to a target driving mode, wherein the plurality of driving modes are used to drive the linear motor to vibrate continuously, intermittently, or with a wide frequency, and the target driving mode is any one of the plurality of driving modes; and controlling the vibration chip to output a voltage to the linear motor according to the target driving mode, so that the linear motor vibrates in the manner indicated by the test parameters.
- the test parameter may include a waveform name; in this case, the vibration chip is controlled to output a voltage to the linear motor according to the target drive mode so that the linear motor vibrates in the manner indicated by the test parameter, further comprising: obtaining first waveform data from the waveform description information according to the waveform name, the waveform description information including the names of multiple vibration waveforms and corresponding waveform data, the waveform data including the identifiers of one or more basic vibration waveforms and the corresponding vibration duration; generating configuration parameters based on the first waveform data, the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple times; controlling the output voltage of the vibration chip based on the configuration parameters so that the linear motor vibrates in the manner indicated by the test parameter. That is, the terminal device can determine the vibration waveform by the waveform name, and control the linear motor to vibrate according to the vibration waveform.
- the test parameter includes a waveform file identifier; in this case, the vibration chip is controlled to output a voltage to the linear motor according to the target drive mode so that the linear motor vibrates in the manner indicated by the test parameter, further comprising: reading a waveform description file corresponding to the waveform file identifier in a plurality of waveform description files to obtain first waveform data; wherein each waveform description file includes waveform data, and the waveform data includes vibration intensity, vibration frequency, vibration type and relative time; generating configuration parameters based on the first waveform data, the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple moments; and controlling the vibration chip output voltage based on the configuration parameters so that the linear motor vibrates in the manner indicated by the test parameter. That is, the terminal device can also determine the vibration waveform through the waveform file identifier and control the linear motor to vibrate according to the vibration waveform.
- the waveform file identifier includes a file name and a storage path.
- the test parameters include vibration duration and sleep duration; in this case, the vibration chip is controlled to output voltage to the linear motor according to the target driving mode so that the linear motor vibrates in a manner indicated by the test parameters, further including: controlling the vibration chip output voltage based on the vibration duration and the sleep duration so that the linear motor vibrates in a manner indicated by the test parameters.
- the vibration parameters corresponding to the multiple driving modes include the vibration parameters required for each driving mode and the value range of the vibration parameters; based on the vibration parameters corresponding to the multiple driving modes, generating test parameters further includes: determining a value from the value range of the vibration parameters required by the target driving mode as the test parameter.
- the terminal device can randomly use the numerical value within the value range as the test parameter. For example, a certain driving mode requires two vibration parameters, and the two vibration parameters respectively include n values. Then, n*n groups of test parameters can be obtained by combining these two vibration parameters. In this way, a large number of different test parameters can be obtained to simulate a large number of application scenarios, and compared with the method of pre-generating a large number of test parameters, it will not take up more storage space.
- the vibration parameters corresponding to the multiple driving modes include multiple groups of vibration parameters, each group of vibration parameters corresponds to one driving mode; based on the vibration parameters corresponding to the multiple driving modes, generating test parameters further includes: selecting one group of vibration parameters from the multiple groups of vibration parameters as test parameters. That is, the user generates multiple groups of vibration parameters for each driving mode in advance, and selects one group of test parameters from them when testing is required. This method of obtaining test parameters is more convenient and quick.
- the method further includes: receiving a first operation for triggering a test event; generating a test parameter based on vibration parameters corresponding to a plurality of driving modes, and further includes: generating a test parameter based on vibration parameters corresponding to a plurality of driving modes in response to the first operation.
- the test event can be triggered by a user's operation.
- the test parameters are generated based on the vibration parameters corresponding to the multiple driving modes, further comprising: if the time interval is greater than or equal to the first waiting time, the test parameters are generated based on the vibration parameters corresponding to the multiple driving modes; wherein the time interval is the difference between the current moment and the end moment of the most recent vibration of the linear motor, and the first waiting time is the parameter carried in the test parameters for driving the linear motor to perform the most recent vibration.
- multiple vibrations will be performed during the test of the terminal device, wherein the time interval between two vibrations is not less than the waiting time (i.e., the first waiting time) determined during the last vibration, and a large number of vibrations are performed reciprocally to achieve an aging test of the linear motor.
- the terminal device includes a vibration service, a first interface, a second interface, a third interface, and a vibration driver, and the test parameters include a vibration duration and a sleep duration; the vibration chip is controlled to output a voltage to the linear motor according to a target drive mode, so that the linear motor vibrates in a manner indicated by the test parameters, It further includes: the vibration service sends test parameters to the first interface; the first interface sends the test parameters to the vibration driver; the vibration driver writes the test parameters into the vibration chip; in response to the written test parameters, the vibration chip outputs a voltage to the linear motor to make the linear motor vibrate in the manner indicated by the test parameters.
- the terminal device includes a vibration service, a first interface, a second interface, a third interface and a vibration driver, and the test parameters include a waveform name;
- the vibration chip is controlled to output a voltage to the linear motor according to the target driving mode, so that the linear motor vibrates in a manner indicated by the test parameters, further including: the vibration service sends the test parameters to the second interface; the second interface obtains the first waveform data from the waveform description information according to the waveform name, the waveform description information includes the names of multiple vibration waveforms and the corresponding waveform data, the waveform data includes the identifiers of one or more basic vibration waveforms and the corresponding vibration duration; the second interface sends the first waveform data to the vibration driver; the vibration driver generates configuration parameters based on the first waveform data, the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple times; the vibration driver writes the configuration parameters to the vibration chip; in response to the written configuration parameters, the vibration chip
- the terminal device includes a vibration service, a first interface, a second interface, a third interface and a vibration driver
- the test parameters include a waveform file identifier
- the vibration chip is controlled to output a voltage to the linear motor according to the target driving mode, so that the linear motor vibrates in a manner indicated by the test parameters
- the vibration service sends the test parameters to the third interface
- the third interface reads a waveform description file corresponding to the waveform file identifier in a plurality of waveform description files to obtain first waveform data; wherein each waveform description file includes waveform data, and the waveform data includes vibration intensity, vibration frequency, vibration type and relative time
- the third interface sends the first waveform data to the vibration driver
- the vibration driver generates configuration parameters based on the first waveform data, and the configuration parameters are used to describe the vibration amount of the vibration waveform determined according to the first waveform data at multiple times
- the vibration driver writes the configuration parameters into the vibration chip; in response to the written configuration parameters, the vibration
- the terminal device also includes a first application; based on vibration parameters corresponding to multiple driving modes, generating test parameters, further includes: the first application generates test parameters based on vibration parameters corresponding to multiple driving modes; the first application sends the test parameters to the vibration service.
- the present application provides a chip system, which includes one or more interface circuits and one or more processors.
- the interface circuit and the processor are interconnected by a line.
- the above chip system can be applied to a terminal device including a communication module and a memory.
- the interface circuit is used to receive a signal from the memory of the terminal device and send the received signal to the processor, where the signal includes a computer instruction stored in the memory.
- the processor executes the computer instruction
- the terminal device can execute the method described in the first aspect and any possible design thereof.
- the present application provides a computer-readable storage medium, which includes computer instructions.
- a terminal device such as a mobile phone
- the terminal device executes the method described in the first aspect and any possible design thereof.
- the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the method described in the first aspect and any possible design thereof.
- the present application provides a terminal device, the terminal device comprising: a memory and one or more processors; the memory is coupled to the processor; wherein the memory is used to store computer program code, the computer program code comprising computer instructions; when the computer instructions are executed by the processor,
- the terminal device executes the method as described in the first aspect and any possible design thereof.
- the technical effects brought about by any design method in the fourth to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here.
- FIG1 is a frequency sweep characteristic curve diagram of a linear motor provided in an embodiment of the present application.
- FIG2 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application.
- FIG3 is a schematic diagram of a software structure of a terminal device provided in an embodiment of the present application.
- FIG4 is a schematic diagram of interaction between software modules provided in an embodiment of the present application.
- FIG5 is an interface diagram of a group of terminal devices provided in an embodiment of the present application.
- FIG6 is a flow chart of a linear motor aging test method according to an embodiment of the present application.
- FIG7 is a schematic diagram of a vibration waveform provided in an embodiment of the present application.
- FIG8 is a second flow chart of an aging test method for a linear motor provided in an embodiment of the present application.
- FIG9 is a schematic diagram of a basic vibration waveform provided in an embodiment of the present application.
- FIG10 is a schematic diagram of another vibration waveform provided in an embodiment of the present application.
- FIG. 11 is a third flow chart of an aging test method for a linear motor provided in an embodiment of the present application.
- FIG. 12 is a schematic diagram of another vibration waveform provided in an embodiment of the present application.
- Nonlinear motors also known as rotor motors, can include iron core motors and flat motors. They generate vibrations by rotating the eccentric mass block (also called the rotor) on the shaft when the shaft is powered.
- eccentric mass block also called the rotor
- a linear motor is a mechanism that generates a changing electromagnetic field through a pulse voltage signal, and the changing electromagnetic field drives the magnet to drive the mass block to perform periodic motion.
- the vibration intensity of the linear motor will be different if the frequency and amplitude of the pulse voltage signal are different.
- Vibration bandwidth refers to the range of the motor's vibration frequency.
- the vibration bandwidth directly determines the richness and layering of the tactile feedback output to the user, and also determines the space for content and system equipment vendors to improve the user experience. Among them, the larger the vibration bandwidth, the richer the vibration modes supported by the linear motor, and the wider the coverage of interactive scenarios.
- the vibration amount can also be called amplitude or vibration intensity. Under the premise that other parameters are equivalent, the larger the vibration amount, the stronger the vibration feeling. It and the resonant frequency together determine the user's subjective perception of the strength of the touch.
- Response time refers to the time it takes for the terminal device to receive a vibration event and for the motor to start vibrating. It directly determines the delay and tailing of the user's tactile interaction experience. For example, whether the vibration of a gun, which gamers usually talk about, is sensitive and crisp, is affected by the speed of response.
- the present application provides an aging test method for a linear motor, which is applied to a terminal device including a linear motor.
- the method can generate test parameters based on vibration parameters corresponding to a plurality of driving modes, and control the vibration chip to output voltage to the linear motor according to the driving mode corresponding to the test parameter, so that the linear motor vibrates in the manner indicated by the test parameter. Since a plurality of driving modes can drive the linear motor to vibrate continuously, intermittently or with a wide frequency, the vibration conditions of the linear motor in different scenarios can be tested, that is to say, the present application covers a wider range of test scenarios, so that the test results obtained are more in line with reality and more accurate.
- the terminal device described in this embodiment may be a mobile phone, a tablet computer, a personal communication service (PCS) phone, a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc., without specific limitation herein.
- PCS personal communication service
- VR virtual reality
- AR augmented reality
- FIG2 is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application.
- the terminal device may include: a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, a subscriber identification module (SIM) card interface 295, and a vibration chip 296, etc.
- SIM subscriber identification module
- the processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
- the processor 210 may be the nerve center and command center of the terminal device.
- the processor 210 may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
- the processor 210 may also be provided with a memory for storing instructions and data.
- the memory in the processor 210 is a cache memory.
- the memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
- the processor 210 may include one or more interfaces.
- the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
- I2C inter-integrated circuit
- I2S inter-integrated circuit sound
- PCM pulse code modulation
- UART universal asynchronous receiver/transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB universal serial bus
- the external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device.
- the external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.
- the internal memory 221 may be used to store computer executable program codes, which include instructions.
- the processor 210 executes various functional applications and data processing of the terminal device by running the instructions stored in the internal memory 221.
- the processor 210 may execute instructions stored in the internal memory 221, and the internal memory 221 may include a program storage area and a data storage area.
- the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), a configuration file of the motor 291, etc.
- the data storage area may store data created during the use of the terminal device (such as audio data, a phone book, etc.), etc.
- the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
- the charging management module 240 is used to receive charging input from a charger.
- the charger can be a wireless charger or a wired charger. While the charging management module 240 charges the battery 242, it can also power the terminal device through the power management module 241.
- the power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210.
- the power management module 241 receives input from the battery 242 and/or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the external memory, the display screen 294, the camera 293, and the wireless communication module 260.
- the power management module 241 and the charging management module 240 can also be set in the same device.
- the wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor and baseband processor, etc.
- antenna 1 of the terminal device is coupled with mobile communication module 250
- antenna 2 is coupled with wireless communication module 260, so that the terminal device can communicate with the network and other devices through wireless communication technology.
- Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
- antenna 1 can be reused as a diversity antenna for a wireless local area network.
- the antenna can be used in combination with a tuning switch.
- the mobile communication module 250 can provide solutions for wireless communications including 2G/3G/4G/5G applied to terminal devices.
- the mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
- the mobile communication module 250 can receive electromagnetic waves from the antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
- the mobile communication module 250 can also amplify the signal modulated by the modem processor and convert it into In some embodiments, at least some functional modules of the mobile communication module 250 may be disposed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 may be disposed in the same device as at least some modules of the processor 210.
- the wireless communication module 260 can provide wireless communication solutions for application in terminal devices, including WLAN (such as (wireless fidelity, Wi-Fi) network), Bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR), etc.
- WLAN such as (wireless fidelity, Wi-Fi) network
- Bluetooth bluetooth, BT
- global navigation satellite system global navigation satellite system, GNSS
- frequency modulation frequency modulation, FM
- near field communication technology near field communication, NFC
- infrared technology infrared, IR
- the wireless communication module 260 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210.
- the wireless communication module 260 may also receive signals to be sent from the processor 210, modulate the frequencies of the signals, amplify the signals, and convert the signals into electromagnetic waves for radiation via the antenna 2.
- the terminal device can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the earphone interface 270D, and the application processor.
- the sensor module 280 may include sensors such as a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor.
- the terminal device may collect various data through the sensor module 280.
- the terminal device implements the display function through a GPU, a display screen 294, and an application processor.
- the GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor.
- the GPU is used to perform mathematical and geometric calculations for graphics rendering.
- the processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.
- the display screen 294 is used to display images, videos, etc.
- the display screen 294 includes a display panel.
- the terminal device can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.
- ISP is used to process the data fed back by camera 293.
- Camera 293 is used to capture static images or videos.
- the terminal device may include 1 or N cameras 293, where N is a positive integer greater than 1.
- the button 290 includes a power button, a volume button, etc.
- the button 290 can be a mechanical button. It can also be a touch button.
- the vibration chip 295 can output a driving voltage to the motor 291, and the motor 291 can vibrate under the action of the driving voltage. The vibration can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
- the motor 291 is a linear motor.
- the indicator 292 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
- the SIM card interface 295 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 295, or pulled out from the SIM card interface 295 to achieve contact and separation with the terminal device.
- the terminal device can support 1 or N SIM card interfaces, N is a positive integer greater than 1.
- the SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
- the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation on the terminal device.
- the terminal device may also include more or fewer modules than those provided in the above embodiment, and the modules may also adopt different interface connection methods in the above embodiment, or a combination of multiple interface connection methods.
- the software system of the above terminal devices can adopt layered architecture, event-driven architecture, micro-kernel architecture, micro-service
- the embodiment of the present invention takes the layered architecture of the Android system as an example to exemplify the software structure of the terminal device.
- the layered architecture divides the software into several layers, each with a clear role and division of labor.
- the layers communicate with each other through interfaces.
- the Android system may include an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, a hardware abstraction layer (HAL) and a kernel layer.
- Android runtime Android runtime
- HAL hardware abstraction layer
- the embodiments of the present application are illustrated by taking the Android system as an example. In other operating systems (such as Hongmeng system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those of the embodiments of the present application, the solutions of the present application can also be implemented.
- the application layer may include a series of application packages. As shown in FIG3 , the application package may include camera applications, gallery, calendar, call, map, navigation, WLAN, settings, music, lock screen applications, short messages and other applications. Of course, the application layer may also include other application packages, such as payment applications, shopping applications, banking applications, chat applications or financial management applications and other third-party applications, which are not limited in this application.
- the application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer.
- the application framework layer includes some predefined functions. For example, it may include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, a vibration service (vibrator service), etc., and the embodiments of the present application do not impose any restrictions on this.
- the vibration service is used to provide vibration-related support services.
- the system library can include multiple functional modules, such as surface manager, media libraries, OpenGL for embedded systems (OpenGL ES), Skia graphics library (SGL), etc.
- functional modules such as surface manager, media libraries, OpenGL for embedded systems (OpenGL ES), Skia graphics library (SGL), etc.
- the surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
- the media library can support a variety of audio and video encoding formats.
- OpenGL ES is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
- SGL is a graphics engine for 2D graphics.
- Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
- the core library consists of two parts: one is the function that the Java language needs to call, and the other is the core library of Android.
- the application layer and the application framework layer run in the virtual machine.
- the virtual machine executes the Java files of the application layer and the application framework layer as binary files.
- the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
- the HAL layer is an encapsulation of the Linux kernel driver, providing an interface to the upper layer and shielding the implementation details of the underlying hardware.
- the HAL layer can include vibration HAL (vibrator HAL), camera HAL (camera HAL), etc.
- the vibration HAL may include a general vibration interface (also called the first interface), a self-developed vibration interface (also called the second interface) and a 4D vibration interface (also called the third interface).
- the general vibration interface, the self-developed vibration interface and the 4D vibration interface can all interact with the vibration drive of the kernel layer.
- the difference is that the three vibration interfaces can achieve different types of vibrations. For details, please refer to the following text and will not be repeated here.
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least display driver, audio driver, camera driver, Vibration drive, etc.
- vibration drive is a program that allows advanced computer software to interact with hardware, that is, a set of programs that drive the motor to work.
- the hardware layer includes memory, vibration chip and motor, etc.
- the vibration chip is used to output driving voltage to the motor to drive the motor to vibrate.
- the motor is used to vibrate to give the user a vibration feeling.
- the first application in the application layer can interact with the vibration service in the application framework layer by calling a preset application programming interface (API) interface, and the vibration service can interact with the vibration HAL in the HAL layer.
- the vibration HAL may include a general vibration interface, a self-developed vibration interface, and a 4D vibration interface.
- the vibration service can interact with the vibration driver of the kernel layer through a general vibration interface, a self-developed vibration interface, or a 4D vibration interface.
- the vibration driver can configure the parameters of the vibration chip in the hardware layer so that the vibration chip outputs a voltage to drive the linear motor to vibrate.
- the terminal device may receive a first operation for triggering a test event, and in response to the first operation, the terminal device performs an aging test on the linear motor.
- the terminal device may be installed with a first application for performing an aging test on the linear motor.
- the first application may be an application visible to the user.
- the terminal device e.g., a mobile phone
- the terminal device may display an interface 501.
- the interface 501 may also be referred to as a main interface or a home interface, etc.
- the interface 501 may include an icon 501a of a test application (i.e., a first application).
- the terminal device may receive a user operation on the icon 501a, and in response to the operation, as shown in (b) of FIG. 5 , the terminal device displays an interface 502 of the test application.
- the interface 502 includes one or more test items, and the one or more test items may include a linear motor aging test 502a, a linear motor vibration test, a linear motor transient response test, etc.
- the one or more test items may also include test items such as a recovery test, a safety test, a stress test, or only include a linear motor aging test.
- the first application can be an application used only for performing a linear motor aging test, or it can be an application that can perform multiple tests, and no specific restrictions are made here.
- the linear motor aging test 502a can be clicked.
- the terminal device can receive the user's operation on the linear motor aging test 502a, and in response, as shown in (c) in Figure 5, the terminal device can display an interface 503.
- the interface 503 may include a control 503a for starting the test.
- the terminal device can receive the user's operation on the control 503a for starting the test, and in response to the operation, the terminal device performs an aging test on the linear motor, and the terminal device can vibrate in different ways during the test.
- the user's operation on the control 503a for starting the test is a first operation for triggering a test event.
- the first application may be an application that is invisible to the user, that is, the interface 501 may not include the icon 501a of the test application.
- the user may enter preset characters (e.g., *#12345#) through the dialing interface.
- the terminal device may receive an operation in which the user enters preset characters, and in response to the operation, the terminal device may display an interface 502 so that the user initiates the first operation according to the process shown in (b) and (c) in FIG. 5 so that the terminal device performs an aging test on the linear motor.
- the terminal device in response to receiving the user input operation of preset characters, can directly run the first application to perform an aging test on the linear motor without the user having to perform related operations on the interface.
- the user input operation of preset characters is a first operation for triggering a test event.
- the terminal device in response to receiving the first operation, the terminal device generates a test parameter, and based on the test parameter, controls the vibration chip to output a driving voltage to the linear motor so that the linear motor vibrates in a manner indicated by the test parameter.
- the test parameters are vibration parameters used by the terminal device during the test process.
- the vibration parameters can be used to indicate the vibration mode of the linear motor.
- the terminal device may adopt different vibration parameters for different driving modes.
- the driving modes may include three types, namely: a driving mode that uses a general vibration interface to realize vibration, a driving mode that uses a self-developed vibration interface to realize vibration, and a driving mode that uses a 4D vibration interface to realize vibration.
- the implementation logic of different driving modes is not the same. The following text will describe in detail how to use different driving modes to realize vibration. For details, see Figures 6-12 and related descriptions, which will not be described here for the time being.
- the universal vibration interface may also be referred to as the Google vibration interface or the standard interface, which can be used to achieve continuous vibration or intermittent vibration.
- the vibration parameters used may include the vibration duration, sleep duration, and waiting duration required for the linear motor to perform continuous vibration or intermittent vibration.
- the vibration duration refers to the duration during which the linear motor is in a vibrating state during a vibration process
- the sleep duration refers to the duration during which the linear motor is in a static state during a vibration process
- the waiting duration refers to the duration between two vibration processes.
- the self-developed vibration interface can also be called the native vibration interface, which is usually a vibration interface developed by the equipment manufacturer itself, and can be used to implement the vibration mode customized by the equipment manufacturer.
- the vibration parameters used may include the waveform name and the waiting time.
- waveform description information is stored in the terminal device, and the waveform description information includes the names of multiple vibration waveforms and corresponding waveform data, wherein each waveform data is used to indicate the corresponding vibration waveform. In this way, the vibration mode of the linear motor can be determined according to the waveform name.
- the waveform description information can be recorded in the format of an extensible markup language (XML) file.
- the 4D vibration interface may be a vibration interface jointly developed by multiple third-party application manufacturers, and may be used to implement a vibration mode customized by a third-party application manufacturer.
- the vibration parameters used may include a waveform file identifier and a waiting time.
- the waveform file identifier is used for the terminal device to quickly find a waveform description file to determine the vibration mode of the linear motor.
- the terminal device further stores a plurality of waveform description files, one waveform description file being used to describe a vibration waveform, such as the vibration intensity, vibration frequency, vibration type, and relative time of the vibration waveform.
- the vibration type may include continuous vibration, transient vibration, or broadband vibration.
- the terminal device can store the waveform description files provided by different third parties in different paths, so that the waveform description files can be distinguished by the storage path and the file name.
- the waveform file identifier includes the storage path and the file name.
- the terminal device can also assign different file IDs to different waveform description files so as to distinguish the waveform description files by the file ID.
- the waveform file identifier includes the file ID.
- the above-mentioned waveform file identifier can also be other, and no specific limitation is made here.
- the name of the above-mentioned vibration interface and the vibration mode that can be realized by the vibration interface are only examples.
- the name of the vibration interface can also be
- the vibration modes achieved can also be more diverse, and no specific limitation is made here.
- the terminal device generating the test parameter further includes: the terminal device generating the test parameter based on the configuration information, and the test parameter corresponds to a target driving mode among the multiple driving modes.
- the target driving mode is any one of the three driving modes: a driving mode of realizing vibration using a general vibration interface, a driving mode of realizing vibration using a self-developed vibration interface, and a driving mode of realizing vibration using a 4D vibration interface.
- the terminal device may use the above three driving modes as target driving modes in a preset order.
- the terminal device may use a driving mode that uses a general vibration interface to realize vibration, a driving mode that uses a self-developed vibration interface to realize vibration, and a driving mode that uses a 4D vibration interface to realize vibration as target driving modes in sequence.
- the terminal device may randomly select any one of the three driving modes as the target driving mode.
- the three driving modes have the same weight, in which case the probability of each driving mode being selected as the target driving mode is the same.
- the three driving modes have different weights, for example, the weight of one or two driving modes may be set larger to increase the probability of the driving mode being selected as the target driving mode.
- the terminal device stores configuration information, which includes vibration parameters corresponding to a plurality of driving modes.
- the configuration information may include all possible values (also referred to as value ranges) of the vibration parameters required by different driving modes.
- the configuration information may include all possible values of vibration parameters required for implementing a vibration driving mode using a universal vibration interface (as shown in Table 1).
- the required vibration parameters include vibration duration, sleep duration and waiting duration.
- the vibration duration can be any value between 0 and 2500ms; the sleep duration can be any value between 0 and 5000ms; and the waiting duration can be any value between 10 and 2000ms. It should be noted that Table 1 is only an example, and the values of each parameter can be set as needed.
- the sleep duration can be any value between 0 and 5000ms
- the waiting duration can also be any value between 10 and 2000ms.
- the configuration information shown in Table 1 may be recorded in the format of an XML file.
- the XML file may include:
- NAME is used to identify the type of vibration, for example, "XXXX_Native” is used to indicate the driving mode of vibration using the universal vibration interface; " ⁇ UNIT>ms ⁇ /UNIT>” is used to indicate that the value unit is ms (milliseconds); “ON” is used to list all possible values of vibration duration, for example, “ ⁇ value>1 ⁇ /value>” indicates that the vibration duration can be 1ms; "SLEEP” is used to list all possible values of sleep duration, for example, “ ⁇ value>20000 ⁇ /value>” indicates that the sleep duration can be 20000ms; “WAIT” is used to list all possible values of waiting duration, for example, “ ⁇ value>20 ⁇ /value>” indicates that the waiting duration can be 20ms. It should be noted that the above XML file is only an example, and the XML file can also include more content than the above list, and the values of "ON”, “SLEEP” and “WAIT” can also be more.
- the configuration information may also include all possible values of vibration parameters required for implementing the vibration driving mode using the self-developed vibration interface (as shown in Table 2).
- the vibration parameters required for the vibration driving method using the universal vibration interface may include the waveform name and the waiting time.
- the waveform name may be click, long press, click up, etc.
- the waiting time may be 0ms, 10ms, or 2300ms. It should be noted that Table 2 is only an example, and the possible values of each parameter may be more. Similarly, the vibration waveform and waiting time in Table 2 are There is no correlation between the values.
- the configuration information shown in Table 2 may also be recorded in the format of an XML file.
- the XML file may include:
- haptic_ver1 in “ ⁇ NAME>haptic_ver1 ⁇ /NAME>” is used to identify the driving mode of using the self-developed vibration interface to realize vibration;
- TYPE is used to list all possible values of the waveform name, such as haptic.common.click, haptic.common.long_press, haptic.common.click_up, etc.;
- WAIT is used to list all possible values of the waiting time, such as 50ms, 500ms, 50000ms, etc.
- the above XML file is only an example, and the XML file can also include more content than the above list, and the possible values of each parameter can also be more.
- the configuration information may also include all possible values of vibration parameters required for implementing the vibration driving mode using the 4D vibration interface (as shown in Table 3).
- the vibration parameters required include the storage path and the waiting time.
- the storage path of the waveform description file may include "/app1/profile” or “/app2/profile”.
- the waiting time may be 100ms or 10000ms, etc.
- the vibration parameters required for the driving method using the 4D vibration interface to realize vibration also include the file name. After determining the storage path, the terminal device can select a waveform description file from the waveform description files under the storage path, and use the file name of the selected waveform description file as the vibration parameter.
- the configuration information shown in Table 3 may also be recorded in the format of an XML file.
- the XML file may include:
- haptic_ver2 in “ ⁇ NAME>haptic_ver2 ⁇ /NAME>” is used to identify the driving mode of using 4D vibration interface to realize vibration;
- PATH is used to list all possible values of storage path, such as “/app1/profile”, “app2/profile”/;
- WAIT is used to list all possible values of waiting time, such as 50ms, 100ms or 10000ms.
- XML file is only an example, and the XML file can also include more content than the above list, the name of each parameter can be other, and the value of each parameter can also be more.
- the terminal device may select a set of values as test parameters from all possible values of vibration parameters required by the target driving mode.
- the target driving mode is a driving mode that uses a universal vibration interface to realize vibration
- the terminal device may select a value from all possible values of vibration duration, select a value from all possible values of sleep duration, and select a value from all possible values of waiting duration to generate test parameters.
- the test parameters may include 20ms (vibration duration), 30ms (sleep duration), and 200ms (waiting duration).
- the terminal device can select a value from all possible values of the waveform name and a value from all possible values of the waiting time to generate a test parameter.
- the test parameters may include: haptic.common.click (waveform name) and 1500ms (sleep time).
- the terminal device can select a value from all possible values of the storage path, select a waveform description file from all waveform description files under the storage path, and select a value from all possible values of the waiting time to generate a test parameter.
- the test parameters may include: /app1/profile (storage path), shoot.he (file name), and 2500ms (waiting time).
- the terminal device can traverse all possible values of each vibration parameter, and use the traversed values as test parameters in turn; or, the terminal device randomly selects a value from all possible values of each vibration parameter as a test parameter, where different values have the same or different weights.
- the terminal device controls the vibration chip to output voltage to the linear motor according to the target driving mode, so that the linear motor vibrates in the manner indicated by the test parameters.
- the following describes the aging test method for a linear motor provided by this embodiment in conjunction with the software architecture shown in Figure 3.
- Figure 6 it is a flow chart 1 of an aging test method for a linear motor provided by an embodiment of the present application. The method can be applied to the terminal device shown in Fig. 2.
- the aging test method of the linear motor can include: S601-S607.
- a first application In response to receiving a first operation, a first application generates a test parameter based on vibration parameters corresponding to a plurality of driving modes.
- test parameters are used to describe the vibration mode of the linear motor.
- the description of the test parameters and the process of generating the test parameters can be found in the previous text and will not be repeated here.
- S602 The first application sends a test parameter to the vibration service.
- the vibration service determines the driving mode according to the test parameters.
- the vibration driving method using the general vibration interface can be adopted; if the vibration service determines that the test parameters include waveform name and waiting time, the vibration driving method using the self-developed vibration interface can be adopted; if the vibration service determines that the test parameters include waveform file identifier and waiting time, the vibration driving method using the 4D vibration interface can be adopted.
- the test parameters include vibration duration, sleep duration and waiting duration.
- the test parameters indicate that the vibration duration is 10ms, the sleep duration is 15ms, and the waiting duration is 100ms.
- the vibration driver writes the test parameters into the vibration chip.
- the vibration chip outputs a driving voltage to the linear motor, so that the linear motor vibrates in a manner indicated by the test parameters.
- the test parameters can be used to control the linear motor to vibrate according to the waveform shown in Figure 7. That is, the linear motor first vibrates for 10ms, and then stops vibrating for 15ms. Then, starting from the end moment when the linear motor stops vibrating for 15ms, the linear motor can vibrate again 100ms later, and the vibration mode of the next vibration can be different from the vibration mode of this vibration.
- FIG8 is a flow chart of a linear motor aging test method provided by the present application. As shown in FIG8, after S603, it also includes: S608 to S613.
- the vibration service sends test parameters to the self-developed vibration interface.
- the test parameters may include a waveform name and a waiting time.
- the self-developed vibration interface searches the waveform description information based on the waveform name to obtain the first waveform data.
- the waveform description information includes the waveform names of multiple vibration waveforms and the corresponding waveform data.
- the waveform data is used to describe the vibration waveform of the linear motor.
- the waveform data may include the serial numbers of one or more basic vibration waveforms and the vibration duration corresponding to one or more basic vibration waveforms.
- the basic vibration waveform may refer to the vibration waveform designed by the equipment manufacturer. By arranging and combining the basic vibration waveforms and vibration durations, a rich vibration waveform can be obtained to provide users with rich tactile feedback.
- a basic waveform library is stored in the terminal device, and the basic waveform library includes multiple basic vibrations. Waveforms and corresponding serial numbers. Exemplarily, the correspondence between the multiple basic vibration waveforms and serial numbers can be shown in Figure 9. It should be noted that the serial number can also be called an identifier, and the identifier can also be in other forms, which is not specifically limited here. In addition, Figure 9 only shows some basic vibration waveforms and corresponding serial numbers. In fact, the basic waveform library can also include more basic vibration waveforms than those shown in Figure 9.
- the waveform data may be expressed in the form of: ⁇ Duration 1, basic vibration waveform 1, Duration 2, basic vibration waveform 2, ..., Duration n, basic vibration waveform n>. Its meaning is: vibrate with basic vibration waveform 1 for duration 1, vibrate with basic vibration waveform 2 for duration 2, ..., vibrate with basic vibration waveform n for duration n.
- the waveform data may also include a vibration mode (for example, long vibration, short vibration) and vibration intensity, etc.
- the expression form of the waveform data may be modified accordingly, for example, ⁇ Duration 1, vibration mode 1, vibration intensity 1, basic vibration waveform 1, Duration 2, vibration mode 2, vibration intensity 2, basic vibration waveform 2, ..., Duration n, vibration mode n, vibration intensity n, basic vibration waveform n>.
- the waveform description information may be as shown in Table 4 below.
- the waveform data corresponding to the waveform name notice1 is ⁇ 10,02,200,04>, which indicates that the linear motor first vibrates with the basic vibration waveform No. 02 for 10ms, and then vibrates with the basic vibration waveform No. 04 for 200ms;
- the waveform data corresponding to the waveform name notice2 is ⁇ 15,01,30,16>, which indicates that the linear motor first vibrates with the basic vibration waveform No. 01 for 15ms, and then vibrates with the basic vibration waveform No. 16 for 30ms;
- the waveform data corresponding to the waveform name click up is ⁇ 10,15>, which indicates that the linear motor vibrates with the basic vibration waveform No. 10 for 15ms.
- the time interval between the multiple basic vibration waveforms may be a preset first value, or a waiting time length included in the test parameters, and no specific limitation is made here.
- S610 The self-developed vibration interface sends the first waveform data and the waiting time to the vibration driver.
- the vibration driver obtains configuration parameters based on the first waveform data.
- the configuration parameters include the vibration amount of the vibration waveform corresponding to the first waveform data at multiple moments, which is used to describe the change of the vibration amount of the linear motor over time during the vibration period.
- the configuration parameters exist in the encoding format of pulse code modulation (PCM).
- the terminal device pre-stores the correspondence between the serial numbers of each basic vibration waveform and the PCM code of the basic vibration waveform.
- the vibration drive can search for the corresponding PCM code based on the serial number of the basic vibration waveform carried by the first waveform data, and then adjust it in combination with the vibration duration carried by the first waveform data to obtain the configuration parameters.
- the vibration driver writes the configuration parameters into the vibration chip.
- the vibration chip outputs a driving voltage to the linear motor to make the linear motor vibrate in a manner indicated by the test parameters.
- the vibration parameters received by the self-developed vibration interface include a waveform name (for example, notice1) and Waiting time (for example, 135ms).
- the self-developed vibration interface can query the waveform data ⁇ 10,02,200,04> in Table 4 according to notice1.
- the vibration waveform corresponding to the waveform data can be shown in Figure 10.
- the linear motor vibrates with the basic vibration waveform No. 02 for 10ms, waits for 135ms, and then vibrates with the basic vibration waveform No. 04 for 200ms.
- the linear motor can perform the next vibration after 135ms, and the vibration mode of the next vibration may be different from the vibration mode of this vibration.
- Figure 11 is a flow chart of a linear motor aging test method provided by the present application. As shown in Figure 11, after S603, it also includes: S614 to S619.
- the vibration service sends test parameters to the 4D vibration interface.
- the test parameters include file name, storage path and waiting time.
- the 4D vibration interface reads a waveform description file indicated by the file name and the storage path from among the multiple waveform description files to obtain first waveform data.
- the 4D vibration interface can find the corresponding waveform description file according to the storage path and file name, and read the corresponding waveform description file to obtain the first waveform data.
- the waveform data in S165 is different from the waveform data in S609.
- the waveform data in S165 includes vibration intensity, vibration frequency, vibration type and relative time, etc.
- the relative time refers to the time difference between the starting time of the vibration waveform and the time when the linear motor starts to vibrate (T0).
- the 4D vibration interface sends the first waveform data and the waiting time to the vibration driver.
- S617 The vibration driver obtains configuration parameters based on the first waveform data.
- the vibration driver may determine the vibration waveform according to the first waveform data.
- the vibration intensity may be 75
- the vibration frequency may be 50 Hz
- the vibration type may be transient vibration
- the relative time may be 0.
- the obtained vibration waveform may be as shown in FIG. 12.
- the vibration waveform may be converted into a PCM encoding format to obtain configuration parameters.
- the vibration driver writes the configuration parameters into the vibration chip.
- the vibration chip outputs a driving voltage to the linear motor so that the linear motor vibrates in a manner indicated by the test parameters.
- the linear motor can vibrate according to the waveform shown in FIG. 12 .
- Figures 6, 8 and 11 only show the process of the terminal device controlling the linear motor to vibrate once.
- the test parameters can be regenerated, and then the linear motor can be controlled to vibrate based on the regenerated test parameters to test the life of the linear motor.
- the terminal device may generate multiple sets of test parameters at one time, or generate new test parameters at any time, and when the time interval is greater than the first waiting time, the vibration chip is controlled to output voltage to the linear motor based on the driving mode corresponding to the new test parameters.
- the time for generating the test parameters may not be limited, as long as the time interval between two vibrations is not less than the waiting time carried in the test parameters.
- the aging test method for a linear motor provided in the present application can test the vibration conditions of a linear motor in different scenarios, covering a wider range of test scenarios, so that the test results obtained are more realistic and more accurate.
- a terminal device which may include: a memory and one or more processors.
- the memory is coupled to the processor.
- the memory is used to store computer program code, and the computer program code includes computer instructions.
- the terminal device may perform various functions or steps performed by the terminal device in the above method embodiment.
- the structure of the terminal device may refer to the structure of the terminal device shown in FIG2.
- An embodiment of the present application also provides a motor, which can be used to realize vibration waveforms under various configuration parameters in the above embodiments, and the terminal device equipped with the motor can execute various functions or steps executed by the terminal device in the above method embodiments.
- An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions.
- the terminal device executes each function or step executed by the terminal device in the above-mentioned method embodiment.
- the embodiment of the present application also provides a computer program product.
- the computer program product is run on a terminal device, the terminal device is enabled to perform each function or step performed by the terminal device in the above method embodiment.
- the disclosed devices and methods can be implemented in other ways.
- the device embodiments described above are only schematic.
- the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
- Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
- the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium.
- the software product is stored in a storage medium, including several instructions for enabling a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk, etc., which can store program code.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Apparatuses For Generation Of Mechanical Vibrations (AREA)
Abstract
本申请提供一种线性马达的老化测试方法及终端设备,涉及测试技术领域。该方法通过多种驱动方式驱动线性马达进行连续振动、间歇振动或者宽频振动,可测试线性马达在不同场景下的振动情况,覆盖更多的应用场景,得到的测试结果更符合实际,也更加精准。该方法包括:基于多种驱动方式对应的振动参数,生成测试参数,测试参数为与目标驱动方式对应的振动参数,目标驱动方式为多种驱动方式中的任意一种;按照目标驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动。
Description
本申请要求于2022年12月12日提交国家知识产权局、申请号为202211599619.X、发明名称为“一种线性马达的老化测试方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及测试技术领域,尤其涉及一种线性马达的老化测试方法及终端设备。
目前,手机、平板等终端设备普遍使用线性马达,特别是一些应用通过扩展的振动接口来实现线性马达的宽频振动,以便给用户提供丰富的振动触感,实现触觉交互。例如用户使用终端设备玩游戏时,终端设备可在用户释放技能时振动,给用户以触觉反馈。
为保证线性马达的稳定性及可靠性,厂商需要对线性马达进行老化测试。老化测试是指模拟产品在现实使用条件中涉及到的各种因素对产品产生老化的情况进行相应条件加强试验的过程。但传统的老化测试通常是控制线性马达连续振动或者间歇振动,无法完全覆盖线性马达的使用场景,导致测试并不全面,进而使得测试结果不够准确。
发明内容
本申请实施例提供一种线性马达的老化测试方法及终端设备,可以不同的驱动方式控制线性马达振动,以测试线性马达在不同使用场景下的振动情况。
为达到上述目的,本申请的实施例采用如下技术方案:
第一方面,本申请提供一种线性马达的老化测试方法,应用于终端设备,终端设备包括振动芯片和线性马达,方法包括:基于多种驱动方式对应的振动参数,生成测试参数,测试参数为与目标驱动方式对应的振动参数,多种驱动方式用于驱动线性马达连续振动、间歇振动或者宽频振动,目标驱动方式为多种驱动方式中的任意一种;按照目标驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动。可以理解地,由于多种驱动方式可驱动线性马达进行连续振动、间歇振动或者宽频振动,可测试线性马达在不同场景下的振动情况,也就是说本申请覆盖的测试场景更广,从而得到的测试结果更符合实际,也更加精准。
在第一方面提供的一种实施方式中,该测试参数可包括波形名称;在这种情况下,按照目标驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动,进一步包括:根据波形名称从波形描述信息中查询得到第一波形数据,波形描述信息包括多个振动波形的名称和对应的波形数据,波形数据包括一个或多个基础振动波形的标识和对应的振动时长;基于第一波形数据生成配置参数,配置参数用于描述根据第一波形数据确定的振动波形在多个时刻的振动量;基于配置参数控制振动芯片输出电压,以使线性马达按照测试参数指示的方式振动。也就是说,终端设备可通过波形名称确定振动波形,并控制线性马达按照该振动波形振动。
在第一方面提供的一种实施方式中,该测试参数包括波形文件标识;在这种情况下,按照目标驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动,进一步包括:读取多个波形描述文件中波形文件标识对应的波形描述文件,得到第一波形数据;其中,每个波形描述文件包括波形数据,波形数据包括振动强度、振动频率、振动类型和相对时间;基于第一波形数据生成配置参数,配置参数用于描述根据第一波形数据确定的振动波形在多个时刻的振动量;基于配置参数控制振动芯片输出电压,以使线性马达按照测试参数指示的方式振动。也就是说,终端设备也可通过波形文件标识确定振动波形,并控制线性马达按照该振动波形振动。
在第一方面提供的一种实施方式中,该波形文件标识包括文件名称以及存储路径。
在第一方面提供的一种实施方式中,该测试参数包括振动时长、休眠时长;在这种情况下,按照目标驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动,进一步包括:基于振动时长和休眠时长控制振动芯片输出电压,以使线性马达按照测试参数指示的方式振动。
在第一方面提供的一种实施方式中,该多种驱动方式对应的振动参数包括每种驱动方式所需的振动参数,以及振动参数的取值范围;基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:从目标驱动方式所需的振动参数的取值范围中确定一个值,作为测试参数。终端设备可随机将取值范围内的数值作为测试参数,例如某种驱动方式需要两种振动参数,两种振动参数分别包括n个取值,则通过这两种振动参数组合可得到n*n组测试参数,这样一来既能得到大量不同的测试参数,以便模拟大量应用场景,且相较于预先生成大量测试参数的方式,不会占用较多的存储空间。
在第一方面提供的一种实施方式中,该多种驱动方式对应的振动参数包括多组振动参数,每组振动参数与一种驱动方式对应;基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:从多组振动参数中选择一组振动参数作为测试参数。也即,用户预先给每种驱动方式生成多组振动参数,在需要进行测试时从中选择一组测试参数即可,这种获取测试参数的方式更加方便、快捷。
在第一方面提供的一种实施方式中,该方法还包括:接收用于触发测试事件的第一操作;基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:响应于第一操作,基于多种驱动方式对应的振动参数生成测试参数。也就是说,测试事件可以通过用户的操作触发。
在第一方面提供的一种实施方式中,该基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:若时间间隔大于等于第一等待时长,基于多种驱动方式对应的振动参数生成测试参数;其中,时间间隔为当前时刻与线性马达最近一次振动的终止时刻之间的差值,第一等待时长为驱动线性马达进行最近一次振动的测试参数中携带的参数。也就是说,在终端设备的测试过程中将进行多次振动,其中两次振动之间的时间间隔不小于上一次振动时确定的等待时长(即第一等待时长),如此往复进行大量振动,实现对线性马达的老化测试。
在第一方面提供的一种实施方式中,该终端设备包括振动服务、第一接口、第二接口、第三接口以及振动驱动,测试参数包括振动时长以及休眠时长;按照目标驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动,
进一步包括:振动服务向第一接口发送测试参数;第一接口向振动驱动发送测试参数;振动驱动将测试参数写入振动芯片;响应于被写入测试参数,振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动。
在第一方面提供的一种实施方式中,该终端设备包括振动服务、第一接口、第二接口、第三接口以及振动驱动,测试参数包括波形名称;按照目标驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动,进一步包括:振动服务向第二接口发送测试参数;第二接口根据波形名称从波形描述信息中查询得到第一波形数据,波形描述信息包括多个振动波形的名称和对应的波形数据,波形数据包括一个或多个基础振动波形的标识和对应的振动时长;第二接口向振动驱动发送第一波形数据;振动驱动基于第一波形数据生成配置参数,配置参数用于描述根据第一波形数据确定的振动波形在多个时刻的振动量;振动驱动将配置参数写入振动芯片;响应于被写入配置参数,振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动。
在第一方面提供的一种实施方式中,该终端设备包括振动服务、第一接口、第二接口、第三接口以及振动驱动,测试参数包括波形文件标识,按照目标驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动,进一步包括:振动服务向第三接口发送测试参数;第三接口读取多个波形描述文件中波形文件标识对应的波形描述文件,得到第一波形数据;其中,每个波形描述文件包括波形数据,波形数据包括振动强度、振动频率、振动类型和相对时间;第三接口向振动驱动发送第一波形数据;振动驱动基于第一波形数据生成配置参数,配置参数用于描述根据第一波形数据确定的振动波形在多个时刻的振动量;振动驱动将配置参数写入振动芯片;响应于被写入配置参数,振动芯片向线性马达输出电压,以使线性马达按照测试参数指示的方式振动。
在第一方面提供的一种实施方式中,该终端设备还包括第一应用;基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:第一应用基于多种驱动方式对应的振动参数生成测试参数;第一应用向振动服务发送测试参数。
第二方面,本申请提供一种芯片系统,该芯片系统包括一个或多个接口电路和一个或多个处理器。该接口电路和处理器通过线路互联。上述芯片系统可以应用于包括通信模块和存储器的终端设备。该接口电路用于从终端设备的存储器接收信号,并向处理器发送接收到的信号,该信号包括存储器中存储的计算机指令。当处理器执行该计算机指令时,终端设备可以执行如第一方面及其任一种可能的设计方式所述的方法。
第三方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令。当计算机指令在终端设备(如手机)上运行时,使得该终端设备执行如第一方面及其任一种可能的设计方式所述的方法。
第四方面,本申请提供一种计算机程序产品,当所述计算机程序产品在终端设备上运行时,使得所述终端设备执行如第一方面及其任一种可能的设计方式所述的方法。
第五方面,本申请提供一种终端设备,所述终端设备包括:存储器和一个或多个处理器;所述存储器与所述处理器耦合;其中,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述计算机指令被所述处理器执行时,使得
所述终端设备执行如第一方面及其任一种可能的设计方式所述的方法。
其中,第四方面至第五方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。
图1为本申请实施例提供的一种线性马达的扫频特性曲线图;
图2为本申请实施例提供的一种终端设备的结构示意图;
图3为本申请实施例提供的一种终端设备的软件结构示意图;
图4为本申请实施例提供的一种软件模块间的交互示意图;
图5为本申请实施例提供的一组终端设备的界面图;
图6为本申请实施例提供的一种线性马达的老化测试方法的流程示意图一;
图7为本申请实施例提供的一种振动波形的示意图;
图8为本申请实施例提供的一种线性马达的老化测试方法的流程示意图二;
图9为本申请实施例提供的基础振动波形的示意图;
图10为本申请实施例提供的另一种振动波形的示意图;
图11为本申请实施例提供的一种线性马达的老化测试方法的流程示意图三;
图12为本申请实施例提供的又一种振动波形的示意图。
以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
为了下述各实施例的描述清楚简洁,首先给出相关技术的简要介绍。
非线性马达,又称为转子马达。转子马达可包括铁芯马达和扁平马达,它们是通过加电后轴的旋转带动轴上的偏心质量块(也可称为转子)旋转而产生振动。
线性马达,是通过脉冲电压信号产生变化的电磁场,由变化的电磁场来驱动磁钢带动质量块进行周期运动的机构。其中,脉冲电压信号的频率、幅度不同,则线性马达的振动强度不同。
在通过线性马达模仿真实世界的触感时,主要影响其用户体验的有四个方面的参数,分别为包括:谐振频率(F0)、振动频宽、振动量以及响应时间。
谐振频率(F0),也可称为固有频率,指能够使线性马达发生共振的频点。如图1所示,设备可以较低的驱动电压使线性马达在谐振频率(F0)附近进行受迫振动,并达到很大的振动幅度。
振动频宽,可指马达的振动频率的范围。振动频宽直接决定了触觉反馈输出给用户的体验的丰富度和层次感,也决定了内容和系统设备商提升用户体验的空间大小。其中,振动频宽越大,则线性马达支持的振动方式越丰富,对交互场景的覆盖越广。
振动量,也可以称为振幅,或者振动强度。在其他参数等价的前提下,振动量越大,振感越强,其与谐振频率共同决定着用户对触感强弱的主观感知。
响应时间,指终端设备接收到振动事件,到马达开始振动所需的时间。响应时间
直接决定了用户在触觉交互体验之时的延迟和拖尾,例如游戏玩家通常所说的枪械振感是否灵敏、清脆,就是受响应快慢的影响。
现有技术中,厂商对线性马达采用传统的老化测试方法。传统的老化测试方法其主要是控制马达进行连续振动或间歇振动,以测试马达的寿命。但这种老化测试方法更适配于非线性马达的使用场景,无法完全覆盖线性马达的使用场景,特别是线性马达需要宽频振动的场景,导致对线性马达的测试并不全面,进而使得测试结果不够准确。
本申请提供一种线性马达的老化测试方法,应用于包括线性马达的终端设备。该方法可以基于多种驱动方式对应的振动参数生成测试参数,并按照该测试参数对应的驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照该测试参数指示的方式振动。由于多种驱动方式可驱动线性马达进行连续振动、间歇振动或者宽频振动,可测试线性马达在不同场景下的振动情况,也就是说本申请覆盖的测试场景更广,从而得到的测试结果更符合实际,也更加精准。
需要说明的是,本实施例所述的终端设备,可以为手机、平板电脑、个人通信业务(personal communication service,PCS)电话、可穿戴设备、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等,在此不作具体限制。
图2为本申请实施例提供的一种终端设备的结构示意图。如图2所示,终端设备可以包括:处理器210,外部存储器接口220,内部存储器221,通用串行总线(universal serial bus,USB)接口230,充电管理模块240,电源管理模块241,电池242,天线1,天线2,移动通信模块250,无线通信模块260,音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,传感器模块280,按键290,马达291,指示器292,摄像头293,显示屏294,用户标识模块(subscriber identification module,SIM)卡接口295以及振动芯片296等。
其中,处理器210可以包括一个或多个处理单元,例如:处理器210可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。处理器210可以是终端设备的神经中枢和指挥中心。处理器210可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器210中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器210中的存储器为高速缓冲存储器。该存储器可以保存处理器210刚用过或循环使用的指令或数据。如果处理器210需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器210的等待时间,因而提高了系统的效率。
在一些实施例中,处理器210可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
外部存储器接口220可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备的存储能力。外部存储卡通过外部存储器接口220与处理器210通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器221可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器210通过运行存储在内部存储器221的指令,从而执行终端设备的各种功能应用以及数据处理。例如,在本申请实施例中,处理器210可以通过执行存储在内部存储器221中的指令,内部存储器221可以包括存储程序区和存储数据区。
其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)、马达291的配置文件等。存储数据区可存储终端设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器221可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
充电管理模块240用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。充电管理模块240为电池242充电的同时,还可以通过电源管理模块241为终端设备供电。
电源管理模块241用于连接电池242,充电管理模块240与处理器210。电源管理模块241接收电池242和/或充电管理模块240的输入,为处理器210,内部存储器221,外部存储器,显示屏294,摄像头293,和无线通信模块260等供电。在一些实施例中,电源管理模块241和充电管理模块240也可以设置于同一个器件中。
终端设备的无线通信功能可以通过天线1,天线2,移动通信模块250,无线通信模块260,调制解调处理器以及基带处理器等实现。在一些实施例中,终端设备的天线1和移动通信模块250耦合,天线2和无线通信模块260耦合,使得终端设备可以通过无线通信技术与网络以及其他设备通信。
天线1和天线2用于发射和接收电磁波信号。终端设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块250可以提供应用在终端设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块250可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块250可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。
移动通信模块250还可以对经调制解调处理器调制后的信号放大,经天线1转为
电磁波辐射出去。在一些实施例中,移动通信模块250的至少部分功能模块可以被设置于处理器210中。在一些实施例中,移动通信模块250的至少部分功能模块可以与处理器210的至少部分模块被设置在同一个器件中。
无线通信模块260可以提供应用在终端设备上的包括WLAN(如(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。
无线通信模块260可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块260经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器210。无线通信模块260还可以从处理器210接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
终端设备可以通过音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
传感器模块280可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器和骨传导传感器等传感器。终端设备可通过传感器模块280采集各种数据。
终端设备通过GPU,显示屏294,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏294和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器210可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏294用于显示图像,视频等。该显示屏294包括显示面板。
终端设备可以通过ISP,摄像头293,视频编解码器,GPU,显示屏294以及应用处理器等实现拍摄功能。ISP用于处理摄像头293反馈的数据。摄像头293用于捕获静态图像或视频。在一些实施例中,终端设备可以包括1个或N个摄像头293,N为大于1的正整数。
按键290包括开机键,音量键等。按键290可以是机械按键。也可以是触摸式按键。这振动芯片295可以向马达291输出驱动电压,马达291可以在驱动电压的作用下振动。该振动可以用于来电振动提示,也可以用于触摸振动反馈。该马达291为线性马达。指示器292可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口295用于连接SIM卡。SIM卡可以通过插入SIM卡接口295,或从SIM卡接口295拔出,实现和终端设备的接触和分离。终端设备可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口295可以支持Nano SIM卡,Micro SIM卡,SIM卡等。
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备的结构限定。在另一些实施例中,终端设备也可以包括比上述实施例提供的更多或者更少的模块,各个模块之间也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
上述终端设备的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务
架构,或云架构。本发明实施例以Android系统的分层架构为例,示例性说明终端设备的软件结构。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过接口通信。在一些实施例中,Android系统可以包括应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,硬件抽象层(hardware abstraction layer,HAL)以及内核层。需要说明的是,本申请实施例以Android系统举例来说明,在其他操作系统中(例如鸿蒙系统,IOS系统等),只要各个功能模块实现的功能和本申请的实施例类似也能实现本申请的方案。
其中,应用程序层可以包括一系列应用程序包。如图3所示,应用程序包可以包括相机应用,图库,日历,通话,地图,导航,WLAN,设置,音乐,锁屏应用,短信息等应用程序。当然,应用程序层还可以包括其他应用程序包,例如支付应用,购物应用、银行应用、聊天应用或理财应用等第三方应用,本申请不做限定。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。例如可以包括活动管理器、窗口管理器,内容提供器,视图系统,资源管理器,通知管理器,振动服务(vibrator service)等,本申请实施例对此不做任何限制。振动服务用于提供振动相关支持的服务。
系统库可以包括多个功能模块。例如,表面管理器(surface manager),媒体库(media libraries),用于嵌入式系统的OpenGL(OpenGL for embedded systems,OpenGL ES),Skia图形库(skia graphics library,SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式。
OpenGL ES用于实现三维图形绘图,图像渲染,合成,和图层处理等。
SGL是2D绘图的绘图引擎。
安卓运行时(android runtime)包括核心库和虚拟机。android runtime负责安卓系统的调度和管理。核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
HAL层是对Linux内核驱动程序的封装,向上提供接口,屏蔽底层硬件的实现细节。
HAL层中可以包括振动HAL(vibrator HAL),相机HAL(camera HAL)等。
其中,振动HAL可包括通用振动接口(也可称为第一接口)、自研振动接口(也可称为第二接口)和4D振动接口(也可称为第三接口)等。该通用振动接口、自研振动接口和4D振动接口均可与内核层的振动驱动交互。区别在于,三种振动接口可以实现的振动类型不同,详情参见后文在此不予赘述。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,音频驱动,相机驱动,
振动驱动等。其中,振动驱动是一个允许高级计算机软件与硬件交互的程序,也就是驱使马达工作的一组程序。
硬件层包括存储器、振动芯片和马达等。其中,振动芯片用于输出驱动电压给马达,以驱动马达振动。马达用于振动以给用户带来振感。
下面对本申请实施例提供的线性马达的老化测试方法所涉及的软件模块和模块间的交互进行说明。如图4所示,应用层中的第一应用可以通过调用预设的应用程序接口(application programming interface,API)接口与应用程序框架层中的振动服务交互,振动服务可以与HAL层中的振动HAL交互。振动HAL可包括通用振动接口、自研振动接口和4D振动接口。具体的,振动服务可通过通用振动接口、自研振动接口或4D振动接口与内核层的振动驱动交互。振动驱动可以配置硬件层中的振动芯片的参数,以使振动芯片输出电压驱动线性马达振动。
下面结合附图说明本申请提供的线性马达的老化测试方法。
终端设备可接收用于触发测试事件的第一操作,响应于该第一操作,终端设备对线性马达进行老化测试。在本实施例中,终端设备可安装有用于对线性马达进行老化测试的第一应用。可选的,该第一应用可以是对用户可见的应用。示例性的,如图5中的(a)图所示,终端设备(例如手机)可显示界面501。该界面501也可以称为主界面或者home界面等。界面501可包括测试应用(即第一应用)的图标501a。终端设备可以接收用户对图标501a的操作,响应于该操作,如图5中的(b)所示,终端设备显示测试应用的界面502。该界面502包括一个或多个测试项目,一个或多个测试项目可包括线性马达老化测试502a、线性马达振动量测试、线性马达瞬态响应测试等。需要说明的是,该一个或多个测试项目还可以包括恢复测试、安全测试、压力测试等测试项目,或者仅包括线性马达老化测试这一个测试项目。换句话说,该第一应用可以为仅用于进行线性马达老化测试的应用,也可以为可进行多项测试的应用,在此不做具体限制。若用户终端设备希望进行线性马达的老化测试,可点击该线性马达老化测试502a。终端设备可接收到用户对线性马达老化测试502a的操作,作为响应,如图5中的(c)所示,终端设备可显示界面503。该界面503可包括开始测试的控件503a。终端设备可以接收用户对该开始测试的控件503a的操作,响应于该操作,终端设备对线性马达进行老化测试,在测试过程中终端设备可以不同的方式振动。可以理解地,在上述场景中,用户对该开始测试的控件503a的操作即为一种用于触发测试事件的第一操作。
需要说明的是,图5所示的场景仅为示意。在其他实施方式中,该第一应用可以是对用户不可见的应用,即界面501中可以不包括测试应用的图标501a。在这种情况下,用户可以通过拨号界面输入预设字符(例如*#12345#)。终端设备可以接收到用户输入预设字符的操作,响应于该操作,终端设备可显示界面502,以使用户按照图5中的(b)和图5中的(c)所示的流程发起第一操作,以使终端设备进行线性马达的老化测试。
在另一种可选的实施方式中,响应于接收到用户输入预设字符的操作,终端设备可直接运行第一应用以对线性马达进行老化测试,无需用户再在界面上进行相关操作。在这种场景下,用户输入预设字符的操作即为一种用于触发测试事件的第一操作。
在一种可选的实施方式中,响应于接收到第一操作,终端设备生成测试参数,以及基于该测试参数控制振动芯片向线性马达输出驱动电压,以使线性马达按照该测试参数指示的方式进行振动。
测试参数为在测试过程中终端设备所使用的振动参数。该振动参数可用于指示线性马达的振动方式。在本实施例中,针对不同的驱动方式,终端设备可采用不同的振动参数。在本实施例中,基于控制线性马达振动过程中所使用的振动接口不同,驱动方式可包括三种,分别为:使用通用振动接口实现振动的驱动方式、使用自研振动接口实现振动的驱动方式,以及使用4D振动接口实现振动的驱动方式。不同驱动方式的实现逻辑并不相同,后文将详细描述如何使用不同的驱动方式实现振动,详情参见图6-图12及相关描述,在此暂不描述。
在本实施例中,通用振动接口也可以称为谷歌振动接口或者标准接口,可用于实现连续振动或者间歇性振动。对于使用通用振动接口实现振动的驱动方式,其所采用的振动参数可包括线性马达进行连续振动或者间歇性振动所需的振动时长、休眠时长和等待时长等。该振动时长指在一次振动过程中线性马达处于振动状态的时长,休眠时长指在一次振动过程中线性马达处于静态状态的时长,等待时长指两次振动过程之间所间隔的时长。
自研振动接口也可以称为原生振动接口,通常是设备厂商自己研发的振动接口,可用于实现设备厂商自定义的振动方式。对于使用自研振动接口实现振动的驱动方式,其所采用的振动参数可包括波形名称和等待时长。在本实施例中,终端设备中存储有波形描述信息,该波形描述信息包括多个振动波形的名称及对应的波形数据,其中每个波形数据用于指示对应的振动波形。如此,根据波形名称便可确定线性马达的振动方式。在一种可选的实施方式中,该波形描述信息可以可扩展标记语言(extensible markup language,XML)文件的格式进行记录。
4D振动接口可以是多个第三方应用厂商联合开发的振动接口,可用于实现第三方应用厂商自定义的振动方式。对于使用4D振动接口实现振动的驱动方式,其所采用的振动参数可包括波形文件标识和等待时长。该波形文件标识用于供终端设备快速查找到波形描述文件,以确定线性马达的振动方式。
在本实施例中,终端设备中还存储有多个波形描述文件,一个波形描述文件用于描述一个振动波形,例如该振动波形的振动强度(intensity)、振动频率(frequency)、振动类型(type)和相对时间(relative time)等。其中,振动类型可包括连续振动、瞬态振动或者宽频振动。
考虑到该多个波形描述文件是由多个第三方提供的,多个波形描述文件可能存在重名的情况,终端设备可将不同第三方提供的波形描述文件存储在不同的路径下,这样可以通过存储路径以及文件名称区分波形描述文件。在这种情况下,波形文件标识包括存储路径和文件名称。可选的,终端设备还可以给不同的波形描述文件分配不同的文件ID,以便通过文件ID来区分波形描述文件。在这种情况下,波形文件标识包括文件ID。
需要说明的是,上述波形文件标识还可以为其他,在此不做具体限制。另外,上述振动接口的名称和振动接口可实现的振动方式仅为示例,振动接口的名称也可以为
其他,所实现的振动方式也可以更丰富,在此不做具体限制。
在一种可选的实施方式中,终端设备生成测试参数进一步包括:终端设备基于配置信息生成测试参数,该测试参数与多种驱动方式中的目标驱动方式对应。
其中,目标驱动方式为使用通用振动接口实现振动的驱动方式、使用自研振动接口实现振动的驱动方式以及使用4D振动接口实现振动的驱动方式这三种驱动方式中的任意一种。
可选的,终端设备可按照预设顺序将上述三种驱动方式依次作为目标驱动方式。示例性的,终端设备可将使用通用振动接口实现振动的驱动方式、使用自研振动接口实现振动的驱动方式,以及使用4D振动接口实现振动的驱动方式依次作为目标驱动方式。
可选的,终端设备可随机将三种驱动方式中的任意一种驱动方式作为目标驱动方式。在一种可选的实施方式中,三种驱动方式具有相同的权重,这种情况下每种驱动方式被选中成为目标驱动方式的概率相同。在一种可选的实施方式中,三种驱动方式具有不同的权重,例如可以将其中一个或两种驱动方式的权重设置得较大,以使该驱动方式被选中成为目标驱动方式的概率更大。
其中,终端设备上存储有配置信息。该配置信息包括多种驱动方式对应的振动参数。具体的,配置信息可包括不同驱动方式所需的振动参数的所有可能取值(也可称为取值范围)。
示例性的,配置信息可包括使用通用振动接口实现振动的驱动方式所需的振动参数的所有可能取值(如表1所示)。
表1
其中,根据表1可知,对于使用通用振动接口实现振动的驱动方式,其所需的振动参数包括振动时长、休眠时长和等待时长。其中,振动时长可以为0~2500ms中的任意一个数值;该休眠时长可以为0~5000ms中的任意一个数值;该等待时长可以为10~2000ms中的任意一个数值。需要说明的是,该表1仅为示例,各个参数的取值可以根据需要进行设置。
另外需要说明的是,该振动时长、休眠时长以及等待时长的各个取值之间不存在关联关系,即振动时长为0时,休眠时长可以为0~5000ms中的任意值,等待时长也可以为10~2000ms中的任意值。
可选的,表1所示的配置信息可以XML文件的格式进行记录。示例性的,该XML文件可包括:
其中,“NAME”用于标识振动的类型,例如“XXXX_Native”用于指示使用通用振动接口实现振动的驱动方式;“<UNIT>ms</UNIT>”用于指示取值单位为ms(毫秒),“ON”用于列举振动时长的所有可能取值,例如“<value>1</value>”表明振动时长可以为1ms;“SLEEP”用于列举休眠时长的所有可能取值,例如“<value>20000</value>”表明休眠时长可以为20000ms;“WAIT”用于列举等待时长的所有可能取值,例如“<value>20</value>”表明等待时长可以为20ms。需要说明的是,上述XML文件仅为示例,XML文件还可包括比上述列举的更多的内容,且“ON”、“SLEEP”以及“WAIT”的取值也可以更多。
在本实施例中,配置信息还可包括使用自研振动接口实现振动的驱动方式所需的振动参数的所有可能取值(如表2所示)。
表2
其中,根据表2可知,使用通用振动接口实现振动的驱动方式,其所需的振动参数可包括波形名称和等待时长。其中,波形名称的取值可以为click、long press、click up等。等待时长的取值可以为0ms、10ms或者2300ms等。需要说明的是,该表2仅为示例,各个参数的可能取值也可以更多。同样地,表2中该振动波形和等待时长的
各个取值之间不存在关联关系。
可选的,表2所示的配置信息也可以XML文件的格式进行记录。该XML文件可包括:
其中,“<NAME>haptic_ver1</NAME>”中的“haptic_ver1”用于标识使用自研振动接口实现振动的驱动方式;“TYPE”用于列举波形名称的所有可能取值,例如包括haptic.common.click、haptic.common.long_press、haptic.common.click_up等;“WAIT”用于列举等待时长的所有可能取值,例如50ms、500ms、50000ms等。需要说明的是,上述XML文件仅为示例,XML文件还可包括比上述列举的更多的内容,且各个参数的可能取值也可以更多。
在本实施例中,配置信息还可包括使用4D振动接口实现振动的驱动方式所需的振动参数的所有可能取值(如表3所示)。
表3
根据表3可知,对于使用4D振动接口实现振动的驱动方式,其所需的振动参数包括存储路径和等待时长。其中,波形描述文件的存储路径可以包括“/app1/profile”或者“/app2/profile”。等待时长可以为100ms或者10000ms等。需要说明的是,该表3仅为示例,实际各个参数的取值可以根据需要进行设置。需要说明的是,使用4D振动接口实现振动的驱动方式其所需的振动参数还包括文件名称。终端设备可在确定存储路径后,从该存储路径下的波形描述文件中选择一个波形描述文件,并将被选择的波形描述文件的文件名称作为振动参数。
可选的,表3所示的配置信息也可以XML文件的格式进行记录。该XML文件可包括:
其中,“<NAME>haptic_ver2</NAME>”中的“haptic_ver2”用于标识使用4D振动接口实现振动的驱动方式;“PATH”用于列举存储路径的所有可能取值,例如“/app1/profile”、“app2/profile”/;“WAIT”用于列举等待时长的所有可能取值,例如为50ms、100ms或者10000ms等。需要说明的是,上述XML文件仅为示例,XML文件还可包括比上述列举的更多的内容,各项参数的名称可以为其他,各个参数的取值也可以更多。
终端设备可从目标驱动方式所需的振动参数的所有可能取值中,选择一组取值作为测试参数。在本实施例中,若目标驱动方式为使用通用振动接口实现振动的驱动方式,则终端设备可从振动时长的所有可能取值中选取一个值,从休眠时长的所有可能取值中选取一个值,以及从等待时长的所有可能取值中选取一个值,以生成测试参数。例如,测试参数可以包括20ms(振动时长)、30ms(休眠时长)以及200ms(等待时长)。
在本实施例中,若目标驱动方式为使用自研振动接口实现振动的驱动方式,则终端设备可从波形名称的所有可能取值中选取一个值,以及从等待时长的所有可能取值中选取一个值,以生成测试参数。例如,测试参数可以包括:haptic.common.click(波形名称)和1500ms(休眠时长)。
在本实施例中,若目标驱动方式为使用4D振动接口实现振动的驱动方式,则终端设备可以从存储路径的所有可能取值中选取一个值,并从该存储路径下所有波形描述文件选择一个波形描述文件,以及从等待时长的所有可能取值中选取一个值,以生成测试参数。例如,测试参数可以包括:/app1/profile(存储路径)、shoot.he(文件名称)以及2500ms(等待时长)。
其中,与确定目标驱动方式类似,终端设备可遍历每个振动参数的所有可能取值,依次将遍历到的取值作为测试参数;又或者,终端设备从每个振动参数的所有可能取值中随机选择取值作为测试参数,其中不同的取值具有相同的或不同的权重。
在生成测试参数后,终端设备按照目标驱动方式控制振动芯片向线性马达输出电压,以使线性马达按照该测试参数指示的方式进行振动。
下面结合图3所示的软件架构,说明本实施例提供的线性马达的老化测试方法。如图6所示,为本申请实施例提供的一种线性马达的老化测试方法的流程示意图一。
该方法可应用于图2所示的终端设备。该线性马达的老化测试方法可包括:S601~S607。
S601,响应于接收到第一操作,第一应用基于多种驱动方式对应的振动参数,生成测试参数。
其中,第一操作用于触发测试事件。示例性的,该第一操作可以为用户对图5中的(c)所示的开始测试的控件503a的操作。又或者,该第一操作可以为用户在拨号界面输入预设字符的操作。
该测试参数用于描述线性马达的振动方式。其中关于测试参数的描述以及生成测试参数的过程可参见前文,在此不再赘述。
S602,第一应用向振动服务发送测试参数。
S603,振动服务根据测试参数确定驱动方式。
具体的,若振动服务确定测试参数包括振动时长、休眠时长以及等待时长,即可采用使用通用振动接口实现振动的驱动方式;若振动服务确定测试参数包括波形名称和等待时长,则可采用使用自研振动接口实现振动的驱动方式;若振动服务确定测试参数包括波形文件标识和等待时长,则可采用使用4D振动接口实现振动的驱动方式。
下面先以测试参数对应使用通用振动接口实现振动的驱动方式为例进行说明,在S603之后,还包括:S604~S607。
S604,振动服务向通用振动接口发送测试参数。
其中,该测试参数包括振动时长、休眠时长以及等待时长。示例性的,该测试参数指示,振动时长为10ms,休眠时长为15ms,等待时长为100ms。
S605,通用振动接口向振动驱动发送测试参数。
S606,振动驱动将测试参数写入振动芯片。
S607,振动芯片向线性马达输出驱动电压,以使线性马达按照测试参数指示的方式振动。
仍然以振动时长为10ms,休眠时长为15ms,等待时长为100ms为例。则该测试参数可用于控制线性马达按照图7所示的波形进行振动。即线性马达先振动10ms,然后停止振动15ms。接着从线性马达停止振动15ms的终止时刻开始,100ms后线性马达可以进行下一次振动,下一次振动的振动方式可与此次振动的振动方式不同。
下面以测试参数对应使用自研振动接口实现振动的驱动方式为例进行说明,图8为本申请提供的一种线性马达的老化测试方法的流程示意图二。如图8所示,在S603之后,还包括:S608~S613。
S608,振动服务向自研振动接口发送测试参数。
其中,该测试参数可包括波形名称及等待时长。
S609,自研振动接口基于波形名称在波形描述信息中查询得到第一波形数据。
其中,波形描述信息包括多个振动波形的波形名称及对应的波形数据。波形数据用于描述线性马达的振动波形。可选的,该波形数据可包括一个或多个基础振动波形的序号以及一个或多个基础振动波形对应的振动时长等。其中基础振动波形可指设备厂商自行设计的振动波形,通过对基础振动波形以及振动时长的排列、组合,可以得到丰富的振动波形,以便给用户丰富的触觉反馈。
在本实施例中,终端设备中存储有基础波形库,该基础波形库包括多个基础振动
波形以及对应的序号。示例性的,该多个基础振动波形和序号的对应关系可以如图9所示。需要说明的是,序号也可以称为标识,该标识也可以为其他形式,在此不做具体限制。另外,图9仅示出了部分基础振动波形和对应的序号,实际上基础波形库还可包括比图9所示的更多的多个基础振动波形。
在本实施例中,波形数据的表现形式可以是:<时长1,基础振动波形1,时长2,基础振动波形2,……,时长n,基础振动波形n>。其含义为:以基础振动波形1振动时长1,以基础振动波形2振动时长2,……,以基础振动波形n振动时长n。需要说明的是,该波形数据还可以包括振动方式(例如包括长振、短振)以及振动强度等,波形数据的表现形式可对应修改,例如为<时长1,振动方式1,振动强度1,基础振动波形1,时长2,振动方式2,振动强度2,基础振动波形2,……,时长n,振动方式n,振动强度n,基础振动波形n>。需要说明的是,上述表现形式仅为示例,波形数据的表现形式以能够体现波形数据所包括的所有内容为准,在此不做具体限制。
示例性的,波形描述信息可以如下表4所示。
表4
如表4所示,notice1这一波形名称对应的波形数据为<10,02,200,04>,该波形数据指示线性马达先以02号基础振动波形振动10ms,再以04号基础振动波形振动200ms;notice2这一波形名称对应的波形数据为<15,01,30,16>,该波形数据指示线性马达先以01号基础振动波形振动15ms,再以16号基础振动波形振动30ms;click up这一波形名称对应的波形数据为<10,15>,该波形数据指示线性马达以10号基础振动波形振动15ms。
需要说明的是,若一个振动波形包括多个基础振动波形,则多个基础振动波形之间的时间间隔可以为预设的第一数值,或者为测试参数中携带的等待时长,在此不做具体限制。
S610,自研振动接口向振动驱动发送第一波形数据和等待时长。
S611,振动驱动基于第一波形数据得到配置参数。
其中,该配置参数包括第一波形数据对应的振动波形在多个时刻的振动量,用于描述线性马达在振动期间振动量随时间的变化情况。在本实施例中,配置参数以脉冲编码调制(pulse code modulation,PCM)的编码格式存在。
可选的,终端设备预存储有各个基础振动波形的序号和基础振动波形的PCM编码的对应关系,振动驱动可基于第一波形数据所携带的基础振动波形的序号查找对应的PCM编码,再结合第一波形数据携带的振动时长进行调整,即可得到配置参数。
S612,振动驱动将配置参数写入振动芯片。
S613,振动芯片向线性马达输出驱动电压,以使线性马达按照测试参数指示的方式振动。
示例性的,自研振动接口接收到的振动参数包括波形名称(例如为notice1)以及
等待时长(例如为135ms)。如此,自研振动接口可根据notice1在表4中查询得到波形数据<10,02,200,04>。结合图9所示的对应关系可知,该波形数据对应的振动波形可如图10所示。其中线性马达以02号基础振动波形振动10ms,等待135ms以后,再以04号基础振动波形振动200ms。另外,在线下马达以04号基础振动波形振动200ms结束时开始,经过135ms后线性马达可进行下一次振动,下一次振动的振动方式可与此次振动的振动方式不同。
下面以测试参数对应使用4D振动接口实现振动的驱动方式为例进行说明,图11为本申请提供的一种线性马达的老化测试方法的流程示意图三。如图11所示,在S603之后,还包括:S614~S619。
S614,振动服务向4D振动接口发送测试参数。
其中,该测试参数包括文件名称、存储路径以及等待时长。
S615,4D振动接口读取多个波形描述文件中该文件名称、存储路径指示的波形描述文件,得到第一波形数据。
前文已经说明,终端设备中存储有多个波形描述文件。4D振动接口可根据存储路径和文件名称查找到对应的波形描述文件,并读取该对应的波形描述文件以得到第一波形数据。需要说明的是,S165中的波形数据与S609中的波形数据不同,S165中的波形数据包括振动强度、振动频率、振动类型和相对时间等。该相对时间是指振动波形的起始时刻相对于线性马达开始振动的时刻(T0)的时间差。
S616,4D振动接口向振动驱动发送第一波形数据和等待时长。
S617,振动驱动基于第一波形数据得到配置参数。
其中,振动驱动可根据第一波形数据确定振动波形。示例性的,该振动强度可以为75,振动频率为50Hz,振动类型为瞬态振动,相对时间为0,则得到的振动波形可以如图12所示。振动驱动确定振动波形后,可将该振动波形转换为PCM编码的格式,以得到配置参数。
S618,振动驱动将配置参数写入振动芯片。
S619,振动芯片向线性马达输出驱动电压,以使线性马达按照测试参数指示的方式进行振动。
如此,线性马达可按照图12所示的波形进行振动。
需要说明的是,图6、图8及图11仅示出了终端设备控制线性马达进行一次振动的流程。在实际测试过程中,终端设备控制线性马达振动一次后,可重新生成测试参数,再基于重新生成的测试参数控制线性马达振动,以测试线性马达的寿命。
在一种可选的实施方式中,若时间间隔大于等于第一等待时长,终端设备可基于多种驱动方式对应的振动参数重新生成测试参数。其中,时间间隔为当前时刻与线性马达最近一次振动的终止时刻之间的差值,第一等待时长为驱动线性马达进行最近一次振动的测试参数中携带的参数。例如,线性马达在12:00结束了第一次振动,其中用于驱动线性马达进行第一次振动的测试参数中携带的等待时长为200ms,则终端设备可在12:00后的第200ms时重新生成测试参数,以基于重新生成的测试参数控制线性马达再次振动,多次重复此流程后,可以测试线性马达在各个应用场景下的振动情况,并确定线性马达的老化情况。
在另一种可选的实施方式中,终端设备可以一次性生成多组测试参数,或者在任意时刻生成新的测试参数,在时间间隔大于第一等待时长时,再基于新的测试参数对应的驱动方式控制振动芯片向线性马达输出电压。也即,可以不限制生成测试参数的时间,只要使得两次振动的时间间隔不小于测试参数中携带的等待时长即可。
综上所述,本申请提供的线性马达的老化测试方法,可测试线性马达在不同场景下的振动情况,覆盖的测试场景更广,从而得到的测试结果更符合实际,也更加精准。
本申请一些实施例提供了一种终端设备,该终端设备可以包括:存储器和一个或多个处理器。该存储器和处理器耦合。该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令。当处理器执行计算机指令时,终端设备可执行上述方法实施例中终端设备执行的各个功能或者步骤。该终端设备的结构可以参考图2所示的终端设备的结构。
本申请实施例还提供一种马达,该马达可以用于实现上述实施例中各种配置参数下的振动波形等,安装有该马达的终端设备可以执行上述方法实施例中终端设备执行的各个功能或者步骤。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当所述计算机指令在上述终端设备上运行时,使得该终端设备执行上述方法实施例中终端设备执行的各个功能或者步骤。
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在终端设备上运行时,使得所述终端设备执行上述方法实施例中终端设备执行的各个功能或者步骤。
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的
形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
Claims (15)
- 一种线性马达的老化测试方法,其特征在于,应用于终端设备,所述终端设备包括振动芯片和线性马达,所述方法包括:基于多种驱动方式对应的振动参数,生成测试参数,所述测试参数为与目标驱动方式对应的振动参数,所述多种驱动方式用于驱动所述线性马达连续振动、间歇振动或者宽频振动,所述目标驱动方式为所述多种驱动方式中的任意一种;按照所述目标驱动方式控制所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动。
- 根据权利要求1所述的方法,其特征在于,所述测试参数包括波形名称;所述按照所述目标驱动方式控制所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动,进一步包括:根据所述波形名称从波形描述信息中查询得到第一波形数据,所述波形描述信息包括多个振动波形的名称和对应的波形数据,所述波形数据包括一个或多个基础振动波形的标识和对应的振动时长;基于所述第一波形数据生成配置参数,所述配置参数用于描述根据所述第一波形数据确定的振动波形在多个时刻的振动量;基于所述配置参数控制所述振动芯片输出电压,以使所述线性马达按照所述测试参数指示的方式振动。
- 根据权利要求1所述的方法,其特征在于,所述测试参数包括波形文件标识;所述按照所述目标驱动方式控制所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动,进一步包括:读取多个波形描述文件中所述波形文件标识对应的波形描述文件,得到第一波形数据;其中,每个所述波形描述文件包括波形数据,所述波形数据包括振动强度、振动频率、振动类型和相对时间;基于所述第一波形数据生成配置参数,所述配置参数用于描述根据所述第一波形数据确定的振动波形在多个时刻的振动量;基于所述配置参数控制所述振动芯片输出电压,以使所述线性马达按照所述测试参数指示的方式振动。
- 根据权利要求3所述的方法,其特征在于,所述波形文件标识包括文件名称以及存储路径。
- 根据权利要求1所述的方法,其特征在于,所述测试参数包括振动时长、休眠时长;所述按照所述目标驱动方式控制所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动,进一步包括:基于所述振动时长和所述休眠时长控制所述振动芯片输出电压,以使所述线性马达按照所述测试参数指示的方式振动。
- 根据权利要求1-5中任意一项所述的方法,其特征在于,所述多种驱动方式对应的振动参数包括每种所述驱动方式所需的振动参数,以及所述振动参数的取值范围;所述基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:从所述目标驱动方式所需的振动参数的取值范围中确定一个值,作为所述测试参数。
- 根据权利要求1-5中任意一项所述的方法,其特征在于,所述多种驱动方式对应的振动参数包括多组振动参数,每组所述振动参数与一种所述驱动方式对应;所述基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:从所述多组振动参数中选择一组振动参数作为所述测试参数。
- 根据权利要求1-7中任意一项所述的方法,其特征在于,所述方法还包括:接收用于触发测试事件的第一操作;所述基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:响应于所述第一操作,基于多种驱动方式对应的振动参数生成所述测试参数。
- 根据权利要求1-7中任意一项所述的方法,其特征在于,所述基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:若时间间隔大于等于第一等待时长,基于多种驱动方式对应的振动参数生成所述测试参数;其中,所述时间间隔为当前时刻与所述线性马达最近一次振动的终止时刻之间的差值,所述第一等待时长为驱动所述线性马达进行所述最近一次振动的测试参数中携带的参数。
- 根据权利要求1-9中任意一项所述的方法,其特征在于,所述终端设备包括振动服务、第一接口、第二接口、第三接口以及振动驱动,所述测试参数包括振动时长以及休眠时长;所述按照所述目标驱动方式控制所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动,进一步包括:所述振动服务向所述第一接口发送所述测试参数;所述第一接口向所述振动驱动发送所述测试参数;所述振动驱动将所述测试参数写入所述振动芯片;响应于被写入所述测试参数,所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动。
- 根据权利要求1-9中任意一项所述的方法,其特征在于,所述终端设备包括振动服务、第一接口、第二接口、第三接口以及振动驱动,所述测试参数包括波形名称;所述按照所述目标驱动方式控制所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动,进一步包括:所述振动服务向所述第二接口发送所述测试参数;所述第二接口根据所述波形名称从波形描述信息中查询得到第一波形数据,所述波形描述信息包括多个振动波形的名称和对应的波形数据,所述波形数据包括一个或多个基础振动波形的标识和对应的振动时长;所述第二接口向所述振动驱动发送所述第一波形数据;所述振动驱动基于所述第一波形数据生成配置参数,所述配置参数用于描述根据所述第一波形数据确定的振动波形在多个时刻的振动量;所述振动驱动将所述配置参数写入所述振动芯片;响应于被写入所述配置参数,所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动。
- 根据权利要求1-9中任意一项所述的方法,其特征在于,所述终端设备包括振动服务、第一接口、第二接口、第三接口以及振动驱动,所述测试参数包括波形文件标识,所述按照所述目标驱动方式控制所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动,进一步包括:所述振动服务向所述第三接口发送所述测试参数;所述第三接口读取多个波形描述文件中所述波形文件标识对应的波形描述文件,得到第一波形数据;其中,每个所述波形描述文件包括波形数据,所述波形数据包括振动强度、振动频率、振动类型和相对时间;所述第三接口向所述振动驱动发送所述第一波形数据;所述振动驱动基于所述第一波形数据生成配置参数,所述配置参数用于描述根据所述第一波形数据确定的振动波形在多个时刻的振动量;所述振动驱动将所述配置参数写入所述振动芯片;响应于被写入所述配置参数,所述振动芯片向所述线性马达输出电压,以使所述线性马达按照所述测试参数指示的方式振动。
- 根据权利要求10-12中任意一项所述的方法,其特征在于,所述终端设备还包括第一应用;所述基于多种驱动方式对应的振动参数,生成测试参数,进一步包括:所述第一应用基于多种驱动方式对应的振动参数生成所述测试参数;所述第一应用向所述振动服务发送所述测试参数。
- 一种终端设备,其特征在于,所述终端设备包括:存储器和一个或多个处理器;所述存储器与所述处理器耦合;其中,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述计算机指令被所述处理器执行时,使得所述终端设备执行如权利要求1-13中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,包括计算机指令;当所述计算机指令在终端设备上运行时,使得所述终端设备执行如权利要求1-13中任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211599619.XA CN118191583B (zh) | 2022-12-12 | 2022-12-12 | 一种线性马达的老化测试方法及终端设备 |
| CN202211599619.X | 2022-12-12 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024124992A1 true WO2024124992A1 (zh) | 2024-06-20 |
Family
ID=91402200
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/117816 Ceased WO2024124992A1 (zh) | 2022-12-12 | 2023-09-08 | 一种线性马达的老化测试方法及终端设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN118191583B (zh) |
| WO (1) | WO2024124992A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119147197A (zh) * | 2024-09-27 | 2024-12-17 | 南方电网科学研究院有限责任公司 | 一种变压器密封件多应力联合作用下老化试验装置及方法 |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20030023122A (ko) * | 2001-09-12 | 2003-03-19 | 유니슨산업 주식회사 | 선형모터를 이용한 진동시험용 진동대 |
| CN105897120A (zh) * | 2016-05-19 | 2016-08-24 | 瑞声科技(新加坡)有限公司 | 可精确控制电机的信号生成方法 |
| CN106461727A (zh) * | 2016-10-31 | 2017-02-22 | 北京小米移动软件有限公司 | 控制马达振动的方法及装置、电子设备 |
| CN110702346A (zh) * | 2019-09-30 | 2020-01-17 | Oppo(重庆)智能科技有限公司 | 一种振动测试方法、装置、存储介质及终端 |
| CN111798865A (zh) * | 2020-07-07 | 2020-10-20 | 北京字节跳动网络技术有限公司 | 终端马达的检测方法、装置、终端及存储介质 |
| CN114640742A (zh) * | 2020-12-15 | 2022-06-17 | 荣耀终端有限公司 | 震动方法、装置、电子设备和可读存储介质 |
| CN114995629A (zh) * | 2021-12-30 | 2022-09-02 | 荣耀终端有限公司 | 振动方法和振动装置 |
Family Cites Families (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20060117400A (ko) * | 2005-05-10 | 2006-11-17 | 주식회사 팬택앤큐리텔 | 이동통신 단말기의 진동 모터 선형 제어 장치 |
| CN101568041A (zh) * | 2008-04-21 | 2009-10-28 | 鸿富锦精密工业(深圳)有限公司 | 手机振动功能测试系统及方法 |
| CN205333824U (zh) * | 2016-01-25 | 2016-06-22 | 信利光电股份有限公司 | 一种线性马达的检测系统 |
| DE102016011803B4 (de) * | 2016-10-04 | 2020-07-02 | Dräger Safety AG & Co. KGaA | Testvorrichtung und Verfahren zur Überprüfung eines in einem Gerät angeordneten Vibrationsmotors |
| CN206848437U (zh) * | 2017-03-13 | 2018-01-05 | 信利光电股份有限公司 | 一种线性马达的寿命测试装置 |
| CN206671501U (zh) * | 2017-04-24 | 2017-11-24 | 信利光电股份有限公司 | 一种线性马达的测试系统 |
| CN107202631A (zh) * | 2017-07-27 | 2017-09-26 | 信利光电股份有限公司 | 一种测试振动马达性能的方法、系统及单片机 |
| CN107991610A (zh) * | 2017-11-22 | 2018-05-04 | 信利光电股份有限公司 | 一种振动马达的寿命测试系统和方法 |
| CN110380664A (zh) * | 2019-06-24 | 2019-10-25 | 瑞声科技(新加坡)有限公司 | 一种马达振动控制方法、装置及计算机可读存储介质 |
| CN112532145B (zh) * | 2019-09-18 | 2023-03-28 | 华为技术有限公司 | 马达振动控制方法及电子设备 |
| CN114543976A (zh) * | 2020-11-25 | 2022-05-27 | 北京小米移动软件有限公司 | 一种线性马达的测试方法、装置、电子设备及介质 |
| CN115378303B (zh) * | 2021-05-20 | 2026-01-20 | 荣耀终端股份有限公司 | 驱动波形的调整方法及装置、电子设备、可读存储介质 |
| CN115395827B (zh) * | 2021-05-20 | 2025-11-07 | 荣耀终端股份有限公司 | 驱动波形的调整方法、装置、设备及可读存储介质 |
| CN115459643A (zh) * | 2021-05-20 | 2022-12-09 | 荣耀终端有限公司 | 线性马达的振动波形调整方法及装置 |
| CN214850923U (zh) * | 2021-06-03 | 2021-11-23 | 苏州索迩电子技术有限公司 | 一种宽频线性马达 |
| CN113974222A (zh) * | 2021-10-11 | 2022-01-28 | 海南摩尔兄弟科技有限公司 | 电源组件和电子雾化装置 |
| CN113938082B (zh) * | 2021-10-29 | 2024-07-02 | 歌尔股份有限公司 | 线性马达的控制方法、控制装置、设备以及介质 |
-
2022
- 2022-12-12 CN CN202211599619.XA patent/CN118191583B/zh active Active
-
2023
- 2023-09-08 WO PCT/CN2023/117816 patent/WO2024124992A1/zh not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20030023122A (ko) * | 2001-09-12 | 2003-03-19 | 유니슨산업 주식회사 | 선형모터를 이용한 진동시험용 진동대 |
| CN105897120A (zh) * | 2016-05-19 | 2016-08-24 | 瑞声科技(新加坡)有限公司 | 可精确控制电机的信号生成方法 |
| CN106461727A (zh) * | 2016-10-31 | 2017-02-22 | 北京小米移动软件有限公司 | 控制马达振动的方法及装置、电子设备 |
| CN110702346A (zh) * | 2019-09-30 | 2020-01-17 | Oppo(重庆)智能科技有限公司 | 一种振动测试方法、装置、存储介质及终端 |
| CN111798865A (zh) * | 2020-07-07 | 2020-10-20 | 北京字节跳动网络技术有限公司 | 终端马达的检测方法、装置、终端及存储介质 |
| CN114640742A (zh) * | 2020-12-15 | 2022-06-17 | 荣耀终端有限公司 | 震动方法、装置、电子设备和可读存储介质 |
| CN114995629A (zh) * | 2021-12-30 | 2022-09-02 | 荣耀终端有限公司 | 振动方法和振动装置 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119147197A (zh) * | 2024-09-27 | 2024-12-17 | 南方电网科学研究院有限责任公司 | 一种变压器密封件多应力联合作用下老化试验装置及方法 |
| CN119147197B (zh) * | 2024-09-27 | 2025-09-23 | 南方电网科学研究院有限责任公司 | 一种变压器密封件多应力联合作用下老化试验装置及方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118191583B (zh) | 2025-02-07 |
| CN118191583A (zh) | 2024-06-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101976728B1 (ko) | 햅틱 테마 프레임워크 | |
| CN116820314A (zh) | 一种悬浮窗显示方法及电子设备 | |
| US12105880B2 (en) | Vibration method and apparatus, electronic device, and readable storage medium | |
| WO2024109259A1 (zh) | 休眠唤醒方法、电子设备、蓝牙外设及存储介质 | |
| CN112114883A (zh) | 一种终端唤醒方法、终端及计算机存储介质 | |
| CN118191583B (zh) | 一种线性马达的老化测试方法及终端设备 | |
| US20190155389A1 (en) | Method of providing vibration and electronic device for supporting same | |
| CN111752688B (zh) | 一种数据获取方法、装置、电子设备及存储介质 | |
| CN117130458B (zh) | 数据处理方法、电子设备及存储介质 | |
| CN116743761A (zh) | 一种协同工作的方法及电子设备 | |
| CN117130516B (zh) | 一种显示方法及电子设备 | |
| EP4521274A1 (en) | Target device selection identification method, terminal device, system and storage medium | |
| CN115633120B (zh) | 一种交互方法和设备 | |
| CN117578949B (zh) | 一种线性马达的控制方法及电子设备 | |
| CN113938550B (zh) | 一种终端设备、信息反馈方法和存储介质 | |
| CN113079332B (zh) | 移动终端及其录屏方法 | |
| WO2024109263A1 (zh) | 一种驱动马达的方法和终端设备 | |
| CN116345984B (zh) | 一种线性马达的控制方法及电子设备 | |
| CN113031903B (zh) | 电子设备及其音频流合成方法 | |
| CN111324255A (zh) | 一种基于双屏终端的应用处理方法及通信终端 | |
| CN116700660B (zh) | 音频播放方法和电子设备 | |
| CN120166173A (zh) | 控制马达动作的方法和终端设备 | |
| WO2025118996A1 (zh) | 数据处理方法及相关装置 | |
| CN120215910A (zh) | 基于someip的代码生成方法、装置及终端 | |
| CN121187437A (zh) | 振动控制方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23902198 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23902198 Country of ref document: EP Kind code of ref document: A1 |