CN117914220A - Speed measuring device and method for servo motor encoder based on microcontroller - Google Patents

Speed measuring device and method for servo motor encoder based on microcontroller Download PDF

Info

Publication number
CN117914220A
CN117914220A CN202311836318.9A CN202311836318A CN117914220A CN 117914220 A CN117914220 A CN 117914220A CN 202311836318 A CN202311836318 A CN 202311836318A CN 117914220 A CN117914220 A CN 117914220A
Authority
CN
China
Prior art keywords
encoder
microcontroller
control
pulse signal
speed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311836318.9A
Other languages
Chinese (zh)
Inventor
崔志伟
刘锐
王程
宋睿康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Triumph International Engineering Co Ltd
Original Assignee
China Triumph International Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Triumph International Engineering Co Ltd filed Critical China Triumph International Engineering Co Ltd
Priority to CN202311836318.9A priority Critical patent/CN117914220A/en
Publication of CN117914220A publication Critical patent/CN117914220A/en
Pending legal-status Critical Current

Links

Landscapes

  • Control Of Electric Motors In General (AREA)

Abstract

The invention relates to the technical field of motor speed measurement, in particular to a servo motor encoder speed measurement device and method based on a microcontroller. The device comprises at least one speed measuring encoder, a motor and a control unit, wherein the speed measuring encoder is used for carrying out corresponding motor and outputting encoder pulse signals; and the input end of the microcontroller is connected with the encoder to receive the encoder pulse signal, and the microcontroller adjusts the encoder pulse signal based on the parameter self-adaptive adjustment mode of the Lyapunov function and outputs the adjusted pulse signal. The invention can improve the speed measurement precision of the servo motor in the glass product industrial automatic production equipment, enhance the anti-interference capability and the self-adaptation performance of the speed measurement encoder, improve the control efficiency of the motor and the stability of the system, and ensure more accurate motor speed measurement.

Description

