Magnetic stirring bar detection method and device, and detection model training method and device
By extracting and detecting features using motor torque or speed data in a magnetic stirrer, the problem of insufficient detection accuracy of Hall sensors in the hot chamber environment of the nuclear industry is solved, and more accurate detection of the operating status of the magnetic stirrer is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA NUCLEAR POWER ENGINEERING CO LTD
- Filing Date
- 2025-05-28
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, the Hall sensor of the magnetic stirrer cannot work effectively in the hot chamber environment of the nuclear industry due to the influence of gamma rays, and the signal transmission link of the Hall sensor is easily affected by electromagnetic interference in the conventional environment, resulting in insufficient accuracy in detecting the operating status of the magnetic stirrer.
By acquiring the motor torque or motor speed data of the stirring device itself, extracting features, and using a target detection model for detection, the operating status of the magnetic stirrer can be directly determined without the need for additional Hall sensors.
This improves the accuracy of detecting the operating status of the magnetic stir bar in the magnetic stirrer and solves the problem of false alarms caused by inaccurate Hall sensor data.
Smart Images

Figure CN120644106B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of stirring technology, specifically relating to a magnetic stir bar detection method and apparatus, and a detection model training method and apparatus. Background Technology
[0002] A stirring device is a apparatus that forces convection and uniformly mixes liquid or gaseous media. It is a commonly used experimental device in many fields such as biology, chemistry, materials science, and material analysis. Common stirring devices include mechanical rod stirrers and magnetic stirrers. For magnetic stirrers, to ensure the smooth progress and reliability of experimental results, the magnetic stir bar needs to be checked regularly to allow for timely maintenance when abnormal operation occurs.
[0003] Currently, for magnetic stirrers, Hall effect sensors are mainly used to detect the magnetic field signals between the magnetic stir bar and the permanent magnet rotating disk. The operating status of the magnetic stir bar, such as loss of synchronization, is detected by calculating the angle difference between the magnetic field strength of the rotating disk and the magnetic field strength of the magnetic stir bar. However, in the hot chamber environment of the nuclear industry, the additional Hall effect sensors are affected by gamma rays and cannot operate effectively. Furthermore, in conventional environments, the signal transmission link of additional Hall effect sensors is susceptible to electromagnetic interference, and the noise in the acquired signal affects the calculation results of the magnetic field angle difference, easily generating false alarms about the operating status of the magnetic stir bar, resulting in errors in the detection results. In summary, the accuracy of the existing technology for detecting the operating status of the magnetic stir bar in magnetic stirrers is insufficient. Summary of the Invention
[0004] The technical problem to be solved by this application is to address the above-mentioned shortcomings of the prior art by providing a magnetic stir bar detection method and apparatus, and a detection model training method and apparatus. Using this magnetic stir bar detection method, there is no need to add an additional Hall sensor, which can improve or solve the problem that the accuracy of detecting the operating status of the magnetic stir bar in the magnetic stirrer is insufficient due to the inaccuracy of the data collected by the additional Hall sensor. In other words, it can improve the accuracy of detecting the operating status of the magnetic stir bar in the magnetic stirrer.
[0005] In a first aspect, embodiments of this application provide a method for detecting a magnetic stir bar, including:
[0006] Acquire the target operating data of the stirring device to be tested, wherein the stirring device to be tested includes the magnetic stir bar to be tested; the target operating data includes N target motor torques, or includes N target motor speeds and N target motor torques, where N is a positive integer;
[0007] Extract target features from the target's operational data;
[0008] A target detection model is used to detect the target features and obtain the target operating state of the magnetic stirrer to be detected. The target detection model is trained by historical features and their corresponding historical operating states.
[0009] Based on the same inventive concept, in a second aspect, embodiments of this application also provide a detection model training method, which is used to train a target detection model according to any one of the first aspects, the method comprising:
[0010] Acquire historical operating data of the stirring device, wherein the stirring device includes a magnetic stir bar; the historical operating data includes Q historical motor torques, or includes Q historical motor speeds and Q historical motor torques, where Q is a positive integer;
[0011] Historical operational data is extracted to obtain historical characteristics;
[0012] The target detection model is obtained by training the preset model using historical features and their corresponding historical operating states.
[0013] Based on the same inventive concept, in a third aspect, embodiments of this application provide a magnetic stir bar detection device, comprising:
[0014] The first acquisition module is used to acquire the target operating data of the stirring device to be tested, wherein the stirring device to be tested includes a magnetic stir bar to be tested; the target operating data includes N target motor torques, or includes N target motor speeds and N target motor torques, where N is a positive integer;
[0015] The first extraction module, connected to the first acquisition module, is used to extract target running data to obtain target features;
[0016] The detection module, connected to the first extraction module, is used to detect target features using a target detection model to obtain the target operating state of the magnetic stirrer to be detected. The target detection model is trained from historical features and their corresponding historical operating states.
[0017] Based on the same inventive concept, embodiments of this application also provide a detection model training apparatus, which is used to train a target detection model as described in any of the first aspects, the apparatus comprising:
[0018] The second acquisition module is used to acquire historical operating data of the stirring device, wherein the stirring device includes a magnetic stir bar; the historical operating data includes Q historical motor torques, or includes Q historical motor speeds and Q historical motor torques, where Q is a positive integer;
[0019] The second extraction module, connected to the second acquisition module, is used to extract historical operating data to obtain historical features;
[0020] The training module, connected to the second extraction module, is used to train the preset model using historical features and their corresponding historical operating states to obtain the target detection model.
[0021] According to the magnetic stir bar detection method and apparatus, and detection model training method and apparatus provided in the embodiments of this application, target features are obtained by extracting N target motor torques of the stirring device to be detected, or by extracting N target motor speeds and N target motor torques of the stirring device to be detected. Then, the target features are detected using a target detection model to obtain the target operating state of the magnetic stir bar to be detected. In other words, in the embodiments of this application, the target operating state of the magnetic stir bar to be detected is determined by the N target motor torques of the stirring device to be detected, or by extracting N target motor speeds and N target motor torques of the stirring device to be detected. There is no need to add an additional Hall sensor. This can improve or solve the problem that the accuracy of detecting the operating state of the magnetic stir bar in the magnetic stirrer is insufficient due to the inaccuracy of the data collected by the additional Hall sensor. That is, it can improve the accuracy of detecting the operating state of the magnetic stir bar in the magnetic stirrer. Attached Figure Description
[0022] Figure 1 This illustration shows a flowchart of a magnetic stir bar detection method provided in an embodiment of this application.
[0023] Figure 2 This illustration shows a structural schematic diagram of a stirring device provided in an embodiment of this application;
[0024] Figure 3 This diagram illustrates an application environment for the magnetic stir bar detection method provided in an embodiment of this application.
[0025] Figure 4 This illustration shows another flowchart of the magnetic stir bar detection method provided in an embodiment of this application;
[0026] Figure 5 This illustration shows another flowchart of the magnetic stir bar detection method provided in the embodiments of this application;
[0027] Figure 6 This illustration shows another schematic flowchart of the magnetic stir bar detection method provided in the embodiments of this application;
[0028] Figure 7 This illustration shows another flowchart of the magnetic stir bar detection method provided in the embodiments of this application;
[0029] Figure 8 This is a schematic diagram of a magnetic stir bar detection device provided in an embodiment of this application;
[0030] Figure 9 This illustration shows a structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0031] To enable those skilled in the art to better understand the technical solutions of this application, the application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0032] The features and exemplary embodiments of various aspects of this application will now be described in detail. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain this application and are not configured to limit this application. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples of this application.
[0033] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0034] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0035] Example 1
[0036] This application provides a method for detecting magnetic stirrers, which can be applied to the detection of magnetic stirrers in nuclear industry hot chamber environments or conventional environments.
[0037] It should be noted that the magnetic stirrer detection method provided in this application embodiment can be executed by a magnetic stirrer detection device and electronic equipment. The following description takes the execution of the magnetic stirrer detection method by electronic equipment as an example.
[0038] like Figure 1 As shown, this application provides a method for detecting a magnetic stir bar, which includes steps S110 to S130.
[0039] S110. Obtain the target operating data of the stirring device to be tested, wherein the stirring device to be tested includes the magnetic stir bar to be tested; the target operating data includes N target motor torques, or includes N target motor speeds and N target motor torques, where N is a positive integer.
[0040] S120. Extract the target running data to obtain the target features.
[0041] S130. The target features are detected by using a target detection model to obtain the target operating state of the magnetic stirrer to be detected. The target detection model is trained by historical features and their corresponding historical operating states.
[0042] According to the magnetic stir bar detection method provided in this application, target features are obtained by extracting the torque of N target motors of the stirring device under test, or by extracting the speed and torque of N target motors of the stirring device under test. Then, a target detection model is used to detect these target features to obtain the target operating state of the magnetic stir bar under test. In other words, in this application embodiment, the target operating state of the magnetic stir bar under test is determined by the torque of N target motors of the stirring device under test, or by the speed and torque of N target motors of the stirring device under test. This eliminates the need for additional Hall sensors, improving or solving the problem of insufficient accuracy in detecting the operating state of the magnetic stir bar in a magnetic stirrer due to inaccurate data collected by additional Hall sensors. Therefore, it can improve the accuracy of detecting the operating state of the magnetic stir bar in a magnetic stirrer.
[0043] The specific implementation methods for each of the above steps are described below.
[0044] In step S110, the stirring device to be tested can be any stirring device whose operating status of the magnetic stir bar needs to be detected. For example, the stirring device to be tested can be as follows: Figure 2 As shown, the stirring device to be tested may include components such as a servo motor 1, a coupling 2, a permanent magnet turntable 3, a container 4, and a magnetic stirrer 5. The servo motor 1 drives the permanent magnet turntable 3, and the magnetic stirrer 5 rotates at the bottom of the container 4 under the magnetic force of the permanent magnet turntable 3, thereby stirring the liquid in the container 4. It should be noted that... Figure 2 In the diagram, N represents North, S represents South, and the direction indicated by the arrow is the direction of rotation.
[0045] For example, the target motor torque can be the current value of the output torque of the stirring device under test; the target motor speed can be the current value of the output speed of the stirring device under test.
[0046] As an example, the target running data includes N target motor torques.
[0047] As another example, the target operating data includes N target motor speeds and N target motor torques.
[0048] For example, when the stirring device under test is detected to be activated, the target operating data of the stirring device under test can be collected through the motor driver in the stirring device under test. In this way, since the control signal of the motor driver has anti-interference capabilities, collecting the target operating data of the stirring device under test through the motor driver can improve the quality of the target operating data, thereby improving the accuracy of detecting the operating status of the magnetic stir bar in the magnetic stirrer. Specifically, the motor driver can continuously collect the target operating data of the stirring device under test in real time to promptly determine the operating status of the magnetic stir bar in the magnetic stirrer.
[0049] For example, the acquisition frequency used when collecting target operating data can be greater than or equal to 200Hz. When the stirring device under test is detected to stop running, the acquisition of target operating data is stopped simultaneously, thereby improving or solving the problem of collecting invalid target operating data.
[0050] In some implementations, acquiring the target operating data of the stirring device to be tested specifically includes:
[0051] The target sampling frequency and first initial operating data of the stirring device to be tested are obtained. The first initial operating data includes P first initial motor torques, or P first initial motor speeds and P first initial motor torques; wherein the first initial motor speeds and the first initial motor torques are in one-to-one correspondence, P is a positive integer, and P is greater than or equal to N.
[0052] The first initial running data is grouped according to the target sampling frequency to obtain P / N groups of first intermediate running data. The first intermediate running data includes N first initial motor torques, or N first initial motor speeds and N first initial motor torques.
[0053] The first intermediate operating data from any one of the P / N groups is determined as the target operating data of the stirring device to be tested.
[0054] For example, the target sampling frequency can be the sampling frequency used when collecting target running data.
[0055] For example, the value of N is equal to the target sampling frequency. For instance, if the target sampling frequency is 250Hz, then the value of N is 250.
[0056] For example, the N target motor speeds are the N first initial motor speeds in any set of first intermediate operating data; the N target motor torques are the N first initial motor torques in any set of first intermediate operating data.
[0057] For example, P is 750 and N is 250. The first initial operating data includes 750 initial motor speeds and 750 initial motor torques. The first to the 250th initial motor speed is collected and defined as the 250 initial motor speeds included in the first group of intermediate operating data; the 251st to the 500th initial motor speed is collected and defined as the 250 initial motor speeds included in the second group of intermediate operating data; and the 501st to the 750th initial motor speed is collected and defined as the 250 initial motor speeds included in the third group of intermediate operating data. The grouping of the initial motor torques is similar and will not be repeated here.
[0058] It should be noted that the values of N and P can be set according to the actual situation, and are not limited here.
[0059] In step S120, after acquiring the target operating data of the stirring device to be detected, the electronic device can also extract the target operating data to obtain target features.
[0060] As an example, target features include the time-domain features of the target torque.
[0061] As another example, target features include target order spectral energy features.
[0062] As yet another example, target features include the time-domain characteristics of the target torque and the energy characteristics of the target order spectrum.
[0063] In some implementations, when the target operating data includes N target motor torques,
[0064] The target features include the time-domain features of the target torque, wherein the time-domain features of the target torque include at least one of the following: target mean, target effective value, target peak factor, target standard deviation, target signal peak value, target kurtosis, and target disturbance factor.
[0065] In this embodiment, the target torque time-domain characteristics include at least one of the following: target mean, target effective value, target peak factor, target standard deviation, target signal peak value, target kurtosis, and target perturbation factor, which can improve the completeness and accuracy of the target torque time-domain characteristics.
[0066] For example, the target mean can be the average value of N target motor torques; the target RMS value can be the RMS value of N target motor torques; the target peak factor can be the peak factor of N target motor matrices; the target standard deviation can be the standard deviation of N target motor matrices; the target signal peak value can be the signal peak value of N target motor matrices; the target kurtosis can be the kurtosis of N target motor torques; and the target perturbation factor can be the perturbation factor of N target motor torques.
[0067] It should be noted that the target effective value can reflect the changing trend of the target motor torque during the target operation data acquisition process; the target peak factor can reflect the stability of the target motor torque; the target signal peak value can represent the intensity of the target motor torque; the target kurtosis can reflect the impact characteristics of the target motor torque; and the target disturbance factor can reflect the fluctuation characteristics of the target motor torque.
[0068] As an example, the time-domain characteristics of the target torque include the target mean.
[0069] As another example, the time-domain characteristics of target torque include target kurtosis and target perturbation factor.
[0070] As yet another example, the time-domain characteristics of the target torque include the target mean, target RMS value, target peak factor, target standard deviation, target signal peak value, target kurtosis, and target disturbance factor.
[0071] For example, the target mean can be determined according to formula (1).
[0072]
[0073] in, Let x be the target mean. n Let N be the torque of the nth target motor, and 1≤n≤N, where n is a positive integer.
[0074] For example, the target effective value can be determined according to formula (2).
[0075] Formula (2) includes:
[0076]
[0077] Where, x rms This represents the target effective value.
[0078] For example, the target signal peak value can be determined according to formula (3).
[0079] Formula (3) includes:
[0080] x peak =max(x n (3)
[0081] Where, x peak denoted as the peak value of the target signal, and max as the maximum value.
[0082] For example, the target peak factor can be determined according to formula (4).
[0083] Formula (4) includes:
[0084]
[0085] Where CF represents the target peak factor.
[0086] For example, the target standard deviation can be determined according to formula (5).
[0087] Formula (5) includes:
[0088]
[0089] Where, σ x The target standard deviation is denoted as .
[0090] For example, the target perturbation factor can be determined according to formula (6).
[0091] Formula (6) includes:
[0092]
[0093] Where T is the target perturbation factor.
[0094] For example, the target kurtosis can be determined according to formula (7).
[0095] Formula (7) includes:
[0096]
[0097] Where K is the target kurtosis.
[0098] In other implementations, when the target operating data includes N target motor speeds and N target motor torques, the target motor speeds and target motor torques correspond one-to-one, and the target features include target order spectrum energy features.
[0099] Extracting target features from the target's operational data, specifically including:
[0100] Based on the N target motor speeds and their corresponding N target acquisition timestamps, determine N first motor rotation angles, with each target motor speed corresponding to a target acquisition timestamp and a first motor rotation angle.
[0101] Determine the target torque order spectrum based on N first motor rotation angles;
[0102] Based on the target torque order spectrum, determine the energy characteristics of the target order spectrum.
[0103] In this embodiment, N first motor rotation angles are first determined based on the rotation speeds of N target motors and their corresponding N target acquisition timestamps. Then, the target torque order spectrum is determined based on the N first motor rotation angles. Finally, the target order spectrum energy characteristics are determined based on the target torque order spectrum, which can improve the reliability of the target order spectrum energy characteristics.
[0104] For example, the target motor speed and its corresponding target motor torque have the same target acquisition timestamp.
[0105] For example, the target order spectrum energy characteristics can be the amplitude of the target order spectrum corresponding to the stirring device under test, or the L largest order signals in the target torque order spectrum, where L is an integer greater than or equal to 1, and the specific value can be set according to actual needs. For example, the value of L can be 8.
[0106] In some examples, the target torque order spectrum is determined based on N first motor rotation angles, specifically including:
[0107] Among the N first motor rotation angles, the M identical first motor rotation angles are determined as the M target motor rotation angles, where M is less than or equal to N and M is a positive integer;
[0108] Based on the M target motor torques corresponding one-to-one with the M target motor rotation angles, determine the target torque order signal;
[0109] Perform a Fourier transform on the target torque order signal to obtain the target torque order spectrum.
[0110] In this embodiment, by determining M identical first motor rotation angles out of N first motor rotation angles as M target motor rotation angles, and then determining the target torque order signal based on the M target motor torques corresponding to the M target motor rotation angles, and then performing a Fourier transform on the target torque order signal to obtain the target torque order spectrum, the reliability of the target torque order spectrum can be improved, thereby improving the reliability of the energy characteristics of the target order spectrum.
[0111] It should be noted that the target motor torque corresponds one-to-one with the target motor speed, the target motor speed corresponds one-to-one with the first motor rotation angle, and the first motor rotation angle corresponds one-to-one with the target motor rotation angle. Therefore, the target motor rotation angle corresponds one-to-one with the target motor torque.
[0112] For example, the target torque order spectrum can be determined based on the target torque order signal corresponding to the target motor torque, and the target torque order signal can be used to describe the vibration frequency of the mechanical equipment.
[0113] It should be noted that the order spectrum is an analytical method for rotating machinery. It decomposes mechanical vibration signals into components of different orders and calculates the magnitude of vibration energy at each order. The order spectrum can accurately reflect the vibration condition of the machinery and provide an effective means of fault diagnosis. The amplitude of the order spectrum refers to the maximum value of the calculated vibration energy.
[0114] In some examples, the target torque order signal is determined based on the M target motor torques corresponding to the M target motor rotation angles, specifically including:
[0115] The M target motor torques, corresponding one-to-one with the M target motor rotation angles, are sorted according to the target acquisition timestamps to obtain the target sequence;
[0116] Interpolate the target sequence to obtain the target torque order signal.
[0117] In this embodiment, by sorting the M target motor torques corresponding to the M target motor rotation angles one by one according to the target acquisition timestamps to obtain the target sequence, and then interpolating the target sequence to obtain the target torque order signal, the reliability of the target torque order signal can be improved, thereby improving the reliability of the target torque order spectrum.
[0118] For example, the data can be sorted from largest to smallest according to the target collection timestamp, or from smallest to largest according to the target collection timestamp; there is no limitation here.
[0119] For example, the target sequence is interpolated using linear interpolation to obtain the target torque order signal. In other words, the target sequence is resampled to obtain the target torque order signal.
[0120] It should be noted that the value of M can be set according to the actual situation, and is not limited here.
[0121] In step S130, after the electronic device extracts the target operating data and obtains the target features, it can also use a target detection model to detect the target features and obtain the target operating state of the magnetic stirrer to be detected.
[0122] For example, the target operating state may include a normal state, a loss-of-synchronization state, a skipping state, a worn state, and a weak magnetic state. Among them, the loss-of-synchronization state can be a state in which the magnetic stir bar under test cannot rotate synchronously with the magnetic field, manifested as a stop rotating or a state in which the rotation speed is not synchronized with the magnetic field; the skipping state can be a state in which the magnetic stir bar under test detaches from the center position of the bottom of the container, causing irregular jumping or impacting the container wall; the worn state can be a state in which the surface of the magnetic stir bar under test is physically damaged or its magnetic properties are weakened due to long-term friction or chemical corrosion; the weak magnetic state can be a state in which the magnetic stir bar under test is demagnetized, resulting in insufficient magnetic field driving force and inability to rotate effectively.
[0123] As an example, a target detection model is used to detect the time-domain characteristics of the target torque to obtain the target operating state of the magnetic stirrer to be detected.
[0124] As another example, a target detection model is used to detect the target order spectrum energy characteristics to obtain the target operating state of the magnetic stirrer to be detected.
[0125] As another example, a target detection model is used to detect the time-domain characteristics of the target torque and the energy characteristics of the target order spectrum to obtain the target operating state of the magnetic stirrer to be detected.
[0126] For example, the target detection model can determine the target operating state of the magnetic stirrer to be detected based on the time-domain characteristics of the target torque and its corresponding data range, and / or the energy characteristics of the target order spectrum and its corresponding data range.
[0127] Example 2
[0128] This application provides a detection model training method for training the target detection model of Embodiment 1. The target detection model trained by this method can be applied to the detection of magnetic stirrers in nuclear industrial hot chamber environments or conventional environments.
[0129] The detection model training method provided in this application can be executed by a detection model training device and electronic equipment. The following description uses the execution of this detection model training method by an electronic device as an example.
[0130] The detection model training method provided in this application embodiment may include steps S210 to S230.
[0131] S210. Obtain historical operating data of the stirring device, wherein the stirring device includes a magnetic stir bar; the historical operating data includes Q historical motor torques, or includes Q historical motor speeds and Q historical motor torques, where Q is a positive integer.
[0132] S220. Extract historical operating data to obtain historical features.
[0133] S230. Train the preset model using historical features and their corresponding historical operating states to obtain the target detection model.
[0134] According to the detection model training method provided in this application, historical features are determined by Q historical motor torques of the stirring device itself, or Q historical motor speeds and Q historical motor torques of the stirring device itself. These historical features and their corresponding historical operating states are then used to train a preset model to obtain a target detection model. This eliminates the need for additional Hall sensors, thus improving or resolving the problem of insufficient accuracy in detecting the operating state of the magnetic stir bar in a magnetic stirrer due to inaccurate data collected by additional Hall sensors. In other words, it improves the accuracy of detecting the operating state of the magnetic stir bar in a magnetic stirrer. Furthermore, it enables the target detection model to predict the torque feature data of the magnetic stir bar, thereby improving the efficiency of determining the operating state of the magnetic stir bar.
[0135] The specific implementation methods for each of the above steps are described below.
[0136] In step S210, the historical motor torque can be the historical value of the output torque of the stirring device; the historical motor speed can be the historical value of the output speed of the stirring device.
[0137] As an example, the historical operating data includes Q historical motor torques.
[0138] As another example, the historical operating data includes Q historical motor torques and Q historical motor speeds.
[0139] The specific implementation of step S210 is similar to that of step S110, and will not be described again here.
[0140] Understandably, there are multiple historical operation data points.
[0141] It should be noted that the value of Q can be the same as or different from the value of N; no restriction is imposed here.
[0142] In step S220, as an example, historical features include historical torque time-domain features.
[0143] As another example, historical features include historical order spectral energy features.
[0144] As another example, historical features include historical torque time-domain features and historical order spectral energy features.
[0145] In some implementations, when the historical operating data includes Q historical motor torques,
[0146] Historical features include historical torque time-domain features, which include at least one of the following: historical mean, historical effective value, historical peak factor, historical standard deviation, historical signal peak value, historical kurtosis, and historical disturbance factor.
[0147] In other implementations, when the historical operating data includes Q historical motor speeds and Q historical motor torques, the historical motor speeds and historical motor torques correspond one-to-one, and the historical features include historical order spectrum energy features.
[0148] Historical operational data is extracted to obtain historical features, specifically including:
[0149] Based on Q historical motor speeds and their corresponding Q historical acquisition timestamps, Q second motor rotation angles are determined, with each historical motor speed corresponding to a historical acquisition timestamp and a second motor rotation angle.
[0150] Based on Q historical motor rotation angles, determine the historical torque order spectrum;
[0151] Based on the historical torque order spectrum, the energy characteristics of the historical order spectrum are determined.
[0152] In some examples, the historical torque order spectrum is determined based on Q historical motor rotation angles, specifically including:
[0153] I identical second motor angles out of Q second motor angles are defined as I historical motor angles, where I is less than or equal to Q and I is a positive integer;
[0154] The order signal of the historical torque is determined based on the I historical motor torques that correspond one-to-one with the I historical motor rotation angles.
[0155] The historical torque order signal is subjected to Fourier transform to obtain the historical torque order spectrum.
[0156] In some examples, the order signal of the historical torque is determined based on the I historical motor torques corresponding to I historical motor angles, specifically including:
[0157] The historical sequence is obtained by sorting the historical motor torques corresponding to the historical motor rotation angles one by one according to the historical collection timestamps.
[0158] Interpolate the historical sequence to obtain the historical torque order signal.
[0159] In some examples, historical operating data of the stirring device is obtained, specifically including:
[0160] The historical sampling frequency and second initial operating data of the stirring device are obtained. The second initial operating data includes J second initial motor torques, or J second initial motor speeds and J second initial motor torques; wherein the second initial motor speeds and the second initial motor torques are in one-to-one correspondence, J is a positive integer, and J is greater than or equal to Q;
[0161] The second initial operating data is grouped according to the historical sampling frequency to obtain the second intermediate operating data of group J / Q. The second intermediate operating data includes Q initial motor torques, or Q initial motor speeds and Q initial motor torques.
[0162] The second intermediate operating data of any one group in the J / Q group is determined as the historical operating data of the stirring device.
[0163] The specific implementation of step S210 is similar to that of step S210, and will not be repeated here.
[0164] In step S230, the historical operating status may include historical normal status, historical out-of-step status, historical jumper status, historical wear status, and historical weak magnetic status, etc.
[0165] For example, the preset model can be at least one of the following algorithmic models: decision tree, logistic regression, Bayesian algorithm, support vector machine, or random forest.
[0166] As an example, historical features are used as training samples, and the historical running states corresponding to the historical features are used as labels corresponding to the training samples. The preset model is then trained to obtain the object detection model.
[0167] As another example, a subset of historical features is used as training samples, and the corresponding historical operating states are used as labels for these training samples. This data is then used to train a pre-defined model, resulting in an intermediate model. Another subset of historical features is used as test samples, and the corresponding historical operating states are used as labels for these test samples. This data is then used to test the intermediate model, and the model loss function value of the intermediate model is determined. If the model loss function value is less than or equal to a pre-defined value, the intermediate model is selected as the target model. The pre-defined value can be set according to actual conditions and is not limited here.
[0168] Specifically, 80% of the historical features and their corresponding historical operating states can be used as model training data, and the remaining 20% of the historical features and their corresponding historical operating states can be used as model testing data. The preset model is trained using the training data, and the trained preset model is used as an intermediate model. The historical features from the model testing data are input into the intermediate model, and the output data of the intermediate model is used as the predicted label data. The model loss function value of the intermediate model is determined based on the predicted label data and the historical operating states in the model testing data. If the model loss function value is less than or equal to a preset value, the intermediate model is determined to be an object detection model. If the model loss function value is greater than the preset loss function value, model training continues until the model loss function value is less than or equal to the preset value, or until a preset number of training iterations is reached. The preset number of training iterations can be set according to actual conditions and is not limited here.
[0169] The above scheme trains a preset model based on model training data to determine an intermediate model, tests the intermediate model using model test data to determine the model loss function value of the intermediate model, and repeatedly trains the intermediate model based on the model loss function value, which can improve the prediction accuracy of the magnetic stir bar detection model.
[0170] Example 3
[0171] The magnetic stir bar detection method provided in this application embodiment can be applied to, for example... Figure 3 The application environment is shown. Terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed in the cloud or on other network servers. Server 104 acquires the target operating data of the stirring device to be tested, extracts the target features from the target operating data, uses a target detection model to detect the target features, obtains the target operating state of the magnetic stirrer to be tested, and sends the target operating state of the magnetic stirrer to terminal 102 via the communication network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0172] In one embodiment, such as Figure 4 As shown, a method for detecting a magnetic stir bar is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and can be implemented through interaction between the terminal and the server. The magnetic stir bar detection method provided in this application embodiment may include steps S410 to S440.
[0173] S410. Collect sample operation data (i.e., historical operation data) of the sample stirring device (i.e., stirring device) through the motor driver.
[0174] The sample operation data includes sample motor torque (i.e., historical motor torque) and sample motor speed (i.e., historical motor speed).
[0175] The sample motor torque is the output torque of the sample stirring device. For example... Figure 2As shown, the stirring device mainly consists of a servo motor 1, a coupling 2, a permanent magnet turntable 3, a container 4, and a magnetic stirrer 5. The servo motor 1 drives the permanent magnet turntable 3, and the magnetic stirrer 5 rotates at the bottom of the container 4 under the magnetic drive of the permanent magnet turntable, thereby stirring the liquid in the container 4.
[0176] Specifically, when the start of the sample stirring device is detected, the sample motor torque and speed of the sample stirring device are continuously collected in real time through the motor driver, and the collected sample motor torque and speed are used as the sample operation data of the sample stirring device. Optionally, the sampling frequency (i.e., the historical sampling frequency) used when collecting the sample operation data is greater than or equal to 200Hz. When the sample stirring device is detected to stop running, the collection of sample operation data is stopped synchronously to avoid collecting invalid sample operation data.
[0177] S420. Extract features from the sample operation data to determine the sample torque time-domain features (i.e., historical torque time-domain features) and sample order spectrum energy features (historical order spectrum energy features) of the sample stirring device.
[0178] The time-domain characteristics of the sample torque include the sample mean (historical mean), sample effective value (historical effective value), sample peak factor (historical peak factor), sample standard deviation (historical standard deviation), sample signal peak value (historical signal peak value), sample kurtosis (historical kurtosis), and sample perturbation factor (historical perturbation factor) corresponding to the sample motor torque. The sample effective value reflects the changing trend of the sample motor torque during the sample operation data acquisition process; the sample peak factor reflects the stability of the sample motor torque; the sample signal peak value represents the intensity of the sample motor torque; the sample kurtosis reflects the impact characteristics of the sample motor torque; and the sample perturbation factor reflects the fluctuation characteristics of the sample motor torque. The energy characteristics of the sample order spectrum can be the amplitude of the sample order spectrum corresponding to the sample stirring device, or the L largest order signals in the sample order spectrum, where L is an integer greater than or equal to 1. The specific values can be set according to actual needs. The sample order spectrum is determined based on the order signals corresponding to the sample motor torque (i.e., historical torque order signals), which can be used to describe the vibration frequency of the mechanical equipment. It should be noted that the order spectrum is an analytical method for rotating machinery. It decomposes mechanical vibration signals into components of different orders and calculates the magnitude of vibration energy at each order. The order spectrum can accurately reflect the vibration condition of the machinery and provide an effective means of fault diagnosis. The amplitude of the order spectrum refers to the maximum value of the calculated vibration energy.
[0179] Specifically, feature extraction is performed on the sample motor torque to determine the time-domain characteristics of the sample torque of the sample stirring device. Based on the sample motor speed, order analysis is performed on the sample motor torque to determine the order signal of the sample motor torque (i.e., the historical torque order signal). Based on the order signal of the sample motor torque, the sample order spectrum of the sample motor torque (i.e., the historical torque order spectrum) is determined. Based on the sample order spectrum, the energy characteristics of the sample order spectrum are determined.
[0180] S430. The machine learning model (i.e., the preset model) is trained by using the temporal characteristics of sample torque, the energy characteristics of sample order spectrum, and the sample state labels (i.e., historical operating states) of the sample magnetic stirrer in the sample stirring device, and the magnetic stirrer detection model (i.e., the target model) is determined.
[0181] The sample state labels for the magnetic stirrer can include anomalies such as out-of-synchronization (i.e., historical out-of-synchronization state), skipping (i.e., historical skipping state), wear (i.e., historical wear state), and / or weak magnetism (i.e., historical weak magnetism state). The machine learning model can be an algorithm model such as decision tree, logistic regression, Bayesian algorithm, support vector machine, or random forest.
[0182] Specifically, the sample state labels of the magnetic stirrer corresponding to the sample torque time-domain features and sample order spectrum energy features are obtained. The sample state labels are used as label data for training the machine learning model. The machine learning model is trained by the sample torque time-domain features, sample order spectrum energy features and sample state labels to determine the magnetic stirrer detection model.
[0183] S440. Obtain the target operating data of the stirring device to be tested. Based on the magnetic stirrer detection model (i.e., the target detection model) and the target operating data, determine the operating state (i.e., the target operating state) of the magnetic stirrer to be tested in the stirring device to be tested.
[0184] The target operating data includes the target motor torque and target motor speed of the stirring device under test within a certain period of time. The target motor torque refers to the output torque of the stirring device under test.
[0185] Specifically, the target motor torque and target motor speed of the stirring device under test are acquired within a certain time period. Based on the target motor torque and target motor speed, the time-domain characteristics of the target torque and the target order spectrum energy characteristics of the stirring device under test are determined. The time-domain characteristics of the target torque include the target mean, target RMS value, target peak factor, target standard deviation, target signal peak value, target kurtosis, and target perturbation factor corresponding to the target motor torque. The target order spectrum energy characteristics can be the amplitude of the target order spectrum corresponding to the target stirring device, or the M largest order signals in the target order spectrum. The time-domain characteristics of the target torque and the target order spectrum energy characteristics are used as input data for the magnetic stirrer detection model. Based on the output data of the magnetic stirrer detection model, the sample state label of the magnetic stirrer under test in the stirring device under test is determined. Based on the sample state label of the magnetic stirrer under test, it is determined whether there is any abnormality in the operating state of the stirring device under test.
[0186] In the aforementioned magnetic stirrer detection method, sample operation data of the sample stirring device is collected via a motor driver; features are extracted from the sample operation data to determine the time-domain characteristics of the sample torque and the energy characteristics of the sample order spectrum of the sample stirring device; a machine learning model is trained using the time-domain characteristics of the sample torque, the energy characteristics of the sample order spectrum, and the sample state labels of the sample magnetic stirrer in the sample stirring device to determine the magnetic stirrer detection model; target operation data of the stirring device to be tested is obtained, and the operating state of the magnetic stirrer to be tested in the stirring device to be tested is determined based on the magnetic stirrer detection model and the target operation data. This solution addresses the problem that, under certain special environments, electromagnetic interference can cause inaccurate detection results of the magnetic stirrer's operating state by traditional magnetic stirrer detection methods, leading to false alarms. By analyzing the sample motor torque and speed of the sample stirring device over a period of time, the temporal characteristics and energy characteristics of the sample torque and order spectrum are determined. A machine learning model is trained using these temporal characteristics, energy characteristics, and sample state labels of the magnetic stirrer to establish a magnetic stirrer detection model. This model is used to predict the operating state of the magnetic stirrer under test. Utilizing the motor torque and speed of the stirring device itself to detect the magnetic stirrer's operating state avoids the need for additional sensors in the hot environment of nuclear industry. Furthermore, the control signals of the motor equipment have anti-interference capabilities, ensuring the quality of the collected data and preventing false alarms due to errors in the detection data. By extracting the temporal statistical characteristics and energy characteristics of the torque and correlating them with the stirrer's operating state, combined with an intelligent decision-making model, the magnetic stirrer's operating state detection is achieved, improving the efficiency of magnetic stirrer operation state detection.
[0187] In one embodiment, such as Figure 5As shown, feature extraction is performed on the sample operation data to determine the time-domain characteristics of the sample torque and the energy characteristics of the sample order spectrum of the sample stirring device, including:
[0188] S510. Determine the data collection timestamp (i.e., historical collection timestamp) and sampling frequency (i.e., historical sampling frequency) corresponding to the sample running data, determine the target data length based on the sampling frequency, and determine the statistical calculation unit based on the target data length.
[0189] It should be noted that, considering that the data acquisition process of the sample operation data is a continuous acquisition process, the data length collected per second can be determined according to the sampling frequency, and the data length collected per second can be used as the target data length. The statistical calculation unit can be determined based on the target data length.
[0190] For example, if the sampling frequency corresponding to the sample running data is 250Hz, then the target data length is 250, that is, 250 sample running data are collected per second, and 250 can be used as a statistical calculation unit.
[0191] S520. Based on the statistical calculation unit, feature extraction is performed on the sample motor torque to determine the time-domain characteristics of the sample stirring device.
[0192] Specifically, the sample operation data can be grouped according to the statistical calculation unit. The sample operation data within a statistical calculation unit is taken as a group of data. The sample motor torque in the grouped sample operation data is used to extract features and determine the time domain characteristics of the sample torque of the sample stirring device.
[0193] S530. Based on the statistical calculation unit, data acquisition timestamps, and sample operation data, the sample order spectrum energy characteristics of the sample stirring device are determined.
[0194] Specifically, the sample operation data is grouped based on the statistical calculation unit to determine the sample group data, and the sample motor torque in the sample group data is resampled based on the data acquisition timestamp and sample motor speed corresponding to the sample group data to determine the torque order signal. The torque order spectrum is determined based on the torque order signal, and the sample order spectrum energy characteristics of the sample stirring device are determined based on the torque order spectrum.
[0195] In this embodiment, the target data length of the sample running data is determined according to the sampling frequency of the sample running data, the statistical calculation unit is determined according to the target data length, the collected sample running data is grouped according to the statistical calculation unit, and the sample torque time-domain characteristics and sample order spectrum energy characteristics are determined according to the grouped sample running data, which can improve the reliability of the sample torque time-domain characteristics and sample order spectrum energy characteristics.
[0196] In one embodiment, such as Figure 6As shown, based on the statistical calculation unit, feature extraction is performed on the sample motor torque to determine the time-domain features of the sample stirring device, including:
[0197] S610. Based on the statistical calculation unit, the sample motor torque is grouped to determine the torque group data, and the sample effective value and sample signal peak value are determined according to the torque group data.
[0198] For example, if the sampling frequency corresponding to the sample running data is 250Hz, then the statistical calculation unit is 250. Each group of torque data contains 250 sample motor torques. Grouping can start from the first sample motor torque collected. That is, the first sample motor torque to the 250th sample motor torque is taken as a group of torque data, the 251st sample motor torque to the 500th sample motor torque is taken as a group of torque data, and so on to determine each torque data group.
[0199] S620. Based on each group of torque data, determine the effective value of the sample and the peak value of the sample signal corresponding to each group of torque data.
[0200] The calculation method for the effective value of the sample is shown in formula (8):
[0201]
[0202] Where, x′ rms Here, x′ represents the valid values of the sample, Q represents the number of sample motor torques in the torque grouping data, and x′ represents the valid values of the sample. n Let Q be the motor torque of the nth sample in the torque grouping data, and 1≤n≤Q, where n and Q are both integers.
[0203] Sample signal peak value x′ peak The calculation formula is shown in formula (9):
[0204] x′ peak =max(x′) n (9)
[0205] S630. Based on each group of torque data and the corresponding valid sample value, determine the sample peak factor corresponding to each group of torque data.
[0206] For example, the formula for calculating the peak factor of a sample is shown in formula (10):
[0207]
[0208] Where CF′ is the sample peak factor.
[0209] S640. Based on each group of torque data, determine the mean sample torque value corresponding to each group of torque data.
[0210] For example, the formula for calculating the mean sample torque is shown in formula (11):
[0211]
[0212] in, This represents the average torque value of the sample.
[0213] S650. Based on the mean sample torque and torque group data corresponding to each group of torque group data, determine the standard deviation of the sample data corresponding to each group of torque group data.
[0214] The formula for calculating the sample standard deviation is shown in formula (12):
[0215]
[0216] Where, σ′ x This represents the sample standard deviation.
[0217] S660. Based on the sample standard deviation and sample torque mean of each group of torque data, determine the sample perturbation factor corresponding to each group of torque data.
[0218] For example, the formula for calculating the sample perturbation factor is shown in formula (13):
[0219]
[0220] Where T′ is the sample perturbation factor.
[0221] S670. Based on each group of torque data, the sample standard deviation, and the sample torque mean, determine the sample kurtosis corresponding to each group of torque data.
[0222] For example, the formula for calculating sample kurtosis is shown in formula (14):
[0223]
[0224] Where K′ is the sample kurtosis.
[0225] S680. The mean value of the sample torque, the effective value of the sample torque, the peak factor of the sample torque, the standard deviation of the sample torque, the peak value of the sample signal, the kurtosis of the sample torque, and the perturbation factor corresponding to each group of torque data are used as the time-domain characteristics of the sample torque of the sample stirring device.
[0226] The above scheme provides methods for calculating sample mean, sample effective value, sample peak factor, sample standard deviation, sample signal peak value, sample kurtosis, and sample perturbation factor. Using sample mean, sample effective value, sample peak factor, sample standard deviation, sample signal peak value, sample kurtosis, and sample perturbation factor as time-domain features of sample torque can improve the completeness and accuracy of the time-domain features of sample torque.
[0227] In one embodiment, the energy characteristics of the sample order spectrum of the sample stirring device are determined based on the statistical calculation unit, data acquisition timestamps, and sample operation data, including:
[0228] The sample operation data is grouped based on the statistical calculation unit to determine the sample group data; based on the sample group data and the data acquisition timestamps corresponding to the sample group data, the torque order signal (i.e., historical torque order signal) corresponding to the sample group data is determined; Fourier transform is performed on the torque order signal to determine the torque order spectrum (i.e., historical torque order spectrum), and the energy characteristics of the sample order spectrum of the sample stirring device are determined based on the torque order spectrum.
[0229] Specifically, the sample operation data is grouped according to the statistical calculation unit to determine the grouped sample operation data. The sample operation data within one statistical calculation unit is considered as one group of data. The data acquisition timestamps are sorted to determine the timestamp sequence information. Based on the timestamp sequence information, the sample motor speed is extracted from the sample operation data. The sample motor speeds at equal time intervals are used as target speed information. The motor angle corresponding to the target speed information is determined based on the target speed information and the corresponding data acquisition timestamp. The sample motor torque corresponding to the motor angle is determined as the target torque signal. The torque order signal is determined by interpolation of the target torque signal corresponding to the same motor angle. Fourier transform is performed on the torque order signal to determine the torque order spectrum. The sample order spectrum energy characteristics of the sample stirring device are determined based on the torque order spectrum. For example, the first eight orders of energy in the torque order spectrum can be used as the sample order spectrum energy characteristics of the sample stirring device. It should be noted that the sample order spectrum energy characteristics of each group of sample operation data need to be determined.
[0230] The above scheme, by grouping the sample operation data according to the statistical calculation unit, determines the sample group data, determines the torque order signal corresponding to each sample group data, and determines the sample order spectrum energy characteristics corresponding to each sample group data based on the torque order signal, thereby improving the reliability of the sample order spectrum energy characteristics.
[0231] In one embodiment, a machine learning model is trained using the temporal characteristics of sample torque, the energy characteristics of sample order spectrum, and the sample state labels of the magnetic stirrer in the sample stirring device to determine a magnetic stirrer detection model, including:
[0232] The temporal characteristics of sample torque and the energy characteristics of sample order spectrum are used as sample training data, and the sample state labels of the magnetic stirrer in the sample stirring device are used as sample supervision data. The machine learning model is trained based on the sample training data and sample supervision data to determine the magnetic stirrer detection model.
[0233] The above scheme provides a method for training a machine learning model to determine a magnetic stirrer detection model, which enables the magnetic stirrer detection model to predict the torque characteristic data of the magnetic stirrer, thereby improving the efficiency of determining the operating state of the magnetic stirrer.
[0234] In one embodiment, a machine learning model is trained based on sample training data and sample supervision data to determine a magnetic stirrer detection model, including:
[0235] The model training data and model testing data are determined based on the sample training data and sample supervision data; the machine learning model is trained using the model training data to determine the candidate detection model; the candidate detection model is tested using the model testing data to determine the model loss function of the candidate detection model; if the model loss function meets the preset loss function conditions, the candidate detection model is determined to be the magnetic stirrer detection model.
[0236] Specifically, the target training data is determined based on the sample training data and sample supervision data. This target training data is divided into model training data and model testing data; for example, 80% of the target training data can be used as model training data, and 20% as model testing data. The machine learning model is trained using the model training data, and the trained machine learning model is used as a candidate detection model. The sample training data from the model testing data is input into the candidate detection model, and the output data of the candidate detection model is used as the predicted label data. The model loss function of the candidate detection model is determined based on the predicted label data and the sample supervision data from the model testing data. If the model loss function meets the preset loss function conditions, the candidate detection model is determined as the magnetic stirrer detection model. If the model loss function does not meet the preset loss function conditions, model training of the candidate detection model continues.
[0237] The above scheme trains the machine learning model based on the model training data, determines candidate detection models, tests the candidate detection models using model test data, determines the model loss function of the candidate detection models, and determines whether the machine learning model has been trained successfully based on the model loss function, thereby improving the prediction accuracy of the magnetic stir bar detection model.
[0238] In one embodiment, such as Figure 7As shown, the target operating data of the stirring device under test is obtained. Based on the magnetic stirrer detection model and the target operating data, the operating status of the magnetic stirrer under test in the stirring device under test is determined, including:
[0239] like Figure 7 As shown, the magnetic stir bar detection method provided in this application embodiment includes steps S710 to S730.
[0240] S710. Obtain the target operating data of the stirring device to be tested.
[0241] The target operating data includes the target motor torque and the target motor speed.
[0242] S720. Determine the time-domain characteristics of the target torque of the stirring device to be tested based on the target motor torque, and determine the target order spectrum energy characteristics of the stirring device to be tested based on the target operating data.
[0243] The time-domain characteristics of the target torque include the target mean, target effective value, target peak factor, target standard deviation, target signal peak value, target kurtosis, and target disturbance factor corresponding to the target motor torque.
[0244] Specifically, feature extraction is performed on the target motor torque to determine the time-domain characteristics of the target torque of the target stirring device. Based on the target operating data, order analysis is performed on the target motor torque to determine the order signal of the target motor torque. Based on the order signal of the target motor torque, the target order spectrum of the target motor torque is determined, and the energy characteristics of the target order spectrum are determined based on the target order spectrum.
[0245] S730. Input the time-domain characteristics of the target torque and the energy characteristics of the target order spectrum into the magnetic stirrer detection model (i.e., the target detection model). Determine the target state label (i.e., the target motion state) of the magnetic stirrer to be detected in the stirring device based on the output data of the magnetic stirrer detection model. Determine the operating state (i.e., the target motion state) of the magnetic stirrer to be detected based on the target state label.
[0246] For example, the data range corresponding to the torque characteristic data of the magnetic stirrer when abnormal phenomena such as loss of synchronization, skipping, wear, or weak magnetism occur can be preset. The target torque time-domain characteristics and target order spectrum energy characteristics are input into the magnetic stirrer detection model. Based on the output data of the magnetic stirrer detection model, the target state label of the magnetic stirrer to be tested in the stirring device is determined. The target state label is used to characterize the operating state of the magnetic stirrer to be tested. For example, the magnetic stirrer detection model can determine the target state label of the magnetic stirrer to be tested based on the target torque time-domain characteristics and its corresponding data range, as well as the target order spectrum energy characteristics and its corresponding data range, and can determine the cause of the abnormality of the magnetic stirrer based on the target state label.
[0247] The above scheme determines the target torque time-domain characteristics and target order spectrum energy characteristics of the stirring device under test based on the target operating data of the stirring device under test. Through the magnetic stirrer detection model, the target state label of the magnetic stirrer under test is determined based on the target torque time-domain characteristics and target order spectrum energy characteristics. The operating state of the magnetic stirrer under test is then determined based on the target state label, which can improve the accuracy of the determined operating state of the magnetic stirrer under test.
[0248] For example, based on the above embodiments, the magnetic stir bar detection method includes:
[0249] When the sample stirring device is detected to be running, the sample motor torque and speed of the sample stirring device are continuously collected in real time via the motor driver. The collected sample motor torque and speed are used as the sample operation data of the sample stirring device. Preferably, the sampling frequency used to collect the sample operation data is greater than or equal to 200Hz. When the sample stirring device is detected to be stopping, the collection of sample operation data is stopped synchronously to avoid collecting invalid sample operation data.
[0250] Example 4
[0251] like Figure 8 As shown, the magnetic stir bar detection device provided in this application embodiment includes:
[0252] The first acquisition module 810 is used to acquire target operating data of the stirring device to be tested, wherein the stirring device to be tested includes a magnetic stir bar to be tested; the target operating data includes N target motor torques, or includes N target motor speeds and N target motor torques, where N is a positive integer;
[0253] The first extraction module 820, connected to the first acquisition module, is used to extract target running data to obtain target features;
[0254] The detection module 830 is connected to the first extraction module 820 and is used to detect the target features using a target detection model to obtain the target operating state of the magnetic stirrer to be detected. The target detection model is trained from historical features and their corresponding historical operating states.
[0255] In some implementations, when the target operating data includes N target motor torques,
[0256] The target features include the time-domain features of the target torque, wherein the time-domain features of the target torque include at least one of the following: target mean, target effective value, target peak factor, target standard deviation, target signal peak value, target kurtosis, and target disturbance factor.
[0257] In some implementations, when the target operating data includes N target motor speeds and N target motor torques, the target motor speeds and target motor torques correspond one-to-one, and the target features include target order spectrum energy features.
[0258] The first extraction module 820 is specifically used for:
[0259] Based on the N target motor speeds and their corresponding N target acquisition timestamps, determine N first motor rotation angles, with each target motor speed corresponding to a target acquisition timestamp and a first motor rotation angle.
[0260] Determine the target torque order spectrum based on N first motor rotation angles;
[0261] Based on the target torque order spectrum, determine the energy characteristics of the target order spectrum.
[0262] In some implementations, the first extraction module 820 is specifically used for:
[0263] Among the N first motor rotation angles, the M identical first motor rotation angles are determined as the M target motor rotation angles, where M is less than or equal to N and M is a positive integer;
[0264] Based on the M target motor torques corresponding one-to-one with the M target motor rotation angles, determine the target torque order signal;
[0265] Perform a Fourier transform on the target torque order signal to obtain the target torque order spectrum.
[0266] In some implementations...
[0267] The first extraction module 820 is specifically used for:
[0268] Based on the M target motor torques corresponding to the M target motor rotation angles, determine the target torque order signal, specifically including:
[0269] The M target motor torques, corresponding one-to-one with the M target motor rotation angles, are sorted according to the target acquisition timestamps to obtain the target sequence;
[0270] Interpolate the target sequence to obtain the target torque order signal.
[0271] In some implementations, the first acquisition module 810 is specifically used for:
[0272] The target sampling frequency and first initial operating data of the stirring device to be tested are obtained. The first initial operating data includes P first initial motor torques, or P first initial motor speeds and P first initial motor torques; wherein the first initial motor speeds and the first initial motor torques are in one-to-one correspondence, P is a positive integer, and P is greater than or equal to N.
[0273] The first initial running data is grouped according to the target sampling frequency to obtain P / N groups of intermediate running data. The intermediate running data includes N first initial motor torques, or N first initial motor speeds and N first initial motor torques.
[0274] Choose any one of the intermediate operating data sets from the P / N groups as the target operating data for the stirring device to be tested.
[0275] The magnetic stir bar detection device provided in this application embodiment can execute the magnetic stir bar detection method in this application embodiment, that is, it has the beneficial effects and implementation method of the magnetic stir bar detection method provided in embodiment 1 of this application. For details, please refer to the specific description of the magnetic stir bar detection method in embodiment 1 above. This embodiment will not repeat the description here.
[0276] Example 5
[0277] The detection model training apparatus provided in this application embodiment is used to train the target detection model of Embodiment 1. The apparatus includes:
[0278] The second acquisition module is used to acquire historical operating data of the stirring device, wherein the stirring device includes a magnetic stir bar; the historical operating data includes Q historical motor torques, or includes Q historical motor speeds and Q historical motor torques, where Q is a positive integer;
[0279] The second extraction module, connected to the second acquisition module, is used to extract historical operating data to obtain historical features;
[0280] The training module, connected to the second extraction module, is used to train the preset model using historical features and their corresponding historical operating states to obtain the target detection model.
[0281] In some implementations, when the historical operating data includes Q historical motor torques,
[0282] Historical features include historical torque time-domain features, which include at least one of the following: historical mean, historical effective value, historical peak factor, historical standard deviation, historical signal peak value, historical kurtosis, and historical disturbance factor.
[0283] In some implementations, when the historical operating data includes Q historical motor speeds and Q historical motor torques, the historical motor speeds and historical motor torques correspond one-to-one, and the historical features include historical order spectrum energy features.
[0284] The second extraction module is specifically used for:
[0285] Based on Q historical motor speeds and their corresponding Q historical acquisition timestamps, Q second motor rotation angles are determined, with each historical motor speed corresponding to a historical acquisition timestamp and a second motor rotation angle.
[0286] Based on Q historical motor rotation angles, determine the historical torque order spectrum;
[0287] Based on the historical torque order spectrum, the energy characteristics of the historical order spectrum are determined.
[0288] In some examples, the second extraction module is specifically used for:
[0289] I identical second motor angles out of Q second motor angles are defined as I historical motor angles, where I is less than or equal to Q and I is a positive integer;
[0290] The order signal of the historical torque is determined based on the I historical motor torques that correspond one-to-one with the I historical motor rotation angles.
[0291] The historical torque order signal is subjected to Fourier transform to obtain the historical torque order spectrum.
[0292] In some examples, the second extraction module is specifically used for:
[0293] The historical sequence is obtained by sorting the historical motor torques corresponding to the historical motor rotation angles one by one according to the historical collection timestamps.
[0294] Interpolate the historical sequence to obtain the historical torque order signal.
[0295] In some examples, the second acquisition module is specifically used for:
[0296] The historical sampling frequency and second initial operating data of the stirring device are obtained. The second initial operating data includes J second initial motor torques, or J second initial motor speeds and J second initial motor torques; wherein the second initial motor speeds and the second initial motor torques are in one-to-one correspondence, J is a positive integer, and J is greater than or equal to Q;
[0297] The second initial operating data is grouped according to the historical sampling frequency to obtain the second intermediate operating data of group J / Q. The second intermediate operating data includes Q initial motor torques, or Q initial motor speeds and Q initial motor torques.
[0298] The second intermediate operating data of any one group in the J / Q group is determined as the historical operating data of the stirring device.
[0299] The detection model training device provided in this application embodiment can execute the detection model training method in this application embodiment, and has the beneficial effects and implementation methods of the detection model training method provided in embodiment 2 of this application. For details, please refer to the specific description of the detection model training method in embodiment 2 above, which will not be repeated here.
[0300] Example 6
[0301] This application provides a computer device, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a magnetic stir bar detection method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0302] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0303] Example 7
[0304] This application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the magnetic stir bar detection method in Embodiment 1 and / or Embodiment 3, and / or implements the detection model training method in Embodiment 2.
[0305] Example 8
[0306] This application provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the magnetic stir bar detection method in Embodiment 1 and / or Embodiment 3, and / or implements the detection model training method in Embodiment 2.
[0307] Example 9
[0308] This application provides a computer program product, including a computer program that, when executed by a processor, implements the magnetic stir bar detection method in Embodiment 1 and / or Embodiment 3, and / or implements the detection model training method in Embodiment 2.
[0309] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0310] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0311] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0312] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of this application, and this application is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this application, and these modifications and improvements are also considered to be within the scope of protection of this application.
Claims
1. A method for detecting a magnetic stir bar, characterized in that, include: Acquire target operating data of the stirring device to be tested, wherein the stirring device to be tested includes a magnetic stir bar to be tested; the target operating data includes N target motor torques, or includes N target motor speeds and N target motor torques, where N is a positive integer; The target's operational data is extracted to obtain target features; The target features are detected using a target detection model to obtain the target operating state of the magnetic stirrer to be detected. The target detection model is trained from historical features and their corresponding historical operating states. When the target operating data includes N target motor torques, The target features include target torque time-domain features, wherein the target torque time-domain features include at least one of the following: target mean, target effective value, target peak factor, target standard deviation, target signal peak value, target kurtosis, and target perturbation factor; When the target operating data includes N target motor speeds and N target motor torques, the target motor speeds and the target motor torques correspond one-to-one, and the target features include target order spectrum energy features; The target running data is extracted to obtain target features, specifically including: Based on N target motor speeds and their corresponding N target acquisition timestamps, N first motor rotation angles are determined, wherein the target motor speeds correspond one-to-one with the target acquisition timestamps and the first motor rotation angles. Determine the target torque order spectrum based on N first motor rotation angles; Based on the target torque order spectrum, determine the energy characteristics of the target order spectrum.
2. The method according to claim 1, characterized in that, Based on N first motor rotation angles, the target torque order spectrum is determined, specifically including: Among the N first motor rotation angles, the M identical first motor rotation angles are determined as the M target motor rotation angles, where M is less than or equal to N and M is a positive integer; Based on the M target motor torques corresponding one-to-one with the M target motor rotation angles, determine the target torque order signal; The target torque order signal is subjected to Fourier transform to obtain the target torque order spectrum.
3. The method according to claim 2, characterized in that, Based on the M target motor torques corresponding to the M target motor rotation angles, determine the target torque order signal, specifically including: The M target motor torques, corresponding one-to-one with the M target motor rotation angles, are sorted according to the target acquisition timestamps to obtain the target sequence; The target sequence is interpolated to obtain the target torque order signal.
4. The method according to claim 1, characterized in that, Obtain the target operating data of the stirring device under test, specifically including: The target sampling frequency and first initial operating data of the stirring device to be tested are obtained. The first initial operating data includes P first initial motor torques, or P first initial motor speeds and P first initial motor torques; wherein the first initial motor speeds and the first initial motor torques are in one-to-one correspondence, P is a positive integer, and P is greater than or equal to N. The first initial running data is grouped according to the target sampling frequency to obtain P / N groups of first intermediate running data. The first intermediate running data includes N first initial motor torques, or N first initial motor speeds and N first initial motor torques. The first intermediate operating data from any one of the P / N groups is determined as the target operating data of the stirring device to be tested.
5. The method according to claim 1, characterized in that, The methods for training the object detection model include: The historical operating data of the stirring device is obtained, wherein the stirring device includes a magnetic stir bar; the historical operating data includes Q historical motor torques, or includes Q historical motor speeds and Q historical motor torques, where Q is a positive integer; Historical features are extracted from the historical operational data. The target detection model is obtained by training the preset model using the historical features and their corresponding historical operating states.
6. The method according to claim 5, characterized in that, In the case that the historical operating data includes Q historical motor torques, The historical features include historical torque time-domain features, wherein the historical torque time-domain features include at least one of historical mean, historical effective value, historical peak factor, historical standard deviation, historical signal peak value, historical kurtosis, and historical disturbance factor.
7. The method according to claim 5 or 6, characterized in that, When the historical operating data includes Q historical motor speeds and Q historical motor torques, the historical motor speeds and the historical motor torques correspond one-to-one, and the historical features include historical order spectrum energy features; The historical operational data is extracted to obtain historical features, specifically including: Based on Q historical motor speeds and their corresponding Q historical acquisition timestamps, Q second motor rotation angles are determined, wherein the historical motor speeds correspond one-to-one with the historical acquisition timestamps and the second motor rotation angles. Based on Q historical motor rotation angles, determine the historical torque order spectrum; Based on the historical torque order spectrum, the energy characteristics of the historical order spectrum are determined.
8. A magnetic stir bar detection device, characterized in that, include: The first acquisition module is used to acquire target operating data of the stirring device to be tested, wherein the stirring device to be tested includes a magnetic stir bar to be tested; the target operating data includes N target motor torques, or includes N target motor speeds and N target motor torques, where N is a positive integer; The first extraction module, connected to the first acquisition module, is used to extract the target running data to obtain target features; The detection module, connected to the first extraction module, is used to detect the target features using a target detection model to obtain the target operating state of the magnetic stir bar to be detected, wherein the target detection model is trained from historical features and their corresponding historical operating states; When the target operating data includes N target motor torques, The target features include target torque time-domain features, wherein the target torque time-domain features include at least one of the following: target mean, target effective value, target peak factor, target standard deviation, target signal peak value, target kurtosis, and target perturbation factor; And / or, When the target operating data includes N target motor speeds and N target motor torques, the target motor speeds and the target motor torques correspond one-to-one, and the target features include target order spectrum energy features; The first extraction module is specifically used for: Based on N target motor speeds and their corresponding N target acquisition timestamps, N first motor rotation angles are determined, wherein the target motor speeds correspond one-to-one with the target acquisition timestamps and the first motor rotation angles. Determine the target torque order spectrum based on N first motor rotation angles; Based on the target torque order spectrum, determine the energy characteristics of the target order spectrum.
9. The apparatus according to claim 8, characterized in that, The device further includes: The second acquisition module is used to acquire historical operating data of the stirring device, wherein the stirring device includes a magnetic stir bar; the historical operating data includes Q historical motor torques, or includes Q historical motor speeds and Q historical motor torques, where Q is a positive integer; The second extraction module, connected to the second acquisition module, is used to extract the historical operation data to obtain historical features; The training module, connected to the second extraction module, is used to train the preset model using the historical features and their corresponding historical operating states to obtain the target detection model.