CN104518716A - Closed loop control system for miniature direct current motor and control method for system - Google Patents

Closed loop control system for miniature direct current motor and control method for system Download PDF

Info

Publication number
CN104518716A
CN104518716A CN201410848814.0A CN201410848814A CN104518716A CN 104518716 A CN104518716 A CN 104518716A CN 201410848814 A CN201410848814 A CN 201410848814A CN 104518716 A CN104518716 A CN 104518716A
Authority
CN
China
Prior art keywords
motor
unit
status word
parameter
reset
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
CN201410848814.0A
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.)
Heilongjiang University
Original Assignee
Heilongjiang University
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 Heilongjiang University filed Critical Heilongjiang University
Priority to CN201410848814.0A priority Critical patent/CN104518716A/en
Publication of CN104518716A publication Critical patent/CN104518716A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a closed loop control system for a miniature direct current motor and a control method for the system, relates to a miniature direct current motor control technology, and aims to solve the problem of poor stability of control of a conventional miniature direct current motor control system over a direct current motor. In terms of hardware, a C8051F040 single-chip microcomputer is adopted as a controller, an LM629 module is adopted as a motion control processor, an L6203 chip is adopted as a motor driving circuit; in terms of software, a PID control algorithm is fused with a PWM direct current pulse width motor control method; therefore, the control system has the advantages of low power consumption, high switching speed, great driving current and the like, has high reliability and setting following performance, and is suitable for control over the miniature direct current motor.

Description

The control method of a kind of small-sized DC motor closed-loop control system and this system
Technical field
The present invention relates to small-sized DC motor control technology.
Background technology
Direct current machine has good starting and braking performance, is easy to stepless speed control on a large scale, is widely used in speed governing or Electric Traction field forward and reverse fast in many needs.And DC motor control system in theory with all comparative maturity in practice, from certain angle, be also the basis of AC Motor Control.In most automatic control system, the control of direct current machine all belongs to the part on basis, such as in the motion control of dolly, the walking, the opening and closing of valve, the motion of mechanical arm etc. of robot, has the figure of motor.But current small-sized DC motor control technology, to stable not to the control of direct current machine, cannot reach required requirement.
Summary of the invention
The object of the invention is, in order to solve existing small-sized DC motor control system to the stable not problem of the control of direct current machine, to provide the control method of a kind of small-sized DC motor closed-loop control system and this system.
A kind of small-sized DC motor closed-loop control system of the present invention comprises controller, power module, screen, motor-drive circuit, motion control processor and encoder; Described controller adopts C8051F040 chip microcontroller, and motion control processor adopts LM629 module to realize; Power module provides working power by 12V battery pack, and for being converted to by the 12V voltage signal of 12V battery pack output, 5V power supply is controller to power module, screen, motor-drive circuit, motion control processor and encoder provide working power; Controller is connected with motion control processor and screen; The code signal output of encoder connects motion control processor code signal input; The motor drive signal output of motion control processor connects the motor drive signal input of motor-drive circuit by photoelectrical coupler; Motor-drive circuit is for sending drive singal to motor;
Described motion control processor is embedded in the control module by software simulating, and this control module comprises with lower unit:
Reset unit: carry out hardware reset and interruption reset condition; And pid parameter reading unit is started after this unit end of run;
Pid parameter reading unit: read and store pid parameter; And filtering parameter updating block is started after this unit end of run;
Filtering parameter updating block: upgrade filter parameter according to pid parameter; And trajectory parameters reading unit is started after this unit end of run;
Trajectory parameters reading unit: read and storage track parameter; And motion control signal transmitting element is started after this unit end of run;
Motion control signal transmitting element: send motion control signal to motor-drive circuit, and start new motion determination unit after this unit end of run;
New motion determination unit: judge whether to receive the new motor message cue that controller is sent, and start pid parameter reading unit when judged result is for being, the operation of finishing control module when judged result is no.
The control method of said system comprises the following steps:
Reset process: carry out hardware reset and interruption reset condition; And pid parameter read step is performed after this step terminates;
Pid parameter read step: read and store pid parameter; And filtering parameter step of updating is performed after this step terminates;
Filtering parameter step of updating: upgrade filter parameter according to pid parameter; And trajectory parameters read step is performed after this step terminates;
Trajectory parameters read step: read and storage track parameter; And motion control signal forwarding step is performed after this step terminates;
Motion control signal forwarding step: send motion control signal to motor-drive circuit, and perform new motion determination step after this step terminates;
New motion determination step: judge whether to receive the new motor message cue that controller is sent, and perform pid parameter reading unit when judged result is for being, terminate this control method when judged result is no.
The control method of a kind of small-sized DC motor closed-loop control system of the present invention and this system, hardware adopt C8051F040 single-chip microcomputer as controller, adopt LM629 module as motion control processor, adopt L6203 chip as motor-drive circuit; Pid control algorithm and PWM DC pulse width are controlled motor method by software merge, make control system have the advantages such as low in energy consumption, switching speed is fast, drive current is large, and there is very high reliability and given followability.
Accompanying drawing explanation
Fig. 1 is the theory diagram of a kind of small-sized DC motor closed-loop control system described in execution mode one;
Fig. 2 is the flow chart of state-detection of " hurrying " in execution mode one;
Fig. 3 is the workflow diagram of control module in execution mode one;
Fig. 4 is the workflow diagram of reset unit in execution mode two;
Fig. 5 is the circuit diagram of power module in execution mode six;
Fig. 6 is the theory diagram of LM629 module in execution mode eight;
Fig. 7 is the circuit diagram of active crystal oscillator in execution mode nine;
Fig. 8 is the annexation circuit diagram of C8051F040 chip and LM629 module in execution mode one;
Fig. 9 is the oscillogram of three signals that in execution mode seven, encoder inputs to LM629 module;
Figure 10 is the full-bridge drive principle figure of L6203 chip internal in execution mode ten;
Figure 11 is the circuit diagram of motor-drive circuit in execution mode ten;
Figure 12 is the oscillogram of the modulation signal that in execution mode 11, LM629 module exports;
Figure 13 is the circuit diagram of optocoupler drive circuit in execution mode 11.
Embodiment
Embodiment one: composition graphs 1 to Fig. 3, Fig. 8 illustrate present embodiment, a kind of small-sized DC motor closed-loop control system described in present embodiment comprises controller 1, power module 2, screen 3, motor-drive circuit 4, motion control processor 5 and encoder 6; Described controller 1 adopts C8051F040 chip microcontroller, and motion control processor 5 adopts LM629 module to realize; Power module 2 provides working power by 12V battery pack, and power module 2 converts for 12V voltage signal 12V battery pack exported that 5V power supply is controller 1, screen 3, motor-drive circuit 4, motion control processor 5 and encoder 6 provide working power to; Controller 1 is connected with motion control processor 5 and screen 3; The code signal output of encoder 6 connects motion control processor 5 code signal input; The motor drive signal output of motion control processor 5 connects the motor drive signal input of motor-drive circuit 4 by photoelectrical coupler; Motor-drive circuit 4 is for sending drive singal to motor;
Described motion control processor 5 is embedded in by the control module of software simulating, and this control module comprises with lower unit:
Reset unit: carry out hardware reset and interruption reset condition; And pid parameter reading unit is started after this unit end of run;
Pid parameter reading unit: read and store pid parameter; And filtering parameter updating block is started after this unit end of run;
Filtering parameter updating block: upgrade filter parameter according to pid parameter; And trajectory parameters reading unit is started after this unit end of run;
Trajectory parameters reading unit: read and storage track parameter; And motion control signal transmitting element is started after this unit end of run;
Motion control signal transmitting element: send motion control signal to motor-drive circuit 4, and new motion determination unit is started after this unit end of run;
New motion determination unit: judge whether to receive the new motor message cue that controller 1 is sent, and start pid parameter reading unit when judged result is for being, the operation of finishing control module when judged result is no.
A kind of small-sized DC motor closed-loop control system described in present embodiment for making controller, carries out exchanges data with motion control processor 5 (LM629 module) with C8051F040 single-chip microcomputer.After motion control processor 5 receives instruction, make response, namely produce the pwm pulse of different duty.Motion control processor 5 is directly connected with the driver module of direct current machine and motor-drive circuit 4, can complete the control to the stable speed of direct current machine and direction like this.In addition, the power source of whole control system is 12V batteries, and 12V voltage transitions is 5V voltage by power module 2, is supplied to controller 1, screen 3, motor-drive circuit 4, motion control processor 5 and encoder 6.
C8051F040 single-chip microcomputer is the mixed signal SOC (system on a chip) of high integration, has by 64 of 8 bit port tissues digital I/O pins.All of the port can press bit addressing and byte addressing, all of the port pin all voltage of resistance to 5V by corresponding port data register, can be configured to open-drain or recommend the way of output and weak pull-up.
C8051F040 has a large amount of digital resources to need could be used by 4 low side I/O ports P0, P1, P2 and P3.Each pin in P0, P1, P2 and P3 both may be defined as general port I/O (GPIO) pin, can distribute to again a digital peripherals or function (such as: UART0 or/INT1).The I/O port of numerous species microprocessor is fixed as the service of certain specific function mostly now, and the 1/O port of this fixed form, had both taken too much pin, configured and underaction.And in C8051F040, then adopt traffic flow prediction to realize the flexible configuration of I/O port in hardware.In this I/O port system by crossbar configuration, single-chip microcomputer outside be general purpose I/O port, inner then pass through to configure corresponding register control crossbar configuration on selected port.Can the pin assignment of control figure function artificially, only by the restriction of usable pins number.No matter pin is assigned to a digital peripherals or as general purpose I/O, always can obtain the state of port I/O pin by reading corresponding data register.Port one, 2 and 3 pin can be used separately as the analog input of ADC2, analog comparator and ADC0.
CIP-51 and MCS-51 instruction set is completely compatible, therefore the assembler of standard MCS-51, compiler and software kit can be used to carry out software development, and this makes the engineers and technicians being familiar with MCS-51 series monolithic can grasp the application technology of C8051F easily and carry out software transplanting.C8051F adopts brand-new CIP-51 kernel, and instruction take clock cycle as run unit, and average each clock can perform 1 one-cycle instruction.Compared with 8051 initial single-chip microcomputers, under identical clock, the one-cycle instruction speed of service is original 12 times, and full instruction set average running speed is original 0.95 times.
C8051F040 single-chip microcomputer provides JTAG serial line interface, in-system programming can be carried out to FLASH program storage by this interface and can with sheet in debug and support circuit communication.Application program can use instruction read Reprogrammable FLASH or rewrite, and can only read or write a byte at every turn.This characteristic allows program storage to be used for non-volatile data storage and refresh routine code under software.In sheet JTAG debugging support circuit allow at full speed in system debug, support arranges Hardware Breakpoint and point of observation, support starts, stop and single step performs (comprising interrupt service routine) order, the inspection of support program allocating stack, read/writable memory device and content of registers.On-wafer test method is non-intrusion type completely, does not need resource in RAM, storehouse, timer or other sheet.The Integrated Development Environment (IDE) of C8051F040 single-chip microcomputer comprises editing machine, macroassembler, debugger and programmable device.The debugger of IDE and realize interface by JTAG between programmable device and CIP-51, provides quick and effective in-system programming and debugging.In addition, C8051F040 single-chip microcomputer also has macroassembler and C compiler.
Because most control task completes by LM629 internal functional blocks, therefore its external circuit is very simple, substantially only needs the mechanical, electrical drive circuit 4 of merchandiser sheet and encoder 6 to carry out interface.What LM629 module specifically adopted is LM629N-8 model chip.As shown in Figure 8, the P0 mouth of single-chip microcomputer C8051F040 is connected with the data port D0 ~ D7 of LM629, and by P2 mouth, single-chip microcomputer can write into instruction and data to LM629, and LM629 also can to single-chip microcomputer regenerating condition information simultaneously.CS is the chip selection signal of LM629, and RST is the reseting port of LM629, and RD is read strobe signal, and WR is write strobe signals, and above-mentioned port is Low level effective.PS is that instruction/data selects port, and when PS exports as low level, single-chip microcomputer is to the write instruction of LM629 instruction mouth or read state from instruction mouth, and when PS exports high level, single-chip microcomputer is through data port write or sense data.MAG pin is for exporting pwm pulse, and SIGN pin is used for outbound course signal.In order to prevent the start and stop of motor host computer and LW629 chip produced and disturb, after these two signals carry out signal isolation by photoelectrical coupler, enter motor-drive circuit 4.
The embedded control module of motion control processor 5 is except comprising said units, and also comprise " doing " state-detection, " hurrying " state is the primary part of Software for Design, through in whole control module.The mode bit that " hurries " is positioned at the lowest order of state byte, at controller 1 after LM629 module write order or the word that reads and writes data, the mode bit that " hurries " can be set at once, now, all command or transfer of data can be ignored, until after information is accepted, " doing " mode bit just can reset, so this mode bit must be detected at each write order or before reading and writing data, determine whether busy condition.Program circuit as shown in Figure 2.
The host interface of LM629 module is that host computer is provided convenience to its programming and monitoring, and on software, the programming of main frame and monitoring function are then by assigning user instruction to realize to LM629.The instruction that LM629 supports comprises initialization directive, interrupt instruction, PID control command, movement instruction, state and information command.Some of them instruction is independent, and most of instruction needs a data structure supported.These additional data give the relevant parameter of order request.Such as instruction STT (startup) does not need additional data, and instruction LFIL (loading filter parameter) then needs the data of 2 ~ 10 bytes such as affix differential term sampling interval and filter parameter.First data are written into master register, data only after the order that write is relevant in master register could load work register further, data are so just enable first to be stored in before the use in LM629, eliminate and be generally present in bottleneck effect in data communication, and provide a kind of solution for multi-axial Simultaneous operates.When control word or data word write LM629, always upper byte is front, and low byte is rear.
After whole control system powers on, because LM629 internal register is in unknown state, any read write command all can produce error result, is at this moment necessary first to carry out hardware reset to it.Single-chip microcomputer obtains reset signal by the RST pin level dragging down the LM629 be attached thereto.Low level time is minimum will keep 8 clock cycle.When it recovers high level, judge whether correctly to reset by the status byte value of chip, if reset circuit, then need to re-start reset.Reset successfully by arrange filtering parameter input-buffer, trajectory parameters buffer memory, motor driver output be zero.In addition, also by the mask bit of removing interrupt mask register, ((Bit6, except breakpoint inter rupt mask bit), motor driver output is set to a DAC transformation result, and current absolute position is as origin position.For guaranteeing to reset successfully, RSTI order can be performed and reset all interruptions to do further inspection.
There is the status register of 8 LM629 inside, when the interrupt condition of interrupting controlling and other corresponding conditionses cause occurs.The corresponding Bit position of this register is set, and the Pin17 pin reaction of LM629 simultaneously has to be interrupted occurring, and exports high level.But the prerequisite that this interruption can be reacted by Pin17 pin is that corresponding interrupt mask register opens interruption ((Bit=1).Concrete mode bit is as shown in table 1.
Table 1 status word bit table
Single-chip microcomputer can determine the state of LM629 by read states byte instruction RDSTAT.The command code that it is not determined.This instruction is by the hardware supports controlled by CS, RD, PS.Be generally used for the communication of main frame and LM629.When main frame reads LM629 status word, the PS pin dragging down LM629 shows currently to want read states word.When reading instruction and sending, RD pin is low level, and the D0 ~ D7 be connected with P00 ~ P07 gets status byte value.For there is the bit position of interrupting in resetting in RSTI.Main frame can reset the bit position of or all status words.User resets after also can providing corresponding service according to the priority of programming definition successively.When RSTI order occurs, PS is low level, shows that the current data that will write are command codes.The data of additional 2 bytes after RSTI, because state byte is 8, therefore most-significant byte is useless, and least-significant byte is effective, and 0 resets.These two bytes write acquisition by twice C8051F040.Now PS should be set as high level, shows that current what write is data.
It is pointed out that interchange between main frame and LM629 is by being that the 0th (busy position) carries out in status word, before instruction dispensing and data input, exporting, main frame must detect, and whether " busy position " is logical zero.Logical zero represents LM629 and is in idle condition, can receive instruction, data or send data.RSTI command code such as and must judge that whether current LM629 is idle by RDSTAT order between additional data.
Embodiment two: composition graphs 4 illustrates present embodiment, present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode one, and in present embodiment, described reset unit comprises with lower unit:
RST drags down unit: by RST end be pulled to low level, and after this unit end of run start-up study unit;
Delay unit: 8 to 10 clock cycle of time delay, and the first status word reading unit is started after this unit end of run;
First status word reading unit: the status word reading LM629 module, and the first status word judging unit is started after this unit end of run;
First status word judging unit: judge whether the status word read is C4H or 84H, and shielding interrupt location is started when judged result is for being, start RST when judged result is no and drag down unit;
Shielding interrupt location: make MSKI instruction shield all interruptions, and start reset interrupt unit after this unit end of run;
Reset interrupt unit: perform the instruction of RSTI interruption reset condition, and start the first status word reading unit after this unit end of run;
First status word reading unit: the status word reading LM629 module, and the second status word judging unit is started after this unit end of run;
Second status word judging unit: judge whether the status word read is 80H or C0H, and terminate the operation of reset unit when judged result is and is, starts RST and drags down unit when judged result is no.
Reset is an important step in LM629 module operation.Reset must be carried out after LM629 module powers on and can carry out other normal running.As shown in Figure 4, reset comprises hardware reset and interruption reset condition.Hardware reset RST end is pulled into low level and at least keeps 8 clock cycle.After reset, check the status word of LM629 module, if be not equal to 84H or C4H, hardware reset failure be described, must again reset.During reset interrupt, first make MSKI instruction shield all interruptions, then perform the instruction of RSTI interruption reset condition.If interruption reset condition success, status word will become 80H or C0H from 84H or C4H.
Embodiment three: present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode one, in present embodiment, pid parameter in described pid parameter reading unit comprises differential coefficient Kd, Proportional coefficient K p and integration gain factor Ki, and the establishing method of pid parameter comprises the following steps:
Step one, initiation parameter, make Kp=Ki=0, and Kd=2, ds=1, ds are derivative sampling time coefficient;
The value of step 2, adjustment differential coefficient Kd is the critical value of motor generation high frequency oscillation;
Step 3, resize ratio COEFFICIENT K p;
Step 4, repeatedly adjust differential coefficient Kd and Proportional coefficient K p according to the mode of step 2 and step 3, until the damping of described control system, follow-up control and regulation time all meet the demands, the differential coefficient Kd that selection is now determined and Proportional coefficient K p is the differential coefficient and proportionality coefficient finally determined;
Step 5, adjustment integration gain factor Ki, make overshoot, regulation time and eliminate permanent torque loads required time all to meet the demands, select the gain coefficient Ki meeting this condition to be final gain coefficient.
The application of PID adjuster in control field is very extensive, realize in the system controlled at appliance computer, pid control algorithm is also apply a kind of control law very widely, this is not only because PID regulates is technology maturation in continuous control system, a kind of widely used method, and because the parameter tuning of PID adjustment is convenient, structural change is very flexible, can obtain satisfied control effects for most of control object.
LM629 module adopts Digital PID Controller to carry out closed-loop control.The controlled quentity controlled variable of motor is the proportional of site error value, integration item and differential term sum, and following formula difference equation is the control formula of LM629 module:
U ( q ) = K p × e ( q ) + K i Σ N = 0 q e ( q ) + K d [ e ( q ) - e ( q - 1 ) ]
In formula, U (q) is motor control signal output during sampling instant q; E (q) is site error value during sampling instant q; Kp, Ki and Kd are the pid parameter be loaded into; The moment of sampling is carried out in q representative with derivative sampling speed.
When system First Contact Connections, the phase place between each input signal of closed loop control cycles summing junction is likely wrong.According to correct negative feedback closed loop requirement, Setting signal and input signal should be anti-phase.If connection error, Setting signal and input signal homophase, then whole closed loop defines positive feedback, is easy to like this cause strong vibrations.Time serious, under slight driving, motor can turn faster and faster, is finally in High Rotation Speed state, forms " driving " phenomenon.So, before determining PID coefficient, first to check that whether closed loop phase is correct.Suggestion uses very little proportional gain factor Kp value (as Kp=1), keep Ki, Kd=0, use LTRJ order, under making motor operate in mode position, be not loaded into trajectory parameters (namely each track value remains 0), if vibration or " driving " phenomenon appear in motor, then feedback phase is incorrect.Following three kinds of modes can be taked to adjust: the link position 1, exchanging encoder input signal A, B and LM629; 2, the electric power polarity of direct current machine is changed; 3, the phase place of PWM drive singal is changed by inverter.
Set up an accurate model of control system in engineering practice and there are some basic difficulties, the mechanical organ partial parameters of such as system can change with the change of temperature in time.So determining the pid parameter stage, the method tested should taked to carry out pid regulator parameters.
Before adjustment control system, first must understand the effect of each PID filter factor.Section 1 in above formula, proportional, difference (departure) according to controlled variable desired value and measured value drives controlled device, reflect the deviation of control system in time pro rata, deviation is once produce, controller produces control action immediately to reduce deviation, but proportional control can only reduce static difference and can not eliminate static difference; Section 2, integration item, goes to drive controlled device according to the integration of departure, adopts integral controller to eliminate static difference in the controls, improve system without margin with elimination or weaken steady-state error, thus the steady-state behaviour of control system is improved; Section 3, differential term, go to drive controlled device according to the differential (being exactly difference in digital system) of departure, the derivative action is always revolted input deviation and is changed to any direction, change of error must more just be opposed stronger, so the derivative action will improve the dynamic characteristic of control system, help system trend will be stable, the advantage that differential controls is the characteristic with the change of prediction input deviation, but can not predict any effect also do not occurred.The advantage of PID controller is that integral action can eliminate static difference in general, improve system without margin, the derivative action can accelerate again transient process or raising system stability, improve the dynamic characteristic of control system.According to the requirement of system quality, select suitable Kp, Kd and Ki, and these three are integrated, produce motion control processor and the Comprehensive Control effect in the controls of LM629 module, just constitute pid control algorithm.Except Kp, Kd and Ki, LM629 module also provides two control variables: integration restriction constant I land derivative sampling time coefficient ds, integration item is limited and according to system requirements to derivative sampling time programming to obtain better derivative control action, the derivative sampling time be the ds (1-256) in LM629 module samples cycle doubly, integration limit entry (i.e. limit of integration) I lmust be loaded into together with Ki, which limit the usefulness the maximum of integration item, the accumulation of integration item can not exceed its limits value, will not adopt and exceed value after exceeding, the derivative sampling time stability contributing to raising low speed height inertia load able to programme.When low cruise, the fractional value effect of speed is comparatively obvious, target and actual position value only just can change after the accumulation through several sampling period, this will cause error amount can not change within continuous several sampling period, and differential term that to be derivative constant Kd and error change amount is long-pending, therefore will differential term be caused further within continuous several sampling period cannot to produce effect, the proper extension derivative sampling time can obtain more stable differential term thus improve stability.Owing to requiring that motion control processor reaches high-speed motion state fast as far as possible in native system, therefore get the less integration sampling cycle.
For the system of dynamic characteristic the unknown, PID controller is normally adjusted by experience.Obtain optimum track and the shortest regulating time for our target of motion servo control system.Here manually regulate and observe to determine the value of PID, until obtain good response.Concrete grammar is as follows:
Step one, start up system, initiation parameter: Kp=Ki=0, Kd=2, ds=1, ds are derivative sampling time coefficient.At this moment motor shaft should remain static.Now the physical location of motor and target location all should be zero, if the two is unequal, but because Kp, Ki=0, so control system can not correct this deviation.
Step 2, setting differential coefficient Kd;
Concussion, minimizing overshoot are eliminated in the effect of adjuster differential term (i.e. differential coefficient), and it can greatly reduce dynamic deviation and the regulating time of system, improves dynamic quality.Differential coefficient is the gain of position deviation pace of change.During adjustment, increase Kd gradually until motor generation high frequency oscillation.Usually, when keeping the concussion of motor to try one's best low, make Kd as far as possible large.
Step 3, setting Proportional coefficient K p;
When motor shaft is static, when producing position deviation because of disturbance, load variations and target location change, the proportional (i.e. proportionality coefficient) of adjuster is by generation restoring force to reduce position deviation, and size and the position deviation of restoring force are proportional.Kp is the constant coefficient of ratio, repeatedly need adjust and could determine.Increase Kp value while the damping of estimating system, until system is in optimal damping state.The damping of system is manual estimation.By adjusting by hand, we can find, increase Kp, can increase the rigidity of motor shaft, can feel that motor shaft is equivalent to add " elasticity " load, if left original position by force, " bullet " is returned original position by axle.As Kp is too little, system will be in overdamping state, and what axle can be very slow gets back to original position.As Kp is too large, system will be in underdamping state, and what axle can be very fast gets back to original position.This will produce overshoot, concussion.When not producing excessive overshoot, concussion, proportional gain factor Kp should be transferred to maximum.
Step 4, repeatedly adjust differential coefficient Kd and Proportional coefficient K p, until the damping of described control system, follow-up control and regulation time all meet the demands according to the mode of step 2 and step 3;
Repeatedly regulate Kd and Kp according to the control method of step 2 and step 3, until system is in optimal damping state, have optimum follow-up control and regulation time.
Step 5, setting integration gain factor Ki, make overshoot, regulation time and eliminate permanent torque loads required time all to meet the demands.
Integration gain factor Ki can eliminate the tracking error produced when axle rotates and the deviation that permanent torque loads produces when axle is static.The growth of integration gain factor and position deviation and time is proportional.High Ki value can provide torque compensation fast, but too increases overshoot and concussion.Under the condition of usually suitable between maintenance overshoot, regulation time, these three system parameterss of the permanent torque loads required time of elimination balance, Ki value should be as far as possible little.For the system without obvious torque loads, as feasible, Ki can be zero.
Embodiment four: present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode one, in present embodiment, the filtering parameter in described filtering parameter updating block refers to proportionality coefficient, integral coefficient, differential coefficient and limit of integration I l.
After reset inspection side is normal, main frame is needed to download the filtered parameter value of LM629 internal digital filter.The filtering parameter of pid filter loads with LFIL instruction, and filtering parameter refers to proportionality coefficient, integral coefficient, differential coefficient and limit of integration I l.The amplitude of integral constant is limited in I by limit of integration lunder, if integration amplitude exceedes limit of integration, will I be used lreplace integration item.In addition, the discrete sampling cycle also can be controlled by this order.It is filtering control word that command code provides rear additional data the first two byte data, determines sampling period numerical value, proportionality coefficient, differential coefficient, integral coefficient and limit of integration I by this control word lwhether load.FILTER TO CONTROL word bit is specifically as shown in table 2.Control word back is determined to need the coefficient of write successively by bit position being sequentially written in from high to low to 3 according to bit0.Such as write sequence is Kp, Ki, Kd and I l.These coefficients are 16 bit value.Except detecting LM629 between command code and additional data whether except the free time, the data often writing 16 all must 0 (busy position) of detected state word.When inputting LFIL instruction code, PS is low level, and when input filter control word and corresponding filter parameter, PS is high level.Because the input of LM629 inner parameter takes double-damping structure, UDF order must be performed just can come into force after LF'IL order input filter parameter or after the adjustment of arbitrary filter parameter, the usual and LFIL order of UDF order with the use of.
Table 2 FILTER TO CONTROL word
Embodiment five: present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode one, in present embodiment, trajectory parameters in described trajectory parameters reading unit refers to motor movement trajectory parameters, comprises position, speed and acceleration.
Finally need to use LTRJ order that motor is moved by the mode of specifying, these modes comprise motor movement trajectory parameters: position, speed, acceleration.LTRJ order simultaneously determines these parameters, and which is absolute value, and which is relative value.Determine that motor pattern is mode position or velocity mode and manual stopping mode, TRAJECTORY CONTROL word bit is as shown in table 3.
Table 3 TRAJECTORY CONTROL word
LTRJ order decides above-mentioned trajectory parameters by writing TRAJECTORY CONTROL word immediately following person after write command byte.After input trajectory control word, the parameter inputted subsequently all inputs with two sixteen-bit data word, and these parameters are followed successively by acceleration, speed, position by it in the descending of the control Bit position that track control word is associated.By being sequentially written in LM629 from highest significant position to least significant bit during the input of each dual control words.It should be noted that except acceleration, these parameters can upgrade at the volley.Only complete at track, or the 8th of TRAJECTORY CONTROL word the send instruction be motor close time, acceleration could change.If acceleration changes, and STT sends, but motor-driven acceleration is still current, will produce a fault interrupt instruction, and present instruction is simultaneously left in the basket.When this order sends, state and the LFIL order of PS pin are similar, also will perform " doing " state-detection simultaneously.
Similar with LFIL order, these trajectory parameters of LM629 storage inside all take double-damping structure.These data are first stored in master register, and send etc. sign on (STT), these track datas are sent to the work register of Double Buffering circuit to make electric motor starting.
Embodiment six: composition graphs 5 illustrates present embodiment, present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode one, in present embodiment, described power module 2 adopts LM7805 power supply chip to realize.
LM7805 power supply chip is due to the restriction of its internal current, and the protection of overtemperature protection and safety operation area, makes it not fragile, application very extensive.And external circuits is fairly simple.Function is the voltage of 5V by the photovoltaic conversion of 12V, and play voltage stabilizing, provides required voltage to the modules of system.The circuit of power module 2 as shown in Figure 5.
Embodiment seven: present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode one, in present embodiment, described encoder 6 adopts incremental optical-electricity encoder, and the discernmible minimum angles of this incremental optical-electricity encoder is 0.15 degree.
When to Motor Control, in order to reach relatively high accuracy and stability, closed-loop system is adopted to control motor.In the control system of motor, required precision comprises: the rotating speed of of motor itself and start-up time etc.Realize the accurate control to these physical quantitys, need be detected by high-precision detecting sensor, and this tittle is converted to digital signal, so that chip is to the process of these data, thus realize closed-loop control.
Incremental rotary encoder, as the widely used digital tactility apparatus of one, can be connected with each chip in the control system described in present embodiment well, meets the requirement of this design.The characteristic of rotary encoder has:
(1) output signal determines angle increment by meter reading.
(2) certainty of measurement depends on the minimum angles that can differentiate, and slit fringe number m is circumferentially relevant for precision and code-disc, and namely differentiating angle is α=360 °/m, resolution=1/m.
(3), during measured angular speed, motor drive shaft or motor drive shaft axle that is direct and rotary encoder are connected, and scanning element is then connected with the axle of encoder by ball bearing.
(4) by carrying out the mode of interpolation processing or software process to signal to improve resolution.
Present embodiment selects incremental optical-electricity encoder as the position detecting element of servomotor, and incremental optical-electricity encoder is the one of incremental rotary encoder, for providing real-time displacement feedback quantity to controller, and composition semiclosed loop position control system.Incremental optical-electricity encoder is a kind of high precision position transducer that the angular displacement of motor output shaft can be converted to pulse or digital quantity, it has mechanical wearing and tearing, precision is high, compact conformation, permission rotating speed is high, long service life, and antijamming capability is strong, high reliability is the angular displacement digital sensor that precision equipment is conventional.
Need the most important technical parameter considered when resolving power is incremental optical-electricity encoder type selecting, it refers to the minimum angles that encoder can be distinguished.Resolving power usually often turns over one week and outputs signal with encoder the basic cycle number (umber of pulse) that produces and represents, namely umber of pulse/turn (P/r) is expressed as, also the number of transmissive slit on coding disk is equaled, the transmissive slit that code-disc is scribed is more, and the resolution capability of encoder is also better.In industrial electric transmission, the resolving power scope usually can for selecting is 500P ~ 5000P, and best result distinguishes that power even can reach several ten thousand, and in the use procedure of reality, frequency doubling technology can also be utilized to improve its resolution capability further.Present embodiment selects the encoder of n=600P/r, and uses quadruple technology to process its output signal simultaneously, the definition of raising encoder, then it can be differentiated minimum angles and is:
In formula, R is the actual resolving power of system, and n is the resolving power of encoder.
LM629 provides the interface of incremental encoder, and the Rotating speed measring information that encoder exports directly is sent in LM629, need not human intervention.The encoder interfaces of LM629 provides 3 input ports: encoder A, B two-phase Waveform Input and an IN zero pulse signal input.Wherein, IN signal is that motor often turns around appearance low level.The relation of three road signals as shown in Figure 9.As can be seen from Figure 9, the absolute position of A, B two-phase waveform signal tracking motor and direction, they form four logic states, the change each time of this logic state, the location register of LM629 inside counts corresponding increase and decrease 1, and such system just reaches the object of quadruple.
The minimum clock cycle number of each state of differential coding device is 8 clock cycle, which dictates that the maximum of code device signal catches speed.Under the input clock of 8MHz, maximum capture frequency can reach 1MHz, and the encoder that present embodiment adopts is 600 lines, and clock frequency is 8MHz, can be calculated motor permission maximum (top) speed to be:
V max = 1 8 8 × 10 6 × 4 × 600 × 60 = 2.5 × 10 4 ( r / min )
Therefore, the motor speed of this system is 25000r/min to the maximum.
The pwm pulse that LM629 exports has 8 bit resolutions being driven into maximum forward driving from maximum negative sense, is halted state when modulation signal output is 0.
Embodiment eight: composition graphs 6 illustrates present embodiment, present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode seven, in present embodiment, LM629 carries out communication by I/O mouth and single-chip microcomputer, input motion parameter and controling parameters, output state information.The physical location of feedback motor is carried out with an incremental photoelectrical coded disk.From position signalling A, B of incremental photoelectrical coded disk after LM629 quadruple, improve resolution.A pulse and B pulsed logic state often change once, the location register in LM629 will add (subtracting) 1.A, B, Z signal of coding disk simultaneously low level time, just produce an INDEX signal and send into LM629 register, the absolute position of record motor.The speed ladder diagram generator of LM629 is for calculating required trapezoidal velocity contour.When position control mode, controller provides acceleration, maximum speed, final position data, and LM629 utilizes these data to calculate running orbit.
The Digital PID Controller of LM629 inside is used for Control loop system.Digital PID Controller adopts incremental timestamp algorithm, required K p, K i, K dcoefficient is provided by primary processor.In motion servo control system, what master controller 1 will do just provides instruction and each kinematic parameter and pid parameter by bus to LM629, and receive each movement state information realization monitoring from LM629, and other loaded down with trivial details control algorithm task all transfers to LM629 to complete.Therefore, in this control system, master controller 1 can farthest be liberated, and makes it that the more time can be had to be engaged in other control task.And, as the motion control processor of a specialty, the motion control disposal ability of LM629 be also common single-chip microcomputer cannot than.
Embodiment nine: composition graphs 7 illustrates present embodiment, present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode one, in present embodiment, this control system also comprises clock power and adopts, this clock power is used for providing clock signal for LM629 module, and described clock power adopts the active crystal oscillator of 8MHZ to realize.
The crystal oscillator frequency that LM629N-8 model chip allows is up to 8MHz, in order to improve system response time, selects the active crystal oscillator of four pin of 8MHZ to provide clock signal for LM629 system.Adopt active crystal oscillator to build special clock circuit, LM629 taking master controller resource can be greatly reduced.Active crystal oscillator does not need outside oscillating circuit, signal quality is good, more stable, and connected mode relatively simply (mainly carries out power filter, the PI type filter network that usual use electric capacity and inductance are formed, the output resistance trap signal of a little resistance), do not need complicated configuration circuit.For the application of timing requirements sensitivity, accurate crystal oscillator can be selected, or even the temperature-compensating crystal oscillator of top grade.
Foundation and the maintenance of the piezoelectric resonator state of active crystal oscillator all could must realize by means of pierce circuit.Present embodiment adopts a tandem type oscillator, the dual-stage amplifier that transistor T1 and T2 is formed, and quartz crystal XT and electric capacity C2 forms lc circuit.In this circuit, quartz crystal is equivalent to an inductance, and C2 is variable capacitor, regulates its capacity that circuit can be made to enter resonance condition.The supply power voltage of this oscillator is 5V, and output waveform is square wave.The internal circuit of active crystal oscillator as shown in Figure 7.
Embodiment ten: present embodiment is described in conjunction with Figure 10 and Figure 11, present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode one, in present embodiment, described motor-drive circuit 4 adopts L6203 chip to realize.
L6203 (Multiwatt11) is a kind of application multi-source BCD (Bipolar, CMOS, DMOS) technology controls the fully controlled bridge driver chip of motor, this chip can by independently DMOS field-effect transistor and CMOS and diode on one chip integrated.Owing to using modularization expansion technique, L6203 can realize the optimization of logical circuit and power stage.DMOS field effect transistor can be run under the voltage of 42V, possesses performance of handoffs efficient, at a high speed simultaneously.Compatible all TTL, CMOS input.Each independently logic input can control a raceway groove (half-bridge), and public Enable Pin can control two raceway grooves.Its outside is by 11 pins.Its major function is as follows:
1) peak current can up to 10A, and the highest withstand voltage is 48V, and driving force can also be expanded;
2) good compatibility is possessed to TTL and CMOS control inputs signal;
3) most high workload bears frequency is 100,000 hertz;
4) built-in overheating protection circuit;
What L6203 inside adopted is widely used H-type full-bridge formula circuit in motor driving field, the both positive and negative polarity changing the voltage at direct current machine two ends just can control the rotating of motor, and this drive circuit can make direct current machine forward or reverse by the break-make of switch.H-type full-bridge formula drive principle figure as shown in Figure 10.
Have four switches in Figure 10, these four switches can be divided into two groups of state complementation, and wherein S1 and S2 is one group, S3 and S4 is one group.These two groups of switches are mutual exclusions, and when closing for a certain group, other one group must disconnect.When S1 and S2 conducting, foreign current is successively through switch S 1, motor, switch S 2, and add forward voltage now to direct current machine two ends, direct current machine will rotate forward; When S3 and S4 conducting, foreign current is successively by switch S 4, motor, switch S 3, and add reverse voltage now to direct current machine two ends, direct current machine rotates backward.
In the application of reality, rotate and reverse and switch constantly repeating, four switches all need turn-on and turn-off continually.We know, the state of two groups of switches should could meet our control overflow by strictly complementary.But the turn-on and turn-off time that in fact switching device is intrinsic makes strict complementary state to realize.In order to solve this problem of shoot through and ensure four switching tube collaborative works, the signal of two groups of control switchs must differ a sufficiently long Dead Time, can increase some time delays by software or hardware implementing between the signal of two groups of control switchs.
Four diodes D1, D2, D3, D4 in Figure 10 play afterflow effect, constitute continuous current circuit with motor coil winding.If do not have these four fly-wheel diodes, epitrochanterian electric current cannot circulate, motor likely can burn because of heating.
L6203 is DC motor Driver chip, inside includes a H bridge, supply power voltage reaches as high as 48V, operating current can reach 4A only needs external little element can complete driving to direct current machine, the EN pin that circuit connects L6203 is as shown in figs. 2-9 enable control end, can drive motors when being input as 1, and when being 0, chip does not work, IN1, IN2 pin inputs pwm signal, and the duty ratio controlling to rotate and reverse PWM waveform respectively then controls motor speed.Motor-drive circuit 4 as shown in figure 11.
5 pin 7 pin of L6203 are respectively the input interface of the pwm pulse control signal of the two-way complementation in H bridge power driving circuit.Complementary pwm pulse control signal required for L6203 is directly provided by the task manager of DSP.And ensure when 5 pin pulse signals are high level, 7 pin are then low level, and now armature voltage is just, when contrary, armature pressure is just negative.During L6203 enable working signal 1 pin access logic high, L6203 is in enable operating state.
Embodiment 11: present embodiment is described in conjunction with Figure 12 and Figure 13, present embodiment is the further restriction to a kind of small-sized DC motor closed-loop control system described in execution mode one, in present embodiment, described photoelectrical coupler adopts 6N137 chip to realize.
Photoelectrical coupler can prevent electric-motor drive unit to the interference of digital control unit.The modulation signal of the PWMM pin output of LM629 as shown in figure 12.If LM629 connects 8MHz crystal oscillator, turn-on time time its minimum output duty cycle (1/128) is:
4/f clk=48×10 6s=0.5us
Therefore high speed photo coupling should be selected.And the operating frequency of N6137 can reach 10MHZ, switch periods can reach
1/10 7=0.1us
Therefore the optional 6N137 chip of optocoupler.
Output current and the filling electric current of LM629 can not more than 1.6mA, the drive current range of 6N137 is between 6-8mA, thus LM629 can not Direct driver 6N137, and needing must increase driving between them, selects 74LS04 chip to realize optocoupler drive circuit here.
For 74LS04, t during its upset pLH=t pHL=15ns, the known PWMM pin meeting LM629 completely exports occasion turn-on time during minimum output duty cycle.And maximum output current I oL=8mA, can drive 6N137 completely.Such design, (sets high position) when Enable Pin is effective, and the logic level of constrained input can also be made completely the same, and its circuit as shown in figure 13.The PWMM pin output signal of LM629 is reverse through 74LS04, and 6N137 is the output of OC door, therefore must connect pull-up resistor at the output of optocoupler and make signals revivification.Circuit connecting for the PWMS pin of LM629 is the same with PWMM pin.
Embodiment 12: composition graphs 3 illustrates present embodiment, present embodiment is the control method of a kind of small-sized DC motor closed-loop control system described in execution mode one, and this control method comprises the following steps:
Reset process: carry out hardware reset and interruption reset condition; And pid parameter read step is performed after this step terminates;
Pid parameter read step: read and store pid parameter; And filtering parameter step of updating is performed after this step terminates;
Filtering parameter step of updating: upgrade filter parameter according to pid parameter; And trajectory parameters read step is performed after this step terminates;
Trajectory parameters read step: read and storage track parameter; And motion control signal forwarding step is performed after this step terminates;
Motion control signal forwarding step: send motion control signal to motor-drive circuit 4, and after this step terminates, perform new motion determination step;
New motion determination step: judge whether to receive the new motor message cue that controller 1 is sent, and perform pid parameter reading unit when judged result is for being, terminate this control method when judged result is no.
Embodiment 13: composition graphs 4 illustrates present embodiment, present embodiment is the further restriction of the control method to a kind of small-sized DC motor closed-loop control system described in execution mode 12, in present embodiment, described reset process comprises the following steps:
RST drags down step unit: RST end is pulled to low level, and performs delaying step after this step terminates;
Delaying step: 8 to 10 clock cycle of time delay, and after this step terminates, perform the first status word read step;
First status word read step: the status word reading LM629 module, and after this step terminates, perform the first status word determining step;
First status word determining step: judge whether the status word read is C4H or 84H, and shielding interrupt step is performed when judged result is for being, perform RST when judged result is no and drag down step;
Shielding interrupt step: make MSKI instruction shield all interruptions, and perform reset interrupt step after this step terminates;
Reset interrupt step: perform the instruction of RSTI interruption reset condition, and perform the first status word read step after this step terminates;
First status word read step: the status word reading LM629 module, and after this step terminates, perform the second status word determining step;
Second status word determining step: judge whether the status word read is 80H or C0H, and terminate reset process when judged result is for being, performs RST and drags down step when judged result is no.

