Motor control system based on MCU

Through the MCU-based motor control system, the motor position data is monitored and processed in real time, combined with PWM drive and H-bridge circuit, the problem of inaccurate manual monitoring of traditional motor control systems is solved, and the precise control of the motor and the stability of the system is improved.

CN119602659APending Publication Date: 2025-03-11SHANGHAI HAISUXIN MICROELECTRONICS CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411865981.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

Traditional motor control systems require manual observation or measurement to determine the operating status of the motor, which is time-consuming and labor-intensive and susceptible to environmental factors, resulting in inaccurate monitoring data.

Method used

The motor control system based on the MCU is adopted to monitor the target position data of the motor in real time, use filtering and PID control units for data processing, and combine it with the PWM drive unit and the H bridge circuit to achieve accurate control of motor speed, direction, position and other parameters.

Benefits of technology

It realizes precise control of the motor, improves the stability and reliability of the system, has functions of easy transplantation and a wide range of applications, and improves the practicality of the existing motor control system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119602659A_ABST
    Figure CN119602659A_ABST
Patent Text Reader

Abstract

The invention discloses a motor control system based on an MCU, and belongs to the technical field of motor control. The problems of high development cost, large power consumption and poor portability in the prior art are solved, target position data of the motor are monitored in real time, the MCU microcontroller carries out filtering and denoising processing on the data through the filtering and PID control unit, and more accurate position information is obtained; a specific PWM waveform is output through a PWM driving unit, and after a PWM driving block generates a PWM signal, an H-bridge connecting block adjusts the on-off state of a switch element in the motor, so that the speed and torque redundancy of the motor are controlled, accurate control over parameters such as the rotating speed, the direction and the position of the motor is achieved, and a motor control system of the motor has high stability and reliability. Based on this, through the master control integration of the MCU microcontroller, the motor control system has the functions of convenient transplantation and wide application range, and the practicability of the existing motor control system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motor control, and in particular to a motor control system based on MCU. Background Art

[0002] Motors are one of the indispensable devices in modern industrial production and daily life. The accurate control of their position and speed has an important impact on the stability and efficiency of the production process. MCU, as the name implies, is a microcontroller. Its motor control method mainly adopts pulse width modulation PWM technology and closed-loop control method. With the advancement of science and technology and the continuous growth of automation needs, motors are increasingly used in industries, homes, entertainment and other fields.

[0003] However, traditional motor control systems often require manual observation or measurement to determine the motor's operating status. This method is not only time-consuming and labor-intensive, but also easily affected by environmental factors, resulting in inaccurate monitoring data.

[0004] Therefore, the existing needs are not met, so we propose a motor control system based on MCU. Summary of the invention

[0005] The purpose of the present invention is to provide a motor control system based on MCU, which monitors the target position data of the motor in real time, and the MCU microcontroller filters and de-noises the data through filtering and PID control unit to obtain more accurate position information; then a specific PWM waveform is output through a PWM drive unit, and when the PWM drive block generates a PWM signal, the H-bridge connection block adjusts the opening and closing state of the switch element in the motor, thereby being able to achieve precise control of parameters such as the motor speed, direction, and position, so that the motor has higher stability and reliability; based on this, through the main control integration of the MCU microcontroller, the motor control system has the functions of easy transplantation and a wide range of applications, thereby improving the practicality of the existing motor control system and solving the problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions: MCU-based motor control system, including: The motor position feedback unit is used to input the target position of the motor to the MCU microcontroller in real time and process it through a low-pass filter; The filter and PID control unit is used to limit the cutoff frequency in the motor position feedback unit, filter the data, remove the noise generated by the ADC, and then perform PID control on the filtered data to obtain more accurate position feedback; The PWM drive unit is a PWM pulse width modulation drive block, which is used to set the output PWM waveform, dead time, correction amount, start time, pulse width and end time, and control the motor speed redundancy by setting a specific PWM waveform and duty cycle through registers; The H-bridge circuit unit is connected to the motor and the PWM drive unit respectively, and is used to receive the output signal of the PWM drive block and convert the voltage output signal of the MCU microcontroller into a voltage signal capable of driving the motor to rotate; The state monitoring unit is used to monitor the operating state of the motor in real time through the Hall sensor, and to provide the MCU microcontroller with real-time feedback on the rotation frequency and position of the motor based on the monitoring results.

