Design of the Closed Loop Speed Control System for Dc Motor

This article introduces the speed control principle of DC motor, expatiates on the speed control system taking PIC16F877 SCM as the main control component, utilizes the characters of catching module, comparing module and analog-to-digital conversion module in PIC16F877 SCM to be the trigger circuit, and gives the program flow chart. The system has many advantages including simple structure, synchronization with the main circuit, stable shifting phase and enough shifting phase range, the control angle of 10000 steps, stepless smooth control of motor, steep pulse front edge, enough amplitude value, setting pulse width, good stability and anti-jamming, and cheap cost, and this speed control system with good practical values can be realized easily.


Introduction
The quick development of electric technology makes the speed control of DC motor gradually translate from analog to digital, and at present, the KZ-D towage system which extensively adopts the thyristor equipment (i.e.silicon controlled thyristor, SCR) in the electrical towage control systems to supply power to electromotor has replaced cumbersome F-D system of generator-electromotor, and especially the application of SCM technology makes the speed control technology of DC motor enter into a new phase.In the DC governor system, there are many sorts of control circuit.SCM has many advantages such as high performance, quick speed, small volume, cheap price and reliable stability, extensive application and strong currency, and it can increase the ability of control and fulfill the requirement of real-time control (quick reaction).The control circuit adopting analogy or digital circuit can be implemented by SCM.In this article, we will introduce a sort of DC motor speed control system based on SCM PIC16F877.

Speed regulation principle of DC motor
In Figure 1, the armature voltage is a U , the armature current is a I , the total resistance of armature loop is a R , the motor constant is a C , and the excitation flux is .According to KVL equation, the rotate speed of the motor is Where, p is the pole-pairs, N is the number of turns.For the motor that the armature spur track number is a, the motor constant 60 , that means when the motor is confirmed, the value is fixed.But in only the winding resistance, so a a I R is very small, and a a a a U I R U .So it is obvious that when we change the armature voltage, the rotate speed n changes with that.

Module frame of system hardware structure
The module block diagram of system hardware is seen in Figure 2.

Work principle of the system
The system is mainly composed by master switch, motor exciting circuit, thyristor speed control circuit (including tachometer circuit), rectifying filter circuit, flat wave reactor and discharge circuit, energy consumption braking circuit, and the system adopts the closed loop PI regulator to implement control.When the master switch closes, the single-phase AC obtains continual current with small pulse through the control of thyristor speed control circuit, and bridge rectifier, filtering and flat wave reactor for the motor, and at the same time, through the rectifying of exciting circuit, AC makes the motor obtain excitation to begin to work.The speed in the regulation trigger circuit sets the potentiometer RP1 to make the control angle output by PIC16F877 decrease when AN1 input voltage decreases, and the flow angle of thyristor increases with that, and the output voltage of main circuit increase, and the motor speed increases, and the output voltage of tachometer circuit increases, and the motor stably runs in the setting speed range through the function of PI regulator.

Design of main circuit
The parameters of various components in the circuit are seen in Figure 3.
Press the start-up button SW, electrify the contactor KM loop, and KM normally open contact closes, and the normally closed contact opens, and start the button self-lock, the main circuit connects, and the thyristor speed control circuit controls the AC output through changing the control angle of bidirectional thyristor, and obtains the DC through bridge rectifying and filtering, and at the same time, the motor obtains the excitation through rectifying of exciting circuit to begin to work.
To limit the pulsation of DC, connect the flat wave reactor in the circuit, and the resistance R3 offers discharge loop for the flat wave reactor when the master circuit suddenly breaks off.
To quicken braking and stopping, the energy consumption braking is adopted in the equipment, and the braking part is composed by the resistance R4 and master circuit contactor normally closed contact.
The motor excitation is powered by the single rectifying circuit, and to prevent the uncontrollable high speed accident induced by the excitation loss of motor, in the exciting circuit, serially connect the under-current relay KA, and the action current can be regulated through the potentiometer RP.

Design of thyristor trigger circuit
The voltages at the point A and the point B in the main circuit change to 20V through the transformer, and after bridge rectifying, the half signals about 100H occur at these two points, and the signals meet with NPN audion through voltage-division R6 and R7 to amplify, produce zero passage pulse at the collector of the audion, and catch the zero passage pulse ascending edge by CCP1 module and note the time of occurrence first, and catch the zero passage pulse descending edge, and the time difference between both is the zero passage pulse width, and the half of the value is the midpoint of pulse, and by this catching mode, we can exactly obtain the actual zero passage point of AC, and at the same time, we can utilize ADC analog/digital conversion module to translate the simulation voltage of PIC16F877 pin RA1/AN1 as the setting value of thyristor control angle (setting value of motor speed), change the setting value of potentiometer RP1 and correspondingly change the setting value of thyristor control angle, and the output value of tachometer circuit is input by the pin RA1/AN1 of PIC16F877, and the value is taken as the speed feedback value through A/D conversion.The oscillation frequency of SCM in the system adopts 4MHz, and according to the character of PIC16F877 order period, the resolution of thyristor control angle is the reciprocal of one fourth of SCM oscillation frequency, i.e. 1μs, for the half wave time of 10ms of the power, the control angle can achieve 10000 steps, which can completely realize the stepless smooth control of motor.

Design of tachometer circuit
The tachometer circuit is composed by the optical coded disc accreting with motor rotor and the electric pulse amplifying and shaping circuit.The frequency of electric pulse has fixed proportion with the rotate speed of motor, and through amplifying and shaping, the electric pulse output by the optical coded disc is input from the pins RC0/T1CK1 of PIC16F877 as the standard TTL level, count by the TMR1 counter to compute the rotate speed, and compare this rotate speed with the presetting rotate speed and obtain the difference value, and PIC16F877 implements PI operation to this difference value to obtain the control increase, and send the thyristor control angle in CCP2 to change the effective voltage of two ports of the motor, and finally control the rotate speed.

Software design
To obtain small super modulation of thyristor control angle, we design the speed closed control as the typical I system, i.e.PI regulator, which is used to regulate the thyristor control angle time d T , and its control algorithm is Considering that the motor time constant of electromotor in the system is 0.12s, the warps couldn't be eliminated in several sampling cycles, so we select 2ms as the tachometer sampling cycle in the system.
The software design module in the system mainly includes CCP1 ascending catching module, CCP1 descending catching module, control angle setting value A/D conversion module, tachometer circuit pulse timing counting module, PI regulator module and CCP2 comparison output module, and the program flow charts are seen in Figure 5 and Figure 6.
Suppose we obtain the zero-pass time T , and the thyristor control angle time is d T , so the comparison value which is sent into CCP2 register CCPR2H:L is Tf T Td , and when the comparison is consistent, output high level in the pin of CCP2 to make the thyristor connect, and modify the value of CCPR2H:L again according to the required trigger pulse width value to sustain the output high level trigger pulse for certain time and return to low level again, so a bidirectional thyristor trigger pulse output is completed.

Conclusions
The speed control system taking PIC16F877 SCM as the bidirectional thyristor trigger circuit designed in the article possesses many characters such as simple structure, reliable running, wide regulation range, good current continuity and quick response in the middle and small sized DC motor speed control system, and the rotate speed loop adopts PI control algorithm, which can effectively restrain the super modulation of rotate speed, so it is a feasible design to adopt the speed control system of SCM, and the running curve is seen in Figure 7. Figure