Power line detection method and device, electronic equipment and storage medium
By collecting and comparing the command current, target reference current and motor rated current during the servo motor enablement process, the problem that the servo motor cannot detect the power line is solved, and the intelligent, reliability and safety detection of the power line is achieved.
Patent Information
- Application Number
- CN202411484386.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the power lines of the servo motor cannot be detected during the servo motor activation process, which poses a safety hazard.
By obtaining the command current output from the drive shaft, the target reference current corresponding to the power line is determined, and the target feedback current is collected when enabled, and its absolute value is compared with the motor rated current to realize the detection of the power line.
It realizes effective monitoring and fault detection of power lines during the servo motor activation process, enhances the intelligence, reliability and safety of detection, and avoids safety hazards caused by power lines breakage.
Smart Images

Figure CN119438979A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of servo motors, and in particular to a power line detection method, device, electronic equipment and storage medium. Background Art
[0002] The servo drive system is an important driving actuator in the industrial automation control system. With the continuous improvement of industrial automation and intelligent requirements, the intelligent requirements for the application of servo systems are also increasing. Reliable and stable fault detection technology can shorten the search time of on-site maintenance personnel and make the equipment work more efficiently.
[0003] The servo drive system is composed of a servo drive and a servo motor. The motor and the drive are connected by three power lines: U, V, and W. During the operation of the servo motor, the power line may be broken due to wiring, vibration, aging, etc. The servo drive cannot apply the drive voltage to the servo motor through the power line, and the servo motor will be out of control, causing stalling, oscillation, free parking, etc. If the power line break is not detected and handled, it will endanger the safety of equipment and personnel, and seriously affect the reliability and safety of the automation control system.
[0004] However, in the prior art, the power line of the servo motor cannot be detected during the servo motor enabling process, which poses a safety hazard. How to detect the power line of the servo motor during the servo motor enabling process has become an urgent problem to be solved. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a power line detection method, device, electronic device and storage medium to solve the problem in the prior art that the power line of the servo motor cannot be detected during the servo motor enabling process, posing a safety hazard.
[0006] According to a first aspect of an embodiment of the present application, a power line detection method is provided, the method comprising: obtaining a command current output by a drive shaft, determining a target reference current corresponding to a power line in a drive motor according to the command current, and collecting a target feedback current corresponding to the power line when the drive motor is enabled; comparing the absolute value of the target reference current with the absolute value of the target feedback current to obtain a first comparison result; obtaining a motor rated current corresponding to a preset power line, comparing the absolute value of the target feedback current with the motor rated current to obtain a second comparison result; detecting the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken.
[0007] According to a second aspect of an embodiment of the present application, a power line detection device is provided, which includes: an acquisition module, configured to acquire a command current output by a drive shaft, determine a target reference current corresponding to a power line in a drive motor according to the command current, and collect a target feedback current corresponding to the power line when the drive motor is enabled; a comparison module, configured to compare the absolute value of the target reference current with the absolute value of the target feedback current to obtain a first comparison result; acquire a motor rated current corresponding to a preset power line, compare the absolute value of the target feedback current with the motor rated current to obtain a second comparison result; and a detection module, configured to detect the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken.
[0008] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0009] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0010] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the method of the embodiments of the present application obtains the command current output by the drive shaft, determines the target reference current corresponding to the power line in the drive motor according to the command current, and collects the target feedback current corresponding to the power line when the drive motor is enabled; compares the absolute value of the target reference current with the absolute value of the target feedback current to obtain a first comparison result; obtains the motor rated current corresponding to the preset power line, compares the absolute value of the target feedback current with the motor rated current, and obtains a second comparison result; detects the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken; the method compares the absolute value of the target reference current with the target feedback current, and compares the absolute value of the target feedback current with the motor rated current, so as to realize effective monitoring and fault detection of the power line during the power line enabling process, which enhances the intelligence, reliability and safety of the power line detection, and avoids the problem that the power line of the servo motor cannot be detected during the servo motor enabling process, which has safety hazards. In addition, the method can perform fault detection on each power line, realizes the separate judgment of the power line break of the three-phase motor, and makes the power line break detection more specific. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0012] Figure 1 It is a flow chart of a power line detection method provided in an embodiment of the present application;
[0013] Figure 2 It is a basic flow chart of a power line detection method provided in an embodiment of the present application;
[0014] Figure 3 It is a flowchart of another power line detection method provided in an embodiment of the present application;
[0015] Figure 4 It is a flowchart of another power line detection method provided in an embodiment of the present application;
[0016] Figure 5 It is a flow chart of another power line detection method provided in an embodiment of the present application;
[0017] Figure 6 It is a flowchart of another power line detection method provided in an embodiment of the present application;
[0018] Figure 7 It is a flowchart of another optional power line detection method provided in an embodiment of the present application;
[0019] Figure 8 It is a flowchart of another optional power line detection method provided in an embodiment of the present application;
[0020] Fig. 9 It is a structural schematic diagram of a power line detection device provided in an embodiment of the present application;
[0021] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0023] A power line detection method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0024] Figure 1 A power line detection method provided in an embodiment of the present application is as follows: Figure 1 As shown, the method includes:
[0025] S101, obtaining a command current output by the drive shaft, determining a target reference current corresponding to a power line in the drive motor according to the command current, and collecting a target feedback current corresponding to the power line when enabling the drive motor;
[0026] S102, comparing the absolute value of the target reference current and the absolute value of the target feedback current to obtain a first comparison result;
[0027] S103, obtaining a motor rated current corresponding to a preset power line, and comparing the absolute value of the target feedback current with the motor rated current to obtain a second comparison result;
[0028] S104 , detecting the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken.
[0029] It can be understood that the power line detection method provided in the present application is applied to at least one of the servo drive and the detection device; that is, the above steps of the present application can be performed separately by the servo drive and / or the detection device, and the above steps of the present application can also be performed jointly by the servo drive and / or the detection device, and this example is not limited to this.
[0030] Specifically, the above-mentioned drive axis includes a direct axis (Di rect Axis, D axis) and a cross axis (Quadrature Axis, Q axis), wherein the D axis is an axis aligned with the magnetic field direction of the drive motor. The Q axis is perpendicular to the D axis to form an orthogonal coordinate system. In the rotating reference system of the motor, the Q axis is an axis that makes a 90-degree angle with the D axis. Among them, in the process of controlling the drive motor, the D-axis current (mainly related to the excitation (or flux) of the motor. By adjusting the D-axis current, the magnetic flux of the motor can be controlled, thereby affecting the working state of the motor; the Q-axis current is mainly related to the torque output of the motor. By adjusting the Q-axis current, the torque of the motor can be directly controlled, so that it can respond to load changes faster.
[0031] It can be understood that the power lines of the drive motor include U, V, and W power lines, and the D-axis and Q-axis represent the excitation direction and torque direction of the motor respectively. By calculating the DQ command current, the target reference current corresponding to each power line in the three-phase power line can be determined. The above target reference current represents the current value required for each power line when connected to the above drive motor, thereby driving the motor to operate at the expected performance level.
[0032] Continuing with the above example, the command current is transformed by I park and I cl ark to obtain the target reference current corresponding to the power line; illustratively, assuming that the command current output by the D axis is I dref, and the command current output by the Q axis is I qref, I dref and I qref are transformed by I park and I cl ark to obtain the target reference currents corresponding to the U, V, and W power lines, which are I aref, I bref, and I cref, respectively.
[0033] In some examples, the present application also acquires the target feedback current corresponding to the power line when the drive motor is enabled, and the target feedback current is the actual current when the power line drives the motor. Exemplarily, the feedback currents I afdb and I bfdb of the U-phase power line and the V-phase power line sampled by the present application are calculated according to Kirchhoff's current law to obtain the target feedback currents I afdb, I bfdb, and I cfdb corresponding to the three-phase power lines, respectively.
[0034] It can be understood that since the target reference current represents the current value required for each power line when connected to the above-mentioned drive motor, and the target feedback current is the actual current when the power line drives the motor, that is, the target reference current is the theoretical current, and the target feedback current is the actual current. Therefore, the target reference current and target feedback current corresponding to each power line should have a certain correlation. Therefore, this example will compare the absolute value of the target reference current and the absolute value of the target feedback current to obtain a first comparison result.
[0035] In some examples, the present application will also pre-set a motor rated current corresponding to a power line, which is the minimum current required to drive the motor in normal use; after obtaining the motor rated current, this example will compare the absolute value of the target feedback current with the motor rated current to obtain a second comparison result.
[0036] It can be understood that, in some examples, different power lines correspond to different motor rated currents; in some examples, different power lines correspond to the same motor rated current.
[0037] In some examples, the present application detects the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken.
[0038] According to the technical solution provided by the embodiment of the present application, the command current output by the drive shaft is obtained, the target reference current corresponding to the power line in the drive motor is determined according to the command current, and the target feedback current corresponding to the power line is collected when the drive motor is enabled; the absolute value of the target reference current is compared with the absolute value of the target feedback current to obtain a first comparison result; the motor rated current corresponding to the preset power line is obtained, the absolute value of the target feedback current is compared with the motor rated current to obtain a second comparison result; the power line is detected according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken; this method realizes effective monitoring and fault detection of the power line during the power line enabling process by comparing the absolute value of the target reference current with the target feedback current, and comparing the absolute value of the target feedback current with the motor rated current. This process enhances the intelligence, reliability and safety of the power line detection, and avoids the problem that the power line of the servo motor cannot be detected during the servo motor enabling process, which has safety hazards. In addition, this method can perform fault detection on each power line, realize separate judgment of power line breakage of the three-phase motor, and make the power line breakage detection more specific.
[0039] In some embodiments, Figure 2 As shown, the power line is detected according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken, including:
[0040] S201, if the first comparison result indicates that the absolute value of the target reference current is greater than or equal to the absolute value of the target feedback current, and the second comparison result indicates that the absolute value of the target feedback current is less than the rated current of the motor, then obtaining a saturation flag of the drive shaft;
[0041] S202: Detect the power line based on the saturation mark of the drive shaft to obtain a detection result of whether the power line is broken.
[0042] It can be understood that, when the absolute value of the target reference current of the power line is greater than or equal to the absolute value of the target feedback current, it means that the actual current output by the power line is less than the theoretical current, and the reason why the actual current output by the power line is less than the theoretical current may be that the power line is damaged or broken; when the absolute value of the target reference current is less than the absolute value of the target feedback current, it means that the actual current output by the power line is greater than or equal to the theoretical current, and the power line is not damaged or broken.
[0043] It can be understood that when the absolute value of the target feedback current of the power line is less than the rated current of the motor, it means that the actual current output by the power line is lower than the minimum current required to drive the motor, and the actual current output by the power line is too low. The reason for the actual current output by the power line being too low may be that the power line is damaged or broken; when the absolute value of the target feedback current of the power line is greater than or equal to the rated current of the motor, it means that the actual current output by the power line is not lower than the minimum current required to drive the motor, and the actual current output by the power line is not too low.
[0044] Based on the above reasons, the first comparison result indicates that the absolute value of the target reference current is greater than or equal to the absolute value of the target feedback current, and the second comparison result indicates that the absolute value of the target feedback current is less than the absolute value of the motor rated current, which indicates that the target feedback current of the current power line is too low. At this time, this example will further obtain the saturation flag of the drive shaft, which is used to indicate whether the current of the drive shaft reaches the maximum limit during the process of driving the motor.
[0045] This example detects the power line based on the saturation flag of the drive shaft to obtain the detection result of whether the power line is broken.
[0046] In some examples, the present application may also compare the absolute value of the target reference current with N times (the value of N is flexibly set by relevant personnel according to actual needs, preferably, the value range of N is 1 to 20, and preferably, the value of N is 10) the target feedback current to obtain the first comparison result; in some examples, the target feedback current may also be compared with M times (the value of M is flexibly set by relevant personnel according to actual needs, preferably, the value range of M is 1% to 15%, and preferably, the value of M is 5%) the rated current of the motor to obtain the second comparison result.
[0047] According to the technical solution provided by the embodiment of the present application, if the first comparison result indicates that the absolute value of the target reference current is greater than or equal to the absolute value of the target feedback current, and the second comparison result indicates that the absolute value of the target feedback current is less than the absolute value of the motor rated current, the saturation mark of the drive shaft is obtained; the power line is detected based on the saturation mark of the drive shaft to obtain the detection result of whether the power line is broken. The method comprehensively compares the target feedback current with the target reference current and the motor rated current. When the target feedback current meets the above conditions, the power line is further detected based on the saturation state of the drive shaft, so that the state of the power line can be effectively monitored. This real-time monitoring and fault diagnosis capability not only enhances the safety and reliability of the servo drive system, but also improves the detection efficiency of the power line.
[0048] In some embodiments, Figure 3As shown, the power line is detected based on the saturation mark of the drive shaft to obtain the detection result of whether the power line is broken, including:
[0049] S301, matching the saturation flag with a preset target saturation flag;
[0050] S302: If the saturation flag matches the target saturation flag successfully, the count value of the disconnection counter is increased according to a preset increase step size;
[0051] S303: Obtain the count value of the increased disconnection counter. If the count value of the disconnection counter is greater than a preset count threshold, determine that the detection result of the power line is disconnection.
[0052] Specifically, the preset target saturation flag is used to characterize the state in which the output current of the drive shaft reaches the maximum limit during the process of driving the drive motor; the present application will match the saturation flag with the preset target saturation flag. If the saturation flag successfully matches the preset target saturation flag, the command current output by the drive shaft reaches the maximum value and cannot be increased; if the saturation flag fails to match the preset target saturation flag, the command current output by the drive shaft does not reach the maximum value and can still be increased.
[0053] Exemplarily, taking the preset target saturation flag as 1 as an example, the drive axis includes a D axis and a Q axis. If the voltage output saturation flag of any one of the D axis and the Q axis is 1, it is determined that the saturation flag successfully matches the preset target saturation flag.
[0054] Continuing with the above example, since the prerequisite for obtaining the saturation flag of the drive shaft is "the first comparison result indicates that the absolute value of the target reference current is greater than or equal to the absolute value of the target feedback current, and the second comparison result indicates that the absolute value of the target feedback current is less than the absolute value of the motor rated current", at this time, the target feedback current of the power line is too low, and the saturation flag successfully matches the preset target saturation flag, indicating that the command current output by the drive shaft has reached the maximum value. At this time, it can be determined that there is an abnormality in the power line.
[0055] In order to avoid misjudgment caused by occasional power outages, the present application will increase the count value of the disconnection counter according to a preset growth step when the saturation flag matches the target saturation flag successfully; illustratively, taking the growth step of 1 as an example, when the saturation flag matches the target saturation flag successfully, the count value of the disconnection counter increases by 1.
[0056] The present application will also obtain the count value of the increased disconnection counter. If the count value of the disconnection counter is greater than a preset count threshold, the detection result of the power line is determined to be a disconnection; wherein, if the count value of the disconnection counter is greater than the preset count threshold, indicating that the power line has experienced multiple disconnection anomalies, the detection result of the power line is determined to be a disconnection; if the count value of the disconnection counter is less than or greater than the preset count threshold, indicating that the number of disconnection anomalies in the power line is within a reasonable range, the detection result of the power line is determined to be normal.
[0057] It can be understood that each power line corresponds to a line break counter. For example, the U-phase power line corresponds to a line break counter, the V-phase power line corresponds to a line break counter, and the W-phase power line corresponds to a line break counter.
[0058] According to the technical solution provided in the embodiment of the present application, the saturation flag is matched with a preset target saturation flag; if the saturation flag matches the target saturation flag successfully, the count value of the disconnection counter is increased according to the preset growth step; the count value of the disconnection counter after the increase is obtained, and if the count value of the disconnection counter is greater than the preset counting threshold, the detection result of the power line is determined to be a disconnection. The method comprehensively compares the target feedback current with the target reference current and the rated current of the motor. When the target feedback current meets the above conditions (the conditions of step S201), the power line is further detected based on the saturation state of the drive shaft, and when the saturation flag matches the target saturation flag successfully, it is confirmed that there is an abnormality in the power line. The above multiple conditions are used to determine whether there is an abnormality in the power line, thereby effectively monitoring the state of the power line. A disconnection counter is also provided in the method. Only when the count value of the disconnection counter is greater than the preset counting threshold, the detection result of the power line is determined to be a disconnection, thereby avoiding the misjudgment caused by directly outputting the detection result of the power line disconnection after one detection, thereby ensuring the accuracy of the disconnection detection.
[0059] In some examples, the present application can also directly determine that the detection result of the power line is a broken line when the first comparison result indicates that the absolute value of the target reference current is greater than or equal to the absolute value of the target feedback current, and the second comparison result indicates that the absolute value of the target feedback current is less than the absolute value of the motor rated current, and the saturation flag successfully matches the target saturation flag.
[0060] In some embodiments, Figure 4 As shown, the method also includes:
[0061] S401, obtaining a preset clearing cycle for a disconnection counter;
[0062] S402, clearing the disconnection counter according to the clearing cycle.
[0063] It can be understood that in order to avoid the disconnection counter from continuously accumulating, which may lead to a misjudgment that the detection result of the power line is disconnection, this example periodically clears the disconnection counter.
[0064] Specifically, this example obtains a preset clearing cycle for the disconnection counter, and then clears the disconnection counter according to the clearing cycle.
[0065] Exemplarily, taking the preset clearing period of the disconnection counter as 10 milliseconds, the present application will clear the disconnection counter once every ten seconds, so that the value of the disconnection counter is 0, and then restart the accumulation.
[0066] According to the technical solution provided in the embodiment of the present application, a preset clearing cycle for the disconnection counter is obtained; and the disconnection counter is cleared according to the clearing cycle.
[0067] In some embodiments, Figure 5 As shown, the command current output by the drive shaft is obtained, and the target reference current corresponding to the power line in the drive motor is determined according to the command current, including:
[0068] S501, obtaining each command current output by the drive shaft within a preset time;
[0069] S502, determining reference currents corresponding to the respective command currents to obtain a plurality of reference currents, and determining a target reference current corresponding to a power line in a driving motor according to the plurality of reference currents.
[0070] It can be understood that in order to more accurately obtain the target reference current corresponding to the power line, the present application will pre-set a preset time, and then obtain all reference currents within the preset time, and then determine the target reference current corresponding to the power line within the preset time based on the reference current.
[0071] In some examples, the present application drives each command current output by the shaft within a preset time, and then obtains a corresponding reference current based on each command current, and then obtains all the reference currents for accumulation operation, and divides the accumulated value by the number of reference currents to obtain an average reference current, and uses the average reference current as the target reference current; in some examples, the present application drives each command current output by the shaft within a preset time, and then obtains a corresponding reference current based on each command current, and then obtains a median reference current from all the reference currents, and uses the median reference current as the target reference current.
[0072] In some examples, in order to obtain the target feedback current more accurately, the present application obtains the feedback current output by the power line within a preset time; then determines the target feedback current corresponding to the power line in the drive motor based on multiple feedback currents, wherein the above-mentioned determination of the target feedback current can also be achieved through average, median, etc., which will not be repeated here.
[0073] In some examples, the preset time ranges from 1 millimeter to 2 milliseconds.
[0074] In order to better understand the present method, the present application provides a more specific example for illustration, such as Figure 6 As shown, in the current loop control, according to the command currents I dref and I qref of the D and Q axes, I park transformation and I cl ark transformation are performed to obtain the three-phase power lines of the drive motor (U-phase power line, V-phase power line and W-phase power line), and the target reference current corresponding to each power line is: I aref, I bref, I cref.
[0075] In the current loop control, the feedback currents I afdb and I bfdb of the sampled U-phase power line and V-phase power line are calculated according to Kirchhoff's current law to obtain I cfdb, thereby obtaining the target feedback currents I afdb, Ibfdb, and I cfdb corresponding to the three-phase power lines respectively.
[0076] In some examples, in order to better obtain the above target reference current and target feedback current, such as Figure 7 As shown, the present application will obtain the average current values within 1ms, I arefavg, I brefavg, I crefavg, I afdbavg, Ibfdbavg, and I cfdbavg, and use the above I arefavg as the target reference current of the U-phase power line, I brefavg as the target reference current of the V-phase power line, and I crefavg as the target reference current of the W-phase power line; use the above I afdbavg as the target feedback current of the U-phase power line, I bfdbavg as the target feedback current of the V-phase power line, and I cfdbavg as the target feedback current of the W-phase power line.
[0077] U-phase power line disconnection judgment: Figure 6As shown, when the absolute value of the target reference current of the U-phase power line is greater than or equal to 10*the absolute value of the target feedback current of the U-phase power line, and the absolute value of the target feedback current sampled by the U-phase power line is less than the preset 5% motor rated current (the motor rated current corresponding to the U-phase power line), and any one of the saturation marks of the D-axis and Q-axis voltage output saturation marks is 1 (1 is the preset target saturation mark), the corresponding broken wire counter of the corresponding U-phase power line is increased by 1, and when the count value of the broken wire counter corresponding to the U-phase power line is greater than the preset count threshold, it is determined that the U-phase power line is broken.
[0078] V-phase power line break judgment: when the absolute value of the target reference current of the V-phase power line is greater than or equal to the absolute value of the target feedback current of the V-phase power line, and the absolute value of the target feedback current sampled by the V-phase power line is less than the preset motor rated current (the motor rated current corresponding to the V-phase power line), and any one of the saturation marks of the D and Q axis voltage output saturation marks is 1 (1 is the preset target saturation mark), the corresponding V-phase power line corresponding to the break counter is increased by 1, and when the count value of the break counter corresponding to the V-phase power line is greater than the preset count threshold, the V-phase power line is judged to be broken.
[0079] W-phase power line break judgment: when the absolute value of the target reference current of the W-phase power line is greater than or equal to the absolute value of the target feedback current of the W-phase power line, and the absolute value of the target feedback current sampled by the W-phase power line is less than the preset motor rated current (the motor rated current corresponding to the W-phase power line), and any one of the saturation marks of the D-axis and Q-axis voltage output saturation marks is 1 (1 is the preset target saturation mark), the corresponding broken line counter of the W-phase power line is increased by 1. When the count value of the broken line counter corresponding to the W-phase power line is greater than the preset count threshold, the W-phase power line is judged to be broken.
[0080] The method provided by the present application can accurately determine which phase of the power line of the drive motor is broken when the drive motor is enabled at zero speed, and timely feedback the operating status of the drive motor, thereby improving the reliability of the drive motor break detection, making the fault diagnosis information of the servo system more accurate and fed back to the user. In addition, the method determines the breakage of the three-phase power line separately, making the power line break detection more specific and accurately determining the power line break fault.
[0081] According to the technical solution provided in the embodiment of the present application, each command current output by the drive shaft within a preset time is obtained; the reference current corresponding to each command current is determined to obtain multiple reference currents, and the target reference current corresponding to the power line in the drive motor is determined based on the multiple reference currents. This method realizes accurate acquisition of the target reference current by averaging multiple reference currents, thereby improving the accuracy of the target reference current.
[0082] In some examples, such as Figure 8As shown, after detecting the power line according to the first comparison result and the second comparison result to obtain the detection result of whether the power line is broken, the method further includes:
[0083] S801, if the detection result of the power line is a disconnection, control the drive shaft to stop outputting the command current to stop enabling the drive motor;
[0084] S802: Output a fault alarm according to the detection result of the power line.
[0085] Specifically, if the detection result of the power line is a broken line, the drive motor is prone to lose control, resulting in stalling, oscillation, free stop, etc., which poses certain safety hazards. Therefore, at this time, the present application will control the drive shaft to stop outputting the command current to stop enabling the drive motor.
[0086] In some examples, the present application will also output a fault alarm based on the detection result of the power line, so that relevant personnel can quickly repair the fault; illustratively, if the detection result of the U-phase power line is a broken line, a fault alarm of the U-phase power line broken line is output, so that relevant personnel can quickly repair the U-phase power line fault.
[0087] According to the technical solution provided in the embodiment of the present application, if the detection result of the power line is a broken line, the drive shaft is controlled to stop outputting the command current to stop enabling the drive motor; a fault alarm is output based on the detection result of the power line, thereby avoiding the safety hazard caused by enabling the drive motor when the power line is broken, and enabling the relevant personnel to quickly repair the power line fault.
[0088] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0089] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0090] This embodiment also provides a power line detection device, such as Fig. 9 As shown, the device comprises:
[0091] The acquisition module 901 is configured to acquire the command current output by the drive shaft, determine the target reference current corresponding to the power line in the drive motor according to the command current, and collect the target feedback current corresponding to the power line when enabling the drive motor;
[0092] The comparison module 902 is configured to compare the absolute value of the target reference current with the absolute value of the target feedback current to obtain a first comparison result; obtain the motor rated current corresponding to the preset power line, and compare the absolute value of the target feedback current with the motor rated current to obtain a second comparison result;
[0093] The detection module 903 is configured to detect the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken.
[0094] In some examples, the detection module 903 is also configured to obtain a saturation flag of the drive shaft when a first comparison result indicates that the absolute value of the target reference current is greater than or equal to the absolute value of the target feedback current, and a second comparison result indicates that the absolute value of the target feedback current is less than the absolute value of the motor rated current; and detect the power line based on the saturation flag of the drive shaft to obtain a detection result of whether the power line is broken.
[0095] In some examples, the detection module 903 is also configured to match the saturation flag with a preset target saturation flag; if the saturation flag matches the target saturation flag successfully, the count value of the disconnection counter is increased according to a preset growth step; the count value of the disconnection counter after the increase is obtained, and if the count value of the disconnection counter is greater than a preset counting threshold, the detection result of the power line is determined to be a disconnection.
[0096] In some examples, the detection module 903 is further configured to obtain a preset clearing cycle for the disconnection counter; and clear the disconnection counter according to the clearing cycle.
[0097] In some examples, the acquisition module 901 is also configured to acquire each command current output by the drive shaft within a preset time; determine the reference current corresponding to each command current to obtain multiple reference currents, and determine the target reference current corresponding to the power line in the drive motor based on the multiple reference currents.
[0098] In some examples, the detection module 903 is further configured to control the drive shaft to stop outputting the command current to stop enabling the drive motor when the detection result of the power line is a broken line; and output a fault alarm according to the detection result of the power line.
[0099] According to the technical solution provided by the embodiment of the present application, the power line detection device provided by the embodiment obtains the command current output by the drive shaft, determines the target reference current corresponding to the power line in the drive motor according to the command current, and collects the target feedback current corresponding to the power line when the drive motor is enabled; compares the absolute value of the target reference current with the absolute value of the target feedback current to obtain a first comparison result; obtains the motor rated current corresponding to the preset power line, compares the absolute value of the target feedback current with the motor rated current to obtain a second comparison result; detects the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken; this method realizes effective monitoring and fault detection of the power line during the power line enabling process by comparing the absolute value of the target reference current with the target feedback current, and comparing the absolute value of the target feedback current with the motor rated current. This process enhances the intelligence, reliability and safety of the power line detection, and avoids the problem that the power line of the servo motor cannot be detected during the servo motor enabling process, which has safety hazards. In addition, this method can perform fault detection on each power line, realizes separate judgment of power line breakage of the three-phase motor, and makes the power line breakage detection more specific.
[0100] Fig.10 Schematic diagram of an electronic device 10 provided in an embodiment of the present application. Fig.10 As shown, the electronic device 10 of this embodiment includes: a processor 1001, a memory 1002, and a computer program 1003 stored in the memory 1002 and executable on the processor 1001. When the processor 1001 executes the computer program 1003, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 1001 executes the computer program 1003, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0101] The electronic device 10 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 10 may include, but is not limited to, a processor 1001 and a memory 1002. Those skilled in the art will appreciate that Fig.10 The electronic device 10 is merely an example and does not limit the electronic device 10 . The electronic device 10 may include more or fewer components than shown in the figure, or different components.
[0102] The processor 1001 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0103] The memory 1002 may be an internal storage unit of the electronic device 10, for example, a hard disk or memory of the electronic device 10. The memory 1002 may also be an external storage device of the electronic device 10, for example, a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 10. The memory 1002 may also include both an internal storage unit of the electronic device 10 and an external storage device. The memory 1002 is used to store computer programs and other programs and data required by the electronic device.
[0104] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0105] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of regional requirements and patent practice. For example, in some areas, according to regional requirements and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0106] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A power line detection method, characterized in that: The method comprises: Acquire the command current output by the drive shaft, determine the target reference current corresponding to the power line in the drive motor according to the command current, and collect the target feedback current corresponding to the power line when enabling the drive motor; Comparing the absolute value of the target reference current with the absolute value of the target feedback current to obtain a first comparison result; Obtaining a preset motor rated current corresponding to the power line, and comparing the absolute value of the target feedback current with the motor rated current to obtain a second comparison result; The power line is detected according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken.
2. The method according to claim 1, characterized in that Detecting the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken includes: If the first comparison result indicates that the absolute value of the target reference current is greater than or equal to the absolute value of the target feedback current, and the second comparison result indicates that the absolute value of the target feedback current is less than the absolute value of the motor rated current, then obtaining a saturation flag of the drive shaft; The power line is detected based on the saturation mark of the drive shaft to obtain a detection result of whether the power line is broken.
3. The method according to claim 2, characterized in that The power line is detected based on the saturation mark of the drive shaft to obtain a detection result of whether the power line is broken, including: Matching the saturation mark with a preset target saturation mark; If the saturation flag matches the target saturation flag successfully, the count value of the disconnection counter is increased according to a preset increase step; The count value of the increased disconnection counter is obtained, and if the count value of the disconnection counter is greater than a preset count threshold, it is determined that the detection result of the power line is disconnection.
4. The method according to claim 3, characterized in that The method further comprises: Obtaining a preset clearing cycle for the disconnection counter; The disconnection counter is cleared according to the clearing cycle.
5. The method according to claim 1, characterized in that Obtaining a command current output by the drive shaft, and determining a target reference current corresponding to a power line in the drive motor according to the command current, including: Acquire each of the command currents output by the drive shaft within a preset time; Determine reference currents corresponding to the command currents to obtain a plurality of reference currents, and determine a target reference current corresponding to a power line in the drive motor according to the plurality of reference currents.
6. The method according to claim 1, characterized in that After detecting the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken, the method further includes: If the detection result of the power line is a disconnection, controlling the drive shaft to stop outputting the command current to stop enabling the drive motor; A fault alarm is outputted according to the detection result of the power line.
7. A power line detection device, characterized in that: The device comprises: an acquisition module configured to acquire a command current output by the drive shaft, determine a target reference current corresponding to a power line in the drive motor according to the command current, and acquire a target feedback current corresponding to the power line when enabling the drive motor; A comparison module is configured to compare the absolute value of the target reference current with the absolute value of the target feedback current to obtain a first comparison result; obtain a preset motor rated current corresponding to the power line, and compare the absolute value of the target feedback current with the motor rated current to obtain a second comparison result; The detection module is configured to detect the power line according to the first comparison result and the second comparison result to obtain a detection result of whether the power line is broken.
8. The device according to claim 7, characterized in that The detection module is further configured to obtain a saturation flag of the drive shaft when the first comparison result indicates that the absolute value of the target reference current is greater than or equal to the absolute value of the target feedback current, and the second comparison result indicates that the absolute value of the target feedback current is less than the absolute value of the motor rated current; The power line is detected based on the saturation mark of the drive shaft to obtain a detection result of whether the power line is broken.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.