Microsoft Word - CET--006.docx CHEMICAL ENGINEERING TRANSACTIONS VOL. 59, 2017 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Zhuo Yang, Junjie Ba, Jing Pan Copyright © 2017, AIDIC Servizi S.r.l. ISBN 978-88-95608- 49-5; ISSN 2283-9216 The Design and Research Based on the DSP Digital Switching Power Supply Shuhua Jiang Changzhou vocational institute of engineering, Changzhou 213164, China huahua@126.com The so-called digital control power source, also referred to as a "loop inside the processor" refers to the system controller can execute the control algorithm in the digital domain. It is necessary to compare the two to produce strings of digital pulse width to drive the power switch, but instead of using a conventional analog PWM comparator. It will all analog system parameters into a digital signal in the digital domain and using the data to calculate the control response, and the newly generated control information is transmitted to the system increases. By digitally controlled analog circuits can greatly reduce system cost and power consumption. In addition, many microcontroller and DSP have been included in the PWM controller chip, which allows the realization of the digital control has become easier. 1. Introduction With the development of the power electronics industry, switching power supply play an increasingly important role in the electronics industry, which has been widely applied to various fields of aviation, communications, transportation, etc. This paper conducts the design and research based on the DSP digital switching power supply. In terms of the principle, it makes the specific introduction on the work process of the fly-back converter and establishes the small-signal linearized modeling. In hardware, combining with system indicators of design, the filtered rectifier circuits, fly-back main circuit and clamp protection circuit arc analyzed at length; and the selecting principles are identified. In controller, the high performance TMS320F2812 is selected as controlling core. We design a DSP-based digital switching power supply with fully digital control and remote management and monitoring capabilities. It has greatly enhanced the intelligence, reduced the volume and influence of environment change. DSP chip such as a digital high-performance direct control of the power supply, the digital signal sampling chip to complete the A / D converter and the PWM output, etc., since the digital output PWM signal enough to drive the power switches, required to drive the chip. This can simplify the control circuit, because these chips have a higher sampling rate and computing speed, you can quickly and efficiently achieve a variety of complex control algorithms to achieve effective control of power, there is a high dynamic performance and voltage accuracy (Martens, 2007). Digitally controlled power system characteristics are as follows: (1) the digital signal processor (DSP) or microcontroller core, intelligent switching power supply system and the digital power drive PWM controller constituted as a control object. (2) The use of "integrated digital power" technology can achieve the optimal combination of switching power analog components and digital components (Chen, 2016). (3) High integration to achieve a monolithic integrated power system, a large number of discrete components into a single chip or a chip set. (4) We can give full play to the advantages of digital signal processors and microcontrollers that are designed to achieve the high-tech digital power indicator. 2. DSP techniques DSP techniques can be used to load application time is constant, so that the high frequency power source operating state, such as power factor correction, the non-interrupted power supply, a plurality of electrical and chemical batteries translation motor control; also, configurable for the use of certain core and PWM control, DOI: 10.3303/CET1759139 Please cite this article as: Shuhua Jiang, 2017, The design and research based on the dsp digital switching power supply, Chemical Engineering Transactions, 59, 829-834 DOI:10.3303/CET1759139 829 diagnostics and other applications interface circuit PMU phones and PDA's, etc. Running time control circuit sub-circuits or peripheral provides optimum operating voltage to its current state in order to save energy. Digital power control can be more sensitive regulator (Fisher et al., 2008). DSP uses the popular TMS320LF2407, mainly for digital PID calculation; complex programmable logic device CPLD digital PWM waveform generation control the main power converter according to the results of the calculation of DSP, analog PWM controller to avoid the double pulse frequency phenomena phenomenon and a half, PWM to achieve a fully digital control; acquisition AID converter circuit as a voltage, current, temperature and other data, the chips may TLC5540 chip, or TLC2543 chip voltage signal acquired through this AID converter circuit, the lower eight bits of the data bus into the DSP, the sine wave signals are compared with the standard, when the detected magnitude of the output voltage is higher than the standard sine wave signal, the duty cycle proportionately reduced, in order to achieve a modulation of the switching power supply output sine wave and the amplitude. Digital signal processor, a fast and efficient processor for digital signal processing and development, and it is mainly used in real-time to quickly achieve a variety of digital signal processing algorithms. Using digital signal processing system has many advantages, such as: easy interface, DSP includes a variety of interfaces can easily and some of the existing systems or devices to communicate; stability, because DSP digital processing is based on the external environment interference, such as the smaller of its temperature, noise, etc.; high precision, a relatively simple 16-bit DSP precision can reach 10-5; easy integration, DSP digital components are highly standardized, easy to scale integration; programming convenience, designers can easily during development software modifications and upgrades. DSP chip advantages are as follows (Zhou et al., 2009). Figure 1 shows the DSP chip advantages. DSP chip advantages CMOS technology Harvard architecture Extensive storage space Pipelined architecture Figure 1: The DSP chip advantages DSP uses a Harvard architecture, the program space and data space separated, allowing simultaneous instruction fetch and operand fetch, which can be on a number of operations to perform arithmetic instruction while the next instruction is read, allowing space between program and data space mutual transfer data. This benefit of speed can be performed simultaneously. There are even specific DSP multiply-add instruction, namely MAC (Multiplier-Accumulator) instruction, to complete the multiplication and addition operations in one clock cycle. In cycling, DSP also repeated n times n times or loop instruction, do not always check the number of cycles can be completed faster n cycles. DSP kernel there is another important feature of the design, that is, the use of pipeline structure, a plurality of control and arithmetic unit working in parallel. When the DSP to execute an instruction, need to go through the instruction fetch, instruction decode, fetch multiple stages, such as the number and executes instructions. Thus by taking the first instruction in the first clock cycle, when the second clock cycle for decoding the first instruction of the second instruction can be read simultaneously when the third clock cycle the first instruction operand fetch operation performed on the second instruction decode and read the third instruction, execute the first instruction of the fourth clock cycle, the second instruction fetch operations carried out on the third instruction decoding, reading the fourth instruction. In addition, DSP compared to some other microcontrollers (MCU, ARM, FPGA, etc.) as well as some of the following basic features: (1) multi-bus architecture: DSP internal multi-bus structure, can guarantee in a single machine cycle times access program and data space, greatly improving the speed of DSP; (2) contains a wealth of storage space and peripheral resources, can greatly improve the data read and write speeds, can be applied to various DSP intelligent control, motor control, power electronics technology, etc. fields. We can see the advantages of DSP its powerful data processing capability and high speed operation, while it is also a place in the field of control. DSP interface circuit can also be extended by LCD, keyboard man-machine data exchange and communication via serial RS-485 or RS-232. Using high-performance static CMOS technology, clocked at up to 150MHz, the core supply voltage drops below 1.8V, I / O port voltage of 3.3V; performance 32-bit CPU, can be completed within a period of a 32 × 32- 830 bit multiply-accumulate operation, CPU Harvard bus architecture, and has a fast interrupt response and processing capabilities. Has three low-power modes to reduce power consumption, they were idle mode (IDLE), standby mode (STANDBY) and stop mode (HALT). In low-power mode, the chip will be selective shutdown of individual peripherals clock or oscillator to reduce power consumption. 3. System hardware design Power system is divided into two parts, the main circuit and control circuit, achieved by TMs320F2812 excitation current, output voltage sampling and closed-loop control, the overall system architecture, including EMI filter circuit, a diode rectifier, DC smoothing circuits, fly-back converter main circuit, control, signal acquisition, PWM drive, keyboard and LCD human interface. Figure 2 shows the overall system structure. Figure 2: The overall system structure DSP-based digital switching power supply hardware composition contains the following sections: (1) EMC modules: the elimination of common mode and differential mode interference 220V mains and reduce high- frequency interference generated by the switch into the mains, reduce to mains interference; (2) PFC modules: improve supply power factor, reduce reactive power; (3) DC-DC module: voltage conversion, converted to the desired output voltage; (4) controller module: voltage and current sampling, feedback, control the DC output voltage stability, communicate with the host, the feedback power status, intelligent control; (5) driving circuit: DSP PWM wave output can directly drive MOSFET, need to be converted to the appropriate driver circuit voltage and larger drive capacity. For there is no phase difference between a purely resistive load, input voltage and current and non-current waveform distortion, power factor is 1. If the input current waveform without distortion, but the lag or lead of the input voltage in phase, only the phase of the input voltage and the input power is supplied to the load current component, and the input voltage while the vertical component of the input current or the power transmission is only the resistance of the generator the power consumption of the network (Thomas et al., 2009). Design of the system mainly through the following process: objectives of the project: to achieve high-precision DSP-based digital switching power supply hardware and software design. Detailed circuit schematic design: the detailed design of each module, detailed to the electronic components. PCB drawing and board: hardware connections and drawing process, in addition to PCB production, but also to complete the welding of components and power tests. Software design: the hardware foundation for the unit on modular software design, the system will be with a microcontroller, DSP and other micro-controller or processor related to software design. Integrated debugging: the development of late work, mainly joint commissioning of hardware and software, improve function according to project requirements, in the event of problems arising determine the cause of the problem, if it is software reason to modify the software, if it is the reason you should first see if the hardware through modify the software to compensate, if not, then you need to modify the hardware (Guo et al., 2009). In the closed-loop control system isolation switching power supply, in order to achieve security and isolation control circuit, to avoid the introduction of noise control loop output circuit, the output of the sampling circuit and control circuit isolation is necessary linear optocoupler and Hall sensor common isolation devices, optical coupler output signal and the input signal into a linear relationship is linear optocoupler linear optocoupler due to good performance and anti-jamming capability and is widely used in the input and output signals require electrical isolation of the occasion , in terms of the need for high linearity and high switching power loop control system bandwidth, and linear light Woe to achieve electrical isolation is a better choice. 831 3.1 DSP-based control system programming Fuzzy control system includes a complete fuzzy controller and control objects in two parts, of which the core part of the fuzzy controller also includes several links shown in the figure dashed box, these links cooperate together to complete the processing of the controlled object. DSP and other processors currently in general use look-up table to implement fuzzy PID algorithm, the specific process is based on the system of three first input e (k) and ce (k) the size of the application of fuzzy control rules PID controller parameters calculated offline, and obtained results are stored in the processor to prepare for the next program. Programming include the main program and interrupt service routine, focus is on the periodic interrupt programs such as T1, underflow interrupt and compare register compare interrupt design. In a full PWM cycle, count up and count down stage will generate a compare match, so the three compare unit interrupts a combined six times, but completed only compare interrupt PWM waveform transitions (Arunachalam et al., 2010). DSP using powerful data processing capability and speed advantage can improve the accuracy of power control system and real-time, you can quickly and efficiently achieve a variety of complex control algorithms to achieve effective control of power, there is a high dynamic performance and regulators accuracy, power inverters meet higher requirements, to provide the necessary hardware and software foundation for the all- digital power control system. We use the basic principles of fuzzy control method and its software implementation on the basis of the procedures for the control system design. The PWM waveform generation methods are described and give the relevant program flow, on the basis of the PWM waveform generation program debugging. Underflow interrupt the loading process completed first compare register value, after the results of AD conversion for reading, and to get the AD conversion is in turn the basis of PFC control circuit and DC / DC control calculation circuit. 3.2 DSP peripheral circuit design Rich DSP internal resources, so relatively speaking, the external circuit is relatively simple, mainly consists of several parts: power supply circuit, reset circuit, crystal oscillator circuit, JTAG debug interface and associated pin configuration circuit. DSP core voltage of 1.8V, I / O port voltage of 3.3V, while the external input power supply is 5V, so the main effect of the power supply circuit to + 5V voltage is converted to a voltage of 3.3V and 1.8V, to the DSP core and I / O power supply. AMS1117 series power supply circuit chips, AMS1117-3.3 power conversion chip converts a 3.3V to 5V I / O port power supply, AMS1117-1.8 power conversion chip 1.8V to turn into a DSP core power, AMS1117 47uF capacitor connected to the output, which is more to ensure power quality (Chen, 2010). Figure 3 shows the schematic of the power supply circuit. Figure 3: The schematic of the power supply circuit ADSP using powerful data processing capability and speed advantage can improve the accuracy of power control system and real-time, you can quickly and efficiently achieve a variety of complex control algorithms to achieve effective control of power, there is a high dynamic performance and regulators accuracy, power inverters meet higher requirements, to provide the necessary hardware and software foundation for the all- digital power control system. Reset circuit RC circuit is reset, connected to the DSP reset pin DSP_RST, and added a manual reset button, easy to use in manual reset. Figure 4 shows the reset circuit 832 Figure 4:The overall reset circuit In order to meet the power dynamic and static performance, fast operating speed DSP as the core controller. In order to reduce losses and voltage spikes, the paper combines phase-shifted full-bridge soft switching PWM mode with switching tube to achieve the purpose of improving the overall efficiency of the power system. Phase-shifted full-bridge super forearm and lagging leg to achieve soft switching process, analyze the difference between the two leg achieve soft switching process and propose solutions. DSP JTAG interface is carried out inside the FLASH programming and simulation debugging. Its role in connection with the DSP each pin were: TDI test data input, TDO for test data output, TCK test clock input, TMS for Test Mode Select, TRST port for the test reset, active low. Figure 5 shows the connection diagram of JTAG. Figure 5: The connection diagram of JTAG In addition, the design part of the protection circuit is also done here, the digital control circuit is a major advantage is that you can use flexible software program to replace complex hardware protection circuit, so the protection part is done in software. The program has a mask-able interrupt and NMI. Among them, the non- mask-able interrupt is configured for a program or system error, in any case as long as this interruption is detected, the program will disable the output, thereby protecting circuits and devices. Mask-able interrupt is generally the system is running against overvoltage, overcurrent, etc., the purpose is to ensure that the system of indicators can meet the requirements, for example: when the output voltage is too low, this interruption is generally not make the program terminates, and is the use of a certain algorithm processing, the index returned to normal (Xu et al., 2010). 3.3 System debugging PCB processing hardware design is completed after the completion of the first to be welded, the welding is completed, no one can guarantee that it will be able to work, you need step by step test, which is the process of discovery issues, the process is to solve the problem. First part of the DSP control power, the first time after power, should detect whether the system is running with the basic conditions, that is, to various parts of the power supply section is normal, the voltage is normal, if there is not a normal fever; detection of DSP whether the crystal normal start-up. Reset pin signal is normal. After performing the above steps can access the download cable, to see whether the normal download and debug program, you can turn on the peripherals used individually tested normal, such as AD pin access an adjustable divider, followed by DC signal and the AC signal AD sampling, by contrast multi-meter and oscilloscope conversion results until AD conversion can be carried out in accordance with proper control. PWM module in order to make the frequency and duty cycle of the output signal for each channel is set. Serial found in this process is very useful debugging tool because each replacement configuration can’t re-download 833 the program, you can send data through the serial port to replace the parameters, while you can easily analyze the data to the computer, so the serial is the first a debugging module needs. After completion of the above debug access to the main circuit, first test whether the PWM signal distortion through the drive circuit, dead time control is normal. After the completion of this portion of the debugger for debugging voltage and current detecting part, in the direct access to a corresponding DC power supply test points, DSP tests whether the acquired signal is a normal sample (Skup et al., 2011). After completion of the above tests can begin debugging overall function, and in turn debugging PFC circuits and DC / DC circuit, the first to use an AC voltage regulator for the circuit to provide a stable input power, input power from the lowest voltage after the completion of commissioning to the highest voltage, see the system is working properly in this process. Finally, direct access to electricity can see in the case of relatively large noise mains input parameters whether the system can meet the requirements. Exchange regulator has a current limiting function is best to avoid procedural errors or parameters damage caused by improper switch. In the software process, although the program does not how to go wrong, this step in when the time sampling A / D, found in the sampled values of A / D by inspection, found that the sampling time, and did not add the reference voltage, and this design AD0 used in the mouth is not connected right, by correcting the problem solved. 4. Conclusion With the continuous development of the power electronic technology and control technology, in order to enhance the performance of the switching power supply and enrich the control ways of the switching power supply, the digital switching power supply has been the new hot topic of the research. The DSP is selected as the core chip of the main control part. Event management module and analog to digital conversion module in DSP are mainly used. Through programming, voltages and currents in the circuit are sampled. Then event management module generates PWM wave to control the switches in order to get the purpose output voltage. The project needs to complete the hardware and software design. Digital power supply is a new power supply technology which has some new functions like intelligent control, protection circuitry and communication interfaces. Digital signal processor (DSP) promotes the development of digital power supply. Reference Arunachalam T., 2010, Digtal Pulse Width Modulation Techniques for Power Converters, US. University of Alabama. Chen D.F., 2016, Fault classification research of analog electronic circuits based on support vector machine, Chemical Engineering Transactions, 51, 1333-1338, DOI: 10.3303/CET1651223. Chen Y.L., Chiang C.Y., 2010, Embedded Vision-based Nighttime Driver Assistance System, International Symposium on Computer Communication Control & Automation, 6(2), 199-203, Doi: 10.1109/3CA.2010.5533586. Fisher R.A., Ngo K.D.T., Sookhz A., 2008, 250WDC/DC converter with multiple output controlled by phase- shifted PWM and magnetic amplifiers, Processing of HFPC, 100. Guo L.P., Hung J.Y., Helms I.Z.M.., 2009, Evaluation of DSI'-hosed PAID and fuzzy controllers for DC-DC converters, lEEE. fransnctionson Industrial Eletronics, 56(6), 2237-2218. Martens O., 2007, DSP-based power-quaity monitoring device. 2007 IEEE international symposium on intelligent signal processing, WISP, 445-451, DOI: 10.1109/WISP.2007.4447591 Skup K.R., Grudzinski P., Orleanski P., 2011, Application of Digital Control Techniques for Satellite Medium Power DC-DC Converters. International Journal of Electronics and Telecommunications, 57(1), 77-83. Thomas B.H., 2009, Roadblocks: Current Technology Challenges forUbiquitous Virtual Reality, International Workshop on Ubiquitous Virtual Reality, 1-4. Xu D., Yu T., Ma Y., 2010, Software design of digital Power supply based on Lab-Windows/CVI. 2010 International Conference on Measuring Technology and Mechatronics Automation, Changsha City, 418- 421. Zhou P., Sridharan K., Sapatnekar S.S., 2009, Optimizing decoupling capacitors in 3d circuits for power grid integrity, IEEE Design & Test of Computers, 26(5), 15-25, DOI: 10.1109/MDT.2009.120. 834