Speed measuring device and method for servo motor encoder based on microcontroller
Technical Field
The invention relates to the technical field of motor speed measurement, in particular to a servo motor encoder speed measurement device and method based on a microcontroller.
Background
In the industrial automation production equipment of glass products, a servo motor is used as a main power output device, and the control precision and reliability of the servo motor have strict requirements. With the rapid development of automatic control algorithms and microcontroller technologies, a control system of a servo motor is more and more efficient and stable, and the motor control system greatly improves the dynamic response and stability of the system by adopting a double closed-loop control method of rotating speed outer ring and current inner ring, so that the failure rate of glass production equipment is effectively reduced, and the maintenance cost of the equipment is reduced.
The accurate rotation speed control of the servo motor system is the premise of ensuring the stable operation of the glass production equipment, and the most commonly used sensor for the rotation speed measurement of the motor is a photoelectric encoder which is connected with the rotor of the motor through a coupler. For the traditional photoelectric encoder speed measuring device, pulse signals output by an encoder can be directly captured, and then the current rotating speed of the motor is obtained through the operation of a controller, so that the device is generally applicable to industrial sites with small load disturbance and good production environment. The load fluctuation of glass production equipment is large, the production environment is severe, the signal acquisition of the encoder is greatly interfered, and if the rotating speed of the servo motor is measured by the traditional method, obvious speed fluctuation exists, so that the production and the processing of the flat glass are affected.
Disclosure of Invention
The invention aims to provide a servo motor encoder speed measuring device based on a microcontroller, which solves the technical problems;
The invention also aims to provide a speed measuring method of the servo motor encoder based on the microcontroller, which solves the technical problems.
The technical problems solved by the invention can be realized by adopting the following technical scheme:
a servo motor encoder speed measuring device based on a microcontroller comprises,
The at least one speed measuring encoder is used for measuring the speed of the corresponding motor and outputting an encoder pulse signal;
The input end of the microcontroller is connected with the speed measuring encoder to receive the encoder pulse signal, and the microcontroller is used for adjusting the encoder pulse signal and outputting an adjusted pulse signal; the microcontroller may be configured to control the operation of the device,
The first input end of the controllable regulator is connected with the speed measuring encoder, and is used for receiving the encoder pulse signal and preprocessing the encoder pulse signal;
the controlled object parameter estimator is connected with the output end of the controllable regulator and used for generating process parameters for regulating control parameters;
The parameter self-adaptive regulator is connected with the output end of the controlled object parameter estimator, receives the process parameter, generates the control parameter for regulating the encoder pulse signal, the output end of the parameter self-adaptive regulator is connected with the second input end of the controllable regulator, and the controllable regulator regulates the encoder pulse signal based on the control parameter and outputs the regulated pulse signal.
Preferably, a control system based on parameter self-adaptive adjustment of Lyapunov function is arranged in the microcontroller, the formula of the control system is as follows,
Y(t)=apy(t)+kpu(t)
Wherein Y (t) is the output quantity of the control system, u (t) is the input quantity of the control system, Y (t) is the control quantity of the control system, a p is the input quantity correlation coefficient of the control system, and k p is the control quantity correlation coefficient of the control system;
The control parameters include an input quantity correlation coefficient a p of the control system and a control quantity correlation coefficient k p of the control system.
Preferably, the control system is provided with a corresponding reference system, the formula of the reference system is,
Ym(t)=amym(t)+kmr(t)
Wherein Y m (t) is the output quantity of the reference system, r (t) is the input quantity of the reference system, Y m (t) is the control quantity of the reference system, k m is the input quantity correlation coefficient of the reference system, and a m is the control quantity correlation coefficient of the reference system;
The process parameters include an input quantity correlation coefficient k m of the reference system and a control quantity correlation coefficient a m of the reference system;
The control rate of the control system is that,
u*(t)=θ*y(t)+k*r(t)
Wherein,
The error of the control system and the reference system is that
e(t)=y(t)-ym(t)
The adaptive control formula for the control system is,
Wherein,Is the derivative of θ,/>As derivatives of k, γ 1 and γ 2 are operational intermediate quantities, sgn is a sign function.
Preferably, the motor control device further comprises a timer interrupt, is connected with the microcontroller, receives the adjusted pulse signal, and is used for calculating the rotating speed value of the motor according to the adjusted pulse signal.
Preferably, the method further comprises the steps of,
The microcontroller is connected with external control equipment through the serial port communication module and uploads the rotating speed value;
And the display screen is connected with the microcontroller and used for outputting and displaying the rotating speed value.
Preferably, the portable electronic device further comprises a power supply module, wherein a power supply voltage input end of the power supply module is connected with a switching power supply, and a power supply end of the power supply module is connected with the microcontroller, the serial port communication module and the display screen and is used for supplying power to the microcontroller, the serial port communication module and the display screen.
Preferably, the microcontroller is an STM32 microcontroller.
Preferably, the speed measuring encoder is a photoelectric encoder, the encoder pulse signals output by the speed measuring encoder comprise an A phase signal, a B phase signal and a Z phase signal, and the resolution of the encoder is 1000 lines to 20000 lines.
A speed measuring method of servo motor encoder based on microcontroller is applied to the speed measuring device of servo motor encoder based on microcontroller, which comprises,
Step S1, at least one speed measuring encoder measures the speed of the corresponding motor, and the microcontroller captures the encoder pulse signal output by the speed measuring encoder;
Step S2, the controllable regulator receives the encoder pulse signal and preprocesses the encoder pulse signal;
Step S3, the controlled object parameter estimator takes the preprocessed encoder pulse signal output by the controllable regulator as a controlled object to generate a process parameter for regulating the control parameter;
And S4, the parameter self-adaptive regulator receives the process parameter, generates the control parameter for regulating the encoder pulse signal and inputs the control parameter into the controllable regulator, and the controllable regulator regulates the encoder pulse signal according to the control parameter to output the regulated pulse signal.
Preferably, the method further comprises the steps of,
And S5, a timer is interrupted to receive the adjusted pulse signals, the rotating speed value of the motor is calculated, and the rotating speed value is transmitted to a display screen and external control equipment.
The invention has the beneficial effects that: by adopting the technical scheme, the speed measuring precision of the servo motor in the glass product industrial automatic production equipment can be improved, the anti-interference capability and the self-adaptation performance of the speed measuring encoder are enhanced, the control efficiency of the motor and the stability of a system are improved, and more accurate motor speed measurement can be ensured.
Drawings
FIG. 1 is a block diagram of an adaptive control of a microcontroller based on Lyapunov function in an embodiment of the invention;
FIG. 2 is a block diagram of a microcontroller-based servo motor encoder speed measurement device in accordance with an embodiment of the present invention;
Fig. 3 is a schematic diagram illustrating steps of a method for measuring a speed of a servo motor encoder based on a microcontroller according to an embodiment of the present invention.
In the accompanying drawings: 1. a speed measuring encoder; 2. a microcontroller; 21. a controllable regulator; 22. a controlled object parameter estimator; 23. a parameter adaptive regulator; 3. a timer is interrupted; 4. a display screen; 5.a serial port communication module; 6. a control device; 7. a switching power supply; 8. and a power supply module.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other.
The invention is further described below with reference to the drawings and specific examples, which are not intended to be limiting.
A servo motor encoder speed measuring device based on a microcontroller, as shown in fig. 1 and 2, comprises,
The at least one speed measuring encoder 1 is used for measuring the speed of the corresponding motor and outputting an encoder pulse signal;
The input end of the microcontroller 2 is connected with the speed measuring encoder 1 to receive the encoder pulse signal, and the microcontroller 2 is used for adjusting the encoder pulse signal and outputting the adjusted pulse signal; the micro-controller 2 comprises a memory unit,
The first input end of the controllable regulator 21 is connected with the speed measuring encoder 1, and is used for receiving encoder pulse signals and preprocessing the encoder pulse signals;
A controlled object parameter estimator 22 connected to the output of the controllable regulator 21 for generating a process parameter for regulating the control parameter;
The parameter adaptive regulator 23 is connected to the output end of the controlled object parameter estimator 22, receives the process parameter, generates a control parameter for adjusting the encoder pulse signal, the output end of the parameter adaptive regulator 23 is connected to the second input end of the controllable regulator 21, and the controllable regulator 21 adjusts the encoder pulse signal based on the control parameter to output an adjusted pulse signal.
Specifically, the invention provides a servo motor rotating speed measuring device based on a microcontroller 2, wherein the microcontroller 2 uses an STM32 processor based on an ARM4 kernel, and a parameter self-adaptive adjusting technology based on a Lyapunov function is adopted, so that signal fluctuation of a speed measuring encoder 1 when the speed measuring encoder operates in a severe environment can be effectively eliminated, and the rotating speed of a motor can be measured more accurately. Meanwhile, the data of the rotation speed value can be displayed in the liquid crystal screen in real time and sent to external control equipment 6 (PLC) in a serial port communication mode, so that the PLC can acquire the rotation speed of the motor in real time.
In a preferred embodiment, a control system based on parameter adaptive adjustment of lyapunov function is provided in the microcontroller 2, the formula of the control system is,
Y(t)=apy(t)+kpu(t)
Wherein Y (t) is the output quantity of the control system, u (t) is the input quantity of the control system, Y (t) is the control quantity of the control system, a p is the input quantity correlation coefficient of the control system, and k p is the control quantity correlation coefficient of the control system;
The control parameters include an input quantity correlation coefficient a p of the control system and a control quantity correlation coefficient k p of the control system.
In a preferred embodiment, the control system is provided with a corresponding reference system, the formula of which is,
Ym(t)=amym(t)+kmr(t)
Wherein Y m (t) is the output quantity of the reference system, r (t) is the input quantity of the reference system, Y m (t) is the control quantity of the reference system, k m is the input quantity correlation coefficient of the reference system, and a m is the control quantity correlation coefficient of the reference system;
The process parameters include an input quantity correlation coefficient k m of the reference system and a control quantity correlation coefficient a m of the reference system;
The control rate of the control system is that,
u*(t)=θ*y(t)+k*r(t)
Wherein,
The errors of the control system and the reference system are,
e(t)=y(t)-ym(t)
The adaptive control formula for the control system is that,
Wherein,Is the derivative of θ,/>As derivatives of k, γ 1 and γ 2 are operational intermediate quantities, sgn is a sign function.
Specifically, the self-adaptive control method based on the Lyapunov function can be set as a control system,
Y(t)=apy(t)+kpu(t) (1)
Wherein Y (t) is the output quantity of the control system, u (t) is the input quantity of the control system, Y (t) is the control quantity of the control system, a p is the input quantity correlation coefficient of the control system, and k p is the control quantity correlation coefficient of the control system;
The control parameters include an input quantity correlation coefficient a p of the control system and a control quantity correlation coefficient k p of the control system.
The reference system for this control system can be set as follows,
Ym(t)=amym(t)+kmr(t) (2)
Wherein Y m (t) is the output quantity of the reference system, r (t) is the input quantity of the reference system, Y m (t) is the control quantity of the reference system, k m is the input quantity correlation coefficient of the reference system, and a m is the control quantity correlation coefficient of the reference system;
The process parameters include an input quantity correlation coefficient k m of the reference system and a control quantity correlation coefficient a m of the reference system;
The control rate can be set to be given by knowing the control parameters a p and k p of the control system
u*(t)=θ*y(t)+k*r(t) (3)
Wherein,
Bringing the above parameters into the control system will keep the control system and the reference system consistent. Because the servo motor speed measuring device operates in a factory environment of glass production equipment, motor load fluctuation is large, production environment is severe, control parameters a p and k p cannot be accurately known, and therefore theta * and k * cannot be calculated, and in order to enable a control system to tend to be stable, an adaptive control algorithm needs to be added, so that the system can obtain stable output through adaptive adjustment even under the condition that the control parameters are undefined.
The errors of the control system and the reference system are,
e(t)=y(t)-ym(t) (4)
The adaptive control law for control system nonlinearities is that,
Wherein,Is the derivative of θ,/>As derivatives of k, γ 1 and γ 2 are operational intermediate quantities, sgn is a sign function.
The reliability of the adaptive control algorithm of the present invention can be demonstrated as long as the control law is infinitely trending towards the reference system, thus defining the lyapunov function with respect to the systematic error, and the asymptotically stable system can be demonstrated as long as the derivative of the lyapunov function with respect to time is proved to be strictly negative.
The procedure for the demonstration of the present invention is as follows,
The lyapunov function of the systematic error is as follows,
The matrix transformation of equation 6 is performed to obtain,
Where Φ=θ - θ *,Ψ=k-k*.
Because both the control parameter a p、kp and the process parameters a m and k m are constant, then both θ * and k * are also constant, and the derivatives of phi and ψ can be obtained as,
Substituting the above formula into the control system, it is possible, as available,
The derivative about the systematic error e can be obtained as,
The derivation of the lyapunov function in equation (6) is:
Because the reference system tends to be stable, a m is smaller than 0, and the error of the control system tends to be 0, the parameter self-adaptive control algorithm based on the Lyapunov function is adopted, so that the speed measuring precision of the speed measuring encoder 1 can be effectively improved, the anti-interference capability is enhanced, and the motor control system is enabled to stably run.
Based on the above algorithm analysis, we need to determine the basic parameters of the motor tachometer encoder 1, and the motor model used in different glass automated production equipment is different, and the resolution requirements on the tachometer encoder 1 are also different. In general, in a high-precision rotation speed and stroke control device, the resolution of the speed measuring encoder 1 is higher, while in a device with low requirements on the speed adjusting performance, the resolution of the speed measuring encoder 1 is lower, and after the parameters of the speed measuring encoder 1 of the motor are determined, the parameters of the speed measuring encoder 1 are completely configured in a software program, which is the first step of measuring and displaying the motor speed.
The invention can improve the speed measurement precision of the servo motor in the glass product industrial automatic production equipment, enhance the anti-interference capability and the self-adaptation performance of the speed measurement encoder 1, improve the control efficiency of the motor and the stability of the system, and ensure more accurate motor speed measurement.
In a preferred embodiment, the motor further comprises a timer interrupt 3 connected to the microcontroller 1 for receiving the adjusted pulse signal for calculating the rotational speed value of the motor based on the adjusted pulse signal.
Specifically, the invention comprises two paths of speed measuring encoders 1, including an encoder a and an encoder b, wherein the encoder a and the encoder b can measure the speed of the same motor or different motors, and the device can capture signals of the two paths of speed measuring encoders 1 and decode and calculate the speed simultaneously due to the superior performance of the STM32 microcontroller.
The self-adaptive control algorithm operates in a main program, the calculation program of the motor speed operates in the timer interrupt 3, and the speed value is displayed through the liquid crystal display 4, so that engineering technicians can observe the motor speed in time, and information of the motor speed value can be sent to the PLC through the serial port communication module 5, and the operation efficiency of the PLC is improved.
Specifically, the timer interrupt 3 may be periodically triggered, and the rotation speed value of the motor is calculated according to the time interval by recording the pulse number of the adjusted pulse signal in each timer interrupt 3.
In a preferred embodiment, the method further comprises,
The microcontroller 2 is connected with the external control equipment 6 through the serial port communication module 5 and uploads the rotating speed value;
and the display screen 4 is connected with the microcontroller 2 and is used for outputting and displaying the rotating speed value.
Specifically, the display screen 4 in the invention is a liquid crystal screen, and the liquid crystal display screen 4 can display variables and character strings in real time; the serial port communication module 5 is used for communication between the STM32 and the PLC, and can transmit the rotating speed value data obtained by calculation of the STM32 microcontroller 2 to the PLC;
In a preferred embodiment, the portable electronic device further comprises a power supply module 8, wherein a power supply voltage input end of the power supply module 8 is connected with the switching power supply 7, and a power supply end of the power supply module 8 is connected with the microcontroller 2, the serial port communication module 5 and the display screen 4 and is used for providing power supply for the microcontroller 2, the serial port communication module 5 and the display screen 4.
Specifically, the power supply voltage of the invention is 24V, the power supply voltage is provided by the switch power supply 7 in the control cabinet, the 24V voltage is reduced by the power supply module 8 and then 5V voltage is output to power devices such as the microcontroller 2, the speed measuring encoder 1, the serial port communication module 5 and the like, and the stable power supply voltage is the guarantee of the reliable operation of the invention.
In a preferred embodiment, the microcontroller 2 is an STM32 microcontroller.
Specifically, the invention relates to a servo motor speed measuring encoder 1 speed measuring device based on an STM32 microcontroller, a parameter self-adaptive adjustment control method based on a Lyapunov function is adopted in the algorithm aspect, C language programming based on an ARM kernel is used in the software aspect, a speed measuring encoder 1, an STM32 microcontroller 2, a display screen 4, a serial port communication module 5, a power supply module 8 and the like are mainly included in the hardware aspect, and development tools used by the STM32 are MDK5 software; the model of STM32 is STM32F4 series based on ARM4 kernel, and the microcontroller 2 is provided with an orthogonal decoding module;
In a preferred embodiment, the tachometer encoder 1 is a photoelectric encoder, and the encoder pulse signals output by the tachometer encoder 1 comprise an A phase signal, a B phase signal and a Z phase signal, and the resolution of the tachometer encoder 1 is 1000 lines to 20000 lines.
Specifically, accurate rotation speed control of a servo motor system is a precondition for ensuring stable operation of glass production equipment, and a speed measuring encoder 1 most commonly used for rotation speed measurement of a motor is a photoelectric encoder which is connected with a rotor of the motor through a coupler.
Specifically, the invention aims to provide a parameter self-adaptive adjustment control device based on Lyapunov function, which can accurately measure the rotating speed of a servo motor and display parameters on a display screen 4 in real time under the environment with larger interference, and can capture motor speed encoder 1 data with different resolutions by configuring software parameters, wherein the resolution of the speed encoder 1 based on the STM32 microcontroller 2 can be sampled is 1000 lines to 20000 lines.
The invention can improve the speed measurement precision of the servo motor in the glass product industrial automatic production equipment, enhance the anti-interference capability and the self-adaptation performance of the speed measurement encoder, improve the control efficiency of the motor and the stability of the system, and ensure more accurate motor speed measurement and real-time parameter display. The invention is an effective and reliable servo motor speed measurement and parameter display device.
A speed measuring method of a servo motor encoder based on a microcontroller is applied to the speed measuring device of the servo motor encoder based on the microcontroller in any embodiment, and comprises the following steps,
Step S1, at least one speed measuring encoder 1 measures the speed of a corresponding motor, and a microcontroller 2 captures an encoder pulse signal output by the speed measuring encoder 1;
step S2, the controllable regulator 21 receives the encoder pulse signal and preprocesses the encoder pulse signal;
Step S3, the controlled object parameter estimator 22 takes the preprocessed encoder pulse signal output by the controllable regulator 21 as the controlled object to generate process parameters for regulating control parameters;
In step S4, the parameter adaptive regulator 23 receives the process parameter, generates a control parameter for adjusting the encoder pulse signal, and inputs the control parameter to the controllable regulator 21, and the controllable regulator 21 adjusts the encoder pulse signal according to the control parameter to output an adjusted pulse signal.
In a preferred embodiment, the method further comprises,
In step S5, a timer interrupt 3 receives the adjusted pulse signal, calculates the rotation speed value of the motor, and transmits the rotation speed value to the display screen 4 and the external control device 6.
Specifically, the timer interrupt 3 may be periodically triggered, and the rotation speed value of the motor is calculated according to the time interval by recording the pulse number of the adjusted pulse signal in each timer interrupt 3.
Specifically, the microcontroller 2 in the invention adopts an STM32 microcontroller, and due to the superior performance of the STM32 microcontroller, the device can simultaneously capture signals of two paths of speed measuring encoders 1 and perform decoding and speed calculation;
The calculation program of the motor speed runs in the timer interrupt 3, the timer interrupt function period is set to be 10ms, so that the STM32 microcontroller can sample and calculate encoder signals 100 times in one second, the real-time performance of speed measurement is greatly improved, the speed is displayed through the liquid crystal display 4, engineering technicians can observe the motor rotating speed in time conveniently, motor rotating speed information can be sent to the PLC through the serial communication module 5, and the running efficiency of the PLC is improved.
In summary, the beneficial effects of the invention include,
1. According to the invention, through the parameter self-adaptive adjustment technology of the speed measuring encoder 1, the interference signals in the pulse of the speed measuring encoder 1 can be effectively eliminated, and the anti-interference capability and the control precision of the motor operation are improved;
2. the invention can measure the motor rotation speed in real time and display the motor rotation speed on the display screen 4, and can transmit the rotation speed value to the PLC through the serial communication module 5;
3. According to the invention, the software parameters are configured to capture the data of the speed measuring encoder 1 with different resolutions, so that the application range of the device is effectively improved.
The foregoing description is only illustrative of the preferred embodiments of the present invention and is not to be construed as limiting the scope of the invention, and it will be appreciated by those skilled in the art that equivalent substitutions and obvious variations may be made using the description and illustrations of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A servo motor encoder speed measuring device based on a microcontroller is characterized by comprising,
The at least one speed measuring encoder is used for measuring the speed of the corresponding motor and outputting an encoder pulse signal;
The input end of the microcontroller is connected with the speed measuring encoder to receive the encoder pulse signal, and the microcontroller is used for adjusting the encoder pulse signal and outputting an adjusted pulse signal; the microcontroller may be configured to control the operation of the device,
The first input end of the controllable regulator is connected with the speed measuring encoder, and is used for receiving the encoder pulse signal and preprocessing the encoder pulse signal;
the controlled object parameter estimator is connected with the output end of the controllable regulator and used for generating process parameters for regulating control parameters;
The parameter self-adaptive regulator is connected with the output end of the controlled object parameter estimator, receives the process parameter, generates the control parameter for regulating the encoder pulse signal, the output end of the parameter self-adaptive regulator is connected with the second input end of the controllable regulator, and the controllable regulator regulates the encoder pulse signal based on the control parameter and outputs the regulated pulse signal.
2. The method for measuring speed of a servo motor encoder based on a microcontroller according to claim 1, wherein a control system based on parameter self-adaptive adjustment of Lyapunov function is arranged in the microcontroller, and the formula of the control system is that,
Y(t)=apy(t)+kpu(t)
Wherein Y (t) is the output quantity of the control system, u (t) is the input quantity of the control system, Y (t) is the control quantity of the control system, a p is the input quantity correlation coefficient of the control system, and k p is the control quantity correlation coefficient of the control system;
The control parameters include an input quantity correlation coefficient a p of the control system and a control quantity correlation coefficient k p of the control system.
3. The method for measuring speed of a servo motor encoder based on a microcontroller according to claim 2, wherein the control system is provided with a corresponding reference system, the formula of the reference system is that,
Ym(t)=amym(t)+kmr(t)
Wherein Y m (t) is the output quantity of the reference system, r (t) is the input quantity of the reference system, Y m (t) is the control quantity of the reference system, k m is the input quantity correlation coefficient of the reference system, and a m is the control quantity correlation coefficient of the reference system;
The process parameters include an input quantity correlation coefficient k m of the reference system and a control quantity correlation coefficient a m of the reference system;
The control rate of the control system is that,
u*(t)=θ*y(t)+k*r(t)
Wherein,
The errors of the control system and the reference system are,
e(t)=y(t)-ym(t)
The adaptive control formula for the control system is,
Wherein,Is the derivative of θ,/>As derivatives of k, γ 1 and γ 2 are operational intermediate quantities, sgn is a sign function.
4. The method of claim 1, further comprising a timer interrupt coupled to the microcontroller for receiving the adjusted pulse signal for calculating a rotational speed value of the motor based on the adjusted pulse signal.
5. The method of claim 4, further comprising,
The microcontroller is connected with external control equipment through the serial port communication module and uploads the rotating speed value;
And the display screen is connected with the microcontroller and used for outputting and displaying the rotating speed value.
6. The method of claim 5, further comprising a power module, wherein a power supply voltage input end of the power module is connected to a switching power supply, and a power supply end of the power module is connected to the microcontroller, the serial port communication module and the display screen, and is used for providing power to the microcontroller, the serial port communication module and the display screen.
7. The microcontroller-based servo motor encoder speed measurement method of claim 1, wherein the microcontroller is an STM32 microcontroller.
8. The speed measuring method of the servo motor encoder based on the microcontroller according to claim 1, wherein the speed measuring encoder is an optoelectronic encoder, the encoder pulse signals output by the speed measuring encoder comprise an A phase signal, a B phase signal and a Z phase signal, and the resolution of the encoder is 1000 lines to 20000 lines.
9. A speed measuring method of a servo motor encoder based on a microcontroller, which is characterized in that the speed measuring method is applied to the servo motor encoder based on the microcontroller according to any one of claims 1 to 8, and comprises the following steps,
Step S1, at least one speed measuring encoder measures the speed of the corresponding motor, and the microcontroller captures the encoder pulse signal output by the speed measuring encoder;
Step S2, the controllable regulator receives the encoder pulse signal and preprocesses the encoder pulse signal;
Step S3, the controlled object parameter estimator takes the preprocessed encoder pulse signal output by the controllable regulator as a controlled object to generate a process parameter for regulating the control parameter;
And S4, the parameter self-adaptive regulator receives the process parameter, generates the control parameter for regulating the encoder pulse signal and inputs the control parameter into the controllable regulator, and the controllable regulator regulates the encoder pulse signal according to the control parameter to output the regulated pulse signal.
10. The method for measuring speed of a servo motor encoder based on a microcontroller of claim 9, further comprising,
And S5, a timer is interrupted to receive the adjusted pulse signals, the rotating speed value of the motor is calculated, and the rotating speed value is transmitted to a display screen and external control equipment.
CN202311836318.9A 2023-12-27 2023-12-27 Speed measuring device and method for servo motor encoder based on microcontroller Pending CN117914220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311836318.9A CN117914220A (en) 2023-12-27 2023-12-27 Speed measuring device and method for servo motor encoder based on microcontroller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311836318.9A CN117914220A (en) 2023-12-27 2023-12-27 Speed measuring device and method for servo motor encoder based on microcontroller

