CN109932895B - Motor rotation speed control teaching experiment table and use method thereof - Google Patents
Motor rotation speed control teaching experiment table and use method thereof Download PDFInfo
- Publication number
- CN109932895B CN109932895B CN201910214984.6A CN201910214984A CN109932895B CN 109932895 B CN109932895 B CN 109932895B CN 201910214984 A CN201910214984 A CN 201910214984A CN 109932895 B CN109932895 B CN 109932895B
- Authority
- CN
- China
- Prior art keywords
- rotating speed
- motor
- upper computer
- parameter
- controller
- 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.)
- Active
Links
- 238000002474 experimental method Methods 0.000 title claims abstract description 40
- 238000000034 method Methods 0.000 title claims description 32
- 230000001276 controlling effect Effects 0.000 claims abstract description 62
- 230000001105 regulatory effect Effects 0.000 claims abstract description 47
- 230000007246 mechanism Effects 0.000 claims abstract description 33
- 230000004044 response Effects 0.000 claims abstract description 21
- 230000008859 change Effects 0.000 claims abstract description 19
- 238000000926 separation method Methods 0.000 claims abstract description 4
- 230000001052 transient effect Effects 0.000 claims description 12
- 230000010355 oscillation Effects 0.000 claims description 6
- 238000004891 communication Methods 0.000 claims description 5
- 230000003750 conditioning effect Effects 0.000 claims description 3
- 238000001914 filtration Methods 0.000 claims description 3
- 230000000087 stabilizing effect Effects 0.000 claims description 3
- 238000012423 maintenance Methods 0.000 abstract 1
- 230000008569 process Effects 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000012935 Averaging Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000005034 decoration Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 229920003023 plastic Polymers 0.000 description 1
- 230000007363 regulatory process Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Images
Landscapes
- Control Of Electric Motors In General (AREA)
Abstract
The invention discloses a motor rotating speed control teaching experiment table which comprises a motor, a gear, a flywheel, a rotating speed sensor, a controller, a shell, four regulating knobs, a power switch, a power interface, a clutch deflector rod, a clutch mechanism, an RS485 interface and an upper computer, wherein the gear is arranged on the motor; the controller measures a gear fixed on the output shaft of the motor through a rotating speed sensor to obtain the rotating speed of the motor; the motor is connected with the controller; the clutch deflector rod is used for controlling the separation and the engagement of a sliding gear of the clutch mechanism and a gear of the motor output shaft; the four regulating knobs are respectively and electrically connected with the controller to regulate and control parameters of the rotating speed; the controller is connected with the upper computer through an RS485 interface. The invention can measure the rotating speed change curves of the motor under different control signals when the motor works in no-load, and the motor can quickly and stably reach the required rotating speed from a certain rotating speed when the motor is loaded by rotating different regulating buttons, and has strong regulating and controlling capability, quick response, convenient maintenance and simple structure.
Description
Technical Field
The invention relates to the field of auxiliary teaching of control systems, in particular to a motor rotating speed control teaching experiment table and a using method thereof.
Background
At present, the auxiliary teaching equipment of the control system in the prior art only models the system through simulation software and simulates to obtain a better result. PID control is one of classical control methods in a control theory and the most common control mode in industrial production, students can understand the parameter setting process only through simulation software, so that the students are familiar with understanding the working principle, the teaching effect is poor, a simulation system established through a pure theory is different from a control system in practical application, the problem is difficult to find in the simulation software, and the students cannot understand the adjustment of the controlled parameters in the control system deeply.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to solve the technical problem of providing a motor rotating speed control teaching experiment table and a using method thereof aiming at the defects related in the background technology.
The technical scheme is as follows:
a motor rotating speed control teaching experiment table comprises a motor, a gear, a rotating speed sensor, a clutch mechanism, a shell, a flywheel, a controller, four regulating knobs, a power supply, an RS485 interface and an upper computer, wherein the four regulating knobs are respectively a D regulating knob in a PID, an I regulating knob in the PID, a P regulating knob in the PID and a time regulating knob, and the power supply comprises a power switch and a power supply interface;
the motor, the gear, the rotating speed sensor, the clutch mechanism, the flywheel and the controller are arranged in the shell, the four regulating knobs, the power switch, the power interface and the RS485 interface are arranged on the shell, the RS485 interface is connected with an upper computer, and the upper computer is arranged outside the shell;
the controller is electrically connected with the four regulating knobs and used for regulating and controlling parameters of the rotating speed; the clutch mechanism comprises a clutch deflector rod, a connecting gear, a shaft in the clutch mechanism, a bearing in the clutch mechanism and a sliding gear, wherein one end of the shaft in the clutch mechanism is fixed on the connecting gear through the bearing, and the other end of the shaft in the clutch mechanism penetrates through the sliding gear and the flywheel and is fixed on the shell through the bearing; the output shaft of the motor is connected with the gear, the gear is fixedly connected with the connecting gear, the clutch deflector rod is used for controlling the separation and the engagement of the sliding gear and the connecting gear of the clutch mechanism, and the flywheel on the shaft of the clutch mechanism is used for simulating the load of the motor during actual working;
the controller measures the rotation speed of the gear through the rotation speed sensor so as to obtain the rotation speed of the motor; the controller is connected with the motor;
the controller is connected with the upper computer through the RS485 interface.
Further, the controller comprises a singlechip minimum system, a power supply voltage stabilizing module, an RS485 communication module, an RC filtering module, a rotating speed signal conditioning module and a motor rotating speed control full-bridge circuit module.
Further, the controller transmits various state values in the controller, including a required rotating speed, an actual rotating speed, a duty ratio, a power supply voltage, a P value, an I value, a D value and a control frequency T, to an upper computer, and receives signals sent to the controller by the upper computer, including coefficients and basic value information of whether the signals are calibration experiments, duty ratio setting, speed setting and P, I, D, T values.
Furthermore, the value of the adjustment parameter P, I, D, T is jointly controlled by four adjusting knobs and an upper computer, so that different adjustment accuracies are realized, the parameter P, I, D is adjusted and controlled to adjust the variation of the PWM duty ratio, and the value T is adjusted and controlled, namely the frequency F is controlled to adjust the variation rate of the PWM duty ratio.
A method for using a motor rotating speed control teaching experiment table comprises the following steps of:
step 1), turning on a power switch, disconnecting a gear and a flywheel through a clutch deflector rod, and connecting an experiment table and an upper computer through an RS485 interface;
step 2), writing the preset duty ratio of the first PWM into an upper computer as the duty ratio of the PWM which needs to be calibrated and controls the rotating speed of the motor;
step 3), transmitting a control signal in the upper computer to a controller through an RS485 interface, and controlling the motor to rotate;
and step 4), data acquisition is carried out, and the acquisition method comprises the following steps:
step 4.1), the controller conditions and calculates pulse signals acquired by the rotating speed sensor to obtain a rotating speed value of the motor;
step 4.2), the controller transmits the obtained motor rotating speed value to an upper computer through an RS485 interface;
step 4.3), recording the duty ratio of PWM (pulse-width modulation) for controlling the rotating speed of the motor to be recorded and the rotating speed value of the motor acquired by the rotating speed sensor as a group of data in an upper computer;
step 5), after the operation of increasing five percent of the duty ratio of the PWM for controlling the rotating speed of the motor at present, writing the duty ratio into an upper computer as the duty ratio to be recorded;
and 6), transmitting the duty ratio of the PWM for controlling the rotating speed of the motor in the upper computer to the controller through the RS485 interface, and controlling the motor to rotate.
Step 7), data acquisition is carried out;
step 8), repeatedly executing the steps 5) to 7) until the duty ratio is equal to the preset duty ratio of the second PWM;
step 9), writing the preset duty ratio of the second PWM into an upper computer as the duty ratio of the PWM which needs to be calibrated and controls the rotating speed of the motor;
step 10), transmitting the duty ratio of PWM (pulse-width modulation) for controlling the rotating speed of the motor in the upper computer to a controller through an RS485 interface, and controlling the motor to rotate;
step 11), data acquisition is carried out;
step 12), after the duty ratio of the PWM for controlling the rotating speed of the motor at present is reduced by five percent, the duty ratio is written into an upper computer as the duty ratio to be recorded;
and step 13), transmitting the duty ratio of PWM (pulse-width modulation) for controlling the rotating speed of the motor in the upper computer to the controller through the RS485 interface, and controlling the motor to rotate.
Step 14), data acquisition is carried out;
step 15), repeatedly executing the steps 11) to 14) until the duty ratio is equal to the preset duty ratio of the first PWM;
step 16), writing the preset duty ratio of the first PWM into an upper computer as the duty ratio of the PWM which needs to be calibrated and controls the rotating speed of the motor;
step 17), the duty ratio of the PWM for controlling the rotating speed of the motor in the upper computer is transmitted to the controller through the RS485 interface, and the motor is controlled to rotate;
step 18), data acquisition is carried out;
step 19) turning off a power switch of the experiment table, and disconnecting a power interface to stop the experiment table;
and 20) averaging the motor rotating speeds corresponding to the same duty ratio in all the recorded data, and drawing a duty ratio-rotating speed value curve chart.
A method for using a motor rotating speed control teaching experiment table comprises the following steps of:
step 1), switching on a power supply of the experiment table through a power switch, connecting the experiment table with an upper computer through an RS485 interface, and engaging a gear with a flywheel through a clutch deflector rod;
step 2), writing the slope of the data fitting curve obtained after recording into a controller through an upper computer;
step 3), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value as an initial rotating speed value, adjusting a proportional control link parameter P and a control frequency parameter T of a PID parameter of a control system through rotating an adjusting knob and adjusting an upper computer interface control parameter, and setting an initial adjusting and controlling parameter value;
step 4), writing a preset second required rotating speed value serving as a motor rotating speed value required to be obtained into the controller through the upper computer, and observing a motor rotating speed transient response curve under the step input of the required rotating speed through an upper computer interface;
step 5), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and adjusting a proportional control link parameter P and a control frequency parameter T of a PID parameter of a control system by rotating a regulating knob and adjusting an upper computer interface control parameter;
step 6), continuously repeating the steps 4) to 5) until critical oscillation occurs to the input step response of the system, and recording the proportional control link parameter P, the control frequency parameter T and the critical oscillation period;
step 7), adjusting an integral control link parameter I of a PID parameter of a control system by rotating the adjusting knob and adjusting an upper computer interface control parameter to stabilize the rotating speed of the motor at a preset second rotating speed value as an initial value of I;
step 8), directly setting the duty ratio of PWM through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, and recovering the initial rotating speed value;
step 9), writing a preset second required rotating speed value serving as a motor rotating speed value required to be obtained into the controller through the upper computer, and observing a motor rotating speed transient response curve under the step input of the required rotating speed through an upper computer interface;
step 10), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and adjusting a proportional control link parameter P, a control frequency parameter T and an integral control link parameter I of a PID parameter of a control system by rotating an adjusting knob and adjusting an upper computer interface control parameter;
step 11), continuously repeating the steps 9) to 10) until the system can quickly and stably keep at a set second rotating speed value finally according to the input step response, and recording a proportional control link parameter P, a control frequency parameter T and an integral control link parameter I at the moment;
step 12), directly setting the duty ratio of PWM through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and inputting a differential control link parameter D of a PID parameter of a smaller control system as an initial value of D by rotating a regulating knob and adjusting an upper computer interface control parameter;
step 13), writing a preset second required rotating speed value serving as a motor rotating speed value required to be obtained into the controller through the upper computer, and observing a motor rotating speed transient response curve under the step input of the required rotating speed through an upper computer interface;
step 14), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and adjusting a proportional control link parameter P, a control frequency parameter T, an integral control link parameter I and a differential control link parameter D of a PID parameter of a control system by rotating a regulating knob and adjusting an upper computer interface control parameter;
step 15), continuously repeating the steps 13) to 14), so that the rotating speed of the motor can be quickly and accurately stabilized at a second rotating speed value under the rotating speed step input, and the overshoot is small;
and step 16), adjusting the control frequency parameter T of the control system by rotating the adjusting knob and adjusting the interface control parameter of the upper computer, and observing the transient response curve of the system under the step input of the rotating speed to deepen the understanding of the control frequency parameter T.
Has the advantages that:
the motor rotating speed control teaching experiment table and the use method thereof can observe the hardware structure of the system, deepen the understanding of the parameter setting of the control system by combining theory and actual operation, have strong regulation and control capability, are quick in response, are convenient to maintain and have simple structures.
On the basis of PID control, control on control frequency is added, so that a controlled system can quickly and stably achieve the desired control effect; the size of the control parameter is adjusted through the combination of the four adjusting knobs and the upper computer, so that the high-precision control of the parameter can be realized in a wider range, and the understanding of the combined control of the upper computer and the controller can be deepened; the control parameters and the rotating speed information are displayed in real time through an upper computer interface, so that the control effect is clearer and more clear; the invention can measure the rotating speed change curve of the motor under different control signals when the motor works in no-load, and the motor can quickly and stably reach the required rotating speed from a certain rotating speed when the motor is loaded by rotating different regulating buttons.
The rotating speed control mode is that the controller controls the duty ratio of PWM of the motor control signal, the difference value between the actual rotating speed and the set rotating speed in the regulation mode is used as the input of PID control, the duty ratio of the PWM is used as the output of the PID control, and simultaneously, because the motor responds sensitively, the controller control frequency is higher, and in the single PID control process, the motor can respond quickly, but the rotating speed fluctuates greatly and cannot be stabilized at the set rotating speed, so the invention adds the regulation of a control frequency parameter T on the basis of the traditional PID control to control the change rate of the PWM duty ratio.
Drawings
FIG. 1 is a schematic structural view of the present invention;
FIG. 2 is a schematic view of the structure of the gear, clutch mechanism and flywheel of the present invention;
FIG. 3 is a schematic diagram of the principle of controlling the rotational speed according to the present invention;
FIG. 4 is a schematic view of a monitoring interface of the upper computer in the present invention;
FIG. 5 is a plot of the duty cycle and motor speed as fitted to the data recorded in one embodiment of the present invention;
FIG. 6 is a speed response curve for optimal regulation under a speed step requirement according to an embodiment of the present invention, where P is 0.01; i is 0.00015; d is 0.00005; controlling the frequency: 25 Hz;
in fig. 1 and 2, a 1-RS485 interface is connected with an upper computer; 2-a controller; d regulating knob in 3-PID; 4-I regulation knob in PID; 5-P regulation knob in PID; 6-time regulating knob; 7-a motor; 8-gear; 9-a rotation speed sensor; 10-clutch deflector rod; 11-a housing; 12-a flywheel; 13-a power switch; 14-a motor output shaft; 15-connecting gear in clutch mechanism; 16-a shaft in the clutch mechanism, wherein the right end of the shaft is fixed on a connecting gear in the clutch mechanism through a bearing, and the left end of the shaft is fixed on a shell through a bearing; 17-bearings in the clutch mechanism; 18-slip gear in clutch mechanism.
Detailed Description
The invention is further explained below with reference to the drawings.
As shown in fig. 1, fig. 2 and fig. 3, the invention discloses a motor rotation speed control teaching experiment table, which comprises a motor 7, a gear 8, a rotation speed sensor 9, a clutch mechanism, a shell 11, a flywheel 12, a controller 2, four regulating knobs, a power supply, an RS485 interface 1 and an upper computer, wherein the four regulating knobs are respectively a D regulating knob 3 in a PID, an I regulating knob 4 in the PID, a P regulating knob 5 in the PID and a time regulating knob 6, and the power supply comprises a power switch 13 and a power supply interface;
the motor 7, the gear 8, the rotating speed sensor 9, the clutch mechanism, the flywheel 12 and the controller 2 are arranged in the shell, the four regulating knobs, the power switch 13, the power interface and the RS485 interface 1 are arranged on the shell, the RS485 interface 1 is connected with an upper computer, and the upper computer is arranged outside the shell;
the controller 2 is electrically connected with the four regulating knobs and used for regulating and controlling parameters of the rotating speed; the clutch mechanism comprises a clutch shift lever 10, a connecting gear 15, a shaft 16 in the clutch mechanism, a bearing 17 in the clutch mechanism and a sliding gear 18, wherein one end of the shaft 16 in the clutch mechanism is fixed on the connecting gear 15 through the bearing, and the other end of the shaft passes through the sliding gear 18 and the flywheel 12 and is fixed on the shell through the bearing 17; an output shaft 14 of the motor 7 is connected with a gear 8, the gear 8 is fixedly connected with a connecting gear 15, the clutch shift lever 10 is used for controlling the separation and the engagement of a sliding gear 18 and the connecting gear 15 of the clutch mechanism, and a flywheel on a shaft of the clutch mechanism is used for simulating the load of the motor during actual working;
the controller measures the rotating speed of the gear 8 through a rotating speed sensor 9 so as to obtain the rotating speed of the motor; the controller is connected with the motor;
the controller is connected with the upper computer through the RS485 interface.
The controller comprises a singlechip minimum system, a power supply voltage stabilizing module, an RS485 communication module, an RC filtering module, a rotating speed signal conditioning module and a motor rotating speed control full-bridge circuit module.
The controller transmits various state values in the controller, including a required rotating speed, an actual rotating speed, a duty ratio, a power supply voltage, a P value, an I value, a D value and a control frequency T to an upper computer, and receives signals sent to the controller by the upper computer, including coefficients and basic value information of whether a calibration experiment, duty ratio setting, speed setting and P, I, D, T values are carried out.
The rotating speed control mode is that the controller controls the PWM duty ratio of the rotating speed signal of the motor, and the regulation mode is that the change of control parameters is changed through four regulation knobs, wherein the first regulation knob, the second regulation knob and the third regulation knob control the change of PID parameters, and the fourth regulation knob controls the change of control frequency parameters; and controlling the change rate of the frequency regulation PWM duty ratio according to the change quantity of the PID regulation PWM duty ratio.
The upper computer is used for recording data; the shell is made of transparent plastic; the upper computer adopts a PC; the rotating speed sensor adopts a magnetoelectric rotating speed sensor; the motor is a direct current motor; the singlechip is electrically connected with a USB interface of the PC through an RS485 communication interface to complete the communication between the singlechip and the upper computer.
The invention also discloses a teaching test bed based on the motor rotating speed control, which is used for drawing a rotating speed change curve during no-load, and comprises the following steps:
step 1), turning on a power switch, disconnecting a gear and a flywheel through a clutch deflector rod, and connecting an experiment table and an upper computer through an RS485 interface;
step 2), writing the preset duty ratio of the first PWM into an upper computer as the duty ratio of the PWM which needs to be calibrated and controls the rotating speed of the motor;
step 3), transmitting a control signal in the upper computer to a controller through an RS485 interface, and controlling the motor to rotate;
and step 4), data acquisition is carried out, and the acquisition method comprises the following steps:
step 4.1), the controller conditions and calculates pulse signals acquired by the rotating speed sensor to obtain a rotating speed value of the motor;
step 4.2), the controller transmits the obtained motor rotating speed value to an upper computer through an RS485 interface;
step 4.3), recording the duty ratio of PWM (pulse-width modulation) for controlling the rotating speed of the motor to be recorded and the rotating speed value of the motor acquired by the rotating speed sensor as a group of data in an upper computer;
step 5), after the operation of increasing five percent of the duty ratio of the PWM for controlling the rotating speed of the motor at present, writing the duty ratio into an upper computer as the duty ratio to be recorded;
and 6), transmitting the duty ratio of the PWM for controlling the rotating speed of the motor in the upper computer to the controller through the RS485 interface, and controlling the motor to rotate.
Step 7), data acquisition is carried out;
step 8), repeatedly executing the steps 5) to 7) until the duty ratio is equal to a preset second PWM duty ratio;
step 9), writing the preset duty ratio of the second PWM into an upper computer as the duty ratio of the PWM which needs to be calibrated and controls the rotating speed of the motor;
step 10), transmitting the duty ratio of PWM (pulse-width modulation) for controlling the rotating speed of the motor in the upper computer to a controller through an RS485 interface, and controlling the motor to rotate;
step 11), data acquisition is carried out;
step 12), after the duty ratio of the PWM for controlling the rotating speed of the motor at present is reduced by five percent, the duty ratio is written into an upper computer as the duty ratio to be recorded;
and step 13), transmitting the duty ratio of PWM (pulse-width modulation) for controlling the rotating speed of the motor in the upper computer to the controller through the RS485 interface, and controlling the motor to rotate.
Step 14), data acquisition is carried out;
step 15), repeatedly executing the steps 11) to 14) until the duty ratio is equal to a preset first duty ratio;
step 16), writing the preset duty ratio of the first PWM into an upper computer as the duty ratio of the PWM which needs to be calibrated and controls the rotating speed of the motor;
step 17), the duty ratio of the PWM for controlling the rotating speed of the motor in the upper computer is transmitted to the controller through the RS485 interface, and the motor is controlled to rotate;
step 18), data acquisition is carried out;
step 19) turning off a power switch of the experiment table, and disconnecting a power interface to stop the experiment table;
and 20) averaging the motor rotating speeds corresponding to the same duty ratio in all the recorded data, and drawing a duty ratio-rotating speed value curve chart.
The invention also discloses a method for controlling the rotating speed required by the regulating and controlling motor based on the motor rotating speed control teaching test bed, which comprises the following steps:
step 1), switching on a power supply of the experiment table through a power switch, connecting the experiment table with an upper computer through an RS485 interface, and engaging a gear with a flywheel through a clutch deflector rod;
step 2), writing the slope of the data fitting curve obtained after recording into a controller through an upper computer;
step 3), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value as an initial rotating speed value, adjusting a proportional control link parameter P and a control frequency parameter T of a PID parameter of a control system through rotating an adjusting knob and adjusting an upper computer interface control parameter, and setting an initial adjusting and controlling parameter value;
step 4), writing a preset second required rotating speed value serving as a motor rotating speed value required to be obtained into the controller through the upper computer, and observing a motor rotating speed transient response curve under the step input of the required rotating speed through an upper computer interface;
step 5), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and adjusting a proportional control link parameter P and a control frequency parameter T of a PID parameter of a control system by rotating a regulating knob and adjusting an upper computer interface control parameter;
step 6), continuously repeating the steps 4) to 5) until critical oscillation occurs to the input step response of the system, and recording the proportional control link parameter P, the control frequency parameter T and the critical oscillation period;
step 7), adjusting an integral control link parameter I of a PID parameter of a control system by rotating the adjusting knob and adjusting an upper computer interface control parameter to stabilize the rotating speed of the motor at a preset second rotating speed value as an initial value of I;
step 8), directly setting the duty ratio of PWM through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, and recovering the initial rotating speed value;
step 9), writing a preset second required rotating speed value serving as a motor rotating speed value required to be obtained into the controller through the upper computer, and observing a motor rotating speed transient response curve under the step input of the required rotating speed through an upper computer interface;
step 10), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and adjusting a proportional control link parameter P, a control frequency parameter T and an integral control link parameter I of a PID parameter of a control system by rotating an adjusting knob and adjusting an upper computer interface control parameter;
step 11), continuously repeating the steps 9) to 10) until the system can quickly and stably keep at a set second rotating speed value finally according to the input step response, and recording a proportional control link parameter P, a control frequency parameter T and an integral control link parameter I at the moment;
step 12), directly setting the duty ratio of PWM through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and inputting a differential control link parameter D of a PID parameter of a smaller control system as an initial value of D by rotating a regulating knob and adjusting an upper computer interface control parameter;
step 13), writing a preset second required rotating speed value serving as a motor rotating speed value required to be obtained into the controller through the upper computer, and observing a motor rotating speed transient response curve under the step input of the required rotating speed through an upper computer interface;
step 14), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and adjusting a proportional control link parameter P, a control frequency parameter T, an integral control link parameter I and a differential control link parameter D of a PID parameter of a control system by rotating a regulating knob and adjusting an upper computer interface control parameter;
step 15), continuously repeating the steps 13) to 14), so that the rotating speed of the motor can be quickly and accurately stabilized at a second rotating speed value under the rotating speed step input, and the overshoot is small;
and step 16), adjusting the control frequency parameter T of the control system by rotating the adjusting knob and adjusting the interface control parameter of the upper computer, and observing the transient response curve of the system under the step input of the rotating speed to deepen the understanding of the control frequency parameter T.
In the embodiment shown in fig. 4, the upper computer interface includes three modules, namely an initialization module, a display module and a control module. The initialization module is used for initializing when an experiment starts, the serial port switch is opened and used for opening and closing the serial port, the calibration switch is used for selecting to carry out a calibration experiment or a speed regulation experiment, the record data switch is used for recording data in the experiment process, and the stop switch is used for closing the whole experiment. The method comprises the steps of firstly inputting an experiment name, selecting a correct port number and a correct baud rate, opening a serial port, recording data, and selecting a calibration experiment or a speed regulation experiment. The display module is used for displaying various data and real-time rotating speed change curves in the experimental process, so that the setting process is clear, and the understanding of the speed regulation process is deepened. The control module is used for adjusting various control parameters in the experiment process, the duty ratio setting is used for directly setting the duty ratio for controlling the rotating speed of the motor in the calibration experiment, and the setting is finished by setting a basic proportionality coefficient through the proportionality coefficient; other buttons are used for speed regulation experiments, wherein speed setting is used for setting target rotating speed, P value setting, I value setting, D value setting and T value setting are used for adjusting control parameters, and the control is more refined and quicker through the value of a rotating button on a zooming controller.
TABLE 1
Table 1 shows a set of data recorded during experiments, and fig. 5 is a curve of a duty cycle-rotation speed fitting graph according to an embodiment, which is specifically implemented as follows: the motor modeling curve fitting method adopts a least square method, and makes a motor modeling curve equation be a linear equation: y ═ C + KX. Wherein X is the input value of the corresponding modeling, namely the duty ratio of the control motor, Y is the modeling engineering value, namely the rotating speed value of the motor, K is the slope of the linear equation, and C is the intercept of the linear equation. The calculation formula of K and C obtained by the least square method is respectively as follows:
where N is the total number of modeling points, i is 1,2, … …, N.
The non-linearity is utilized to characterize the no-load characteristic of the motor. The inconsistency between the actual working curve of the motor and the theoretical fitting straight line is reflected, and the inconsistency is defined as the percentage of the maximum deviation of the actual working curve to the theoretical fitting straight line and the output full scale of the motor, namely
As can be seen from fig. 5, the actual working curve is a thick solid line with a square frame, the theoretical fitting straight line is a dotted line, the theoretical fitting curve equation is that y is 40.077x, x is the duty ratio of the control signal, y is the actual rotation speed of the motor, the proportional coefficient is 40, the distance between the actual working curve and the theoretical fitting curve is the maximum when the duty ratio is 55%, and the linearity is calculated by taking the value:
therefore, a no-load experiment of the motor is completed, a functional relation between input and output of the control signal when the motor is unloaded is found, and the nonlinearity is 3.16% in the experimental example, which shows that the linearity of the motor is good when the motor is unloaded.
In the motor control process, the controller receives the duty ratio sent by the upper computer, and the motor is controlled through the motor rotating speed full-bridge circuit after identification.
The specific implementation of the setting process of the duty ratio of the PWM for controlling the rotating speed of the motor is as follows: the control process adopts a combined control mode of the variable quantity of the PWM duty ratio and the change rate of the PWM duty ratio.
The variable quantity of the PWM duty ratio adopts a classical PID control method, and the equation is as follows:
ΔU(k)=Kp×(err(k)-err(k-1))+Ki×err(k)+Kd×(err(k)-2×err(k-1)+err(k-2))
wherein err (K) is an error value obtained by subtracting the actual rotating speed value from the required rotating speed value sent by the upper computer received by the controller at the current moment, err (K-1) is an error value obtained by subtracting the actual rotating speed value from the required rotating speed value sent by the upper computer received by the controller at the previous moment, err (K-2) is an error value obtained by subtracting the actual rotating speed value from the required rotating speed value sent by the upper computer received by the controller at the previous moment, and K is a time value obtained by subtracting the actual rotating speed value from the required rotating speed value sent by thepValue, KiValue, KdThe values are respectively obtained through a mode of combined control of a regulating knob and an upper computer interface, and the combined mode is that y is equal to aAnd x + b, wherein the acquisition mode is that the controller reads the voltage value of the regulating knob, the voltage value is converted into digital quantity through A/D conversion, namely x, the coefficient a and the basic value b are input through an upper computer interface, and the final value y is obtained through calculation.
The change rate of the PWM duty ratio is the number of times of PWM duty ratio change for controlling the rotation speed of the motor in a unit time, and is the adjustment frequency of the duty ratio to be changed in the speed regulation process, for example, 10 times per second or 20 times per second. If the change rate is not well set, the motor is easy to lose control, and the change rate is not adjusted in the prior control. The P value in the PID is directly related to the change of the variable quantity, the P value is too small, the setting process is too slow, the speed regulating process is too slow, the P value is too large, the overshoot appears in the setting process, and the runaway and the out-of-control of the motor are easily appeared in the speed regulation. By adding the control (T) of the setting frequency, the motor can be prevented from running away and being out of control, and the requirement of rotating speed step change can be realized more quickly and stably. The method comprises the steps of obtaining the voltage value of a regulation knob through a regulation knob and an upper computer interface in a combined control mode, wherein the combined mode is that y is ax + b, the voltage value of the regulation knob is read by a controller, the voltage value is converted into digital quantity, namely x, through A/D conversion, a coefficient a and a basic value b are input through an upper computer interface, and a final value y, namely the control quantity for controlling the frequency regulation parameter, is obtained through calculation.
Fig. 6 shows a change curve of the motor speed under the requirement of the step of the motor speed in the example, which realizes that the motor speed can be smoothly and rapidly changed from 1000r/min to 2200r/min under the requirement of the step of the motor speed by controlling different parameters. The abscissa is the number of acquisition points of the rotating speed signal, the rotating speed signal acquisition mode triggers the rotating speed sensor once for each tooth, and finally the rotating speed is converted by the time consumed by one rotation.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (1)
1. The application method of the motor rotating speed control teaching experiment table is characterized in that the motor rotating speed control teaching experiment table comprises a motor (7), a gear (8), a rotating speed sensor (9), a clutch mechanism, a shell (11), a flywheel (12), a controller (2), four regulating knobs, a power supply, an RS485 interface (1) and an upper computer, wherein the four regulating knobs are respectively a D regulating knob (3) in a PID, an I regulating knob (4) in the PID, a P regulating knob (5) in the PID and a time regulating knob (6), and the power supply comprises a power switch (13) and a power supply interface;
the motor (7), the gear (8), the rotating speed sensor (9), the clutch mechanism, the flywheel (12) and the controller (2) are arranged in the shell, the four regulating knobs, the power switch (13), the power interface and the RS485 interface (1) are arranged on the shell, the RS485 interface (1) is connected with an upper computer, and the upper computer is arranged outside the shell;
the controller (2) is electrically connected with the four regulating knobs and used for regulating and controlling parameters of the rotating speed; the clutch mechanism comprises a clutch deflector rod (10), a connecting gear (15), a shaft (16) in the clutch mechanism, a bearing (17) in the clutch mechanism and a sliding gear (18), one end of the shaft (16) in the clutch mechanism is fixed on the connecting gear (15) through the bearing, and the other end of the shaft (16) penetrates through the sliding gear (18) and the flywheel (12) and is fixed on the shell through the bearing (17); an output shaft (14) of the motor (7) is connected with a gear (8), the gear (8) is fixedly connected with a connecting gear (15), the clutch deflector rod (10) is used for controlling the separation and the engagement of a sliding gear (18) and the connecting gear (15) of the clutch mechanism, and a flywheel on a shaft of the clutch mechanism is used for simulating the load of the motor during actual working;
the controller measures the rotating speed of the gear (8) through a rotating speed sensor (9) to further obtain the rotating speed of the motor; the controller is connected with the motor;
the controller is connected with the upper computer through the RS485 interface;
the controller comprises a singlechip minimum system, a power supply voltage stabilizing module, an RS485 communication module, an RC filtering module, a rotating speed signal conditioning module and a motor rotating speed control full-bridge circuit module;
the controller transmits various state values in the controller, including a required rotating speed, an actual rotating speed, a duty ratio, a power supply voltage, a P value, an I value, a D value and a control frequency T to an upper computer, and receives signals sent to the controller by the upper computer, including coefficients and basic value information of whether a calibration experiment, duty ratio setting, speed setting and P, I, D, T values are carried out;
the value of the adjustment parameter P, I, D, T is jointly controlled by four adjusting knobs and an upper computer to realize different adjustment accuracies, P, I, D parameters are adjusted to adjust the variable quantity of the PWM duty ratio, and T value is adjusted to control frequency F to adjust the change rate of the PWM duty ratio;
the method for regulating and controlling the required rotating speed comprises the following steps:
step 1), switching on a power supply of the experiment table through a power switch, connecting the experiment table with an upper computer through an RS485 interface, and engaging a gear with a flywheel through a clutch deflector rod;
step 2), writing the slope of the data fitting curve obtained after recording into a controller through an upper computer;
step 3), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value as an initial rotating speed value, adjusting a proportional control link parameter P and a control frequency parameter T of a PID parameter of a control system through rotating an adjusting knob and adjusting an upper computer interface control parameter, and setting an initial adjusting and controlling parameter value;
step 4), writing a preset second required rotating speed value serving as a motor rotating speed value required to be obtained into the controller through the upper computer, and observing a motor rotating speed transient response curve under the step input of the required rotating speed through an upper computer interface;
step 5), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and adjusting a proportional control link parameter P and a control frequency parameter T of a PID parameter of a control system by rotating a regulating knob and adjusting an upper computer interface control parameter;
step 6), continuously repeating the steps 4) to 5) until critical oscillation occurs to the input step response of the system, and recording the proportional control link parameter P, the control frequency parameter T and the critical oscillation period;
step 7), adjusting an integral control link parameter I of a PID parameter of a control system by rotating the adjusting knob and adjusting an upper computer interface control parameter to stabilize the rotating speed of the motor at a preset second rotating speed value as an initial value of I;
step 8), directly setting the duty ratio of PWM through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, and recovering the initial rotating speed value;
step 9), writing a preset second required rotating speed value serving as a motor rotating speed value required to be obtained into the controller through the upper computer, and observing a motor rotating speed transient response curve under the step input of the required rotating speed through an upper computer interface;
step 10), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and adjusting a proportional control link parameter P, a control frequency parameter T and an integral control link parameter I of a PID parameter of a control system by rotating an adjusting knob and adjusting an upper computer interface control parameter;
step 11), continuously repeating the steps 9) to 10) until the system can quickly and stably keep at a set second rotating speed value finally according to the input step response, and recording a proportional control link parameter P, a control frequency parameter T and an integral control link parameter I at the moment;
step 12), directly setting the duty ratio of PWM through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and inputting a differential control link parameter D of a PID parameter of a smaller control system as an initial value of D by rotating a regulating knob and adjusting an upper computer interface control parameter;
step 13), writing a preset second required rotating speed value serving as a motor rotating speed value required to be obtained into the controller through the upper computer, and observing a motor rotating speed transient response curve under the step input of the required rotating speed through an upper computer interface;
step 14), directly setting the duty ratio of PWM in the controller through an upper computer interface, controlling the rotating speed of the motor at a preset first required rotating speed value, recovering an initial rotating speed value, and adjusting a proportional control link parameter P, a control frequency parameter T, an integral control link parameter I and a differential control link parameter D of a PID parameter of the control system by rotating a regulating knob and adjusting an upper computer interface control parameter;
step 15), continuously repeating the steps 13) to 14), so that the rotating speed of the motor can be quickly and accurately stabilized at a second rotating speed value under the rotating speed step input, and the overshoot is small;
and step 16), adjusting the control frequency parameter T of the control system by rotating the adjusting knob and adjusting the interface control parameter of the upper computer, and observing the transient response curve of the system under the step input of the rotating speed to deepen the understanding of the control frequency parameter T.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910214984.6A CN109932895B (en) | 2019-03-19 | 2019-03-19 | Motor rotation speed control teaching experiment table and use method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910214984.6A CN109932895B (en) | 2019-03-19 | 2019-03-19 | Motor rotation speed control teaching experiment table and use method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109932895A CN109932895A (en) | 2019-06-25 |
CN109932895B true CN109932895B (en) | 2020-10-20 |
Family
ID=66987800
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910214984.6A Active CN109932895B (en) | 2019-03-19 | 2019-03-19 | Motor rotation speed control teaching experiment table and use method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109932895B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112091898B (en) * | 2020-08-07 | 2022-06-17 | 惠州拓邦电气技术有限公司 | Electric hammer control method and electric hammer |
CN116208031A (en) * | 2023-03-03 | 2023-06-02 | 湖北惠洋电器制造有限公司 | BLDC motor rotating speed control method |
CN116449688B (en) * | 2023-06-19 | 2023-10-31 | 深圳市大族机器人有限公司 | Robot motor PID parameter determination method, device and computer equipment |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102062696B (en) * | 2010-12-17 | 2012-01-25 | 湖北三环离合器有限公司 | Multifunctional simulation test bed for auto clutch |
CN102332223B (en) * | 2011-09-25 | 2014-06-25 | 北京理工大学 | Teaching experiment system based on alternating-current motor driving control method |
CN203225046U (en) * | 2013-04-17 | 2013-10-02 | 长安大学 | Electromechanical system PID automatic control experiment teaching platform based on single chip microcomputer |
CN105207531B (en) * | 2015-09-11 | 2018-01-02 | 厦门唯科健康科技有限公司 | A kind of motor soft start method |
KR20180075341A (en) * | 2016-12-26 | 2018-07-04 | 부산대학교 산학협력단 | Architectural 3D Printer simulator Nozzle Control using PID Controller |
CN106997705A (en) * | 2017-04-17 | 2017-08-01 | 南京航空航天大学 | A kind of gas pressure sensor demarcation teaching experimental base and its scaling method |
-
2019
- 2019-03-19 CN CN201910214984.6A patent/CN109932895B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109932895A (en) | 2019-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109932895B (en) | Motor rotation speed control teaching experiment table and use method thereof | |
US3826887A (en) | Simplified procedure for tuning pid controllers | |
CN102142800B (en) | Stage synchronous lift control system and method | |
CN106094510B (en) | A kind of pid parameter adjusting method based on interference inverter | |
CN108196442A (en) | Steering gear control system and method based on fuzzy neural PID control and absolute encoder | |
CN109541935B (en) | Parameter adaptive fractional order active disturbance rejection automatic power generation control method | |
CN105182744B (en) | Anti-interference control method for nanometer positioning system | |
CN105911862B (en) | A kind of temperature Control of Electric Heater method | |
Meenakshipriya et al. | Modelling and control of ball and beam system using coefficient diagram method (CDM) based PID controller | |
CN104122795A (en) | Novel extremal function index based intelligent self-turning PID (Proportion Integration Differentiation) indoor temperature control algorithm | |
CN105227035A (en) | A kind of permanent-magnetism linear motor control method | |
CN104331113A (en) | High-precision numerically-controlled constant current source | |
CN109162878A (en) | A kind of intelligent blade of wind driven generator investigating method and its system | |
CN115993778A (en) | Fuzzy control method and device for temperature control system of high-low temperature test chamber | |
CN105262405B (en) | Closed loop disturbance observation compensation method for servomotor electric current loop | |
CN102790584B (en) | A kind of servo drive system and speed ring parameter tuning system thereof | |
CN109686516A (en) | The continuous potentiometer of number | |
EP0783730B1 (en) | Non-linear control system for a single input-single output process | |
CN108468616B (en) | Speed regulator proportional valve neutral position adjusting method based on static balance of hydraulic servo system | |
CN106569406B (en) | Method for rapidly identifying model parameters of brush direct-current motor based on scale transformation | |
CN108880366B (en) | Control method of torque loading controller of reduction gearbox test bed | |
CN104238359B (en) | A kind of large-scale electromechanical mixing inertia system control method | |
CN108132597B (en) | Design method of differential advanced intelligent model set PID controller | |
CN109791395A (en) | The adjusting device of controllability with performance of control | |
CN102385154B (en) | Electrical control device for DC motor type force actuator |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |