Current sampling proportion abnormity detection method and device and storage medium
By applying voltage and acquiring motor current values under open-loop voltage control in the sewing machine controller, and calculating the difference to determine abnormal current sampling ratios, the problem of difficulty in finding abnormal current sampling ratios in sewing machine controllers is solved, and rapid and accurate anomaly detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-03-31
AI Technical Summary
Abnormal current sampling ratios in sewing machine controllers are difficult to detect, leading to motor operation errors, but existing technologies lack effective solutions.
Under the open-loop voltage control state of the controller, the voltage of 0 is applied to the Q axis of the motor, and within a preset time period, a test voltage of the first electrical angle is applied to the D axis to obtain the actual sampled current values of the U phase and V phase, calculate the theoretical sampled current value, and compare the difference to determine the current sampling ratio abnormality.
By comparing the difference between theoretical and actual current sampling values, abnormalities in the controller's current sampling ratio can be quickly and accurately determined, improving the speed and accuracy of the search.
Smart Images

Figure CN121762916A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sewing machine control technology, and in particular to a method, device and storage medium for detecting abnormal current sampling ratios. Background Technology
[0002] The sewing machine controller controls the motor's operation. The motor current passes through sampling resistors and operational amplifiers before being input to the microcontroller. The microcontroller then calculates the current based on the circuit's proportional characteristics, thus forming a closed-loop current control. However, during use, the controller often experiences abnormal current sampling ratios, leading to motor operation errors. But there are many reasons for these errors, and it cannot be directly determined that the problem is solely due to an abnormal current sampling ratio.
[0003] There is currently no effective solution to the problem of difficulty in finding abnormal current sampling ratios in controllers. Summary of the Invention
[0004] This embodiment provides a method, apparatus, and storage medium for detecting abnormal current sampling ratios, in order to solve the problem of difficulty in finding abnormal current sampling ratios in controllers.
[0005] Firstly, this embodiment provides a method for detecting abnormal current sampling ratios, used in a sewing machine controller, the method comprising:
[0006] In the open-loop voltage control state of the controller, a voltage of 0 is applied to the Q-axis of the motor, and within a preset time period, a preset test voltage of a first electrical angle is applied to the D-axis of the motor.
[0007] During the duration of the test voltage applied to the D-axis at the first electrical angle, the first actual sampled current values of the U-phase and V-phase of the motor are acquired;
[0008] Calculate the first theoretical sampled current values for the corresponding U-phase and V-phase;
[0009] The difference between the first actual sampled current value and the first theoretical sampled current value is used to obtain a first difference value; when the first difference value is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0010] In some embodiments, the difference between the first actual sampled current value and the first theoretical sampled current value is used to obtain a first difference value; when the first difference value is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio, including:
[0011] The first difference value of phase U is obtained by subtracting the first actual sampled current value of phase U from the first theoretical sampled current value of phase U; the first difference value of phase V is obtained by subtracting the first actual sampled current value of phase V from the first theoretical sampled current value of phase V.
[0012] When either the first difference of the U phase or the first difference of the V phase is greater than the preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0013] In some embodiments, the method further includes:
[0014] When the first difference of the U phase and the first difference of the V phase are both less than or equal to the preset threshold, a preset test voltage of the second electrical angle is applied to the D axis of the motor within a preset time period.
[0015] During the duration of applying the second electrical angle of the preset test voltage to the D-axis, the second actual sampled current values of the U-phase and V-phase of the motor are acquired;
[0016] Calculate the corresponding second theoretical sampling current values for the U-phase and the V-phase;
[0017] The difference between the second actual sampled current value and the second theoretical sampled current value is used to obtain a second difference value; when the second difference value is greater than the preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0018] In some embodiments, the difference between the second actual sampled current value and the second theoretical sampled current value is used to obtain a second difference value; when the second difference value is greater than the preset threshold, it is confirmed that the controller has an abnormal current sampling ratio, including:
[0019] The second difference value of phase U is obtained by subtracting the second actual sampled current value of phase U from the second theoretical sampled current value of phase U; the second difference value of phase V is obtained by subtracting the second actual sampled current value of phase V from the second theoretical sampled current value of phase V.
[0020] When either the second difference of the U phase or the second difference of the V phase is greater than the preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0021] In some embodiments, calculating the first theoretical sampled current values for the corresponding U-phase and V-phase includes:
[0022] Based on the test voltage, the first electrical angle, the bus voltage, and the phase resistance of the motor, calculate the corresponding first theoretical sampling current values for the U phase and the V phase.
[0023] In some embodiments, calculating the corresponding second theoretical sampling current values for the U-phase and the V-phase includes:
[0024] Based on the test voltage, the second electrical angle, the bus voltage, and the phase resistance of the motor, calculate the corresponding second theoretical sampling current values for the U phase and the V phase.
[0025] Secondly, this embodiment provides a detection device for abnormal current sampling ratio, including a first testing module, a first reading module, a first calculation module, and a first judgment module, wherein:
[0026] The first test module is used to apply a voltage of 0 to the Q-axis of the motor under the open-loop voltage control state of the controller, and to apply a preset test voltage of a first electrical angle to the D-axis of the motor within a preset time period.
[0027] The first reading module is used to acquire the first actual sampled current values of the U phase and V phase of the motor during the duration of applying a preset test voltage of the first electrical angle to the D axis;
[0028] The first calculation module is used to calculate the first theoretical sampled current values of the corresponding U phase and V phase;
[0029] The first judgment module is used to subtract the first actual sampled current value from the first theoretical sampled current value to obtain a first difference value; when the first difference value is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0030] In some embodiments, the device further includes a second testing module, a second reading module, a second calculation module, and a second judgment module, wherein:
[0031] The second test module is used to apply a preset test voltage of a second electrical angle to the D-axis of the motor within a preset time period, provided that the current sampling ratio of the controller is normal.
[0032] The second reading module is used to acquire the second actual sampled current values of the U phase and V phase of the motor during the duration of applying the second electrical angle to the D-axis with a preset test voltage.
[0033] The second calculation module is used to calculate the corresponding second theoretical sampled current values of the U phase and the V phase;
[0034] The second judgment module is used to subtract the second actual sampled current value from the second theoretical sampled current value to obtain a second difference value; when the second difference value is greater than the preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0035] Thirdly, this embodiment provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the current sampling ratio anomaly detection method described in the first aspect above.
[0036] Fourthly, this embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the current sampling ratio anomaly detection method described in the first aspect above.
[0037] Compared with related technologies, the current sampling ratio anomaly detection method provided in this embodiment involves applying a voltage of 0 to the Q-axis of the motor in the open-loop voltage control state of the controller, and applying a preset test voltage of a first electrical angle to the D-axis of the motor within a preset time period; acquiring the first actual sampled current values of the U-phase and V-phase of the motor during the duration of the test voltage applied to the D-axis; calculating the corresponding first theoretical sampled current values of the U-phase and V-phase; subtracting the first actual sampled current value from the first theoretical sampled current value to obtain a first difference value; and confirming that the controller has an abnormal current sampling ratio when the first difference value is greater than a preset threshold. This method can determine whether the current sampling ratio is abnormal by comparing the difference between the theoretical sampled current value and the actual sampled current value based on the motor current characteristics, thus improving the speed of current sampling ratio anomaly detection in the controller.
[0038] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0039] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0040] Figure 1 This is a hardware structure block diagram of the terminal of the current sampling ratio abnormality detection method in this embodiment;
[0041] Figure 2 This is a flowchart of the method for detecting abnormal current sampling ratio in this embodiment;
[0042] Figure 3 This is a flowchart of the method for detecting abnormal current sampling ratio in this embodiment. Detailed Implementation
[0043] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0044] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this application do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific order of objects.
[0045] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of the terminal of the current sampling ratio abnormality detection method in this embodiment. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.
[0046] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the current sampling ratio anomaly detection method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0047] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0048] This embodiment provides a method for detecting abnormal current sampling ratios. Figure 2 This is a flowchart of the current sampling ratio anomaly detection method in this embodiment, as follows: Figure 2 As shown, the process includes the following steps:
[0049] Step S201: In the open-loop voltage control state of the controller, the voltage of 0 is applied to the Q axis of the motor, and within a preset time period, a preset test voltage of the first electrical angle is applied to the D axis of the motor.
[0050] This voltage open-loop control state means that during operation, the controller does not rely on the actual voltage feedback signal from the motor to form a control closed loop. Instead, it directly issues drive signals based on pre-set voltage commands or voltage values calculated by a model. The purpose of this voltage open-loop control state is to cut off the controller's current feedback, causing the controller to output a preset fixed voltage command, thereby creating a stable and controllable voltage excitation source. Applying a voltage of 0 to the motor's Q-axis aims to eliminate the possibility of the motor generating rotational torque during the test, thus forcing the system into a static, stable, and theoretically simplified purely resistive load state. Together, these two aspects construct an idealized test environment where the motor is stationary, the excitation is constant, and the response can be accurately calculated theoretically, thereby achieving high-precision diagnosis of abnormal current sampling ratios in the controller.
[0051] Specifically, in the open-loop voltage control state of the controller, a voltage of 0 is applied to the Q-axis of the motor, and within a preset time period, a preset test voltage of a first electrical angle is applied to the D-axis of the motor. This preset time period can be 200 milliseconds (ms), during which the preset test voltage of the first electrical angle is applied to the D-axis of the motor. This preset test voltage can be 39 volts (V).
[0052] Step S202: During the duration of the test voltage of the first electrical angle applied to the D-axis, the first actual sampled current values of the U-phase and V-phase of the motor are acquired.
[0053] Specifically, during the duration of the test voltage applied to the D-axis at the first electrical angle, the first actual sampled current values of the U-phase and V-phase of the motor are acquired. These first actual sampled current values are obtained by acquiring the bus voltage through a bus voltage circuit, calculating the pulse width modulation count values of the U, V, and W phases using a space vector pulse width modulation algorithm, applying these counts to the U, V, and W phases respectively via a three-phase inverter circuit, and obtaining the current sampled values through a current sampling circuit, which are then converted according to the circuit parameters.
[0054] Step S203: Calculate the first theoretical sampling current values for the corresponding U-phase and V-phase.
[0055] Specifically, the first theoretical sampling current values for the corresponding U-phase and V-phase are calculated. These first theoretical sampling current values are calculated under the open-loop voltage control state of the controller, with the voltage applied to the Q-axis of the motor being 0, and during the duration of the test voltage of the first electrical angle applied to the D-axis.
[0056] Step S204: Subtract the first actual sampled current value from the first theoretical sampled current value to obtain the first difference value; when the first difference value is greater than the preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0057] Specifically, the first actual sampled current value of phase U is subtracted from the first theoretical sampled current value of phase U to obtain the first difference value of phase U; the first actual sampled current value of phase V is subtracted from the first theoretical sampled current value of phase V to obtain the first difference value of phase V; when either the first difference value of phase U or the first difference value of phase V is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0058] In this embodiment, by applying a voltage of 0 to the Q-axis of the motor in the open-loop voltage control state of the controller, and applying a preset test voltage of a first electrical angle to the D-axis of the motor within a preset time period; during the duration of applying the test voltage of the first electrical angle to the D-axis, the first actual sampled current values of the U-phase and V-phase of the motor are acquired; the corresponding first theoretical sampled current values of the U-phase and V-phase are calculated; the difference between the first actual sampled current value and the first theoretical sampled current value is obtained to obtain a first difference value; when the first difference value is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio. This method can determine whether the current sampling ratio is abnormal by comparing the difference between the theoretical sampled current value and the actual sampled current value based on the motor current characteristics, thus solving the problem of difficulty in finding abnormal current sampling ratios in the controller.
[0059] In some embodiments, the difference between the first actual sampled current value and the first theoretical sampled current value is obtained to obtain a first difference value; when the first difference value is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio, including: the difference between the first actual sampled current value of phase U and the first theoretical sampled current value of phase U to obtain a first difference value of phase U; the difference between the first actual sampled current value of phase V and the first theoretical sampled current value of phase V to obtain a first difference value of phase V; when either the first difference value of phase U or the first difference value of phase V is greater than the preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0060] Specifically, the first actual sampled current value of phase U is obtained during the duration of a test voltage with a first electrical angle applied to the D-axis of the motor; the first theoretical sampled current value of phase U is calculated during the duration of a test voltage with a first electrical angle applied to the D-axis of the motor; the first actual sampled current value of phase V is obtained during the duration of a test voltage with a first electrical angle applied to the D-axis of the motor; the first theoretical sampled current value of phase V is calculated during the duration of a test voltage with a first electrical angle applied to the D-axis of the motor. The first difference between phase U and phase V is calculated to obtain the first difference value of phase U; the first difference between phase V and phase V is calculated to obtain the first difference value of phase V; when either the first difference value of phase U or the first difference value of phase V is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0061] In some embodiments, the method for detecting abnormal current sampling ratio further includes: when the first difference of the U phase and the first difference of the V phase are both less than or equal to a preset threshold, applying a preset test voltage of a second electrical angle to the D-axis of the motor within a preset time period; during the duration of applying the preset test voltage of the second electrical angle to the D-axis, acquiring the second actual sampled current values of the U phase and V phase of the motor; calculating the corresponding second theoretical sampled current values of the U phase and V phase; subtracting the second actual sampled current value from the second theoretical sampled current value to obtain a second difference; and confirming that the controller has an abnormal current sampling ratio when the second difference is greater than a preset threshold.
[0062] Specifically, when the first difference between phase U and phase V are both less than or equal to a preset threshold, under the open-loop voltage control state of the controller, a voltage of 0 is applied to the Q-axis of the motor, and within a preset time period, a preset test voltage of a second electrical angle is applied to the D-axis of the motor. This preset time period can be 200 milliseconds (ms), during which the preset test voltage of the second electrical angle is applied to the D-axis of the motor. This preset test voltage can be 39 volts (V). During the duration of the test voltage of the second electrical angle applied to the D-axis, the second actual sampled current values of phases U and V of the motor are acquired. These second actual sampled current values are obtained by acquiring the bus voltage through the bus voltage circuit, calculating the pulse width modulation count values of phases U, V, and W using the space vector pulse width modulation algorithm, applying them to phases U, V, and W respectively through the three-phase inverter circuit, obtaining the current sampled values through the current sampling circuit, and converting them according to the circuit parameters. The corresponding second theoretical sampled current values of phases U and V are then calculated. The second theoretical sampling current value is calculated under the open-loop voltage control state of the controller, with the voltage applied to the Q-axis of the motor being 0, and during the duration of the test voltage applied to the D-axis at the second electrical angle. The second difference value for phase U is obtained by subtracting the second actual sampling current value for phase U from the second theoretical sampling current value for phase U; the second difference value for phase V is obtained by subtracting the second actual sampling current value for phase V from the second theoretical sampling current value for phase V; when either the second difference value for phase U or the second difference value for phase V exceeds a preset threshold, an abnormal current sampling ratio in the controller is confirmed.
[0063] In some embodiments, the difference between the second actual sampled current value and the second theoretical sampled current value is used to obtain a second difference value; when the second difference value is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio, including: the difference between the second actual sampled current value of phase U and the second theoretical sampled current value of phase U is used to obtain a second difference value of phase U; the difference between the second actual sampled current value of phase V and the second theoretical sampled current value of phase V is used to obtain a second difference value of phase V; when either the second difference value of phase U or the second difference value of phase V is greater than the preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0064] Specifically, the second actual sampled current value of phase U is obtained during the duration of the test voltage applied to the D-axis of the motor at a second electrical angle; the second theoretical sampled current value of phase U is calculated during the duration of the test voltage applied to the D-axis of the motor at a second electrical angle; the second actual sampled current value of phase V is obtained during the duration of the test voltage applied to the D-axis of the motor at a second electrical angle; the second theoretical sampled current value of phase V is calculated during the duration of the test voltage applied to the D-axis of the motor at a second electrical angle. The second difference value of phase U is obtained by subtracting the second actual sampled current value of phase U from the second theoretical sampled current value of phase U; the second difference value of phase V is obtained by subtracting the second actual sampled current value of phase V from the second theoretical sampled current value of phase V; when either the second difference value of phase U or the second difference value of phase V is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0065] In some embodiments, calculating the first theoretical sampling current values of the corresponding U-phase and V-phase includes: calculating the first theoretical sampling current values of the corresponding U-phase and V-phase based on the test voltage, the first electrical angle, the bus voltage, and the phase resistance of the motor.
[0066] Specifically, the test voltage can be 39 volts (V); the first electrical angle can be 0 degrees. Based on the test voltage applied to the D-axis, the first electrical angle, the bus voltage, and the U-phase resistance of the motor, the corresponding first theoretical sampling current value of the U-phase is calculated; based on the test voltage applied to the D-axis, the first electrical angle, the bus voltage, and the V-phase resistance of the motor, the corresponding first theoretical sampling current value of the V-phase is calculated.
[0067] In some embodiments, calculating the corresponding second theoretical sampling current values for the U-phase and V-phase includes: calculating the corresponding second theoretical sampling current values for the U-phase and V-phase based on the test voltage, the second electrical angle, the bus voltage, and the phase resistance of the motor.
[0068] Specifically, the test voltage can be 39 volts (V); the second electrical angle can be 90 degrees. Based on the test voltage applied to the D-axis, the second electrical angle, the bus voltage, and the U-phase resistance of the motor, the corresponding second theoretical sampling current value of the U-phase is calculated; based on the test voltage applied to the D-axis, the second electrical angle, the bus voltage, and the V-phase resistance of the motor, the corresponding second theoretical sampling current value of the V-phase is calculated.
[0069] This embodiment also provides a detection device for abnormal current sampling ratios. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below can refer to combinations of software and / or hardware that implement a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0070] The detection device for abnormal current sampling ratio includes: a first testing module, a first reading module, a first calculation module, and a first judgment module, wherein:
[0071] The first test module applies a voltage of 0 to the Q-axis of the motor under the open-loop voltage control state of the controller, and applies a preset test voltage of a first electrical angle to the D-axis of the motor within a preset time period. The first reading module acquires the first actual sampled current values of the U-phase and V-phase of the motor during the duration of the preset test voltage applied to the D-axis. The first calculation module calculates the corresponding first theoretical sampled current values of the U-phase and V-phase. The first judgment module subtracts the first actual sampled current value from the first theoretical sampled current value to obtain a first difference; when the first difference is greater than a preset threshold, it confirms that the controller has an abnormal current sampling ratio.
[0072] In some embodiments, the current sampling ratio abnormality detection device further includes: a second testing module, a second reading module, a second calculation module, and a second judgment module, wherein: the second testing module is used to apply a preset test voltage of a second electrical angle to the D-axis of the motor within a preset time period, provided that the current sampling ratio of the controller is normal. The second reading module is used to acquire the second actual sampled current values of the U-phase and V-phase of the motor during the duration of applying the preset test voltage of the second electrical angle to the D-axis. The second calculation module is used to calculate the corresponding second theoretical sampled current values of the U-phase and V-phase. The second judgment module is used to subtract the second actual sampled current value from the second theoretical sampled current value to obtain a second difference value; when the second difference value is greater than a preset threshold, it is confirmed that the controller has an abnormal current sampling ratio.
[0073] In one embodiment, Figure 3 This is a flowchart of the current sampling ratio anomaly detection method in this embodiment, as follows: Figure 3 As shown, the process includes the following steps:
[0074] S301: Enter current sampling ratio abnormality detection mode.
[0075] S302: Apply a preset test voltage of the first electrical angle to the D-axis of the motor within a preset time period.
[0076] S303: Determine whether the difference between the first actual sampled current value and the first theoretical sampled current value is greater than a preset threshold.
[0077] S304: If so, an error message will be displayed.
[0078] S305: If not, apply a preset test voltage of the second electrical angle to the D-axis of the motor within a preset time period.
[0079] S306: Determine whether the difference between the second actual sampled current value and the second theoretical sampled current value is greater than a preset threshold.
[0080] S307: If so, an error message will be displayed.
[0081] S308: If not, the current sampling ratio is normal.
[0082] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0083] This embodiment also provides an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0084] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0085] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0086] Furthermore, in conjunction with the current sampling ratio anomaly detection method provided in the above embodiments, this embodiment can also provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements the steps of any of the current sampling ratio anomaly detection methods in the above embodiments.
[0087] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0088] 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.
[0089] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0090] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0091] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A method for detecting a current sampling ratio anomaly, characterized by, Controller for sewing machine; the method comprises: In the voltage open-loop control state of the controller, a voltage of 0 is applied to the Q-axis of the motor, and a preset test voltage of a first electric angle is applied to the D-axis of the motor within a preset time period; Within the duration of applying the test voltage of the first electric angle to the D-axis, first actual sampling current values of the U-phase and the V-phase of the motor are obtained; First theoretical sampling current values corresponding to the U-phase and the V-phase are calculated; The first actual sampling current values are subtracted from the first theoretical sampling current values to obtain first difference values; when the first difference values are greater than a preset threshold, it is confirmed that the controller has current sampling proportion abnormality.
2. The method of claim 1, wherein, The first actual sampling current values are subtracted from the first theoretical sampling current values to obtain first difference values; When the first difference values are greater than a preset threshold, it is confirmed that the controller has current sampling proportion abnormality, including: The first actual sampling current values of the U-phase are subtracted from the first theoretical sampling current values of the U-phase to obtain first difference values of the U-phase; The first actual sampling current values of the V-phase are subtracted from the first theoretical sampling current values of the V-phase to obtain first difference values of the V-phase; When any of the first difference values of the U-phase and the first difference values of the V-phase is greater than the preset threshold, it is confirmed that the controller has current sampling proportion abnormality.
3. The method of claim 2, wherein the current sampling ratio abnormality is detected by: The method further comprises: When the first difference values of the U-phase and the first difference values of the V-phase are both less than or equal to the preset threshold, a preset test voltage of a second electric angle is applied to the D-axis of the motor within a preset time period; Within the duration of applying the test voltage of the second electric angle to the D-axis, second actual sampling current values of the U-phase and the V-phase of the motor are obtained; Second theoretical sampling current values corresponding to the U-phase and the V-phase are calculated; The second actual sampling current values are subtracted from the second theoretical sampling current values to obtain second difference values; when the second difference values are greater than the preset threshold, it is confirmed that the controller has current sampling proportion abnormality.
4. The method of claim 3, wherein the current sampling ratio abnormality is detected by: The second actual sampling current values are subtracted from the second theoretical sampling current values to obtain second difference values; When the second difference values are greater than the preset threshold, it is confirmed that the controller has current sampling proportion abnormality, including: The second actual sampling current values of the U-phase are subtracted from the second theoretical sampling current values of the U-phase to obtain second difference values of the U-phase; the second actual sampling current values of the V-phase are subtracted from the second theoretical sampling current values of the V-phase to obtain second difference values of the V-phase; When any of the second difference values of the U-phase and the second difference values of the V-phase is greater than the preset threshold, it is confirmed that the controller has current sampling proportion abnormality.
5. The method of claim 1, wherein the step of detecting a current sampling ratio abnormality comprises the steps of: determining whether the current sampling ratio is abnormal; and determining whether the current sampling ratio is abnormal based on the current sampling ratio and the reference current sampling ratio. The first theoretical sampling current values corresponding to the U-phase and the V-phase are calculated, including: The first theoretical sampling current values corresponding to the U-phase and the V-phase are calculated according to the test voltage, the first electric angle, the bus voltage, and the phase resistance of the motor.
6. The method for detecting abnormal current sampling ratio according to claim 3, characterized in that, The second theoretical sampling current values corresponding to the U-phase and the V-phase are calculated, including: According to the test voltage, the second electric angle, bus voltage and phase resistance of the motor, a second theoretical sampling current value corresponding to the U phase and the V phase is calculated.
7. A detection device for abnormal current sampling ratio, characterized in that, The method comprises a first test module, a first reading module, a first calculation module and a first judgment module, wherein: The first test module is configured to, in a voltage open-loop control state of the controller, apply a voltage of 0 to a Q-axis of the motor, and apply a preset test voltage of a first electric angle to a D-axis of the motor within a preset time period; The first reading module is configured to, during a duration of applying the preset test voltage of the first electric angle to the D-axis, acquire a first actual sampling current value of a U phase and a V phase of the motor; The first calculation module is configured to calculate a first theoretical sampling current value corresponding to the U phase and the V phase; The first judgment module is configured to subtract the first actual sampling current value from the first theoretical sampling current value to obtain a first difference value, and confirm that the controller has a current sampling proportion abnormality when the first difference value is greater than a preset threshold.
8. The apparatus for detecting current sampling ratio abnormality according to claim 7, wherein The device further comprises a second test module, a second reading module, a second calculation module and a second judgment module, wherein: The second test module is configured to, in a case where it is determined that the current sampling proportion of the controller is normal, apply a preset test voltage of a second electric angle to the D-axis of the motor within a preset time period; The second reading module is configured to, during a duration of applying the preset test voltage of the second electric angle to the D-axis, acquire a second actual sampling current value of the U phase and the V phase of the motor; The second calculation module is configured to calculate a second theoretical sampling current value corresponding to the U phase and the V phase; The second judgment module is configured to subtract the second actual sampling current value from the second theoretical sampling current value to obtain a second difference value, and confirm that the controller has a current sampling proportion abnormality when the second difference value is greater than the preset threshold. 9.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to run the computer program to execute the current sampling proportion abnormality detection method in any one of claims 1 to 6.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the current sampling proportion abnormality detection method in any one of claims 1 to 6.