Robot fuzzy PI control method and fuzzy PI controller structure
Through the fuzzy PI control method, the PI control parameters are optimized in real time, and the problems of over-adjustment or under-adjustment of traditional PI control when load and speed are high are solved, and a smoother and more accurate control response is achieved, improving the accuracy and safety of rehabilitation training.
Patent Information
- Application Number
- CN202510232644.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-05-30
AI Technical Summary
Traditional PI control methods are prone to over-adjustment or under-adjustment under large loads and speeds, resulting in unstable control response and affecting the effectiveness of rehabilitation training.
The fuzzy PI control method is adopted to obtain the motor error signal in real time, convert it into a fuzzy set, and fuzzy reasoning is performed according to the fuzzy rule library, and the gain values of proportion and integral are generated, and the fuzzy processing is performed, and the PI control parameters are optimized to adjust the output signal of the controller.
In the case of large fluctuations in load and motion states, the fuzzy PI control method can maintain a more stable and accurate control response, improve the accuracy and safety of rehabilitation training, and avoid over-adjustment or under-adjustment of traditional PI control.
Smart Images

Figure CN120065697A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot control, and particularly to a fuzzy PI control method for robots and a structure of a fuzzy PI controller. Background Art
[0002] With the advent of an aging society, the importance of rehabilitation medicine in clinical treatment has been increasing day by day, and the application of lower limb rehabilitation robots in promoting the recovery of patients' lower limb motor functions has received extensive attention. These robots can simulate the movements of the human lower limbs, design rehabilitation training programs according to the individual needs of patients, and are widely used in fields such as neurological rehabilitation, orthopedic rehabilitation, and the recovery of motor functions of the elderly.
[0003] Although existing lower limb rehabilitation robots have achieved certain success to some extent, they still face a series of technical challenges in practical applications, especially in the control system. Many rehabilitation robots adopt a permanent magnet synchronous motor (PMSM) drive system, and the control accuracy and the smoothness of the system response have become key factors affecting the effectiveness and comfort of the robots. Among these robots, although the traditional PI control algorithm is widely used, there are still some significant deficiencies. First, the traditional PI control method usually relies on fixed proportional (P) and integral (I) parameters for adjustment and cannot perform adaptive adjustment according to real-time feedback. Therefore, in the dynamically changing rehabilitation process, accurate trajectory tracking and joint motion control cannot be achieved. Second, the adjustment of PI control parameters usually requires manual setting or optimization through experiments. In actual use, with different rehabilitation needs of patients or load changes, the traditional PI control method cannot make corresponding adjustments flexibly, resulting in the inability to fully exert the system performance. Moreover, during the rehabilitation process, the joint load and motion state of patients may change greatly. In the case of large changes in such load and speed, the traditional PI control is prone to overshoot or undershoot phenomena, resulting in unstable control response, thus affecting the comfort of patients and possibly hindering the effect of rehabilitation training.
[0004] The above content is only used to assist in understanding the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main object of the present invention is to provide a fuzzy PI control method for robots, aiming to solve the technical problem that in the prior art, the traditional PI control adopted by robots is prone to overshoot or undershoot phenomena when the load and speed are large, resulting in unstable control response.
[0006] To achieve the above object, the present invention provides a fuzzy PI control method for robots, and the fuzzy PI control method for robots includes:
[0007] Obtain the error signal of the motor in real time and convert the error signal into a fuzzy set;
[0008] Perform fuzzy inference on the fuzzy set according to the fuzzy rule base to generate gain values of proportional and integral;
[0009] Perform defuzzification on the generated gain values of proportional and integral and select the proportionality factor K up 、K ui to obtain the optimized proportional and optimized integral parameters;
[0010] Adjust the proportional and integral parameters of the PI controller according to the optimized proportional and the optimized integral parameters to adjust the output signal of the PI controller.
[0011] Preferably, converting the error signal into a fuzzy set includes:
[0012] Select the quantization factors K e and K ec Transform the rotational speed error e and the error change rate ec from the basic universe of discourse to the fuzzy universe of discourse, and through fuzzification, convert them into fuzzy variables to obtain a fuzzy set with a membership function represented by a Gaussian 2 curve.
[0013] Preferably, after adjusting the proportional and integral parameters of the fuzzy PI controller according to the optimized proportional and the optimized integral parameters to adjust the output signal of the fuzzy PI controller, it further includes:
[0014] Adjust the stator current through the current loop module according to the output signal of the fuzzy PI controller;
[0015] Adopt a vector control algorithm to control the stator current to run along the expected trajectory through the PMSM module.
[0016] Preferably, the method further includes:
[0017] Convert the three-phase stator current to the d-q rotating coordinate system through the Park transformation module. In the d-q coordinate system, the d-axis current i d controls the magnetic flux, and the q-axis current i q controls the torque. By separately adjusting i q control the torque output of the motor.
[0018] Preferably, the method further includes:
[0019] Convert the controlled d-q current command back to the α-β stationary coordinate system through the Park inverse transformation module;
[0020] Generate a PWM signal according to the current command in the α-β stationary coordinate system through the space vector pulse width modulation module to control the inverter according to the PWM signal;
[0021] Convert direct current into three-phase alternating current \(i\) through an inverter a , \(i\) b , \(i\) c , and drive the PMSM module to operate.
[0022] Preferably, the method further includes:
[0023] Convert the three-phase current signal into the α-β coordinate system through the Clark transformation module.
[0024] Preferably, the method further includes:
[0025] Convert the current in the α-β coordinate system into the d-q rotating coordinate system through the Park transformation module.
[0026] In addition, to achieve the above object, the present invention also proposes a fuzzy PI controller structure, and the fuzzy PI controller structure includes:
[0027] A fuzzification module for real-time obtaining the error signal of the motor and converting the error signal into a fuzzy set;
[0028] A fuzzy inference module for performing fuzzy inference on the fuzzy set according to the fuzzy rule base to generate gain values of proportional and integral;
[0029] A defuzzification module for defuzzifying the generated gain values of proportional and integral and selecting the proportionality factor \(K\) up , \(K\) ui , to obtain optimized proportional and optimized integral parameters;
[0030] A PI controller for adjusting the proportional and integral parameters of the PI controller according to the optimized proportional and the optimized integral parameters to adjust the output signal of the PI controller.
[0031] Compared with the existing technology, the beneficial effects of the present invention include:
[0032] 1. Compared with the traditional PI control method, the lower limb rehabilitation robot system based on fuzzy PI control can maintain a more stable and precise control response under large fluctuations in load and motion state. When the load changes in the traditional PI control, overshoot or undershoot may occur, while the fuzzy PI control can adapt to different training requirements by adjusting the PI parameters in real time, providing a more stable control effect, thereby effectively improving the accuracy and safety of rehabilitation training.
[0033] 2. The fuzzy PI control method of the present invention overcomes the limitations of traditional fuzzy PI control that relies on initial values and incremental adjustment by directly outputting proportional (P) and integral (I) control parameters. Compared with the traditional method that requires setting initial parameters and adjusting increments first, the present invention directly generates control parameters in real time by a fuzzy controller according to system errors and dynamic changes, significantly improving the control accuracy and response speed, and avoiding the delay and loss of control accuracy caused by incremental adjustment in the traditional method. At the same time, this method simplifies the control process, reduces system complexity, and improves implementation efficiency and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic flowchart of the first embodiment of the robot fuzzy PI control method of the present invention;
[0035] Figure 2 is the detailed structure of the fuzzy PI controller in the embodiment of the robot fuzzy PI control method of the present invention;
[0036] Figure 3 is the control flowchart of the permanent magnet synchronous motor (PMSM) drive system based on fuzzy PI control in the embodiment of the robot fuzzy PI control method of the present invention;
[0037] Figure 4 is the fuzzy rule design diagram in the embodiment of the robot fuzzy PI control method of the present invention;
[0038] The realization, functional features and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0040] In this embodiment, aiming at the problems of difficult determination of internal parameters and poor adaptability to dynamic changes in the permanent magnet synchronous motor (PMSM) control system, a fuzzy PI control algorithm is proposed. By collecting the error signal and the rate of change of the error of the motor in real time, and combining fuzzy rules to dynamically adjust the parameters of the PI controller, it can adapt to the changes of load and motion state, ensure the stable operation of the robot system under different rehabilitation requirements, and thus solve the problem of poor adaptability to dynamic changes of the traditional PI control algorithm under dynamic load and patient demand changes.
[0041] Referring to Figure 1 , Figure 1 , which is a schematic flowchart of the first embodiment of the robot fuzzy PI control method of the present invention, the first embodiment of the robot fuzzy PI control method of the present invention is proposed.
[0042] In the first embodiment, the robot fuzzy PI control method includes the following steps:
[0043] Step S10: Obtain the error signal of the motor in real time and convert the error signal into a fuzzy set.
[0044] Step S20: Perform fuzzy inference on the fuzzy set according to the fuzzy rule base to generate gain values of the proportional and integral parts.
[0045] Step S30: Perform defuzzification on the generated gain values of the proportional and integral parts and select the proportionality factors K up 、K ui to obtain the optimized proportional and optimized integral parameters.
[0046] Step S40: Adjust the proportional and integral parameters of the fuzzy PI controller according to the optimized proportional and optimized integral parameters to adjust the output signal of the fuzzy PI controller.
[0047] It should be noted that Figure 2 is the detailed structure of the fuzzy PI controller, where n* is the desired rotational speed, n is the actual rotational speed, the error e and the error change rate ec are both precise quantities, while the fuzzy reasoning part inside the fuzzy controller uses fuzzy quantities. Therefore, appropriate quantization factors K e and K ec are selected to complete the transformation of the rotational speed error e and the error change rate ec from the basic domain to the fuzzy domain, which are transformed into fuzzy variables after defuzzification, and then processed in the fuzzy reasoning module.
[0048] Furthermore, in this embodiment, converting the error signal into a fuzzy set includes:
[0049] Select quantization factors K e and K ec to transform the rotational speed error e and the error change rate ec from the basic domain to the fuzzy domain, which are transformed into fuzzy variables after defuzzification, and obtain a fuzzy set with the membership function represented by a Gaussian 2 curve.
[0050] Furthermore, in this embodiment, after step S40, it further includes:
[0051] Adjust the stator current through the current loop module according to the output signal of the fuzzy PI controller;
[0052] Adopt a vector control algorithm to control the stator current to run along the expected trajectory through the PMSM module.
[0053] It should be understood that Figure 3The control flow of a permanent magnet synchronous motor (PMSM) drive system based on fuzzy PI control is shown. The settings of each module are all for achieving precise motor control and meeting the requirements of the lower limb rehabilitation robot for smoothness, response speed, and adaptability. The system first receives an external target input signal and processes it through a fuzzy PI controller. Different from traditional PI control, this fuzzy PI controller directly outputs the proportional (P) and integral (I) parameters, dynamically adjusts according to the real-time error information of the motor (such as speed error, current error), thereby overcoming the limitations of fixed-parameter PI control when the load and motion state change, and improving the self-adaptability and response speed of the system.
[0054] Furthermore, in this embodiment, the method further includes:
[0055] Converting the three-phase stator current to the d-q rotating coordinate system through the Park transformation module. In the d-q coordinate system, the d-axis current i d controls the magnetic flux, and the q-axis current i q controls the torque. By separately adjusting i q to control the torque output of the motor.
[0056] Converting the controlled d-q current command back to the α-β stationary coordinate system through the Park inverse transformation module;
[0057] Generating a PWM signal through the space vector pulse width modulation module according to the current command in the α-β stationary coordinate system to control the inverter according to the PWM signal;
[0058] Converting direct current to three-phase alternating current i a , i b , i c through the inverter to drive the PMSM module to operate.
[0059] Converting the three-phase current signal to the α-β coordinate system through the Clark transformation module.
[0060] Converting the current in the α-β coordinate system to the d-q rotating coordinate system through the Park transformation module.
[0061] It should be noted that, as shown in Figure 3 , Figure 3 the current loop module is used to adjust the stator current, which is a key link to achieve high-performance motor control. The PMSM adopts the vector control (FOC) method, and one of the cores of FOC is to control the stator current so that it can run along the expected trajectory, thereby ensuring that the motor can accurately output the desired torque.
[0062] Continue to refer to Figure 3, To achieve this goal, the system needs to perform coordinate transformation. First, the Park transformation converts the three-phase stator currents into the d-q rotating coordinate system, enabling the current control to be decoupled from the magnetic flux and simplifying the control strategy. In the d-q coordinate system, the d-axis current i d controls the magnetic flux, and the q-axis current i q controls the torque. By separately adjusting i q , the torque output of the motor can be precisely controlled.
[0063] Next, continuing to refer to Figure 3 , the inverse Park transformation is used to convert the controlled d-q current commands back to the α-β stationary coordinate system, providing the input for subsequent PWM modulation. During the PWM signal generation process, the SVPWM (Space Vector Pulse Width Modulation) module plays an important role. Compared with traditional sinusoidal PWM, SVPWM can make more full use of the DC bus voltage, improve the voltage utilization rate, and thus enhance the accuracy and efficiency of motor control. The PWM signals generated by SVPWM are used to control the inverter, which converts direct current into three-phase alternating current i a , i b , i c , to drive the PMSM to operate.
[0064] Continuing to refer to Figure 3 , to achieve closed-loop control, the system needs to provide real-time feedback on the operating state of the motor. Therefore, the Clark transformation is adopted, whose function is to convert the three-phase current signals into the α-β coordinate system to simplify the calculation. Next, the Park transformation further converts the current in the α-β coordinate system into the d-q rotating coordinate system to facilitate current control and complete the entire control closed-loop. Through this control architecture, the system realizes the combination of fuzzy PI control and vector control (FOC), enabling the PMSM to maintain high-precision and high-dynamic response control effects under changing load and motion conditions, thereby improving the motion stability and training safety of the lower limb rehabilitation robot.
[0065] In the specific implementation, Figure 4 is the fuzzy rule design in this implementation, Figure 4 The left side in
[0066] Figure 4 On the right side is the rule editor, which is used to define the rule set for fuzzy inference. The proportional (P) and integral (I) variables are calculated through the fuzzy rule base. After passing through the defuzzification module, appropriate proportionality factors K up , K ui are selected through experiments to obtain optimized and accurate proportional and integral parameters, which are finally used to adjust the output of the PI controller. The signal i q * output by the controller is then used to control the current of the motor, thereby adjusting the rotational speed of the motor to complete dynamic adjustment. Different from the traditional fuzzy PI control method, the traditional method usually sets the initial proportional (P) and integral (I) values through pre-experiments, and then adjusts the increments of the proportional and integral through the fuzzy control output. The improvement of the present invention lies in that the output of the fuzzy controller is directly used as the real-time gain value of the PI controller, rather than setting the initial value first and adjusting the increment. In this way, the system can dynamically adjust the proportional and integral parameters in real time according to the error and the rate of change of the error, avoiding the response delay and loss of control accuracy caused by the dependence on preset parameters in the traditional method.
[0067] In this embodiment, specifically, the fuzzy PI controller obtains the error signal of the motor system in real time, converts it into a fuzzy set, and judges and processes the error according to the designed fuzzy rule base. The fuzzy control rule base includes a series of empirical rules. According to these rules, the fuzzy controller automatically adjusts the proportional and integral parameters of the PI controller to ensure more accurate trajectory tracking. This fuzzy PI control-based scheme can achieve a more stable control response, avoiding overshoot or undershoot phenomena that occur in traditional PI control methods when the load and speed fluctuate greatly. Especially during the rehabilitation training process, the joint load and movement state of the patient may change with the training progress. Fuzzy PI control can dynamically adjust the control strategy according to real-time feedback to ensure that the system is always in the optimal working state. This not only improves the control accuracy and stability of the rehabilitation robot, but also greatly enhances the comfort of the patient, avoiding the discomfort and inaccurate tracking effects that may be brought about by traditional PI control.
[0068] The application of the traditional PI controller in motor control has the problem that due to the use of fixed proportional and integral parameters, the control effect cannot be adjusted in real time according to the dynamic changes of the system. Therefore, in the present invention, a fuzzy controller is used to dynamically adjust the proportional (P) and integral (I) parameters of the PI controller to adapt to the continuous changes of the load, speed and patient movement state of the system during the rehabilitation process. The fuzzy controller adaptively adjusts the parameters of the PI controller by calculating the error (position error, speed error) and the rate of change of the error of the motor in real time according to the fuzzy rules, thereby greatly improving the control accuracy and response speed.
[0069] In addition, an embodiment of the present invention further provides a fuzzy PI controller structure, which includes:
[0070] A fuzzification module, configured to obtain the error signal of the motor in real time and convert the error signal into a fuzzy set;
[0071] A fuzzy inference module, configured to perform fuzzy inference on the fuzzy set according to a fuzzy rule base to generate gain values of the proportional and integral parts;
[0072] A defuzzification module, configured to perform defuzzification processing on the generated gain values of the proportional and integral parts and select proportionality factors K up , K ui to obtain optimized proportional and optimized integral parameters;
[0073] A PI controller, configured to adjust the proportional and integral parameters of the PI controller according to the optimized proportional and optimized integral parameters to adjust the output signal of the PI controller.
[0074] For other embodiments or specific implementation manners of the fuzzy PI controller structure of the present invention, reference may be made to the above method embodiments, which will not be elaborated herein.
[0075] It should be noted that in this document, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or system including that element.
[0076] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments. Among the several unit claims listing several devices, several of these devices may be embodied by the same hardware item. The use of the words "first", "second", and "third", etc. does not indicate any order and these words may be interpreted as identifiers.
[0077] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a magnetic disk, an optical disc), and includes several instructions for causing a terminal device (which may be a mobile phone, a computer, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0078] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A robot fuzzy PI control method, characterized in that: The robot fuzzy PI control method comprises: Acquire an error signal of the motor in real time, and convert the error signal into a fuzzy set; Perform fuzzy reasoning on the fuzzy set according to a fuzzy rule base to generate proportional and integral gain values; The generated proportional and integral gain values are defuzzified and the proportional factor K is selected up , K ui , get the optimized proportion and optimized integral parameters; The proportion and integral parameters of the PI controller are adjusted according to the optimized proportion and the optimized integral parameter to adjust the output signal of the PI controller.
2. The robot fuzzy PI control method according to claim 1, characterized in that: The error signal is converted into a fuzzy set, including: Choose the quantization factor K e and K ec The speed error e and the error change rate ec are transformed from the basic domain to the fuzzy domain, and then transformed into fuzzy variables through fuzzification to obtain a fuzzy set whose membership function is represented by a Gaussian 2 curve.
3. The robot fuzzy PI control method according to claim 1, characterized in that: After adjusting the proportion and integral parameters of the fuzzy PI controller according to the optimized proportion and the optimized integral parameter to adjust the output signal of the fuzzy PI controller, the method further includes: Regulating the stator current through a current loop module according to the output signal of the fuzzy PI controller; A vector control algorithm is used to control the stator current through the PMSM module to run according to the expected trajectory.
4. The robot fuzzy PI control method according to claim 3, characterized in that: The method further comprises: The three-phase stator current is converted to the dq rotating coordinate system through the Park transformation module. In the dq coordinate system, the d-axis current i d Control flux, q-axis current i q Control torque by individually adjusting i q Controls the torque output of the motor.
5. The robot fuzzy PI control method according to claim 4, characterized in that: The method further comprises: The controlled dq current command is converted back to the α-β stationary coordinate system through the Park inverse transformation module; Generate a PWM signal through a space vector pulse width modulation module according to a current command in an α-β stationary coordinate system, so as to control an inverter according to the PWM signal; Convert direct current into three-phase alternating current through an inverter a ,i b ,i c , driving the PMSM module to operate.
6. The robot fuzzy PI control method according to claim 5, characterized in that: The method further comprises: The three-phase current signal is converted into the α-β coordinate system through the Clark transformation module.
7. The robot fuzzy PI control method according to claim 6, characterized in that: The method further comprises: The current in the α-β coordinate system is converted to the dq rotating coordinate system through the Park transformation module.
8. A fuzzy PI controller structure, characterized in that: The fuzzy PI controller structure includes: A fuzzification module, used for acquiring an error signal of the motor in real time and converting the error signal into a fuzzy set; A fuzzy reasoning module, used for performing fuzzy reasoning on the fuzzy set according to a fuzzy rule base to generate proportional and integral gain values; Defuzzification module, used to generate proportional and integral gain values for defuzzification and select the proportional factor K up , K ui , get the optimized proportion and optimized integral parameters; A PI controller is used to adjust the proportion and integral parameters of the PI controller according to the optimized proportion and the optimized integral parameter to adjust the output signal of the PI controller.