Claims (10)

1. a small-sized DC motor closed-loop control system, is characterized in that: it comprises controller (1), power module (2), screen (3), motor-drive circuit (4), motion control processor (5) and encoder (6); Described controller (1) adopts C8051F040 chip microcontroller, and motion control processor (5) adopts LM629 module to realize;
Power module (2) provides working power by 12V battery pack, and power module (2) converts for 12V voltage signal 12V battery pack exported that 5V power supply is controller (1), screen (3), motor-drive circuit (4), motion control processor (5) and encoder (6) provide working power to; Controller (1) is connected with motion control processor (5) and screen (3); The code signal output of encoder (6) connects motion control processor (5) code signal input; The motor drive signal output of motion control processor (5) connects the motor drive signal input of motor-drive circuit (4) by photoelectrical coupler; Motor-drive circuit (4) is for sending drive singal to motor;
Described motion control processor (5) is embedded in by the control module of software simulating, and this control module comprises with lower unit:
Reset unit: carry out hardware reset and interruption reset condition; And pid parameter reading unit is started after this unit end of run;
Pid parameter reading unit: read and store pid parameter; And filtering parameter updating block is started after this unit end of run;
Filtering parameter updating block: upgrade filter parameter according to pid parameter; And trajectory parameters reading unit is started after this unit end of run;
Trajectory parameters reading unit: read and storage track parameter; And motion control signal transmitting element is started after this unit end of run;
Motion control signal transmitting element: send motion control signal to motor-drive circuit (4), and start new motion determination unit after this unit end of run;
New motion determination unit: judge whether to receive the new motor message cue that controller (1) is sent, and start pid parameter reading unit when judged result is for being, the operation of finishing control module when judged result is no.
2. a kind of small-sized DC motor closed-loop control system according to claim 1, is characterized in that: described reset unit comprises with lower unit:
RST drags down unit: by RST end be pulled to low level, and after this unit end of run start-up study unit;
Delay unit: 8 to 10 clock cycle of time delay, and the first status word reading unit is started after this unit end of run;
First status word reading unit: the status word reading LM629 module, and the first status word judging unit is started after this unit end of run;
First status word judging unit: judge whether the status word read is C4H or 84H, and shielding interrupt location is started when judged result is for being, start RST when judged result is no and drag down unit;
Shielding interrupt location: make MSKI instruction shield all interruptions, and start reset interrupt unit after this unit end of run;
Reset interrupt unit: perform the instruction of RSTI interruption reset condition, and start the first status word reading unit after this unit end of run;
First status word reading unit: the status word reading LM629 module, and the second status word judging unit is started after this unit end of run;
Second status word judging unit: judge whether the status word read is 80H or C0H, and terminate the operation of reset unit when judged result is and is, starts RST and drags down unit when judged result is no.
3. a kind of small-sized DC motor closed-loop control system according to claim 1, it is characterized in that: the pid parameter in described pid parameter reading unit comprises differential coefficient Kd, Proportional coefficient K p and integration gain factor Ki, pid parameter is by manual setting, and establishing method comprises the following steps:
Step one, initiation parameter, make Kp=Ki=0, and Kd=2, ds=1, ds are derivative sampling time coefficient;
The value of step 2, adjustment differential coefficient Kd is the critical value of motor generation high frequency oscillation;
Step 3, resize ratio COEFFICIENT K p;
Step 4, repeatedly adjust differential coefficient Kd and Proportional coefficient K p according to the mode of step 2 and step 3, until the damping of described control system, follow-up control and regulation time all meet the demands, the differential coefficient Kd that selection is now determined and Proportional coefficient K p is the differential coefficient and proportionality coefficient finally determined;
Step 5, adjustment integration gain factor Ki, make overshoot, regulation time and eliminate permanent torque loads required time all to meet the demands, select the gain coefficient Ki meeting this condition to be final gain coefficient.
4. a kind of small-sized DC motor closed-loop control system according to claim 1, is characterized in that: the filtering parameter in described filtering parameter updating block refers to proportionality coefficient, integral coefficient, differential coefficient and limit of integration I l.
5. a kind of small-sized DC motor closed-loop control system according to claim 1, is characterized in that: the trajectory parameters in described trajectory parameters reading unit refers to motor movement trajectory parameters, comprises position, speed and acceleration.
6. a kind of small-sized DC motor closed-loop control system according to claim 1, is characterized in that: described encoder (6) adopts incremental optical-electricity encoder, and the discernmible minimum angles of this incremental optical-electricity encoder is 0.15 degree.
7. a kind of small-sized DC motor closed-loop control system according to claim 1, is characterized in that: it comprises clock power and adopts, and this clock power is used for providing clock signal for LM629 module, and described clock power adopts the active crystal oscillator of 8MHZ to realize.
8. a kind of small-sized DC motor closed-loop control system according to claim 1, is characterized in that: described motor-drive circuit (4) adopts L6203 chip to realize.
9. the control method of a kind of small-sized DC motor closed-loop control system according to claim 1, is characterized in that: this control method comprises the following steps:
Reset process: carry out hardware reset and interruption reset condition; And pid parameter read step is performed after this step terminates;
Pid parameter read step: read and store pid parameter; And filtering parameter step of updating is performed after this step terminates;
Filtering parameter step of updating: upgrade filter parameter according to pid parameter; And trajectory parameters read step is performed after this step terminates;
Trajectory parameters read step: read and storage track parameter; And motion control signal forwarding step is performed after this step terminates;
Motion control signal forwarding step: send motion control signal to motor-drive circuit (4), and perform new motion determination step after this step terminates;
New motion determination step: judge whether to receive the new motor message cue that controller (1) is sent, and perform pid parameter reading unit when judged result is for being, terminate this control method when judged result is no.
10. the control method of a kind of small-sized DC motor closed-loop control system according to claim 9, is characterized in that: described reset process comprises the following steps:
RST drags down step unit: RST end is pulled to low level, and performs delaying step after this step terminates;
Delaying step: 8 to 10 clock cycle of time delay, and after this step terminates, perform the first status word read step;
First status word read step: the status word reading LM629 module, and after this step terminates, perform the first status word determining step;
First status word determining step: judge whether the status word read is C4H or 84H, and shielding interrupt step is performed when judged result is for being, perform RST when judged result is no and drag down step;
Shielding interrupt step: make MSKI instruction shield all interruptions, and perform reset interrupt step after this step terminates;
Reset interrupt step: perform the instruction of RSTI interruption reset condition, and perform the first status word read step after this step terminates;
First status word read step: the status word reading LM629 module, and after this step terminates, perform the second status word determining step;
Second status word determining step: judge whether the status word read is 80H or C0H, and terminate reset process when judged result is for being, performs RST and drags down step when judged result is no.
CN201410848814.0A 2014-12-29 2014-12-29 Closed loop control system for miniature direct current motor and control method for system Pending CN104518716A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410848814.0A CN104518716A (en) 2014-12-29 2014-12-29 Closed loop control system for miniature direct current motor and control method for system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410848814.0A CN104518716A (en) 2014-12-29 2014-12-29 Closed loop control system for miniature direct current motor and control method for system

Publications (1)

Publication Number Publication Date
CN104518716A true CN104518716A (en) 2015-04-15

Family

ID=52793561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410848814.0A Pending CN104518716A (en) 2014-12-29 2014-12-29 Closed loop control system for miniature direct current motor and control method for system

Country Status (1)

Country Link
CN (1) CN104518716A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106208847A (en) * 2016-09-08 2016-12-07 哈尔滨工程大学 Cavitation device driving method based on direct current generator
CN106253770A (en) * 2016-08-26 2016-12-21 刘华英 The control method of direct current generator and device
CN107276467A (en) * 2017-08-03 2017-10-20 深圳市驿固科技有限公司 A kind of adaptive method of direction of motor rotation
CN111395241A (en) * 2020-04-13 2020-07-10 徐州徐工环境技术有限公司 Accurate and efficient motor rotating speed control method and road sweeper
CN112059732A (en) * 2020-08-31 2020-12-11 苏州铼铂机电科技有限公司 PLC control method of polishing machine swing arm stepping motor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203896236U (en) * 2014-06-13 2014-10-22 大连现代高技术集团有限公司 Precise blade control structure of automatic multi-blade collimator

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203896236U (en) * 2014-06-13 2014-10-22 大连现代高技术集团有限公司 Precise blade control structure of automatic multi-blade collimator

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王华 等: "电机专用运动控制器LM629的应用研究", 《电子器件》 *
贺志军: "基于LM629的电机伺服控制器设计", 《机械设计与制造》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106253770A (en) * 2016-08-26 2016-12-21 刘华英 The control method of direct current generator and device
CN106208847A (en) * 2016-09-08 2016-12-07 哈尔滨工程大学 Cavitation device driving method based on direct current generator
CN107276467A (en) * 2017-08-03 2017-10-20 深圳市驿固科技有限公司 A kind of adaptive method of direction of motor rotation
CN111395241A (en) * 2020-04-13 2020-07-10 徐州徐工环境技术有限公司 Accurate and efficient motor rotating speed control method and road sweeper
CN112059732A (en) * 2020-08-31 2020-12-11 苏州铼铂机电科技有限公司 PLC control method of polishing machine swing arm stepping motor
CN112059732B (en) * 2020-08-31 2023-02-28 苏州铼铂机电科技有限公司 PLC control method of polishing machine swing arm stepping motor

