Memristor-based multi-sensor fusion digital-analog hybrid circuit self-balancing control system
By using memristor-based analog Kalman filtering and PD controller, combined with mixed-signal circuitry, the problems of analog-to-digital conversion delay and high power consumption in traditional digital computing platforms in mobile robot systems are solved, achieving high real-time performance and low power consumption self-balancing control.
Patent Information
- Application Number
- CN202610255010.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-26
AI Technical Summary
Traditional digital computing platforms suffer from analog-to-digital conversion delays, signal distortion, and high power consumption in mobile robot systems, which limit their performance under high dynamic response requirements.
A self-balancing control system is constructed by using a memristor-based analog Kalman filter circuit and an analog PD controller, combined with sensor data from a gyroscope and accelerometer, and achieving sensor signal filtering, fusion and control through a mixed-signal circuit. The non-volatile characteristics of the memristor are used to adjust the filter gain and control parameters.
It significantly improves the real-time response speed of the system, reduces power consumption, and achieves circuit reconfigurability and flexibility, making it suitable for self-balancing control scenarios with high dynamic response.
Smart Images

Figure CN122284261A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic and information control technology, and in particular to a self-balancing control system based on memristors and multi-sensor fusion mixed-signal circuits. Background Technology
[0002] Professor Cai Shaotang proposed the concept of memristors in 1971, and HP Labs achieved the physical fabrication of nanoscale memristors in 2008. As a nonlinear resistor with memory characteristics, the resistance of a memristor changes with historical voltage or current, and remains unchanged after power is turned off. This characteristic makes it a promising candidate for application in the field of analog computing.
[0003] As the performance of complementary metal-oxide-semiconductor (CMOS) technology approaches its physical limits, the rate of improvement in energy efficiency for traditional digital computing platforms is slowing. This issue not only affects the power demands of large data centers but also limits the performance improvements of mobile robot systems with sensing and actuation capabilities. As the complexity of mobile robot systems increases, the demand for computing power grows accordingly, while the saturation of Moore's Law further restricts the development of mobile robot systems with more functions and higher degrees of freedom.
[0004] In the specific application scenario of self-balancing control systems, traditional digital signal processor-based implementations face challenges in achieving sensor fusion (such as Kalman filtering) and closed-loop control (such as PD control). These challenges include latency from analog-to-digital conversion, signal distortion caused by sampling, and high power consumption, limiting the system's performance under high dynamic response requirements. Therefore, developing a faster and more energy-efficient alternative computing platform is of great value for mobile robots. Summary of the Invention
[0005] The purpose of this invention is to address the problems in the prior art by proposing a self-balancing control system and method based on a memristor-based multi-sensor fusion hybrid analog-digital circuit. This system employs an analog Kalman filter circuit with a memristor and an analog PD controller circuit. By combining sensor data from gyroscopes and accelerometers, noise is effectively removed and the vertical loop control response speed is improved, achieving optimal low-power sensor fusion and fast response control. This solves the problems of limited real-time performance and high power consumption in the prior art.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A self-balancing control system based on memristors and multi-sensor fusion mixed-signal circuits includes: an analog computing module, a digital computing module, a balancing execution module, and a power supply module;
[0008] The analog computing module includes an accelerometer, a gyroscope, a memristor-analog Kalman fusion filter circuit, and a memristor-analog PD controller circuit. The first input terminal of the memristor-analog Kalman fusion filter circuit is connected to the angle signal output terminal of the accelerometer, and the second input terminal is connected to the angular velocity signal output terminal of the gyroscope. The input terminal of the memristor-analog PD controller circuit is connected to the output terminal of the memristor-analog Kalman fusion filter circuit. This is used to achieve filtering and fusion of sensor signals and vertical loop control.
[0009] The digital computing module includes a microcontroller unit, which has an analog-to-digital conversion interface and an encoder interface. The analog-to-digital conversion interface is connected to the output of the memristor-analog PD controller circuit, and the encoder interface is connected to the motor encoder. Its PWM output is used to output PWM control signals to realize speed loop control and cascade PID signal generation.
[0010] The balance execution module includes a motor drive circuit, a brushless motor, a motor encoder, and a momentum wheel; the input terminal of the motor drive circuit is connected to the PWM control signal output terminal of the digital calculation module, and the output terminal is connected to the brushless motor; the brushless motor is mechanically connected to the momentum wheel; the motor encoder is mounted on the brushless motor and is coaxial or mechanically coupled with the brushless motor; the balance execution module is used to execute control commands to achieve vehicle body balance.
[0011] The power module is used to supply power to the above modules.
[0012] Furthermore, the memristor-analog Kalman fusion filter circuit includes a first operational amplifier U1, a first memristor G1, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, and a first capacitor C1; wherein:
[0013] The non-inverting input of the first operational amplifier U1 is connected to the other end of the third resistor R3 and one end of the fourth resistor R4, and the inverting input is connected to the other end of the first resistor R1, the other end of the first memristor G1, one end of the second resistor R2 and one end of the first capacitor C1; the output is connected to the other end of the second resistor R2 and the other end of the first capacitor C1, and is connected to the input of the memristor-analog PD controller circuit as the filtered and fused signal output.
[0014] One end of the first memristor G1 serves as the second input terminal of the memristor-analog Kalman fusion filter circuit and is connected to the angular velocity signal output terminal of the gyroscope; the other end is connected to the inverting input terminal of the first operational amplifier U1.
[0015] One end of the first resistor R1 serves as the first input terminal of the memristor-analog Kalman fusion filter circuit and is connected to the angle signal output terminal of the accelerometer; the other end is connected to the inverting input terminal of the first operational amplifier U1.
[0016] One end of the second resistor R2 is connected to the inverting input terminal of the first operational amplifier U1, and the other end is connected to the output terminal of the first operational amplifier U1;
[0017] One end of the third resistor R3 is connected to the DC power supply Vcc, and the other end is connected to the non-inverting input terminal of the first operational amplifier U1 and one end of the fourth resistor R4.
[0018] One end of the fourth resistor R4 is connected to the non-inverting input terminal of the first operational amplifier U1 and the other end of the third resistor R3, and the other end is grounded;
[0019] One end of the first capacitor C1 is connected to the inverting input terminal of the first operational amplifier U1, and the other end is connected to the output terminal of the first operational amplifier U1.
[0020] Furthermore, the fusion process implemented by the memristor-analog Kalman fusion filter circuit is as follows: ;
[0021] in, This will be used as the next angle estimate. This is the current angle measurement value. () represents the estimated current angular velocity. This is the current angle estimate; the resistance state of the first memristor G1 is used to realize the Kalman filter gain. By adjusting the resistance value of the first memristor G1, the weighting coefficients of the fusion algorithm are changed, thereby achieving the best filtering and fusion effect.
[0022] Furthermore, the memristor-analog PD controller circuit includes a second operational amplifier U2, a third operational amplifier U3, a fourth operational amplifier U4, a second memristor G2, a fifth resistor R5, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, a ninth resistor R9, a tenth resistor R10, an eleventh resistor R11, a twelfth resistor R12, and a thirteenth resistor R13; wherein:
[0023] The non-inverting input of the second operational amplifier U2 serves as the input of the memristor-analog PD controller circuit and is connected to the output of the first operational amplifier U1; the inverting input is connected to the other end of the fifth resistor R5 and one end of the sixth resistor R6; the output is connected to the other end of the sixth resistor R6 and one end of the seventh resistor R7.
[0024] The non-inverting input terminal of the third operational amplifier U3 is connected to the other end of the tenth resistor R10 and one end of the eleventh resistor R11, the inverting input terminal is connected to the other end of the eighth resistor R8 and one end of the second memristor G2, and the output terminal is connected to the other end of the second memristor G2 and one end of the ninth resistor R9.
[0025] The non-inverting input of the fourth operational amplifier U4 is connected to the other end of the seventh resistor R7 and the other end of the ninth resistor R9, the inverting input is connected to the other end of the twelfth resistor R12 and one end of the thirteenth resistor R13, the output is connected to the other end of the thirteenth resistor R13, and is connected to the analog-to-digital conversion interface of the digital computing module as the PD control signal output.
[0026] One end of the second memristor G2 is connected to the inverting input of the third operational amplifier U3 and the other end of the eighth resistor R8, and the other end is connected to the output of the third operational amplifier U3 and one end of the ninth resistor R9;
[0027] One end of the fifth resistor R5 is grounded, and the other end is connected to the inverting input terminal of the second operational amplifier U2;
[0028] One end of the sixth resistor R6 is connected to the inverting input terminal of the second operational amplifier U2, and the other end is connected to the output terminal of the second operational amplifier U2 and one end of the seventh resistor R7.
[0029] One end of the seventh resistor R7 is connected to the output terminal of the second operational amplifier U2 and the other end of the sixth resistor R6, and the other end is connected to the non-inverting input terminal of the fourth operational amplifier U4.
[0030] One end of the eighth resistor R8 is connected to the angular velocity signal output terminal of the gyroscope, and the other end is connected to the inverting input terminal of the third operational amplifier U3 and one end of the second memristor G2.
[0031] One end of the ninth resistor R9 is connected to the output terminal of the third operational amplifier U3 and the other end of the second memristor G2, and the other end is connected to the non-inverting input terminal of the fourth operational amplifier U4.
[0032] One end of the tenth resistor R10 is connected to the DC power supply Vcc, and the other end is connected to the non-inverting input terminal of the third operational amplifier U3 and one end of the eleventh resistor R11.
[0033] One end of the eleventh resistor R11 is connected to the non-inverting input of the third operational amplifier U3 and the other end of the tenth resistor R10, and the other end is grounded.
[0034] One end of the twelfth resistor R12 is grounded, and the other end is connected to the inverting input terminal of the fourth operational amplifier U4 and one end of the thirteenth resistor R13;
[0035] One end of the thirteenth resistor R13 is connected to the inverting input of the fourth operational amplifier U4 and the other end of the twelfth resistor R12, and the other end is connected to the output of the fourth operational amplifier U4.
[0036] Furthermore, the control process implemented by the memristor-analog PD controller circuit is as follows:
[0037] ;
[0038] in, This is the output signal of the PD controller; and These are all parameters of the PD controller. This is the angle estimate after filtering and fusion. The first memristor G1 is used to estimate the angular velocity. The resistance state of the second memristor G2 is used to realize the differential coefficient Kd of the PD controller. By adjusting the resistance value of the second memristor G2, the control parameters are changed to achieve adaptive control. Further, a memristor resistance state adjustment circuit is included for adjusting the resistance states of the first memristor G1 and the second memristor G2. The adjustment circuit includes a first data selector MUX1, a second data selector MUX2, a first analog switch S1, and a second analog switch S2. The D terminal of the first memristor G1 is connected to the connection point between the other end of the first resistor R1 and the inverting input terminal of the first operational amplifier U1 via the first analog switch S1. The D terminal of the second memristor G2 is connected to the connection point between the other end of the eighth resistor R8 and the inverting input terminal of the third operational amplifier U3 via the second analog switch S2. When the memristor resistance state needs to be adjusted, the first analog switch S1 and the second analog switch S2 are disconnected from the preceding and following stage circuits, causing the corresponding memristor D terminal to disconnect from the preceding stage circuit. The output terminal of the first data selector MUX1 is connected to the Gate terminal of the memristor to be adjusted. The output of the second data selector MUX2 is connected to the S terminal of the memristor to be adjusted. The IN2 input of the second data selector MUX2 is grounded. The selection terminal of the second data selector MUX2 receives a high-level signal output by the main control unit. The selection terminal of the first data selector MUX1 receives a pulse signal output by the main control unit. A positive or negative pulse is applied to the memristor to be adjusted according to the pulse polarity to adjust its resistance state. A positive pulse increases the resistance value, and a negative pulse decreases the resistance value. When the memristor needs to be connected to the circuit, the first analog switch S1 and the second analog switch S2 are closed, so that the D terminal of the corresponding memristor is connected to the front-end circuit. The IN1 input of the second data selector MUX2 is connected to the back-end circuit. The output of the second data selector MUX2 is connected to the S terminal of the memristor. The selection terminal of the second data selector MUX2 receives a low-level signal output by the main control unit. Furthermore, the digital computing module includes a microcontroller unit (MCU), which is configured to: acquire the analog control signal u(t) output by the memristor-analog PD controller circuit via an ADC interface as a position loop control quantity; read the momentum wheel speed information fed back by the motor encoder via an encoder interface; calculate the momentum wheel speed information using an internally preset PI speed loop control algorithm to obtain a speed loop PI control signal as a speed loop control quantity; and perform a cascade combination operation between the speed loop PI control signal and the analog control signal u(t) to generate a PWM control signal and output it to the motor drive circuit, thereby forming a dual closed-loop cascade control loop of position loop and speed loop.
[0039] Furthermore, the balancing execution module achieves self-balancing control based on the principle of conservation of angular momentum:
[0040] ;
[0041] in, The angular momentum generated by the momentum wheel. The moment of inertia of the momentum wheel. ω is the angular velocity of the momentum wheel; Let be the angular momentum of the vehicle body. Let the moment of inertia of the vehicle body be _____. This refers to the angular velocity of the vehicle body; that is, the angular momentum of the wheel and the angular momentum of the vehicle body are equal in magnitude and opposite in direction.
[0042] ;
[0043] When the vehicle body tilts to one side, the brushless motor drives the momentum wheel to accelerate in the same direction, generating a reverse compensating angular momentum to restore the vehicle body to balance; when the vehicle body is restored to balance, the speed of the momentum wheel decreases accordingly.
[0044] Furthermore, the resistance values of the first memristor G1 and the second memristor G2 are determined through supervised learning:
[0045] For the first memristor G1, the actual output of the Kalman filter circuit is compared with the ideal output in the standard dataset to calculate the error. Positive and negative pulses are sent to the memristor to adjust the resistance value according to the magnitude of the error until the preset error threshold is reached.
[0046] For the second memristor G2, by setting an initial balance attitude value, the resistance value of the memristor is gradually adjusted using the binary method, and the balance state of the trolley is observed until the optimal control parameters that keep the system in balance are found.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] 1) This invention uses analog circuits to implement Kalman filtering and PD control algorithms, avoiding the delay of analog-to-digital conversion and digital calculation, and significantly improving the real-time response speed of the system. It is suitable for self-balancing control scenarios with high dynamic response.
[0049] 2) This invention utilizes the non-volatile analog storage characteristics of memristors, enabling the filter gain (K) and control parameters (Kd) to be flexibly adjusted via pulse circuits, thus achieving circuit reconfigurability and avoiding the drawbacks of traditional analog circuit parameters being difficult to modify.
[0050] 3) This invention employs a mixed-signal architecture, storing the filter gain and control parameters in a memristor and utilizing analog circuits to perform parallel matrix operations and error signal calculations. This reduces the reliance on high-frequency sampling, analog-to-digital conversion, and CPU serial computation found in traditional digital systems. Since analog signals undergo continuous-time operations directly in the voltage domain, frequent data transfer and clock driving are unnecessary, significantly reducing system power consumption. Furthermore, the non-volatility of the memristor eliminates the need for continuous power supply to maintain parameters, further reducing standby power consumption. Based on these technical features, this invention effectively improves real-time performance and reduces overall power consumption in multi-sensor fusion control scenarios.
[0051] 4) In the hybrid analog-digital architecture of this invention, the analog circuit is responsible for state estimation and rapid calculation of error signals, achieving high-speed response in the continuous time domain; the digital circuit is used for parameter updates, mode switching, and system management and control. By keeping the high-speed control loop in the analog domain and placing strategy adjustments in the digital domain, this invention improves the flexibility of parameter configuration and the scalability of the system while ensuring system response speed. This structure fully combines the low-latency characteristics of analog circuits with the programmable characteristics of digital circuits, providing a technical solution for the self-balancing control of mobile robots that combines high real-time performance and low power consumption. Attached Figure Description
[0052] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale. Wherein:
[0053] Figure 1 This is a schematic diagram of the analog memristor-Kalman fusion filter circuit of the present invention;
[0054] Figure 2 This is a schematic diagram of the analog memristor-PD controller circuit of the present invention;
[0055] Figure 3 This is a schematic diagram of the memristor pulse tuning circuit of the present invention;
[0056] Figure 4 This is a schematic diagram of the digital computing module structure of the present invention;
[0057] Figure 5 This is a schematic diagram of the momentum wheel structure assembly of the present invention;
[0058] Figure 6 This is a schematic diagram of the balance control module of the present invention.
[0059] In the accompanying drawings, the same parts are referred to by the same reference numerals, and the drawings are not to scale. Detailed Implementation
[0060] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.
[0061] The present invention provides a memristor-based multi-sensor fusion hybrid circuit self-balancing control system. This system utilizes a memristor with a high on / off ratio and good polymorphism retention characteristics, applied to the control of a momentum wheel robot. The memristor-based momentum wheel balancing robot control system achieves rapid signal fusion and PD control in the analog domain, and speed loop control and cascaded PID algorithm in the digital domain, fully leveraging the advantages of a hybrid circuit self-balancing control system.
[0062] The memristor-based multi-sensor fusion hybrid circuit self-balancing control system includes an analog computing module, a digital computing module, a balancing execution module, and a power supply module; the balancing execution module includes a motor drive circuit, a brushless motor, and a momentum wheel; the modules work together according to the following process:
[0063] S1. Accelerometers and gyroscopes collect the vehicle's attitude information in real time to obtain angle signals. and angular velocity signal And input to the memristor-analog Kalman fusion filter circuit.
[0064] S2. Memristor-Analog Kalman Fusion Filter Circuit for Angle Signals and angular velocity signal Filtering and fusion processing is performed to eliminate high-frequency noise from the accelerometer and the zero-drift effect from the gyroscope, outputting an accurate angle estimate. and angular velocity estimates The filtering and fusion effect is controlled by the Kalman gain K, which is determined by the resistance value of the first memristor (G1).
[0065] S3. Angle estimate after receiving and filtering the impedance-analog PD controller circuit. and the angular velocity signal of the gyroscope The PD control operation is performed, and the vertical loop control signal u(t) is output. The proportional-derivative weight of the vertical loop control signal u(t) is controlled by the derivative coefficient Kd, which is determined by the resistance value of the second memristor (G2).
[0066] S4. The microcontroller unit (MCU) of the digital computing module acquires the control signal u(t) output by the analog PD controller through the analog-to-digital converter interface, and simultaneously reads the momentum wheel speed information fed back by the motor encoder through the encoder interface. The MCU internally runs a PI speed loop control algorithm, combining the speed loop output with the vertical loop signal in a cascaded PID manner to generate the final PWM control signal.
[0067] The motor drive circuit of the balancing execution module receives the PWM control signal output by the MCU and drives the brushless motor to rotate the momentum wheel. According to the principle of conservation of angular momentum, the reverse compensating angular momentum generated by the momentum wheel restores the vehicle body to a balanced state.
[0068] The analog computing module includes a memristor-analog Kalman fusion filter circuit connected to the accelerometer and gyroscope, and a memristor-analog PD controller circuit connected to the output of the memristor-analog Kalman fusion filter circuit; in some preferred embodiments, the analog computing module is implemented as follows:
[0069] like Figure 1 As shown, the analog signals generated by the analog accelerometer and analog gyroscope sensors represent angle and angular velocity signals, respectively. The accelerometer signal is susceptible to high-frequency noise, and the angular velocity signal generated by the gyroscope suffers from zero drift; a single sensor cannot provide accurate attitude information. The memristor-analog Kalman fusion filter circuit of this invention achieves signal fusion through analog circuitry.
[0070] In the memristor-analog Kalman fusion filter circuit, one end of resistor R1 is connected to the angle signal generated by the accelerometer, and one end of memristor G1 is connected to the angular velocity signal generated by the gyroscope. The other ends of resistor R1, memristor G1, resistor R2, and capacitor C1 are all connected to the inverting input of operational amplifier U1. One end of resistor R3 is connected to the DC power supply Vcc, and the other ends of resistor R3 and R4 are connected to the non-inverting input of operational amplifier U1, with the other end of resistor R4 grounded. The other ends of resistor R2 and capacitor C1 are connected to the output of operational amplifier U1, generating the filtered and fused signal. .
[0071] The fusion gain of this circuit is achieved by setting the appropriate resistance state of the memristor G1. Under the same input conditions, the error is calculated by comparing the actual output of the Kalman filter circuit with the ideal output in the standard dataset. The resistance of the memristor is adjusted by sending positive and negative pulses according to the magnitude of the error, thereby changing the weighting coefficients of the Kalman filter circuit and minimizing the loss function (the variance between the actual and ideal results).
[0072] like Figure 2As shown, the memristor-analog PD controller circuit is used to implement vertical loop control. One end of resistor R5 is grounded, and the other end of resistor R5 and one end of resistor R6 are connected to the inverting input of operational amplifier U2. The non-inverting input of operational amplifier U2 is connected to the output of operational amplifier U1 to receive the filtered and fused signal. The other end of resistor R6 and one end of resistor R7 are connected to the output of operational amplifier U2. One end of resistor R8 is connected to the angular velocity signal generated by the gyroscope. The other end of resistor R8 and one end of memristor G2 are connected to the inverting input of operational amplifier U3. The other end of memristor G2 and one end of resistor R9 are connected to the output of operational amplifier U3. One end of resistor R10 is connected to the DC power supply Vcc. The other end of resistor R10 and one end of resistor R11 are connected to the non-inverting input of operational amplifier U3. The other end of resistor R11 is grounded. The other ends of resistors R7 and R9 are connected to the non-inverting input of operational amplifier U4. One end of resistor R12 is grounded, and the other ends of resistors R12 and R13 are connected to the inverting input of operational amplifier U4. The other end of resistor R13 is connected to the output of operational amplifier U4, thus obtaining the PD control signal. .
[0073] The output gain of the PD controller is determined by the conductance of memristor G2. By outputting a specific pulse wave to the memristor through the main control MCU, precise control of the memristor's conductance is achieved, thereby adjusting the PD control parameters. The method for determining the optimal resistance value is as follows: set an initial equilibrium attitude value, gradually adjust the memristor resistance value using a binary search method, observe the balance state of the vehicle, and continue until the optimal control parameters that allow the system to maintain balance for an extended period are found.
[0074] In some preferred embodiments, the memristor resistance-state control circuit is implemented as follows:
[0075] like Figure 3 As shown, the memristor resistance-state control circuit includes a first data selector MUX1 and a second data selector MUX2. Its specific operation is as follows:
[0076] When the memristor's resistance needs adjustment, the main control unit sets the selector of MUX2 to a high level, connecting the output of MUX2 to the input IN2. The input IN2 is then connected to ground, and the source (S) terminal of the memristor is grounded through MUX2. Simultaneously, the selector of MUX1 receives pulse signals from the main control unit. When a positive pulse is needed, the main control unit outputs a positive pulse sequence, which is applied to the memristor's gate terminal via MUX1; when a negative pulse is needed, the main control unit outputs a negative pulse sequence. In this way, precisely controlled pulses can be applied to the memristor to adjust its resistance.
[0077] When the memristor needs to be connected to the circuit for normal operation, the main control unit controls the selection terminal of MUX2 to be low, so that the output terminal of MUX2 is connected to the input terminal of IN1, and the source terminal of the memristor is connected to the subsequent circuit through MUX2. The selection terminal of MUX1 is set to high impedance or disconnected, so that the gate terminal of the memristor is in a floating or appropriately biased state, and the memristor works normally as a circuit element.
[0078] In some preferred embodiments, the digital calculation module and the balanced execution module are implemented as follows:
[0079] like Figure 4 As shown, the core of the digital computing module is a microcontroller unit (MCU), which is equipped with an ADC interface and an encoder interface. The ADC interface is connected to the output of the memristor-analog PD controller circuit and is used to acquire the analog control signal u(t) output by the memristor-analog PD controller circuit. The encoder interface is connected to the output of the motor encoder and is used to read the momentum wheel speed information fed back by the motor encoder in real time. The microcontroller unit (MCU) has a pre-set PI speed loop control algorithm. The MCU processes the momentum wheel speed information using the PI speed loop control algorithm to obtain the speed loop PI control signal. The MCU combines the speed loop PI control signal with the analog control signal u(t) acquired through the ADC interface to generate a PWM control signal and output it to the motor drive circuit. The analog control signal u(t) serves as the position loop control quantity, and the speed loop PI control signal serves as the speed loop control quantity. The two are configured with a cascaded PID control method to form a double closed-loop cascade control loop, achieving precise control of the vehicle body attitude. At the same time, the momentum wheel speed information fed back by the motor encoder serves as the speed loop feedback quantity, which, together with the analog control signal u(t), forms a closed-loop regulation to ensure the stability and response speed of the system.
[0080] like Figure 5 and Figure 6 As shown, the balancing execution module includes a brushless motor drive circuit, a brushless motor, and a momentum wheel. The brushless motor is fixed to the vehicle body, and the momentum wheel is mechanically connected to the brushless motor. The motor drive circuit receives PWM control signals output by the MCU and precisely adjusts the speed of the momentum wheel. Its control principle is based on the law of conservation of angular momentum: when the vehicle body tilts in a certain direction due to external disturbances, the control system drives the momentum wheel to accelerate in the opposite direction through a closed-loop feedback mechanism, generating reverse compensating angular momentum to offset the attitude deviation; as the vehicle body gradually returns to its balanced position, the speed of the momentum wheel adaptively decreases according to a preset algorithm until the system returns to steady state. This process achieves closed-loop adjustment of dynamic balance by matching the angular acceleration of the momentum wheel with the amplitude of the vehicle body attitude deviation in real time.
[0081] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. These terms are used merely for ease of description and simplification of the invention, and are not intended to indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention.
[0082] While the invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways different from those described in the original claims. It is also understood that features described in conjunction with individual embodiments can be used in other described embodiments.
Claims
1. A multi-sensor fusion digital-analog hybrid circuit self-balancing control system based on memristor, characterized in that, include: Analog computing module, digital computing module, balanced execution module, and power supply module; The analog computing module includes an accelerometer, a gyroscope, a memristor-analog Kalman fusion filter circuit, and a memristor-analog PD controller circuit. The first input terminal of the memristor-analog Kalman fusion filter circuit is connected to the angle signal output terminal of the accelerometer, and the second input terminal is connected to the angular velocity signal output terminal of the gyroscope. The input terminal of the memristor-analog PD controller circuit is connected to the output terminal of the memristor-analog Kalman fusion filter circuit, and the output terminal of the memristor-analog PD controller circuit is connected to the analog-to-digital conversion interface of the microcontroller unit. The digital computing module includes a microcontroller unit, which has an analog-to-digital conversion interface and an encoder interface; the analog-to-digital conversion interface is connected to the output of the memristor-analog PD controller circuit, and the encoder interface is connected to the motor encoder, with its PWM output terminal used to output PWM control signals. The balancing execution module includes a motor drive circuit, a brushless motor, a motor encoder, and a momentum wheel; the input terminal of the motor drive circuit is connected to the PWM control signal output terminal of the digital calculation module, and the output terminal is connected to the brushless motor; the brushless motor is mechanically connected to the momentum wheel; the motor encoder is mounted on the brushless motor and is coaxial or mechanically engaged with the brushless motor. The power module is used to supply power to the above modules.
2. The memristor-based multi-sensor fusion digital-analog hybrid circuit self-balancing control system according to claim 1, wherein, The memristor-analog Kalman fusion filter circuit includes a first operational amplifier U1, a first memristor G1, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, and a first capacitor C1; wherein: The non-inverting input of the first operational amplifier U1 is connected to the other end of the third resistor R3 and one end of the fourth resistor R4, and the inverting input is connected to the other end of the first resistor R1, the other end of the first memristor G1, one end of the second resistor R2 and one end of the first capacitor C1; the output is connected to the other end of the second resistor R2 and the other end of the first capacitor C1, and is connected to the input of the memristor-analog PD controller circuit as the filtered and fused signal output. One end of the first memristor G1 serves as the second input terminal of the memristor-analog Kalman fusion filter circuit and is connected to the angular velocity signal output terminal of the gyroscope; the other end is connected to the inverting input terminal of the first operational amplifier U1. One end of the first resistor R1 serves as the first input terminal of the memristor-analog Kalman fusion filter circuit and is connected to the angle signal output terminal of the accelerometer; the other end is connected to the inverting input terminal of the first operational amplifier U1. One end of the second resistor R2 is connected to the inverting input terminal of the first operational amplifier U1, and the other end is connected to the output terminal of the first operational amplifier U1; One end of the third resistor R3 is connected to the DC power supply Vcc, and the other end is connected to the non-inverting input terminal of the first operational amplifier U1 and one end of the fourth resistor R4. One end of the fourth resistor R4 is connected to the non-inverting input terminal of the first operational amplifier U1 and the other end of the third resistor R3, and the other end is grounded; One end of the first capacitor C1 is connected to the inverting input terminal of the first operational amplifier U1, and the other end is connected to the output terminal of the first operational amplifier U1.
3. The memristor-based multi-sensor fusion digital-analog hybrid circuit self-balancing control system according to claim 2, wherein, The fusion process implemented by the memristor-analog Kalman fusion filter circuit is as follows: ; wherein, is the next angle estimate, is the current angle measurement, is the current angular velocity estimate, is the current angle estimate; the resistance state of the first memristor G1 is used to implement the Kalman filter gain The weighting factor of the fusion algorithm is changed by adjusting the resistance value of the first memristor G1.
4. The memristor-based multi-sensor fusion digital-analog hybrid circuit self-balancing control system according to claim 1, wherein, The memristor-analog PD controller circuit includes a second operational amplifier U2, a third operational amplifier U3, a fourth operational amplifier U4, a second memristor G2, a fifth resistor R5, a sixth resistor R6, a seventh resistor R7, an eighth resistor R8, a ninth resistor R9, a tenth resistor R10, an eleventh resistor R11, a twelfth resistor R12, and a thirteenth resistor R13; wherein: The non-inverting input of the second operational amplifier U2 serves as the input of the memristor-analog PD controller circuit and is connected to the output of the first operational amplifier U1; the inverting input is connected to the other end of the fifth resistor R5 and one end of the sixth resistor R6; the output is connected to the other end of the sixth resistor R6 and one end of the seventh resistor R7. The non-inverting input terminal of the third operational amplifier U3 is connected to the other end of the tenth resistor R10 and one end of the eleventh resistor R11, the inverting input terminal is connected to the other end of the eighth resistor R8 and one end of the second memristor G2, and the output terminal is connected to the other end of the second memristor G2 and one end of the ninth resistor R9. The non-inverting input of the fourth operational amplifier U4 is connected to the other end of the seventh resistor R7 and the other end of the ninth resistor R9, the inverting input is connected to the other end of the twelfth resistor R12 and one end of the thirteenth resistor R13, the output is connected to the other end of the thirteenth resistor R13, and is connected to the analog-to-digital conversion interface of the digital computing module as the PD control signal output. One end of the second memristor G2 is connected to the inverting input of the third operational amplifier U3 and the other end of the eighth resistor R8, and the other end is connected to the output of the third operational amplifier U3 and one end of the ninth resistor R9; One end of the fifth resistor R5 is grounded, and the other end is connected to the inverting input terminal of the second operational amplifier U2; One end of the sixth resistor R6 is connected to the inverting input terminal of the second operational amplifier U2, and the other end is connected to the output terminal of the second operational amplifier U2 and one end of the seventh resistor R7. One end of the seventh resistor R7 is connected to the output terminal of the second operational amplifier U2 and the other end of the sixth resistor R6, and the other end is connected to the non-inverting input terminal of the fourth operational amplifier U4. One end of the eighth resistor R8 is connected to the angular velocity signal output terminal of the gyroscope, and the other end is connected to the inverting input terminal of the third operational amplifier U3 and one end of the second memristor G2. One end of the ninth resistor R9 is connected to the output terminal of the third operational amplifier U3 and the other end of the second memristor G2, and the other end is connected to the non-inverting input terminal of the fourth operational amplifier U4. One end of the tenth resistor R10 is connected to the DC power supply Vcc, and the other end is connected to the non-inverting input terminal of the third operational amplifier U3 and one end of the eleventh resistor R11. One end of the eleventh resistor R11 is connected to the non-inverting input of the third operational amplifier U3 and the other end of the tenth resistor R10, and the other end is grounded. One end of the twelfth resistor R12 is grounded, and the other end is connected to the inverting input terminal of the fourth operational amplifier U4 and one end of the thirteenth resistor R13; One end of the thirteenth resistor R13 is connected to the inverting input of the fourth operational amplifier U4 and the other end of the twelfth resistor R12, and the other end is connected to the output of the fourth operational amplifier U4.
5. The memristor-based multi-sensor fusion digital-analog hybrid circuit self-balancing control system according to claim 4, characterized in that, The control process implemented by the memristor-analog PD controller circuit is as follows: ; wherein, is an output signal of the PD controller; and are parameters of the PD controller, is a filtered and fused angle estimate, is an angular velocity estimate; the resistance state of the second memristor G2 is used to implement a derivative coefficient Kd of the PD controller, and the control parameter is changed by adjusting the resistance value of the second memristor G2.
6. The memristor-based multi-sensor fusion analog-digital hybrid circuit self-balancing control system according to claim 2 or 4, characterized in that, It also includes a memristor resistance state control circuit for adjusting the resistance state of the first memristor G1 and the second memristor G2; the control circuit includes a first data selector MUX1, a second data selector MUX2, a first analog switch S1 and a second analog switch S2. The D terminal of the first memristor G1 is connected to the connection point between the other end of the first resistor R1 and the inverting input terminal of the first operational amplifier U1 via the first analog switch S1; the D terminal of the second memristor G2 is connected to the connection point between the other end of the eighth resistor R8 and the inverting input terminal of the third operational amplifier U3 via the second analog switch S2. When the resistance state of the memristor needs to be adjusted, the first analog switch S1 and the second analog switch S2 are disconnected from the preceding and following stage circuits, so that the corresponding memristor D terminal is disconnected from the preceding stage circuit; the output terminal of the first data selector MUX1 is connected to the Gate terminal of the memristor to be adjusted, the output terminal of the second data selector MUX2 is connected to the S terminal of the memristor to be adjusted, the IN2 input terminal of the second data selector MUX2 is grounded, the selection terminal of the second data selector MUX2 receives the high-level signal output by the main control unit, and the selection terminal of the first data selector MUX1 receives the pulse signal output by the main control unit. According to the pulse polarity, a positive or negative pulse is applied to the memristor to be adjusted to adjust its resistance state. When the memristor needs to be connected to the circuit, the first analog switch S1 and the second analog switch S2 are closed, so that the D terminal of the corresponding memristor is connected to the front-end circuit; the IN1 input terminal of the second data selector MUX2 is connected to the back-end circuit, the output terminal of the second data selector MUX2 is connected to the S terminal of the memristor, and the selection terminal of the second data selector MUX2 receives the low-level signal output by the main control unit.
7. The memristor-based multi-sensor fusion digital-analog hybrid circuit self-balancing control system according to claim 1, wherein, The digital computing module includes a microcontroller unit (MCU), which is configured to: The analog control signal u(t) output by the memristor-analog PD controller circuit is acquired through the ADC interface and used as the position loop control quantity; The momentum wheel speed information fed back by the motor encoder is read through the encoder interface; The momentum wheel speed information is calculated by the internally preset PI speed loop control algorithm to obtain the speed loop PI control signal as the speed loop control quantity. The speed loop PI control signal and the analog control signal u(t) are combined in a cascade to generate a PWM control signal, which is then output to the motor drive circuit to form a dual closed-loop cascade control loop of position loop and speed loop.
8. The memristor-based multi-sensor fusion digital-analog hybrid circuit self-balancing control system of claim 1, wherein, The balancing execution module achieves self-balancing control based on the principle of conservation of angular momentum. ; wherein is the angular momentum generated by the momentum wheel, is the moment of inertia of the momentum wheel, is the angular velocity of the momentum wheel; is the angular momentum of the vehicle body, is the moment of inertia of the vehicle body, is the angular velocity of the vehicle body; i.e. the momentum wheel angular momentum and the vehicle body angular momentum are equal in magnitude and opposite in direction: ; When the vehicle body tilts to one side, the brushless motor drives the momentum wheel to accelerate in the same direction, generating a reverse compensating angular momentum to restore the vehicle body to balance; when the vehicle body is restored to balance, the speed of the momentum wheel decreases accordingly.
9. The memristor-based multi-sensor fusion hybrid circuit self-balancing control system according to claim 4 or 5, characterized in that, The resistance values of the first memristor G1 and the second memristor G2 are determined through supervised learning: For the first memristor G1, the actual output of the Kalman filter circuit is compared with the ideal output in the standard dataset to calculate the error. Positive and negative pulses are sent to the memristor to adjust the resistance value according to the magnitude of the error until the preset error threshold is reached. For the second memristor G2, by setting an initial balance attitude value, the resistance value of the memristor is gradually adjusted using the binary method, and the balance state of the trolley is observed until the optimal control parameters that keep the system in balance are found.