[0007] Furthermore, it also includes: The power management unit is used to connect the external power supply to the interface of the power management unit, convert the external power supply into the voltage format required by the MCU microcontroller and the H-bridge circuit unit, and provide power supply, voltage regulation, detection and management for each unit.

[0008] Furthermore, the motor position feedback unit comprises: The motor position feedback module, which consists of a displacement sensor and an analog / digital conversion module, is integrated into the MCU microcontroller and is used to detect the position change of the motor in real time through the displacement sensor and convert it into an analog voltage signal; the analog voltage signal is converted into a digital signal through the analog / digital conversion module; The first filtering module, consisting of a low-pass filter and a digital signal processor, is used to remove high-frequency noise in the digital signal through the low-pass filter, calculate the target position of the motor according to a preset control algorithm through the digital signal processor, and feed back the calculation result to the MCU microcontroller in real time.

[0009] Furthermore, the filtering and PID control unit comprises: The second filtering module, which consists of a bandpass filter, a proportional P link, and an integral I link, is used to limit the cutoff frequency through the bandpass filter so that only the frequency matching the actual movement speed of the motor is allowed to pass through, and other unnecessary frequencies are prevented from passing through; The PID control module is used to respond quickly through the proportional P link in the PID control link, so that the motor position feedback system reaches the expected position in a short time; and smoothing is performed through the integral I link and the differential D link, so that the performance of the motor position feedback system tends to a steady state.

[0010] Furthermore, the PWM driving unit comprises: PWM driver block, used to control the speed and torque of the motor based on the generated PWM waveform; The duty cycle adjustment module is used to control the motor speed and torque by changing the duty cycle of the PWM waveform; The pulse width adjustment module is used to control the motor torque by adjusting the pulse width of the PWM waveform.

[0011] Furthermore, the H-bridge circuit unit comprises: The H-bridge connection block is used to receive specific control signals from the PWM drive unit, control the opening and closing states of the motor switch components, and realize forward rotation, reverse rotation, adjustment, and stop of the motor; The fault detection module is used to perform fault detection on a switch element connected to the motor.

[0012] Furthermore, the state monitoring unit comprises: The state monitoring module is a Hall sensor, which is used to detect the magnetic field changes inside the motor in real time, convert the monitored data into a voltage signal, and configure the bias current, bias voltage, and gain setting value of the Hall gain by the MCU microcontroller, and obtain the position information of the motor through ad and da conversion, and feed it back to the MCU microcontroller in real time; The abnormality diagnosis module is used to compare the motor position with the historical data of the motor under normal operation, timely detect the abnormal situation of the motor, and issue an alarm and handle it.

[0013] Furthermore, the state monitoring unit further includes: The data reading interface is used to provide a data transmission interface between the Hall sensor and the MCU microcontroller to ensure that the data is read and used by the MCU microcontroller.

[0014] Furthermore, the power management unit includes: The power management module includes a switch tube, a voltage regulator, a filter, and a protection circuit. The switch tube is responsible for controlling the flow of current and opening or closing the circuit as needed; the voltage regulator is responsible for stabilizing the input voltage; the filter is used to remove interference signals in the output voltage; the protection circuit is used to protect the circuit from overload and short circuit; The power interface module is used to connect the external power supply to the internal interface and convert the external power supply into the voltage format required by the MCU microcontroller and the H-bridge circuit unit; The power supply function module includes: power supply function, voltage regulation function, detection function and management function. The power supply function is used to supply power to the MCU microcontroller and the H-bridge circuit unit to maintain the normal operation of the MCU microcontroller and the H-bridge circuit unit; the voltage regulation function is used to adjust the output voltage as needed to adapt to different load requirements; the detection function is used to obtain the working status and performance of the circuit through current detection and voltage detection; the management functions include: temperature control, fault diagnosis, and power status monitoring functions to ensure the normal operation of the circuit and extend its service life.