Publications (1)

Publication Number Publication Date
CN117914220A true CN117914220A (en) 2024-04-19

Family

ID=90689082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311836318.9A Pending CN117914220A (en) 2023-12-27 2023-12-27 Speed measuring device and method for servo motor encoder based on microcontroller

Country Status (1)

Country Link
CN (1) CN117914220A (en)

Similar Documents

Publication Publication Date Title
Huang et al. PC-based PID speed control in DC motor
US11947322B2 (en) Factory system for machine learning of an actuator
CN107086835B (en) Permanent magnet synchronous motor rotation initial zero-potential angle calibration system and calibration method
EP2778804A1 (en) Control program, control method, and control device
CN102480096B (en) Visualized intelligent precise numerically controlled crimping method and device therefor
US20210116899A1 (en) Parameterization of a component in an automation system
CN108717304A (en) Pneumatic equipment bladess Multiexciter synchronizes fatigue loading control system and control method
CN209570187U (en) A kind of caliberating device of obliquity sensor
CN117914220A (en) Speed measuring device and method for servo motor encoder based on microcontroller
CN114079411A (en) Online automatic identification method for servo motor
CN209857935U (en) Detection device for detecting precision of photoelectric encoder
Aravind et al. Remote monitoring and control of automation system with internet of things
CN110647120A (en) Motion control method suitable for extreme application conditions
CN115480517A (en) Communication type encoder feedback position estimation method and system
CN114609917A (en) Servo driver and servo system based on digital twin technology
CN108880366B (en) Control method of torque loading controller of reduction gearbox test bed
CN116382185A (en) PLC analog quantity output system and method based on machine learning
Dwiyaniti et al. Implementation of IoT on PLC-Based Induction Motor Speed Control
CN111590577B (en) Mechanical arm multi-parameter digital frequency conversion control method and device
CN216013596U (en) Programmable stepping motor loop tester
EP3600799A1 (en) Method, apparatus and system for monitoring industrial robot
CN220525912U (en) Multichannel frequency measurement device
CN212435613U (en) Additional stability control device of gas generator set
CN106774459B (en) Two-dimensional rotary table follow-up control system and control method of command mirror based on step driving
US20220356867A1 (en) Method for operating a wind power installation, wind power installation and wind farm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication