PID (Proportion Integration Differentiation) control inertia servo system and control method

By constructing a PID control inertial servo system, combining the fuzzy PID control algorithm and the linear quadratic regulator, and optimizing the system parameters, the problem of the difficult response of micro-intelligent artillery shells in complex environments was solved, and higher control accuracy and stability were achieved.

CN120652782AActive Publication Date: 2025-09-16SRED SECURITY & SURVEILLANCE TECH CO LTD

Patent Information

Application Number
CN202511122603.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-09-16
Estimated Expiration
2045-08-12

AI Technical Summary

Technical Problem

Existing micro-intelligent artillery shells cannot respond to the external environment quickly and accurately in complex meteorological environments, and algorithm parameters are difficult to adjust, which affects their universal development.

Method used

A PID controlled inertial servo system is constructed, which combines the fuzzy PID control algorithm and the linear quadratic regulator. The system parameters are optimized through the linear feedback controller to realize position closed-loop feedback and fuzzy PID control, thereby improving the environmental adaptability and dynamic responsiveness.

Benefits of technology

The system's environmental adaptability, dynamic responsiveness and reliability are improved, with higher control accuracy and stability, shorter adjustment time and smaller overshoot.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120652782A_ABST
    Figure CN120652782A_ABST
Patent Text Reader

Abstract

The invention relates to a PID (Proportion Integration Differentiation) control inertial servo system and a control method. The PID control inertial servo system comprises a controller, a control circuit, a driving circuit, a motor, a potentiometer, a system clock, a timer, an analog-to-digital converter, a plurality of serial ports, a communication bus, main control equipment, a steering engine, a fuzzy PID control module, a sampling module, a current sensor, a linear quadratic regulator, a PWM (Pulse-Width Modulation) duty ratio module and an integration module, the control circuit comprises a control chip; the driving circuit comprises a first driving circuit and a second driving circuit; the first driving circuit comprises a driving chip; and the second driving circuit is electrically connected with the motor and is provided with a plurality of switches. On the basis of position closed-loop feedback, with the fuzzy PID control algorithm as the core, optimal system parameters are obtained through a linear quadratic regulator, and compared with traditional PID control, fuzzy PID control has higher control precision, stability and response speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of PID control, and more particularly to a PID controlled inertial servo system and a control method. Background Art

[0002] At present, the inertial servo system of the servo on micro-intelligent artillery shells can be divided into pneumatic servo servo, hydraulic servo servo and electric servo servo according to the power energy. Compared with pneumatic servo servo and hydraulic servo servo, electric servo servo has the advantages of simple structure, small size, easy maintenance, convenient control, high control accuracy and fast dynamic response. It is widely used in micro-intelligent artillery shells and drones.

[0003] In terms of control, existing micro-intelligent shells usually use PID algorithms. However, the parameter adjustment of this algorithm is relatively difficult, especially for nonlinear and time-varying systems. Micro-intelligent shells usually need to work in various complex meteorological environments. How to respond to the external environment quickly and accurately has always been one of the factors restricting the universal development of micro-intelligent devices. Summary of the Invention

[0004] The technical problem to be solved by the present invention is that the algorithm parameters of existing micro-intelligent artillery shells are difficult to adjust and cannot respond to the external environment quickly and accurately. In response to the above-mentioned defects of the existing technology, a PID control inertial servo system and a control method are provided.

[0005] The technical solution adopted by the present invention to solve its technical problem is: A PID controlled inertial servo system is constructed, which includes a controller, a control circuit, a drive circuit, a motor, a potentiometer, a system clock, a timer, an analog-to-digital converter, multiple serial ports, a communication bus, a main control device, a servo, a fuzzy PID control module, a sampling module, a current sensor, a linear quadratic regulator, a PWM duty cycle module and an integration module; the control circuit includes a control chip; the control chip is electrically connected to the controller and the linear quadratic regulator respectively; the drive circuit is electrically connected to the PWM duty cycle module; the drive circuit includes a first drive circuit and a second drive circuit; the first drive circuit includes a drive chip; the second drive circuit is electrically connected to the motor and is provided with multiple switches; the motor is electrically connected to the servo and is used to drive the servo; the potentiometer is electrically connected to the analog-to-digital converter, And is used to adjust the resistance to control the output voltage; the system clock, the timer, the analog-to-digital converter, and the serial port are electrically connected to the controller respectively; the analog-to-digital converter is used to convert signals; the communication bus is electrically connected to the controller, and is used to receive the position given instructions of the main control device in real time and send the position of the servo to the main control device; the controller is electrically connected to the fuzzy PID control module; the sampling module is electrically connected to the current sensor; the current sensor is used to measure the current of the motor and calculate the phase current feedback value of the motor; the linear quadratic regulator is electrically connected to the fuzzy PID control module; the fuzzy PID control module is electrically connected to the PWM duty cycle module; the integration module is electrically connected to the sampling module, and is used to convert the speed of the motor into an angular position signal.

[0006] Construct a control method for a PID controlled inertial servo system, comprising the following steps: Initialize multiple preset functional modules; wherein the functional modules include a system clock, a timer, an analog-to-digital converter, a serial port and a fuzzy PID control module; Turning on the timer to interrupt the initialization; Execute the functional modules cyclically according to the time tag sequence; The position command sent by the main control device is received in real time through the communication bus, and the control chip sends the position information of the servo to the main control device at preset time intervals; The control chip collects current and position information once every system control cycle; Determine whether an angle position deflection instruction is received; If yes, then update the target angle information, and input the error signal of the position information and the position error change rate signal into a preset linear quadratic regulator for inference to obtain an inference result; Sending the inference result to the fuzzy PID control module and calling the fuzzy PID control algorithm; The fuzzy PID control algorithm is executed once every system control cycle, and a PWM adjustment value is output; wherein the PWM adjustment value includes proportional, integral and differential adjustment coefficients; Superimposing the PWM adjustment amounts to obtain a superposition result; The superposition result is converted into a duty cycle signal through a preset PWM duty cycle module to control a driving circuit; wherein the driving circuit includes a plurality of MOS transistors; Collecting the rotational speed of the motor and converting the rotational speed into an angular position signal through a preset integration module; The position error signal and the position error change rate signal are fed back to the fuzzy PID control module.

[0007] Furthermore, the step of enabling the timer to interrupt the initialization includes: The timer is set to 100 us and used as the system control period.

[0008] Furthermore, the step of the control chip collecting current and position information once every system control cycle includes: The motor bus current measured by the current sensor is obtained in real time through the sampling module.

[0009] Furthermore, the step of executing the fuzzy PID control algorithm once every system control cycle and outputting the PWM adjustment value includes: The weight of the adjustment coefficient is updated by a preset linear quadratic regulator to obtain a PWM duty cycle.

[0010] Furthermore, the step of updating the weight of the adjustment coefficient by a preset linear quadratic regulator includes: A dynamic model is established by the linear quadratic regulator, and the regulation coefficient is calculated by the fuzzy PID control algorithm; wherein, the dynamic model includes a state space equation; the state space equation includes a state vector, a control input and a system dynamic matrix.

[0011] Furthermore, the state space equation is: ; in, is the time derivative of the state vector, which represents the rate of change of the state over time; A is the system matrix; represents the state vector; B is the input matrix; is the control input vector.

[0012] Furthermore, a linear feedback controller is added to the state space equation to obtain: ; in, is the control input vector, is the state vector; K is the feedback gain matrix; At this point, the new state space equation is obtained: ; Among them, A-BK is the closed-loop system matrix.

[0013] Furthermore, after the step of adding a linear feedback controller on the basis of the state space equation, the method further comprises: Define the quadratic cost function: ; Among them, Q and R are positive definite symmetric matrices, representing the weights of state and control input respectively; Define an auxiliary constant matrix P and get: ; Substituting into the quadratic cost function, we obtain: ; in, is the initial state vector; Expand the differential terms of the auxiliary constant matrix P and define ,get: ; Where K is the optimal feedback gain matrix; is the inverse matrix of the control weight matrix R; is the transposed matrix of matrix B; By setting A, B, Q, and R, an auxiliary matrix is ​​obtained, and the PWM duty cycle is obtained.

[0014] Furthermore, after the step of converting the superposition result into a duty cycle signal by presetting the PWM duty cycle module, the method further includes: Calculating a motor phase current feedback value according to the PWM duty cycle; The position information of the servo fed back by the potentiometer is collected through an analog-to-digital converter.

[0015] The beneficial effects of the present invention are as follows: Based on position closed-loop feedback and centered on a fuzzy PID control algorithm, this application uses a linear quadratic regulator to obtain optimal system parameters, thereby improving the system's environmental adaptability, dynamic responsiveness, and reliability. Compared with traditional PID control, fuzzy PID control has higher control accuracy, stability, and response speed, as well as shorter settling time and smaller overshoot. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a block diagram of a combined fuzzy PID control in one embodiment of the present invention; Figure 2 This is a structural block diagram of a PID controlled inertial servo system according to one embodiment of the present invention; Figure 3 is a circuit diagram of a main control chip in one embodiment of the present invention; Figure 4 is a circuit diagram of a PWM drive circuit in one embodiment of the present invention; Figure 5 1 is a circuit diagram of an H-bridge circuit of the present invention; Figure 6 1 is a schematic diagram of the steps of a control method for a PID controlled inertial servo system according to the present invention; Figure 7 This is the MCU controller software design process in one embodiment of the present invention; Figure 8 1 is a schematic diagram of closed-loop control of fuzzy PID in one embodiment of the present invention; Figure 9 This is a comparison chart of the control effects of the traditional PID and fuzzy PID in the simulation environment 1 of the present invention; Figure 10 This is a comparison chart of the control effects of the traditional PID and fuzzy PID in the simulation environment 2 of the present invention; Figure 11 This is a comparison chart of the control effects of the traditional PID and fuzzy PID in the simulation environment 3 of the present invention; Figure 12 This is a comparison chart of the control effects of the traditional PID and fuzzy PID in the simulation environment 4 of the present invention. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0018] PID control is the most widely used automatic controller. Servo systems often use incremental and position algorithms to control the platform. Select the position PID algorithm and output the relative increment of the control quantity. , the algorithm formula is as follows:

[0019] in, Represents the proportionality coefficient, Represents the integral coefficient, represents the differential coefficient; When using the position PID algorithm for control, the control amount is obtained by using the deviation of the three measurements before, during and after. 、 、 These three parameters are used to improve the control effect. Due to the complexity of the actual working environment, a single set of parameters is difficult to adapt to different scenarios in actual applications, resulting in poor environmental adaptability, slow dynamic response, and poor reliability.

[0020] In order to solve the problem of poor adaptability of traditional PID controller, this application uses a linear quadratic regulator (LQR) to update PID ( 、 、 )’s weight.

[0021] Using a combined fuzzy PID controller such as Figure 1 As shown, de / dt is the error change rate, input r is the angular position of the rudder blade that needs to be deflected, and output y is the actual position of the rudder blade. Through feedback, the input and output of the system output error can be obtained, and the error and the differential of the error are used as the input of the fuzzy PID controller to determine 、 and Update scope.

[0022] Please refer to Figure 2The present invention proposes a PID control inertial servo system, including a controller, a control circuit, a drive circuit, a motor, a potentiometer, a system clock, a timer, an analog-to-digital converter, multiple serial ports, a communication bus, a main control device, a steering gear, a fuzzy PID control module, a sampling module, a current sensor, a linear quadratic regulator, a PWM duty cycle module and an integration module; the control circuit includes a control chip; the control chip is electrically connected to the controller and the linear quadratic regulator respectively; the drive circuit is electrically connected to the PWM duty cycle module; the drive circuit includes a first drive circuit and a second drive circuit; the first drive circuit includes a drive chip; the second drive circuit is electrically connected to the motor and is provided with multiple switches; the motor is electrically connected to the steering gear and is used to drive the steering gear; the potentiometer and The analog-to-digital converter is electrically connected and used to adjust the resistance to control the output voltage; the system clock, timer, analog-to-digital converter, and serial port are electrically connected to the controller respectively; the analog-to-digital converter is used to convert signals; the communication bus is electrically connected to the controller and is used to receive the position given instructions of the main control device in real time and send the position of the servo to the main control device; the controller is electrically connected to the fuzzy PID control module; the sampling module is electrically connected to the current sensor; the current sensor is used to measure the current of the motor and calculate the phase current feedback value of the motor; the linear quadratic regulator is electrically connected to the fuzzy PID control module; the fuzzy PID control module is electrically connected to the PWM duty cycle module; the integration module is electrically connected to the sampling module and is used to convert the motor speed into an angular position signal.

[0023] In this embodiment, the system includes a controller, a control circuit, a drive circuit, a motor, a potentiometer, a system clock, a timer, an analog-to-digital converter, multiple serial ports, a communication bus, a main control device, a servo, a fuzzy PID control module, a sampling module, a current sensor, a linear quadratic regulator, and a PWM duty cycle module; Specifically, the control circuit includes a control chip, which is electrically connected to the controller and the linear quadratic regulator. In this embodiment, the control chip is an STM32 chip. Figure 3 Figure 2 shows a circuit diagram of the control chip in this embodiment. As can be seen, the control chip has four PWM outputs, supports ADC sampling, and supports IIC (Inter-Integrated Circuit), UART (Universal Asynchronous Receiver / Transmitter), and SPI (Serial Peripheral Interface) communications. PWM stands for pulse width modulation, which controls analog circuits by adjusting the duty cycle of pulse signals. ADC stands for analog-to-digital converter. Pin 26 of the control chip is PWM B1, which represents a PWM pulse signal.

[0024] Furthermore, the control circuit includes a first drive circuit and a second drive circuit, and the first drive circuit includes a drive chip. Specifically, the first drive circuit is a PWM drive circuit. Figure 4 As shown, the PWM drive circuit includes PWM pulse B1, capacitor C58, capacitor C59, capacitor C61, resistor R29, resistor R33, resistor R35, driver chip U13, and diode D2. Among them, PWM pulse B1 is Figure 3 The pulse signal obtained by PWM_B1 after passing through the isolation chip. The model of the driver chip U13 is driver chip 2014, an insulated gate bipolar transistor, which has the advantages of high speed, high voltage and low on-resistance. Among them, high voltage, that is, the rated voltage of the driver chip is 1200V, and it can work stably within a higher voltage range. Low on-resistance, that is, the on-resistance of the driver chip is only 0.06-0.25Ω, which can reduce energy loss and improve equipment efficiency. In addition, it also has fast switching speed and wide operating range. Fast switching speed, that is, the driver chip has a faster switching speed, which can realize high-frequency switching mode power supplies and inverters. Wide operating range, that is, the operating temperature range of the driver chip is -55℃ to 150℃, which can adapt to different environmental conditions.

[0025] Specifically, the second driving circuit is an H-bridge circuit, and the H-bridge circuit is electrically connected to the motor. Figure 5 As shown, the H-bridge circuit is provided with four MOS transistors Q1, Q2, Q3, and Q4. When the MOS transistors Q1 and Q4 are closed and Q2 and Q3 are disconnected, the DC motor rotates normally, with this rotation direction being the forward direction. When the MOS transistors Q2 and Q3 are closed and Q1 and Q4 are disconnected, the DC motor rotates normally, with this rotation direction being the reverse direction. When the MOS transistors Q1 and Q2 are closed and Q3 and Q4 are disconnected, or when the MOS transistors Q3 and Q4 are closed and Q1 and Q2 are disconnected, the DC motor does not rotate. At this time, the motor can be considered to be in a "braking" state. The potential generated by the inertial rotation of the motor will be short-circuited, forming a back electromotive force that hinders the movement, thus playing a "braking" role.

[0026] When MOS tubes Q1 and Q3 are closed or when MOS tubes Q2 and Q4 are closed, the power supply is short-circuited and the power supply will be burned. This situation is strictly prohibited; when the four switches of MOS tubes Q1, Q2, Q3 and Q4 are all disconnected, the motor is in a "coasting" state. The potential generated by the inertia of the motor will not be able to form a circuit, and no back electromotive force that hinders the movement will be generated. The motor will rotate by inertia for a long time.

[0027] Furthermore, the motor is electrically connected to the servo and is capable of driving the servo. The potentiometer is electrically connected to the analog-to-digital converter for adjusting resistance and controlling output voltage. The system clock, timer, analog-to-digital converter, and serial port are each electrically connected to the controller. The controller is capable of initializing the system clock, timer, analog-to-digital converter, and serial port. In one specific embodiment, the analog-to-digital converter is an ADC (Analog-to-Digital Converter Module), which is configured to convert the continuous analog voltage signal output by the potentiometer into discrete digital values ​​that can be recognized and processed by the microcontroller.

[0028] Furthermore, the communication bus is an RS422 bus, which is electrically connected to the controller and is used to receive the position setting command sent by the main control device in real time, and send the current position of the servo to the main control device every 2ms. Figure 2 As shown, the controller is electrically connected to the fuzzy PID control module; the sampling module is electrically connected to the current sensor; the current sensor is used to measure the motor current and calculate the motor phase current feedback value; the sampling module can obtain the motor bus current measured by the current sensor in real time and calculate the motor phase current feedback value based on the current PWM duty cycle. The linear quadratic regulator is electrically connected to the fuzzy PID control module, which is in turn electrically connected to the PWM duty cycle module. The integration module is electrically connected to the sampling module and converts the motor speed into an angular position signal. The current position error signal and the position error change rate are then fed back to the PID controller, completing the closed-loop control of the entire system.

[0029] Please refer to Figure 6 The present invention provides a control method for a PID controlled inertial servo system, comprising the following steps: S1, initialize multiple preset functional modules; wherein the functional modules include system clock, timer, analog-to-digital converter, serial port and fuzzy PID control module; S2, turn on timer interrupt initialization; S3, looping and executing the function modules according to the time tag sequence; S4, receiving the position command sent by the main control device in real time through the communication bus, and the control chip sends the position information of the servo to the main control device at preset time intervals; S5, the control chip collects current and position information every system control cycle; S6, determining whether an angle position deflection instruction is received; S7, if yes, then update the target angle information, and input the position information error signal and the position error change rate signal into a preset linear quadratic regulator for inference to obtain an inference result; S8, sending the inference result to the fuzzy PID control module and calling the fuzzy PID control algorithm; S9, executing the fuzzy PID control algorithm once every system control cycle and outputting a PWM adjustment value; wherein the PWM adjustment value includes proportional, integral and differential adjustment coefficients; S10, superimposing the PWM adjustment amounts to obtain a superposition result; S11, converting the superposition result into a duty cycle signal through a preset PWM duty cycle module to control a driving circuit; wherein the driving circuit includes a plurality of MOS transistors; S12, collecting the motor speed and converting the speed into an angle position signal through a preset integration module; S13, feeding back the position error signal and the position error change rate signal to the fuzzy PID control module.

[0030] In this embodiment, if Figure 6 As shown, first, the system clock, timer, analog-to-digital converter, serial port and fuzzy PID control module are initialized, then the timer is turned on to interrupt initialization, and then the functional modules are executed cyclically according to the time tag sequence, and then the position command sent by the main control device is received in real time through the communication bus, and the control chip sends the position information of the servo to the main control device every time period; the control chip collects current and position information once every system control cycle; then it is judged whether the angle position deflection command is received; if so, the target angle information is updated, and the error signal of the position information and the position error change rate signal are input into the preset linear quadratic regulator for reasoning to obtain the reasoning result; then the reasoning result is sent to the fuzzy PID control module, and the fuzzy PID control algorithm is called; among them, "fuzzy" refers to control through fuzzy logic, specifically, the precise input value is fuzzified into a language variable, and then reasoning is performed, and finally the fuzzy output obtained by reasoning is defuzzified into an accurate value, which can be used to adjust the PID parameters or as a control variable.

[0031] Then, the fuzzy PID control algorithm is executed once every system control cycle and the PWM adjustment value is output; the PWM adjustment value includes the adjustment coefficients of proportion, integration and differentiation; the PWM adjustment values ​​are then superimposed to obtain the superposition result; the superposition result is converted into a duty cycle signal through the preset PWM duty cycle module to control the drive circuit; the motor speed is then collected and converted into an angular position signal through the preset integration module; finally, the position error signal and the position error change rate signal are fed back to the fuzzy PID control module.

[0032] Specifically, such as Figure 7As shown in the figure, each functional module is first initialized; these include the system clock, timer, analog-to-digital converter, serial port, and fuzzy PID control module. The fuzzy PID control module initializes the parameters of the fuzzy PID control algorithm. Next, the timer interrupt initialization routine is enabled. Each functional module executes sequentially according to time stamps. The controller is an MCU, which receives position commands from the master device in real time via the RS422 bus and transmits the servo's current position information to the master device every 2ms. The MCU then generates a 100µs timer interrupt as the system control period, collecting current and position information every 100µs.

[0033] Next, it determines whether an angular position deflection command has been received. If so, the target angle information φt is updated and set. The position information error signal and the position error rate change signal are input into a preset linear quadratic regulator for inference, resulting in an inference result. The inference result is sent to the fuzzy PID control module, and the fuzzy PID control algorithm is invoked. The fuzzy PID control algorithm is executed every system control cycle, and a PWM control variable is output to adjust the output of the control variable. The PWM control variable includes proportional, integral, and differential control coefficients. The current servo position φc fed back by the potentiometer is acquired through the A / D module. The PWM control variables are then superimposed to obtain a superimposed result. The superimposed result is then converted into a duty cycle signal using a preset PWM duty cycle module to control the drive circuit. The sampling module obtains the motor bus current measured by the electromechanical current sensor in real time and calculates the motor phase current feedback value based on the current PWM duty cycle. The motor speed is then acquired and converted into an angular position signal using a preset integration module. Finally, the position error signal and the position error rate change signal are fed back to the fuzzy PID control module. Compared with traditional PID control, this application adopts fuzzy logic control, which can be applied to electric servos and lays the foundation for the intelligent development of electric servos.

[0034] In one embodiment, the step of enabling timer interrupt initialization includes: Set the timer to 100us and use it as the system control period.

[0035] In this embodiment, the timer is set to 100us as the system control period. Specifically, the MCU uses the 100us set by the timer as the system control period, collects current and position information and executes the control PID algorithm every 100us to adjust the output of the control variable.

[0036] In one embodiment, the step of the control chip collecting current and position information once every system control cycle includes: The motor bus current measured by the current sensor is obtained in real time through the sampling module.

[0037] After the step of converting the superposition result into a duty cycle signal by presetting the PWM duty cycle module, the method includes: Calculate the motor phase current feedback value based on the PWM duty cycle; The position information of the servo fed back by the potentiometer is collected through an analog-to-digital converter.

[0038] In specific implementation, the IIC bus (Inter-Integrated Circuit) sampling module acquires the motor bus current measured by the current sensor in real time. This is then combined with the current PWM duty cycle to calculate the motor phase current feedback value. The current PWM duty cycle is obtained by updating the weight of the adjustment coefficient of the linear quadratic regulator. The current servo position information, fed back by the potentiometer, is then acquired through an analog-to-digital converter.

[0039] In one embodiment, the step of executing the fuzzy PID control algorithm once every system control cycle and outputting the PWM adjustment value includes: The weight of the adjustment coefficient is updated by a preset linear quadratic regulator to obtain the PWM duty cycle.

[0040] In practice, the fuzzy PID control algorithm is executed every system control cycle. This algorithm updates the weights of the control coefficients through a linear quadratic regulator (LQR) to determine the PWM duty cycle. This LQR is a linear quadratic regulator (LQR), which generates an optimal control law for linear state feedback and facilitates closed-loop optimal control.

[0041] Table 1:

[0042] Table 1 is a PID parameter state table. As shown in Table 1, in traditional PID control, when the proportional, integral and differential coefficients are increased respectively, the system parameters are affected respectively.

[0043] In one embodiment, the step of updating the weight of the adjustment coefficient by a preset linear quadratic regulator includes: A dynamic model is established through a linear quadratic regulator, and a regulation coefficient is calculated through a fuzzy PID control algorithm; wherein the dynamic model includes a state space equation; the state space equation includes a state vector, a control input and a system dynamic matrix.

[0044] In the specific implementation, to obtain the optimal PID control parameters, a linear quadratic regulator is used to provide the PID control parameters. First, a linear time-invariant dynamic model of the system is established. It is represented as a state-space equation containing the state vector, the control input, and the system dynamic matrix.

[0045] In one embodiment, the state space equation is: ; in, is the time derivative of the state vector, which represents the rate of change of the state over time; A is the system matrix; represents the state vector; B is the input matrix; is the control input vector.

[0046] Then add a linear feedback controller to the state space equation to obtain: ; in, is the control input vector, is the state vector; K is the feedback gain matrix, which generates control input through state feedback to stabilize the system and optimize performance; At this point, the new state space equation is obtained: ; Among them, A-BK is the closed-loop system matrix.

[0047] Redefine the quadratic cost function: ; Among them, Q and R are positive definite symmetric matrices, representing the weights of the state and control input, respectively, that is, the degree of influence of the state and input on the cost function; Define an auxiliary constant matrix P and get: ; Substituting into the quadratic cost function, we get the cost function: ; in, is the initial state vector; From the above formula, we can see that the cost function is only related to the matrix P and the initial state of the system, that is, finding the smallest P can minimize the cost function J. Now expand the differential term on the left side of the definition of P and define ,get: ; Where K is the optimal feedback gain matrix; is the inverse matrix of the control weight matrix R; is the transposed matrix of matrix B, that is, the rows and columns are swapped; Using the given (A, B, Q, R) in MATLAB (mathematical software), we set A, B, Q, and R to get the auxiliary matrix, and then find the PID coefficients and get the PWM duty cycle.

[0048] In one embodiment, the step of converting the superposition result into a duty cycle signal by a preset PWM duty cycle module to control the driving circuit includes: The motor is controlled by controlling the MOS tube.

[0049] In specific implementation: the MOS tube is electrically connected to the motor, and the forward rotation, reverse rotation and speed of the motor are controlled by controlling the switch of the MOS tube.

[0050] In one embodiment, if Figure 8 As shown in the figure, a step function is generated according to the input signal; the two inputs of the fuzzy PID control module are the current position error signal and the position error change rate signal, and then the proportional, integral and differential adjustment coefficients are output. The proportional, integral and differential adjustment amounts are superimposed to obtain the superposition result. The PWM duty cycle module is then called to convert the superposition result after the superposition of the adjustment amounts into a PWM duty cycle signal to control the H-bridge circuit. The motor speed is then sampled and converted into an angular position signal through the integral module. The current position error signal and the position error change rate signal are then fed back to the fuzzy PID control module to complete the closed-loop control of the entire system.

[0051] In one embodiment, a conventional PID system and a fuzzy PID system were placed in simulation environments 1, 2, and 3 for simulation testing, and the following results were obtained: The simulation environment 1 is a step response of 1°, such as Figure 9 As shown in the figure, after simulation control, the traditional PID and fuzzy PID are compared in simulation environment 1. The horizontal axis in the figure represents time and the vertical axis represents position. It can be seen that with the change of time, the degree of change of fuzzy PID is smaller and it has better stability.

[0052] Table 2:

[0053] As shown in Table 2, which is a comparison of the test data of simulation environment 1, it can be seen from the table that the maximum overshoot of fuzzy PID is much smaller than that of traditional PID, and the adjustment interval is shorter.

[0054] The simulation environment 2 is a step response of 3°, such as Figure 10As shown in the figure, after simulation control, by comparing the traditional PID and fuzzy PID in simulation environment 2, it can be seen that the degree of change of fuzzy PID is smaller and more stable as time changes.

[0055] Table 3:

[0056] As shown in Table 3, which is a comparison of the test data of simulation environment 2, it can be seen from the table that the maximum overshoot of the fuzzy PID is much smaller than that of the traditional PID, and the adjustment speed is also faster than that of the traditional PID.

[0057] The simulation environment 3 is a step response of 5°, such as Figure 11 As shown in the figure, after simulation control, by comparing the traditional PID and fuzzy PID in simulation environment 3, it can be seen that the fuzzy PID has a smaller degree of change and is more stable as time changes.

[0058] Table 4:

[0059] As shown in Table 4, which is a comparison of the test data of simulation environment 3, it can be seen from the table that the maximum overshoot of the fuzzy PID is much smaller than that of the traditional PID, and the adjustment speed is also faster than that of the traditional PID.

[0060] The simulation environment 4 is a 1° sinusoidal response, such as Figure 12 As shown in the figure, it can be seen that compared with traditional PID control, fuzzy PID control has a smaller overshoot. After amplifying the first peak, the adjustment time of traditional PID is 0.012, and the adjustment time of fuzzy PID is 0.01, which shows that the adjustment time of fuzzy PID is shorter.

[0061] Table 5:

[0062] As shown in Table 5, which is a comparison of the test data of simulation environment 4, it can be seen from the table that the maximum overshoot of the fuzzy PID is much smaller than that of the traditional PID, and the adjustment time is shorter than that of the traditional PID.

[0063] In summary, the fuzzy PID has a shorter adjustment time and a smaller overshoot, thus achieving optimized control.

[0064] Simulation data results show that compared with traditional PID control, fuzzy PID control exhibits higher control accuracy, stability, and response speed. In addition, control accuracy can be further improved by refining the fuzzy rules in the future.

[0065] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.

[0066] The above description is only a preferred embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A PID controlled inertial servo system, characterized in that: It includes controller, control circuit, drive circuit, motor, potentiometer, system clock, timer, analog-to-digital converter, multiple serial ports, communication bus, main control device, servo, fuzzy PID control module, sampling module, current sensor, linear quadratic regulator, PWM duty cycle module and integration module; The control circuit includes a control chip; the control chip is electrically connected to the controller and the linear quadratic regulator respectively; The driving circuit is electrically connected to the PWM duty cycle module; The drive circuit includes a first drive circuit and a second drive circuit; the first drive circuit includes a drive chip; the second drive circuit is electrically connected to the motor and is provided with a plurality of switches; The motor is electrically connected to the steering gear and is used to drive the steering gear; The potentiometer is electrically connected to the analog-to-digital converter and is used to adjust the resistance to control the output voltage; The system clock, the timer, the analog-to-digital converter, and the serial port are electrically connected to the controller respectively; The analog-to-digital converter is used to convert signals; The communication bus is electrically connected to the controller and is used to receive a position setting instruction from the main control device in real time and send the position of the servo to the main control device; The controller is electrically connected to the fuzzy PID control module; The sampling module is electrically connected to the current sensor; the current sensor is used to measure the current of the motor and calculate the phase current feedback value of the motor; The linear quadratic regulator is electrically connected to the fuzzy PID control module; The fuzzy PID control module is electrically connected to the PWM duty cycle module; The integration module is electrically connected to the sampling module and is used to convert the rotation speed of the motor into an angular position signal.

