The excitation controller based on LPC11c14 completes the hardware and software design of frequency measurement, terminal voltage and synchronous shift trigger.
The terminal voltage is obtained by AD sampling. The terminal voltage is compared with the given reference value as a control signal. The control voltage Uk is obtained by PID control processing, and the Uk is converted to trigger angle alpha by equivalent substitution. The angle is converted to time t, and the trigger pulse is emitted when the matching time reaches to complete the trigger of thyristor by the timer matching function.
Excitation controller is an important part of excitation control device. The main function of excitation controller is to ensure that the terminal voltage changes within a limited range through the regulation function of excitation controller. This paper is mainly divided into two parts. The first part completes the hardware design of power supply circuit, frequency measurement circuit, terminal voltage measurement circuit and synchronous shift trigger circuit. The second part completes the sampling processing program of frequency and terminal voltage and the software design of synchronous shift trigger.
The excitation controller based on LPC11c14 has simple structure, good stability and can basically meet the operation requirements. The core tex-M0 series single chip LPC11c14 of ARM company is used as the CPU of the excitation controller. Then the corresponding peripheral circuits are designed, including power supply circuit, synchronous frequency measurement circuit, terminal voltage sampling circuit and synchronous phase-shifting trigger circuit. The overall hardware structure is shown in Figure 1. The hardware circuit of the power supply is shown in Fig. 2. The power supply of the excitation control system is AC:100-240V and DC:24v produced by Meanwell Company. The input is 220V for municipal power supply. The power module DC-DC/K7805-1000L is used to convert DC24v to DC5v, and LM7803 is used to complete the conversion of DC5v-3.3v. 3.3V is used as the power supply of CPU LPC11c14. Proper capacitance is added to the circuit to play an anti-interference role. The hardware circuit of synchronous frequency measurement is shown in Figure 3. J1-3 LAC2 is connected with positive excitation voltage output, J1-3 LAC2 is connected with negative excitation voltage output, and U12 is connected with photoelectric isolation respectively. After filtering and shaping circuit, the sinusoidal wave is shaped into standard square wave, and the output is connected with pin 33 of CPU. Pin 33 is configured as a capture function when the port is initialized, and is used to measure the frequency when the rising edge is captured continuously. The hardware circuit of terminal voltage measurement is shown in Fig. 4. The grid voltage is transformed into AC voltage signal of the same frequency and direction by analog voltage transmitter WB V413B0. The terminal voltage is isolated and converted into standard analog signal output, and then through bridge rectifier circuit, AC signal is converted into DC signal. The filter amplifier circuit is connected to the 39th pin of CPU, which is configured as AD sampling function when the port is initialized. It is used to sample the terminal voltage. The synchronous shift trigger circuit is shown in Fig. 5. The trigger mode with two timers of LPC11c14 as the core (34,35 pins) is selected, and the trigger angle a is converted to time. When the timing time reaches the trigger pulse, the SCR is triggered by a single semi-controlled bridge rectifier circuit to achieve the purpose of feedback regulation.
It is known that the pin 33 of LPC11c14 is configured as CAP capture function when IO is initialized by hardware circuit. When two rising or falling edges of a square wave are captured continuously, the time difference between them is our period T. Then, T is converted to frequency f.
The flow chart of frequency measurement is shown in Figure 6. The frequency measurement circuit is used as a reference circuit. When the rising edge is captured, thermostatic element the AD conversion is started to sample the terminal voltage. The sampling times are 64, that is, 64 sampling times in a cycle are needed, and each sampling time point is T/64. The value of the matching register is changed to the sampling time point. When the timing time arrives, the AD conversion is started and each conversion is completed. Record the number of sampling times to 64 times, then complete the terminal voltage sampling, and then filter the sampled data with median, finally get the terminal voltage value. As shown in Figure 7. The structure of the phase shift trigger unit is shown in Fig. 8. The excitation controller uses a timer (pin 34,35) to trigger the synchronous pulse, and provides a reference value for the terminal voltage. With the terminal voltage obtained by AD sampling, the excitation controller performs PID processing. KP = 12.
00, Ki = 800, Kd = 10. Then a control voltage Uk is obtained. Then the trigger angle of thyristor is calculated by Uk.
The triggering process is shown in Fig. 9.
When the selected square wave of synchronous signal arrives, the synchronization point (rising edge time) is captured and the triggering angle time of alpha is delayed. The generation of pulse G1 is realized by setting 34,35 pins, and the difference between G2 and G1 is half a cycle. The hardware design of synchronous frequency measurement, terminal voltage sampling circuit and synchronous shift circuit based on LPC11c14 excitation controller is completed. The frequency and terminal voltage measurement are completed, and the trigger of thyristor is realized.
The system has the characteristics of strong anti-interference ability, high speed, relatively simple design and low cost. The next step is to replace the traditional PID control theory with the new control theory.