[0015] Furthermore, the motor is an actual motor driven in a motor control system.

[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention monitors the target position data of the motor in real time, and the MCU microcontroller performs filtering and denoising processing on the data through filtering and PID control unit to obtain more accurate position information; then a specific PWM waveform is output through the PWM drive unit, and when the PWM drive block generates a PWM signal, the H-bridge connection block adjusts the opening and closing state of each switch element in the motor according to the signal to ensure the stability and accuracy of the MCU microcontroller's control of the motor; thereby, accurate control of parameters such as the motor speed, direction, and position can be achieved, so that the motor control system has higher stability and reliability; based on this, through the main control integration of the MCU microcontroller, the motor control system has the functions of easy transplantation and a wide range of applications, thereby improving the practicality of the existing motor control system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a composition diagram of the MCU-based motor control system of the present invention. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] In order to solve the technical problem that the traditional motor control system often needs to determine the motor's operating status through manual observation or measurement, which is not only time-consuming and labor-intensive, but also easily affected by environmental factors, resulting in inaccurate monitoring data, please refer to Figure 1 , this embodiment provides the following technical solutions: In this embodiment, the MCU microcontroller is a 32-bit MCU equipped with a high-performance ARM@Cortex@M0+ core, with a maximum operating frequency of 48MHz, and has the advantages of low development cost and low power consumption; its main control block is integrated by the MCU master control, making it easy to transplant and widely applicable; in actual use, it only needs to be matched with the corresponding H-bridge according to different motors; and the main controller MCU microcontroller supports ICP online programming, and the MCU's Flash can be programmed through the SWD protocol or boot program to change the required configuration, with high flexibility to adapt to more usage scenarios.

[0020] MCU-based motor control system, including: The motor position feedback unit is used to input the target position of the motor to the MCU microcontroller in real time so as to monitor the running status of the motor in real time; wherein the motor is the actual motor driven in the motor control system; in order to ensure the accuracy of the data, the data is processed through a low-pass filter to further improve the accuracy of the data.

[0021] Motor position feedback unit, including: The motor position feedback module, which consists of a displacement sensor and an analog / digital conversion module, is integrated into the MCU microcontroller and is used to detect the position change of the motor in real time through the displacement sensor and convert it into an analog voltage signal; the analog voltage signal is converted into a digital signal through the analog / digital conversion module; specifically, the motor position feedback module is used to obtain the current position of the motor and the target position required for input, compare the current position signal and the target command signal, thereby generating corresponding commands, and outputting pulse signals to form a control closed loop. The driving ability of the output pulse signal is improved through the onboard drive circuit, and finally transmitted to the filtering and PID control block.

[0022] The first filtering module, composed of a low-pass filter and a digital signal processor, is used to remove high-frequency noise in the digital signal through the low-pass filter, calculate the target position of the motor according to a preset control algorithm through the digital signal processor, and feed back the calculation result to the MCU microcontroller in real time, so as to realize real-time and accurate monitoring of the motor position and speed; specifically, by integrating the motor position feedback unit into the MCU microcontroller, not only the position and speed of the motor can be monitored in real time, but also the manual intervention and delay in the traditional control system can be avoided, and the accuracy of the data can be further improved, thereby improving the accuracy and reliability of the motor control system; at the same time, by processing and analyzing the digital signal, more intelligent control strategies and decision support can be provided to users.

[0023] The filtering and PID control unit is used to limit the cutoff frequency in the motor position feedback unit, filter the data, remove the noise generated by the ADC, and then perform PID control on the filtered data to obtain more accurate position feedback; specifically, in this process, the filtering and PID control unit is divided into a filtering unit and a PID control unit. The function of the filtering unit is to remove the cutoff frequency and make the output data smoother; the function of the PID control unit is to obtain more accurate position feedback by performing proportional integral differential operations on the data in the position feedback unit, thereby improving the stability of the system; at the same time, the filtering and PID control block can implement various control strategies by configuring different parameters, such as PID gain, zero point and error range, so as to meet the needs of different application scenarios.

[0024] Filter and PID control unit, including: The second filtering module is composed of a bandpass filter, a proportional P link and an integral I link, and is used to limit the cutoff frequency through the bandpass filter so that only the frequency matching the actual movement speed of the motor is allowed to pass through, and other unnecessary frequencies are prevented from passing through; specifically, the unnecessary frequencies that do not match the actual movement speed of the motor are filtered out through the bandpass filter to avoid interference with the motor control; at the same time, through the integral effect of the proportional link, the errors in the control process can be accumulated and corrected in the control process to improve the control accuracy and stability; based on this, the errors caused by noise in the ADC conversion process can be effectively eliminated, and the accuracy of position feedback can be improved.

[0025] The PID control module is used to respond quickly through the proportional P link in the PID control link, so that the motor position feedback system reaches the expected position in a short time; the integral I link and the differential D link are used for smoothing, so that the performance of the motor position feedback system tends to a steady state; specifically, by connecting the filter of the motor position feedback module and the Hall sensor drive block to the PID control module respectively, the PID gain can be controlled, the pole zero point can be configured, and the effective cumulative error range can be set; at the same time, the pre-filter and post-filter of the PID can also be switched to set the gain of the PID controller; in this embodiment: the input basis of the gain is the 35Hz AD input and the input gain of the motor under the condition that the PID zero point is 35Hz, the pole is 900Hz, and the PWM frequency is 31.25kHz. The pole position mainly affects the peak position of the pulse signal amplitude characteristic and determines the strength of the integrator effect. In this module, the integrator can generate and control the cumulative error. When the integrator is turned on, the upper limit of the cumulative error can be set to reduce the error. Correspondingly, the calculation effect of the integrator will also be weakened accordingly. The zero point position mainly affects the valley position and concave degree of the pulse signal amplitude characteristic. The differentiator in this module can generate and control the upper limit of the noise response. When the differentiator is turned on, the upper limit of the noise response can be set. The amplitude of the noise generated by the differentiator will be attenuated, and accordingly, the effect of the differential algorithm will be weakened. The integrator and differentiator have greatly improved the stability and dynamic characteristics of this system. The gain control signal generated by this module is transmitted to the PWM drive block through the cutoff frequency selection and post-filter; by reasonably setting the proportional coefficients of the above three links, the filtered data can be effectively adjusted, further improving the accuracy and stability of the motor position feedback, and making the motor control system more intelligent.

[0026] The PWM drive unit is a PWM pulse width modulation drive block, which is used to set the output PWM waveform, dead time, total correction amount, start time, pulse width and end time, and set a specific PWM waveform and duty cycle to control the motor speed redundancy through the register; specifically, during operation, by receiving the motor position and speed update fed back by the motor position feedback unit, combined with the specific PWM waveform input by the register, its frequency, duty cycle and pulse width are controlled, thereby giving a new target value to the PWM output, and the H-bridge circuit unit uses the new target value to adjust the opening and closing state of each switching element in the motor, thereby realizing real-time control of the motor rotation mode; in this process, increasing and decreasing the duty cycle of the PWM output signal can also realize acceleration or deceleration of the motor rotation; and by configuring the PWM drive unit interconnected with other modules inside the MCU microcontroller, flexible control of the motor drive characteristics can be achieved.

[0027] PWM drive unit, including: The PWM drive block is used to control the speed and torque of the motor based on the generated PWM waveform; specifically, the PWM drive block is an important part of the motor control system, which can generate the required PWM waveform according to the system requirements and can accurately control multiple parameters of the waveform. By connecting the filter and PID control unit to the PWM drive block, the PWM wave with a specific frequency and duty cycle can be controlled to output; secondly, the PWM waveform can be set through registers, such as: PWM waveform, dead time, total correction, start time, pulse width and end time. The above parameters can be programmed to the MCU's Flash through the SWD protocol or the boot program to change the required configuration. Based on this, by changing the above parameters, the speed and torque of the motor can be accurately controlled to meet various complex control requirements. Among them, in the process of real-time control of the motor, the PWM drive block will continuously receive information from the motor position feedback unit, and adjust the parameters of the PWM waveform in real time according to the received information and the pre-set target value, so as to achieve precise control of the motor. For example, if the motor speed is found to be too fast or too slow, the duty cycle of the PWM waveform can be increased or decreased to achieve the effect of slowing down or speeding up the motor. At the same time, the PWM driver block can also cooperate with other modules, such as filtering and PID control blocks, H-bridge connection blocks, etc., to jointly build a highly integrated motor control system, so that the entire system has stronger real-time performance and better dynamic response capabilities.

[0028] The duty cycle adjustment module is used to control the motor speed and torque by changing the duty cycle of the PWM waveform. Specifically, when the duty cycle is large, it means that the motor obtains more pulses per second and the motor speed will become faster. When the duty cycle is small, it means that the motor obtains fewer pulses per second and the motor speed will become slower. By adjusting the size of the duty cycle, precise control of the motor speed can be achieved.

[0029] The pulse width adjustment module is used to control the motor torque by adjusting the pulse width of the PWM waveform. Specifically, when the pulse width is large, it means that the motor obtains a larger current per second, and the motor torque will increase; when the pulse width is small, it means that the motor obtains a smaller current per second, and the motor torque will decrease; based on this, different PWM waveforms are generated according to needs through the PWM drive unit, so as to accurately control the speed and torque of the motor, so that the motor can move accurately as needed.

[0030] The H-bridge circuit unit is connected to the motor and the PWM drive unit respectively, and is used to receive the output signal of the PWM drive block and convert the voltage output signal of the MCU microcontroller into a voltage signal that can drive the motor to rotate; and through the unique conduction mode of the H-bridge, the adjacent magnetic poles are turned on in turn clockwise or counterclockwise to control the rotation of the motor, and power amplification is performed at the same time.

[0031] The H-bridge circuit unit comprises: The H-bridge connection block is a power electronic device used to receive specific control signals in the PWM drive unit, control the opening and closing states of the motor switch components, and realize the forward rotation, reverse rotation, adjustment and stop of the motor; specifically, in this embodiment, the motor can be connected to the H-bridge circuit using a three-phase stepper motor, and the three-phase stepper motor has the advantages of high response, high precision, low vibration, simple control, etc.; the three-phase stepper motor can better demonstrate the control of the start and stop of the motor, specific rotation mode, change of rotation state, etc. of the present invention; when the PWM drive block generates a PWM signal, the H-bridge connection block adjusts the opening and closing state of each switch element according to the signal, thereby obtaining a voltage signal that can control the rotation of the motor to ensure the stability and accuracy of the motor.

[0032] The fault detection module has the function of fault detection and protection, and is used to detect faults of the switch elements connected to the motor; and to detect faults and replace or repair them in time to ensure the reliability and safety of the motor.

[0033] The state monitoring unit is used to monitor the running state of the motor in real time through the Hall sensor, and to feed back the rotation frequency and position of the motor to the MCU microcontroller in real time according to the monitoring results; wherein, the signal driving current of the Hall sensor mainly depends on the external resistor of the REF port, and the voltage of the REF port is 1.22V. The resistance value is adjusted by the register to change the Hall signal driving current; at the same time, different Hall signal bias voltages can be input through the register setting, and the Hall signal bias current and bias voltage together constitute the gain control of the Hall signal; the specific adjustment methods include: first, the Hall signal bias current is directly set; second, the bias signal is set to 0, the output signal will be adjusted and fed back to the 8-bit dac and 12-bit ADC, and the final feedback signal is then fed into the filtering and PID control block to form a control loop.

[0034] Condition monitoring unit, including: The status monitoring module is a Hall sensor, which is used to detect the changes in the magnetic field inside the motor in real time, convert the monitored data into a voltage signal, and the MCU microcontroller configures the bias current, bias voltage, and gain setting value of the Hall gain, and obtains the position information of the motor through ad and da conversion, and feeds it back to the MCU microcontroller in real time; specifically, by comparing the voltage signal output by the Hall sensor with the instructions of the microcontroller, the operating status of the motor, including speed, direction, position, etc., can be monitored in real time.

[0035] The abnormal diagnosis module is used to compare the motor position with the historical data of the motor under normal operation, timely detect the abnormal situation of the motor, and issue an alarm and process to ensure the reliability and safety of the motor; specifically, by comparing the real-time position of the motor with the historical data obtained under normal operating conditions, if any abnormal situation is found, an alarm will be immediately issued and corresponding processing will be carried out. This ensures that the motor always operates within a safe and reliable range to avoid equipment damage or personal safety accidents caused by abnormal situations. For example, when the actual position of the motor deviates greatly from the expected position, it may mean that the motor is faulty or operating abnormally. At this time, the abnormal diagnosis module will immediately issue an alarm to notify the operator to conduct further inspection and maintenance to prevent the potential problem from expanding. In addition, the abnormal diagnosis module can also analyze the historical operation data of the motor to find out the possible causes of the abnormal situation, and provide targeted improvement suggestions to help users optimize the use of the motor and improve the reliability and efficiency of the equipment.

[0036] The data reading interface is used to provide a data transmission interface between the Hall sensor and the MCU microcontroller to ensure that the data is read and used by the MCU microcontroller; specifically, for example, the microcontroller can calculate the actual position and speed of the motor based on the output information of the Hall sensor, and analyze the information, thereby effectively improving the stability and accuracy of the motor control system and reducing the occurrence of human intervention and erroneous operations.

[0037] The power management unit is used to connect the external power supply to the interface of the power management unit, convert the external power supply into the voltage format required by the MCU microcontroller and the H-bridge circuit unit, and provide power supply, voltage regulation, detection and management for each unit.

[0038] Power management unit, including: The power management module includes a switch tube, a voltage regulator, a filter, and a protection circuit. The switch tube is responsible for controlling the flow of current and opening or closing the circuit as needed. The switch tube is the core part of the power management module. The switch tube enables the motor to open the circuit when needed to allow current to flow; and close the circuit when not needed to avoid unnecessary energy waste, thereby ensuring the effective use of electric energy and saving energy. The voltage regulator is responsible for stabilizing the input voltage to ensure the stability of the output voltage. The motor can ensure the stability of the output voltage regardless of the external voltage fluctuation. Avoid equipment damage caused by unstable voltage and ensure the stable operation of the entire system. The filter is used to remove interference signals in the output voltage to ensure the purity of the circuit. The filter in this module generally uses a high-pass filter, which can effectively remove the high-frequency components in the AC signal, making the output DC voltage purer, which is conducive to subsequent processing. The protection circuit is used to protect the circuit from overload and short circuit to ensure the safety and reliability of the circuit. When the circuit is abnormal, the protection circuit can quickly cut off the power supply to prevent the circuit from further damage and ensure the safety of the entire system.

[0039] The power interface module is used to connect an external power source, such as a battery or a power grid, to an internal interface, and convert the external power source into the voltage format required by the MCU microcontroller and the H-bridge circuit unit for effective power management and control. Specifically, the power interface module usually includes the following key parts: Power adapter: used to convert the original voltage from the external power source into a suitable voltage value, and usually requires precise voltage setting according to specific application requirements. Power switch: responsible for switching on and off, switching the input power supply as needed. Filter: used to filter out possible clutter and noise, improve the quality of the voltage, and ensure the stability and safety of the circuit. Voltage regulator: used to fine-tune the voltage according to specific application requirements to ensure that the voltage is stable and meets the requirements of use. Protection circuit: used to have functions such as overload protection and short-circuit protection to deal with possible power failures. Through the synergistic effect of the above parts, the power interface module can convert the external power supply into a voltage format suitable for the motor control system and provide reliable power support for the entire system.

[0040] The power supply function module includes: power supply function, voltage regulation function, detection function and management function. The power supply function is used to supply power to the MCU microcontroller and the H-bridge circuit unit to maintain the normal operation of the MCU microcontroller and the H-bridge circuit unit; the voltage regulation function is used to adjust the output voltage as needed to adapt to different load requirements; the detection function is used to obtain the working status and performance of the circuit through current detection and voltage detection; the management functions include: temperature control, fault diagnosis, and power supply status monitoring functions, which can comprehensively manage the entire power supply system, including: monitoring the status of the power supply, analyzing the use of the equipment, and managing the maintenance plan of the equipment, so as to effectively help users better understand and utilize the power supply system, and further improve the operating efficiency and service life of the equipment; based on this, the safety, reliability and efficiency of the circuit can be effectively improved, energy consumption can be reduced, and the overall performance of the system can be improved.

[0041] The beneficial effects achieved by the above contents are as follows: through the main control integration of the MCU microcontroller, the motor control system has the functions of easy transplantation and wide application range, thus improving the practicality of the existing motor control system.

[0042] Working principle: By real-time monitoring of the motor's target position data, the MCU microcontroller filters and denoises the data through filtering and PID control units to obtain more accurate position information; then a specific PWM waveform is set through the PWM drive unit to control its frequency, duty cycle and pulse width. When the PWM drive block generates a PWM signal, the H-bridge connection block adjusts the opening and closing state of each switching element in the motor according to the signal, thereby controlling the motor's speed and torque redundancy to ensure the stability and accuracy of the MCU microcontroller's control of the motor; thereby achieving precise control of motor speed, direction, position and other parameters, making the motor have higher stability and reliability.

[0043] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0044] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and alterations may be made to the embodiments without departing from the principles and spirit of the invention.

Claims

1. The motor control system based on MCU is characterized by: include: The motor position feedback unit is used to input the target position of the motor to the MCU microcontroller in real time and process it through a low-pass filter; The filter and PID control unit is used to limit the cutoff frequency in the motor position feedback unit, filter the data, remove the noise generated by the ADC, and then perform PID control on the filtered data to obtain more accurate position feedback; The PWM drive unit is a PWM pulse width modulation drive block, which is used to set the output PWM waveform, dead time, correction amount, start time, pulse width and end time, and set a specific PWM waveform and duty cycle through registers to control the motor speed redundancy; The H-bridge circuit unit is connected to the motor and the PWM drive unit respectively, and is used to receive the output signal of the PWM drive block and convert the voltage output signal of the MCU microcontroller into a voltage signal capable of driving the motor to rotate; The state monitoring unit is used to monitor the operating state of the motor in real time through the Hall sensor, and to provide the MCU microcontroller with real-time feedback on the rotation frequency and position of the motor based on the monitoring results.

2. The motor control system based on MCU according to claim 1, characterized in that: Also includes: The power management unit is used to connect the external power supply to the interface of the power management unit, convert the external power supply into the voltage format required by the MCU microcontroller and the H-bridge circuit unit, and provide power supply, voltage regulation, detection and management for each unit.