2. A control method for the PID controlled inertial servo system according to claim 1, characterized in that: The following steps are involved: Initialize multiple preset functional modules; wherein the functional modules include a system clock, a timer, an analog-to-digital converter, a serial port and a fuzzy PID control module; Turning on the timer to interrupt the initialization; Execute the functional modules cyclically according to the time tag sequence; The position command sent by the main control device is received in real time through the communication bus, and the control chip sends the position information of the servo to the main control device at preset time intervals; The control chip collects current and position information once every system control cycle; Determine whether an angle position deflection instruction is received; If yes, then update the target angle information, and input the error signal of the position information and the position error change rate signal into a preset linear quadratic regulator for inference to obtain an inference result; Sending the inference result to the fuzzy PID control module and calling the fuzzy PID control algorithm; The fuzzy PID control algorithm is executed once every system control cycle, and a PWM adjustment value is output; wherein the PWM adjustment value includes proportional, integral and differential adjustment coefficients; Superimposing the PWM adjustment amounts to obtain a superposition result; The superposition result is converted into a duty cycle signal through a preset PWM duty cycle module to control a driving circuit; wherein the driving circuit includes a plurality of MOS transistors; Collecting the rotational speed of the motor and converting the rotational speed into an angular position signal through a preset integration module; The position error signal and the position error change rate signal are fed back to the fuzzy PID control module.

3. The control method of the PID controlled inertial servo system according to claim 2, characterized in that: The step of enabling the timer to interrupt the initialization includes: The timer is set to 100 us and used as the system control period.

4. The control method of the PID controlled inertial servo system according to claim 2, characterized in that: The step of the control chip collecting current and position information once every system control cycle includes: The motor bus current measured by the current sensor is obtained in real time through the sampling module.

5. The control method of the PID controlled inertial servo system according to claim 2, characterized in that: The step of executing the fuzzy PID control algorithm once every system control cycle and outputting the PWM adjustment value includes: The weight of the adjustment coefficient is updated by a preset linear quadratic regulator to obtain a PWM duty cycle.

6. The control method of the PID controlled inertial servo system according to claim 5, characterized in that: The step of updating the weight of the adjustment coefficient by a preset linear quadratic regulator includes: A dynamic model is established by the linear quadratic regulator, and the regulation coefficient is calculated by the fuzzy PID control algorithm; wherein, the dynamic model includes a state space equation; the state space equation includes a state vector, a control input and a system dynamic matrix.

7. The control method of the PID controlled inertial servo system according to claim 6, characterized in that: The state space equation is: ; in, is the time derivative of the state vector, which represents the rate of change of the state over time; A is the system matrix; represents the state vector; B is the input matrix; is the control input vector.

8. The control method of the PID controlled inertial servo system according to claim 7, characterized in that: Adding a linear feedback controller to the state space equation yields: ; in, is the control input vector, is the state vector; K is the feedback gain matrix; At this point, the new state space equation is obtained: ; Among them, A-BK is the closed-loop system matrix.

9. The control method of the PID controlled inertial servo system according to claim 8, characterized in that: After the step of adding a linear feedback controller on the basis of the state space equation, the method further comprises: Define the quadratic cost function: ; Among them, Q and R are positive definite symmetric matrices, representing the weights of state and control input respectively; Define an auxiliary constant matrix P and get: ; Substituting into the quadratic cost function, we obtain: ; in, is the initial state vector; Expand the differential terms of the auxiliary constant matrix P and define ,get: ; Where K is the optimal feedback gain matrix; is the inverse matrix of the control weight matrix R; is the transposed matrix of matrix B; By setting A, B, Q, and R, an auxiliary matrix is ​​obtained, and the PWM duty cycle is obtained.

10. The control method of the PID controlled inertial servo system according to claim 2, characterized in that: After the step of converting the superposition result into a duty cycle signal by presetting the PWM duty cycle module, the method further includes: Calculating a motor phase current feedback value according to the PWM duty cycle; The position information of the servo fed back by the potentiometer is collected through an analog-to-digital converter.

Citation Information

Patent Citations

  • Single-wheel robot system and control method thereof

    CN101590323A

  • Inertial navigation modulation axis control method based on LQR regulator

    CN115903507A

  • Linear quadratic optimal control-based fuzzy expansion state observer design method

    CN116088306A

Cited By

  • Electronic load system and method based on adaptive predictive control algorithm

    CN121680182A