Similar Documents

Publication Publication Date Title
CN104518716A (en) Closed loop control system for miniature direct current motor and control method for system
CN100568131C (en) Multi-axis motion controller based on MPC5200
CN104615087A (en) Bus type motion controller
CN1570794A (en) Numerical control system for machine tool
CN102837311B (en) Low speed Full-automatic spot gluing machine people servo controller in a kind of five axles
CN103259470B (en) A kind of stepping motor kinematic system supporting multi-operation mode
CN104608383B (en) A kind of control system and its method based on fusion sediment 3D printer
CN101729002A (en) SOPC-based remote monitoring system of no-position sensor brushless DC motor
CN102111106B (en) Motor comprehensive control apparatus based on ARM (Advanced RISC Machines) and DSP (digital signal processor)
CN104317236A (en) Soft PLC technology-based wireless sensor network control terminal
CN102291073A (en) Multi-axis stepper motor interpolation controller and multi-axis stepper motor motion control card
CN104753415B (en) Start-up and shut-down control method, system and the stepper motor of stepper motor
CN107565861A (en) Multi-Axis Stepper Motor Control System based on STM32 control L6470H drivers
US7890212B2 (en) Wizard for programming an intelligent module
CN106533286B (en) A kind of integrated driving system of stepping motor of multiple degrees of freedom
CN102830645B (en) Uniaxial full-automatic high-speed dispensing robot servo control system
CN107979308A (en) A kind of control system of switched reluctance machines
CN102830643A (en) Uniaxial medium/low-speed dispensing robot servo control system
CN1655080A (en) Arm rack motion controller of concrete pump truck
CN102841558A (en) Five-axis full-automatic high speed dispensing robot servo-control system
CN101860296A (en) Servo motion control device based on floating-point DSP
CN102830642B (en) Low speed adhesive dispensing robot servo-control system in five axles
CN102841556B (en) Low speed Full-automatic spot gluing machine people servo controller in a kind of diaxon
CN105915133B (en) Stepper motor driver and its any divided method
CN107053169A (en) A kind of bus intelligent servo drive system, robot and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150415

WD01 Invention patent application deemed withdrawn after publication