3. The motor control system based on MCU according to claim 1, characterized in that: The motor position feedback unit comprises: The motor position feedback module, which consists of a displacement sensor and an analog / digital conversion module, is integrated into the MCU microcontroller and is used to detect the position change of the motor in real time through the displacement sensor and convert it into an analog voltage signal; the analog voltage signal is converted into a digital signal through the analog / digital conversion module; The first filtering module, consisting of a low-pass filter and a digital signal processor, is used to remove high-frequency noise in the digital signal through the low-pass filter, calculate the target position of the motor according to a preset control algorithm through the digital signal processor, and feed back the calculation result to the MCU microcontroller in real time.

4. The motor control system based on MCU according to claim 1, characterized in that: The filtering and PID control unit comprises: The second filtering module, which is composed of a bandpass filter, a proportional P link and an integral I link, is used to limit the cutoff frequency through the bandpass filter so that only the frequency matching the actual movement speed of the motor is allowed to pass; The PID control module is used to respond quickly through the proportional P link in the PID control link, so that the motor position feedback system reaches the expected position in a short time; and smoothing is performed through the integral I link and the differential D link, so that the performance of the motor position feedback system tends to a steady state.

5. The motor control system based on MCU according to claim 1, characterized in that: The PWM driving unit comprises: PWM driver block, used to control the speed and torque of the motor based on the generated PWM waveform; The duty cycle adjustment module is used to control the motor speed and torque by changing the duty cycle of the PWM waveform; The pulse width adjustment module is used to control the motor torque by adjusting the pulse width of the PWM waveform.

6. The motor control system based on MCU according to claim 1, characterized in that: The H-bridge circuit unit comprises: The H-bridge connection block is used to receive specific control signals from the PWM drive unit, control the opening and closing states of the motor switch components, and realize forward rotation, reverse rotation, adjustment, and stop of the motor; The fault detection module is used to perform fault detection on a switch element connected to the motor.

7. The motor control system based on MCU according to claim 1, characterized in that: The state monitoring unit comprises: The state monitoring module is a Hall sensor, which is used to detect the magnetic field changes inside the motor in real time, convert the monitored data into a voltage signal, and configure the bias current, bias voltage, and gain setting value of the Hall gain by the MCU microcontroller, and obtain the position information of the motor through ad and da conversion, and feed it back to the MCU microcontroller in real time; The abnormality diagnosis module is used to compare the motor position with the historical data of the motor under normal operation, detect the abnormality of the motor, and issue an alarm and handle it.

8. The MCU-based motor control system according to claim 7, characterized in that: The state monitoring unit further comprises: The data reading interface is used to provide a data transmission interface between the Hall sensor and the MCU microcontroller to ensure that the data is read and used by the MCU microcontroller.

9. The motor control system based on MCU according to claim 2, characterized in that: The power management unit comprises: The power management module includes a switch tube, a voltage regulator, a filter, and a protection circuit. The switch tube is responsible for controlling the flow of current and opening or closing the circuit as needed; the voltage regulator is responsible for stabilizing the input voltage; the filter is used to remove interference signals in the output voltage; the protection circuit is used to protect the circuit from overload and short circuit; The power interface module is used to connect the external power supply to the internal interface and convert the external power supply into the voltage format required by the MCU microcontroller and the H-bridge circuit unit; The power supply function module includes: power supply function, voltage regulation function, detection function and management function. The power supply function is used to supply power to the MCU microcontroller and the H-bridge circuit unit to maintain the normal operation of the MCU microcontroller and the H-bridge circuit unit; the voltage regulation function is used to adjust the output voltage as needed to adapt to different load requirements; the detection function is used to obtain the working status and performance of the circuit through current detection and voltage detection; the management functions include: temperature control, fault diagnosis, and power status monitoring functions.

10. The motor control system based on MCU according to claim 1, characterized in that: The motor is the actual motor that is driven in the motor control system.