Closed-loop control method, device, electronic equipment and storage medium for motor speed
By detecting the abnormal state of the motor speed encoder and estimating the rotation speed for closed-loop control, the problem of vector control failure during high-speed operation of the motor is solved, and the effect of smoothly reducing the rotation speed and improving control dynamics is achieved.
Patent Information
- Application Number
- CN202311803410.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2043-12-25
AI Technical Summary
When the motor of a new energy electric vehicle is running at high speed, the abnormal speed encoder causes vector control to fail, and the smooth reduction of the motor speed cannot be achieved. The existing open-loop control has poor dynamic characteristics and cannot be used as an effective emergency redundant backup.
By detecting whether the speed encoder is in an abnormal state, if it is abnormal, the estimated speed is used as the target feedback speed for closed-loop control. The input voltage and feedback current of the motor are used to calculate and estimate the speed to ensure that the control ring maintains closed-loop operation and overcome the dynamics of open-loop control. .
It realizes smooth reduction of the speed when the motor is running at high speed, improves control dynamics, and ensures the stability and accuracy of the motor speed.
Smart Images

Figure CN117767829B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a closed-loop control method, device, electronic device and storage medium for motor speed. Background Art
[0002] At present, the motors of new energy electric vehicles (three-phase asynchronous AC motors or permanent magnet synchronous motors) all use vector control technology to accurately control the motor speed. During the control process, it is necessary to obtain the three-phase current of the motor stator and the speed of the motor rotor in real time for feedback. However, when the motor is running at high speed, if the speed encoder is abnormal, the entire vector control will be completely ineffective, and even abnormal control behavior will occur.
[0003] In existing scenarios, if the speed encoder is detected to be in an abnormal state, the motor control strategy is directly switched from the closed-loop control strategy of vector control to the open-loop control strategy of V / F (voltage frequency). However, this open-loop control has disadvantages such as poor dynamic characteristics, especially as an emergency redundant backup when the motor is running at high speed, and cannot achieve the purpose of smoothly reducing the motor speed. Summary of the invention
[0004] In view of the above problems, the present application provides a closed-loop control method, device, electronic device and storage medium for motor speed, so as to overcome the problem of poor dynamics of open-loop control and achieve the purpose of smoothly reducing the motor speed.
[0005] According to one aspect of an embodiment of the present application, a closed-loop control method for a motor speed is provided, the closed-loop control method comprising: detecting whether a speed encoder is in an abnormal state to obtain a detection result; wherein the speed encoder is a device for obtaining the motor speed; if the detection result indicates that the speed encoder is in the abnormal state, the estimated speed is used as a target feedback speed output by the motor; wherein the estimated speed is a speed calculated based on an input voltage of the motor and a feedback current output by the motor; and a closed-loop control operation is performed on the speed control loop based on the target feedback speed.
[0006] In an optional manner, the detecting whether the speed encoder is in an abnormal state to obtain a detection result further includes: if the detection receives a status signal sent by the speed encoder indicating that the speed encoder is in an abnormal state, then determining a detection result indicating that the speed encoder is in the abnormal state.
[0007] In an optional manner, the detection of whether the speed encoder is in an abnormal state to obtain a detection result further includes: detecting whether the status signal sent by the speed encoder is continuously received within a preset time length, and detecting whether the feedback speed output by the motor changes within the preset time length; if both are no, detecting whether the difference between the feedback speed output by the motor and the estimated speed is greater than a first preset difference; if greater, determining the detection result characterizing that the speed encoder is in the abnormal state.
[0008] In an optional manner, the detection of whether the speed encoder is in an abnormal state to obtain a detection result further includes: performing a difference operation on the feedback speed of the motor output obtained by the speed encoder at the current moment and the historical feedback speed obtained at the previous moment, and detecting whether the calculated difference is greater than a second preset difference; if greater, detecting whether the difference between the feedback current output by the motor and the input current is less than a preset third difference; if less, determining a detection result characterizing that the speed encoder is in the abnormal state.
[0009] In an optional manner, the closed-loop control method further includes: acquiring an input voltage of the motor and a feedback current output by the motor; and calculating an estimated rotation speed of the motor based on the input voltage and the feedback current.
[0010] In an optional manner, the closed-loop control method also includes: constructing a first model based on the input voltage and the feedback current, and constructing a second model based on the input voltage and the estimated feedback current; and calculating the estimated speed of the motor based on the first model and the second model.
[0011] In an optional manner, the estimated speed of the motor is calculated based on the first model and the second model, and further includes: performing a difference operation between the first model and the second model, and using the calculated model difference as the model error corresponding to the estimated speed of the motor; determining a target function for calculating the estimated speed based on the error function, and determining the estimated speed based on the target function.
[0012] In an optional manner, determining the estimated speed according to the target model further includes: adjusting the weight coefficient in the target model so that the error of the target model decays to zero; and using the result value output when the error of the target model is zero as the estimated speed. In an optional manner, the closed-loop control method further includes: if the detection result indicates that the speed encoder is in a normal state, using the feedback speed output by the motor as the target feedback speed.
[0013] According to another aspect of an embodiment of the present application, a closed-loop control device for a motor speed is provided, the closed-loop control device comprising: a detection module, used to detect whether a speed encoder is in an abnormal state to obtain a detection result; wherein the speed encoder is a device for obtaining the motor speed; a determination module, used to use an estimated speed as a target feedback speed output by the motor if the detection result indicates that the speed encoder is in the abnormal state; wherein the estimated speed is a speed calculated based on the input voltage of the motor and the feedback current output by the motor; and a control module, used to perform a closed-loop control operation on the speed control loop based on the target feedback speed.
[0014] According to one aspect of an embodiment of the present application, an electronic device is provided, including: a controller; and a memory for storing one or more programs, which, when the one or more programs are executed by the controller, perform the above-mentioned closed-loop control method.
[0015] According to one aspect of an embodiment of the present application, a computer-readable storage medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the above-mentioned closed-loop control method.
[0016] According to one aspect of the embodiments of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the above-mentioned closed-loop control method.
[0017] If the embodiment of the present application detects that the speed encoder is in an abnormal state, the estimated speed is used as the target feedback speed of the motor output, and the speed control loop is closed-loop controlled based on the target feedback speed. The estimated speed is the speed calculated based on the input voltage of the motor and the feedback current of the motor output. When the embodiment of the present application detects that the speed encoder is in an abnormal state, the speed control loop is still closed-loop controlled based on the target feedback speed to overcome the problem of poor dynamics of open-loop control and achieve the purpose of smoothly reducing the motor speed.
[0018] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 It is a flow chart of a closed-loop control method of motor speed shown in an exemplary embodiment of the present application.
[0021] Figure 2 This is a normal motor control loop diagram.
[0022] Figure 3 It is a loop schematic diagram of a motor closed-loop control shown in an exemplary embodiment of the present application.
[0023] Figure 4 It is a loop schematic diagram of another motor closed-loop control shown in an exemplary embodiment of the present application.
[0024] Figure 5 It is a schematic diagram of an application scenario of the closed-loop control method of the motor speed of the present application.
[0025] Figure 6 It is a schematic structural diagram of a closed-loop control device for motor speed shown in an exemplary embodiment of the present application.
[0026] Figure 7 It is a structural diagram of a computer system of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0027] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0028] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0029] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0030] The term "multiple" as used in this application refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0031] In existing scenarios, if the speed encoder is detected to be in an abnormal state, the motor control strategy is directly switched from the closed-loop control strategy of vector control to the open-loop control strategy of V / F (voltage frequency). However, this open-loop control has disadvantages such as poor dynamic characteristics, especially as an emergency redundant backup when the motor is running at high speed, and cannot achieve the purpose of smoothly reducing the motor speed.
[0032] To this end, one aspect of the present application provides a closed-loop control method for motor speed. Figure 1 , Figure 1 1 is a flow chart of a closed-loop control method for motor speed shown in an exemplary embodiment of the present application. The closed-loop control method at least includes S110 to S130, which are described in detail as follows:
[0033] S110: Detect whether the speed encoder is in an abnormal state to obtain a detection result; wherein the speed encoder is a device for obtaining the motor speed.
[0034] The speed encoder is a sensor used to obtain the motor rotor speed. When the speed encoder is in an abnormal state, the motor rotor speed it obtains cannot accurately reflect the actual speed of the motor rotor. If the motor is further controlled according to the inaccurate speed, errors will inevitably occur in the motor control process.
[0035] The normal motor control loop is as follows Figure 2 As shown, Figure 2 This is a schematic diagram of a normal motor control loop. The current control loop is fed back according to the feedback current output by the motor, and the speed control loop is fed back according to the feedback speed output by the motor, so as to realize the closed-loop control process of the motor.
[0036] When it is detected that the speed encoder is in an abnormal state, the existing solution strategy is generally to switch directly from the closed-loop control strategy of vector control to the open-loop control strategy of V / F, while the present application still uses the closed-loop control strategy to control the motor accordingly, thereby improving the dynamics of the control process and will not suddenly and drastically reduce the motor speed, so as to control the motor speed to decrease smoothly.
[0037] S120: If the detection result indicates that the speed encoder is in an abnormal state, the estimated speed is used as the target feedback speed of the motor output; wherein the estimated speed is a speed calculated based on the input voltage of the motor and the feedback current of the motor output.
[0038] The estimated speed is not the speed obtained by the speed encoder, that is, it is not the speed obtained from the motor. It is the speed calculated by the execution subject of this application based on the input voltage of the motor and the feedback current output by the motor.
[0039] When the speed encoder is detected to be in an abnormal state, this embodiment does not use the motor speed acquired by the speed encoder, but uses the estimated speed as the target feedback speed, and still performs closed-loop control on the motor according to the target feedback speed.
[0040] In another exemplary embodiment, if the detection result indicates that the speed encoder is in a normal state, the feedback speed output by the motor is used as the target feedback speed.
[0041] If the speed encoder is in a normal state, the feedback speed of the motor output obtained by the speed encoder can be directly used for closed-loop control of the motor.
[0042] S130: Performing closed-loop control operation on the speed control loop based on the target feedback speed.
[0043] For example, Figure 3 As shown, Figure 3 This is a loop diagram of a motor closed-loop control shown in an exemplary embodiment of the present application. When the controller (executing body of this embodiment) detects that the encoder is in a normal state, it feeds back the speed control loop according to the feedback speed output by the motor; when the controller detects that the encoder is in an abnormal state, it switches the speed feedback link, calculates the estimated speed according to the input voltage and feedback current, and uses the estimated speed as the target feedback speed to perform closed-loop control on the motor.
[0044] If the speed encoder is detected to be in an abnormal state in this embodiment, the estimated speed is used as the target feedback speed of the motor output, and the speed control loop is closed-loop controlled based on the target feedback speed. The estimated speed is the speed calculated based on the input voltage of the motor and the feedback current of the motor output. When the speed encoder is detected to be in an abnormal state, this embodiment still performs closed-loop control on the speed control loop based on the target feedback speed to overcome the problem of poor dynamics of open-loop control and achieve the purpose of smoothly reducing the motor speed.
[0045] In certain exemplary embodiments of the present application, how to detect whether a speed encoder is in an abnormal state to obtain a detection result is described in detail. Three exemplary embodiments are exemplarily described below.
[0046] In a first exemplary embodiment, the above S110 further includes S111, which is described in detail as follows:
[0047] S111: If a state signal indicating that the speed encoder is in an abnormal state is received and sent by the speed encoder, a detection result indicating that the speed encoder is in an abnormal state is determined.
[0048] The speed encoder can generate error information by itself to generate a status signal indicating that it is in an abnormal state. If the execution subject of this embodiment detects the status signal, it can quickly identify that the speed encoder is in an abnormal state.
[0049] In a second exemplary embodiment, the above S110 may further include S112 to S114, which are described in detail as follows:
[0050] S112: Detecting whether the status signal sent by the speed encoder is continuously received within a preset time period, and detecting whether the feedback speed output by the motor changes within the preset time period.
[0051] The preset duration is a time length that can be adjusted according to actual conditions, such as 0.1 seconds, 10 seconds, 1 minute, etc., which is used to detect whether the speed encoder is in a signal loss state.
[0052] S113: If all are negative, then detecting whether the difference between the feedback speed output by the motor and the estimated speed is greater than a first preset difference.
[0053] If the status signal sent by the speed encoder is not continuously received within the preset time, it indicates that the speed encoder signal is disconnected. In addition, during the motor closed-loop control process, the feedback speed at each moment should change slightly. If it is detected that the feedback speed has not changed within the preset time, it indicates that the speed encoder may be abnormal and needs to be further detected to see if it is in an abnormal state.
[0054] Furthermore, a difference operation is performed between the unchanged feedback speed and the estimated speed, and the calculated difference is compared with a first preset difference. If the difference is smaller than the first preset difference, it indicates that the speed encoder is in a normal state.
[0055] S114: If it is greater than, determining the detection result indicating that the speed encoder is in an abnormal state.
[0056] The estimated speed is closer to the actual speed. If the difference between the feedback speed and the estimated speed is greater than the first preset difference, it indicates that the difference between the feedback speed and the estimated speed is large, the feedback speed deviates from the estimated speed, and the speed encoder is in an abnormal state.
[0057] In the third exemplary embodiment, the above S110 may further include S115 to S117, which are described in detail as follows:
[0058] S115: performing a difference operation on the feedback speed of the motor output obtained by the speed encoder at the current moment and the historical feedback speed obtained at the previous moment, and detecting whether the calculated difference is greater than a second preset difference.
[0059] For example, the preset acquisition cycle is 1 second / time, the current time is 09:01.11, the obtained feedback speed is 1000 units, the previous time is 09:01.10, the obtained feedback speed (i.e., the historical feedback speed in this embodiment) is 998 units, and the difference between the two is 2 units. The difference is compared with the second preset difference. The second preset difference may be the same or different in value from the first preset difference, and this application does not limit it.
[0060] S116: If it is greater than, detect whether the difference between the feedback current output by the motor and the input current is less than a preset third difference.
[0061] If the difference in the previous step is greater than the second preset difference, it indicates that the speed obtained by the encoder has jumped, and the feedback current output by the motor is further subtracted from the input current to detect whether it is less than the preset third difference; if it is greater, it is determined that the detection result indicating that the speed encoder is in a normal state. Among them, the present application does not limit the specific value of the preset third difference, which can be the same as or different from the values corresponding to the preset first difference and the preset second difference.
[0062] S117: If it is less than, a detection result indicating that the speed encoder is in an abnormal state is determined.
[0063] The above three exemplary embodiments illustrate how to detect that the speed encoder is in an abnormal state, and provide three different detection methods, which can be used in conjunction with each other or performed independently. Multiple detection methods enrich different application scenarios and ensure that corresponding detection results can be accurately obtained in different application scenarios.
[0064] In another exemplary embodiment, based on the closed-loop control method shown in any of the above exemplary embodiments, the closed-loop control method of this embodiment further includes S140 to S150, which are described in detail as follows:
[0065] S140: Acquire the input voltage of the motor and the feedback current output by the motor.
[0066] S150: Calculate the estimated speed of the motor according to the input voltage and the feedback current.
[0067] For example, Figure 4 As shown, Figure 4 1 is another loop diagram of a motor closed-loop control shown in an exemplary embodiment of the present application. The speed observer collects the input voltage of the motor and the feedback current output by the motor at all times. The execution subject of this embodiment calculates the estimated speed of the motor by controlling the speed observer according to the collected input voltage and feedback current.
[0068] The arbitration judge is used to switch the feedback speed output by the motor to the estimated speed calculated by the speed observer when detecting that the speed encoder is in an abnormal state, so as to perform closed-loop control operation on the speed control loop by using the estimated speed as the target feedback speed.
[0069] Furthermore, it is necessary to construct a first model based on motor-related parameters, input voltage and feedback current, and construct a second model based on input voltage and estimated feedback current; based on the first model and the second model, the estimated speed of the motor is calculated.
[0070] For example, the spatial state model of the electrical part of the three-phase asynchronous AC motor under Park transformation is shown in (Formula 1: i.e., the first model):
[0071]
[0072] y=Cx 0 ;
[0073] Among them, u is the input voltage, y is the feedback current, and the relevant parameters are as follows:
[0074]
[0075]
[0076]
[0077] R s Represents the stator resistance of the motor winding, R r represents the rotor resistance of the motor winding, M represents the common inductance on the motor winding, and L s Indicates the stator self-inductance on the motor winding, L r Represents the rotor self-inductance on the motor winding, Z p Indicates the number of motor pole pairs, Ω m represents the feedback speed of the motor output; u represents the input value of the model (i.e., input voltage), i.e., the stator voltage on the α and β axes; y represents the output value of the model (i.e., feedback current), i.e., the stator current on the α and β axes; x 0 is the spatial state of the model, that is, the rotor flux on the α and β axes.
[0078] In summary, a data model for estimating the rotation speed can be obtained, as shown in (Formula 2, i.e., the second model):
[0079]
[0080]
[0081] Furthermore, the first model and the second model are subjected to a difference operation, and the calculated model difference is used as the model error corresponding to the estimated speed of the motor; the target model for calculating the estimated speed is determined according to the model error, and the estimated speed is determined according to the target model. That is, (Formula 1) is subtracted from (Formula 2), and the error equation of the estimated speed of the motor (i.e., the model error) is obtained, which is as follows:
[0082]
[0083] in, Ω m Indicates the actual speed. represents the estimated speed, express Figure 4 The gain of the speed observer shown is used to adjust the decay speed of the speed observer error and solve the problem of the motor losing stability in the low-speed power generation mode. Combined with Lyapunov's stability law, it can be strictly proved that the adaptive rate can be the above e quickly decays to 0, that is, the estimated speed is equal to the feedback speed of the actual output of the motor.
[0084] (i.e. target model);
[0085] The weight coefficient in the target model is adjusted so that the error of the target model decays to zero; the result value output when the error of the target model is zero is used as the estimated speed. and The error can be quickly decayed to 0, thereby accurately estimating the estimated speed of the motor.
[0086] This embodiment provides a specific method for calculating the estimated rotational speed. The calculation problem of estimating the motor rotational speed in real scenarios is solved through a corresponding calculation model, so as to accurately calculate the estimated rotational speed and use it as the target feedback rotational speed when the speed encoder is detected to be in an abnormal state. The speed control is switched to a closed-loop control operation to overcome the problem of poor dynamics of open-loop control and achieve the purpose of smoothly reducing the motor speed.
[0087] In another exemplary embodiment of the present application, the application scenarios of the above-mentioned multiple closed-loop control methods are exemplarily described. Figure 5 , Figure 5 Schematic diagram of the application scenario of the closed-loop control method of the motor speed of the present application. It includes a vehicle end 100, a motor 200, a speed encoder 300 and a controller 400. The three ends can be connected by wireless communication. The present application does not limit the connection method between them. The controller 400 can be as follows: Figure 5 As shown, it is placed inside the vehicle end 100, and can also be placed outside the vehicle end 100.
[0088] The motor 200 is a three-phase asynchronous AC motor or a permanent magnet synchronous motor in an AC motor. The speed encoder 300 is a sensor for obtaining the rotor speed of the motor 200. The controller 400 can execute the closed-loop control method shown in any of the above exemplary embodiments, which is exemplarily described as follows:
[0089] The controller 400 detects whether the speed encoder 300 is in an abnormal state to obtain a detection result; wherein, the speed encoder 300 is a device for obtaining the rotational speed of the motor 200; if the detection result of the controller 400 indicates that the speed encoder 300 is in an abnormal state, the estimated rotational speed is used as the target feedback rotational speed output by the motor 200; wherein, the estimated rotational speed is a rotational speed calculated based on the input voltage of the motor 200 and the feedback current output by the motor 200; the controller 400 performs a closed-loop control operation on the speed control loop based on the target feedback rotational speed.
[0090] Among them, the controller 400 can be an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, wherein multiple servers can form a blockchain, and the server is a node on the blockchain. The controller 400 can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network) and big data and artificial intelligence platforms, and there is no restriction on this here.
[0091] Another aspect of the present application also provides a closed-loop control device for motor speed, such as Figure 6 As shown, Figure 6 600 is a schematic diagram of the structure of a closed-loop control device for motor speed according to an exemplary embodiment of the present application. The closed-loop control device 600 includes:
[0092] The detection module 610 is used to detect whether the speed encoder is in an abnormal state to obtain a detection result; wherein the speed encoder is a device for obtaining the motor speed.
[0093] The determination module 630 is used to use the estimated speed as the target feedback speed of the motor output if the detection result indicates that the speed encoder is in an abnormal state; wherein the estimated speed is the speed calculated based on the input voltage of the motor and the feedback current of the motor output.
[0094] The control module 650 is used to perform a closed-loop control operation on the speed control loop based on the target feedback speed.
[0095] In an optional manner, the detection module 610 further includes:
[0096] The first detection unit is used to determine a detection result indicating that the speed encoder is in an abnormal state if a state signal indicating that the speed encoder is in an abnormal state is received and sent by the speed encoder.
[0097] In an optional manner, the detection module 610 further includes:
[0098] The second detection unit is used to detect whether the status signal sent by the speed encoder is continuously received within a preset time period, and to detect whether the feedback speed output by the motor changes within the preset time period.
[0099] The first difference value detection unit is used to detect whether the difference between the feedback speed output by the motor and the estimated speed is greater than a first preset difference value if all the above are negative.
[0100] The first abnormal state determining unit is used to determine a detection result indicating that the speed encoder is in an abnormal state if it is greater than.
[0101] In an optional manner, the detection module 610 further includes:
[0102] The third detection unit is used to perform a difference operation between the feedback speed of the motor output obtained by the speed encoder at the current moment and the historical feedback speed obtained at the previous moment, and detect whether the calculated difference is greater than a second preset difference.
[0103] The second difference detection unit is used to detect whether the difference between the feedback current output by the motor and the input current is less than a preset third difference if it is greater than.
[0104] The second abnormal state determining unit is used to determine a detection result indicating that the speed encoder is in an abnormal state if is less than.
[0105] In an optional manner, the closed-loop control device 600 further includes:
[0106] The acquisition module is used to obtain the input voltage of the motor and the feedback current output by the motor.
[0107] The calculation module is used to calculate the estimated speed of the motor according to the input voltage and the feedback current.
[0108] In an optional manner, the closed-loop control device 600 further includes:
[0109] The model building module is used to build a first model according to the input voltage and the feedback current, and to build a second model according to the input voltage and the estimated feedback current.
[0110] The calculation module is used to calculate the estimated rotation speed of the motor based on the first model and the second model.
[0111] In an optional manner, the calculation module further includes:
[0112] The first calculation unit is used to perform a difference operation on the first model and the second model, and use the calculated model difference as a model error corresponding to the estimated rotation speed of the motor.
[0113] The second calculation unit is used to determine a target model for calculating the estimated rotational speed according to the model error, and to determine the estimated rotational speed according to the target model.
[0114] In an optional manner, the second computing unit further includes:
[0115] The adjustment block is used to adjust the weight coefficient in the target model so that the error of the target model decays to zero.
[0116] The estimated speed module is used to use the result value output when the error of the target model is zero as the estimated speed. In an optional manner, the closed-loop control device 600 also includes:
[0117] The normal state module is used to use the feedback speed output by the motor as the target feedback speed if the detection result indicates that the speed encoder is in a normal state.
[0118] If the closed-loop control device of the present application detects that the speed encoder is in an abnormal state, the estimated speed is used as the target feedback speed of the motor output, and the speed control loop is closed-loop controlled based on the target feedback speed. The estimated speed is the speed calculated based on the input voltage of the motor and the feedback current of the motor output. When the closed-loop control device of the present application detects that the speed encoder is in an abnormal state, the closed-loop control device of the present application still performs closed-loop control on the speed control loop based on the target feedback speed to overcome the problem of poor dynamics of open-loop control and achieve the purpose of smoothly reducing the motor speed.
[0119] It should be noted that the closed-loop control device provided in the above embodiment and the closed-loop control method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment and will not be repeated here.
[0120] Another aspect of the present application provides an electronic device, including: a controller; a memory for storing one or more programs, when the one or more programs are executed by the controller, the above-mentioned closed-loop control method is executed.
[0121] See also Figure 7 , Figure 7 1 is a schematic diagram of the structure of a computer system of an electronic device shown in an exemplary embodiment of the present application, which shows a schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present application.
[0122] It should be noted that Figure 7 The computer system 700 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0123] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703, such as executing the method in the above embodiment. In the RAM 703, various programs and data required for system operation are also stored. The CPU 701, ROM 702 and RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0124] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.
[0125] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 709, and / or installed from a removable medium 711. When the computer program is executed by a central processing unit (CPU) 701, various functions defined in the system of the present application are executed.
[0126] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0127] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0128] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0129] Another aspect of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the closed-loop control method as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0130] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the closed-loop control method provided in each of the above embodiments.
[0131] According to one aspect of an embodiment of the present application, a computer system is also provided, including a central processing unit (CPU), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage portion into a random access memory (RAM), such as executing the method in the above embodiment. In RAM, various programs and data required for system operation are also stored. CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0132] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0133] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A closed-loop control method for motor speed, It is characterized in that The closed-loop control method comprises: Detecting whether the speed encoder is in an abnormal state to obtain a detection result; wherein the speed encoder is a device for obtaining the motor speed; If the detection result indicates that the speed encoder is in the abnormal state, the estimated speed is used as the target feedback speed of the motor output; wherein the estimated speed is a speed calculated based on the input voltage of the motor and the feedback current of the motor output; the estimated speed is calculated based on the target model, and the target model is The target model is a model determined based on an error equation obtained by subtracting the first model from the second model. The first model is y=Cx 0 The second model is The error equation is in, represents the estimated rotation speed, represents the difference between the stator current of the α axis and the estimated stator current, represents the estimated rotor flux on the β axis, represents the difference between the stator current of the β axis and the estimated stator current, represents the estimated rotor flux on the α-axis, and represents the weight coefficient; u and are the input voltage, y is the feedback current, R s Represents the stator resistance of the motor winding, R r represents the rotor resistance of the motor winding, M represents the common inductance on the motor winding, and L s Indicates the stator self-inductance on the motor winding, L r represents the rotor self-inductance on the motor winding, Zp represents the number of motor pole pairs, Ω m Indicates the feedback speed of the motor output; Ω m Indicates the actual speed. represents the estimated speed, represents the gain of the speed observer; and is the weight coefficient determined when the error of the target model is zero; A closed-loop control operation is performed on a speed control loop based on the target feedback speed.
2. The closed-loop control method according to claim 1, It is characterized in that The detecting whether the speed encoder is in an abnormal state to obtain a detection result further includes: Detecting whether a status signal sent by the speed encoder is continuously received within a preset time length, and detecting whether a feedback speed output by the motor changes within the preset time length; If all are negative, detecting whether the difference between the feedback speed output by the motor and the estimated speed is greater than a first preset difference; If it is greater than, a detection result indicating that the speed encoder is in the abnormal state is determined.
3. The closed-loop control method according to claim 1, It is characterized in that The detecting whether the speed encoder is in an abnormal state to obtain a detection result further includes: Performing a difference operation on the feedback speed of the motor output obtained by the speed encoder at the current moment and the historical feedback speed obtained at the previous moment, and detecting whether the calculated difference is greater than a second preset difference; If it is greater than, detecting whether the difference between the feedback current output by the motor and the input current is less than a preset third difference; If it is less than, a detection result indicating that the speed encoder is in the abnormal state is determined.
4. The closed-loop control method according to claim 1, It is characterized in that The closed-loop control method further comprises: Acquiring an input voltage of the motor and a feedback current output by the motor; The estimated rotation speed is calculated according to the input voltage and the feedback current.
5. The closed-loop control method according to claim 4, It is characterized in that The closed-loop control method further comprises: constructing the first model according to the input voltage and the feedback current, and constructing the second model according to the input voltage and the estimated feedback current; The estimated rotation speed is calculated based on the first model and the second model.
6. The closed-loop control method according to claim 5, It is characterized in that The calculating the estimated rotation speed based on the first model and the second model further includes: Performing a difference operation on the first model and the second model, and using the calculated model difference as the model error corresponding to the estimated speed of the motor; The target model for calculating the estimated rotational speed is determined according to the model error, and the estimated rotational speed is determined according to the target model.
7. The closed-loop control method according to claim 6, It is characterized in that The step of determining the estimated rotation speed according to the target model further comprises: Adjusting the weight coefficients in the target model so that the error of the target model decays to zero; The result value output when the error of the target model is zero is used as the estimated rotation speed.
8. A closed-loop control device for motor speed, It is characterized in that The control device comprises: A detection module, used to detect whether the speed encoder is in an abnormal state to obtain a detection result; wherein the speed encoder is a device for obtaining the motor speed; A determination module is used for taking the estimated speed as the target feedback speed output by the motor if the detection result indicates that the speed encoder is in the abnormal state; wherein the estimated speed is a speed calculated based on the input voltage of the motor and the feedback current output by the motor; the estimated speed is calculated based on a target model, and the target model is The target model is a model determined based on an error equation obtained by subtracting the first model from the second model. The first model is y=Cx 0 The second model is The error equation is in, represents the estimated rotation speed, represents the difference between the stator current of the α axis and the estimated stator current, represents the estimated rotor flux on the β axis, represents the difference between the stator current of the β axis and the estimated stator current, represents the estimated rotor flux on the α-axis, and represents the weight coefficient; u and are the input voltage, y is the feedback current, R s Represents the stator resistance of the motor winding, R r represents the rotor resistance of the motor winding, M represents the common inductance on the motor winding, and L s Indicates the stator self-inductance on the motor winding, L r Represents the rotor self-inductance on the motor winding, Z p Indicates the number of motor pole pairs, Ω m Indicates the feedback speed of the motor output; Ω m Indicates the actual speed. represents the estimated speed, represents the gain of the speed observer; and It is a weight coefficient determined when the error of the target model is zero; a control module is used to perform closed-loop control operation on the speed control loop based on the target feedback speed.
9. An electronic device, It is characterized in that include: Controller; A memory for storing one or more programs, which, when executed by the controller, enables the controller to implement the closed-loop control method described in any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the closed-loop control method according to any one of claims 1 to 7.
