Master’s Thesis Abstract
Abstract
The purpose of this master thesis project has been to study, operate and program the 32-bit 150MIPS TMS320F2812 DSP developed by Texas Instruments Inc. In addition, it has also been a goal to implement fast estimation techniques for control of resonant converters. For this purpose, PWM signals that are generated using this DSP are used. The demands on the system and the hardware to solve the problem were already decided when I started the work.
The algorithms were programmed in C/C++ language, compiled, debugged and transferred to the DSP development board in a compiling and simulation tool (downloader), called CCS (Code Composer Studio v2), also provided by Texas Instruments.
In the first chapters of this thesis I give general information about control systems, digital signal processors, digital signal processing and the DSP used in this work. The following chapters tell about PWM, how to configure the PWM outputs and some examples related with PWM signals are given. After a short review of series resonant converters, I presented the last example implemented in this project. I conclude with a summary and provide some hints of future work.
Baris Bagci 1
Master’s Thesis Acknowledgements
Acknowledgements
I would like to thank everyone at the Faculty of Information, Media and Electrical Engineering at the University of Applied Sciences Cologne, who have helped me to accomplish this diploma work. Special thanks go to Professor van der Broeck for the valuable assistance, guidance and encouragement he gave during the work. Many thanks to Professor Große for acting as the second referee.
I also wish to thank Mr. Kellersohn and Mr. Küster for the great co-operation.
Last but not least, I would like to thank my parents for the opportunity to do my degree at all.
Baris Bagci 2
Master’s Thesis Declaration
Declaration
I declare that this thesis is my own work and has not previously been submitted for any other form of assessment. Information derived from the published or unpublished work of others has been acknowledged in the text and a list of references is given.
24.10.2003 ______________________________ Date Signature
Baris Bagci 3
Master’s Thesis Table of Contents
Table of Contents
Abstract 1
Acknowledgements 2
Declaration 3
Table of Contents 4
List of Figures Tables 6
1. Introduction 9
1.1 Power Electronic and Electrical Drive Systems 9
1.1.1 Power Electronic Applications 9
1.1.2 Switched Mode Operation 10
1.1.3 Electrical Drive Applications 11
1.1.3.1 Motion Control 12
1.2 Control Systems 16
1.2.1 Digital versus Analog Implementation 16
1.2.1.1 Review of Today’s Servo Drive Systems 18
1.2.2 Digital PWM Control Using DSP 21
1.3 Digital Signal Processors 23
1.3.1 Data Path of a DSP 28
1.3.2 Peripherals of a DSP 29
1.4 Digital Signal Processing 32
1.4.1 The History of DSP 33
2. The TMS320 F2812 DSP 36
2.1 Overview 36
2.2 The Peripherals of F2812 41
3. The eZdsp F2812 Board 47
3.1 Overview 47
3.2 eZdsp F2812 Connectors 49
4. DSP Software Development 54
4.1 Basic Software Tools Required 54
4.2 Code Composer Studio 56
4.2.1 Creating a New Project 56
4.2.2 Adding Files to a Project 57
4.2.3 Building and Running the Program 59
Baris Bagci 4
Master’s Thesis Table of Contents
5. PWM 67 5.1 Definition 67
5.2 Event Manager PWM Waveform Generation 68
5.3 Generation of PWM Outputs 70
5.3.1 Asymmetric and Symmetric PWM Generation 70
5.3.2 Program Example 5.3.3 Dead-Time Generation on the TMS320C2812 5.4 Creating a PWM Signal with Fixed Duty Cycle and Frequency 83
5.5 Creating a PWM Signal with Variable Duty Cycle and Frequency 86
6. Applications 92
6.1 Creating a Sine Modulated PWM Signal 92
6.1.1 Sine Modulated PWM Generation to Control Inverters 95
6.2 Control of a Half-Bridge of a Switched Mode Power Supply 98
6.3 Control of a Series Resonant DC-DC Converter 100
6.3.1 The Series Resonant DC-DC Converter
6.3.2 The Snubber Effect
7. Conclusion and Recommended Continuation 113 7.1 Conclusion 113 7.2 Future Work 113 Bibliography 114 Appendix 119 A. Program Codes 119
B. Circuitry and Wiring Diagram of the Experimental Set-Up 136
C. Acronyms and Abbreviations 138
D. Schematics of the eZdsp F2812 Board 140
E. Sine Values Contained in sinus.dat 145
Baris Bagci 5
Master’s Thesis List of Figures Tables
List of Figures Tables
Figures
Figure 1 1 Power Electronic System Consisting of Power Electronics and Control 9
Figure 1 2 Electrical Drive Consisting of Power Electronics, Electrical Machine and Control 11
Figure 1 3 Basic Structure of a Typical Motion Control System 13
Figure 1 4 Typical Microcontroller-Based Digital Control System Diagram for PWM DC/DC Converter 20
Figure 1 5 Typical DSP-Based Digital Control System Diagram for PWM DC/DC Converter 21
Figure 1 6 Architecture of Digital PWM Using Digital Signal Processor 22
F i g u r e 1 7 M A C O p e r a t i o n 24
Figure 1 8 In DSPs, an Analog Signal such as Voice is Digitized by an Analog-to Digital Converter 25
Figure 1 9 Harvard Architecture 25
Figure 1 10 Von Neumann Architecture 26
Figure 2 1 A New TI DSP Product Line: 32 bit Flash Mixed Signal DSP 36
F i g u r e 2 2 C 2 8 x D S P C o r e 37
Figure 2 3 On-Chip 12 bit Analog-to Digital Converter 38
Figure 2 4 2 On-Chip Event Managers 39
Figure 2 5 TMS320 F2812 DSP Simplified Hardware Diagram 39
Figure 2 6 IQmath Library: Floating Point on a Fixed Point Machine 40
F i g u r e 2 7 I Q m a t h A p p r o a c h 40
Figure 2 8 Block Diagram of the F2812 ADC Module 44
Figure 3 1 Block Diagram of the eZdsp F2812 48
Figure 3 2 eZdsp F2812 Connector Positions 49
Figure 3 3 Top View of the eZdsp F2812 Board 49
Figure 3 4 P1 Pin Locations 50
Figure 3 5 Connector P2 Pin Locations 50
Figure 3 6 P4 /P8 /P7 Connectors 51
Figure 3 7 Connector P5 /P9 Pin Locations 53
Figure 4 1 Steps Taken during DSP Software Development 55
Figure 4 2 The Project Creation Window 56
Figure 4 3 The Project Manager Window 58
F i g u r e 4 4 T h e W a t c h W i n d o w 61
Figure 4 5 The File I/O Dialog 63
Figure 4 6 Changing the Address and Length Values in the File I/O Dialog 63
Figure 4 7 The Brake/Probe Points Dialog 64
Figure 4 8 The Graph Property Dialog 65
Figure 5 1 Decomposition of PWM Signal 67
Figure 5 2 Asymmetric PWM Waveform Generation with Compare Unit and PWM Circuits 71
Figure 5 3 Symmetric PWM Waveform Generation with Compare Units and PWM Circuits 71
Baris Bagci 6
Master’s Thesis List of Figures Tables
Figure 5 4 PWM Signal and its Complement at the Pins PWM3 4 and PWM9 10 76
Figure 5 5 PWM Signal and its Complement at the Pins PWM5 6 and PWM11 12 77
Figure 5 6 PWM Signals plus Complemented PWM with Dead-Time 79
Figure 5 7 PWM Signals plus PWM with Dead-Time 79
Figure 5 8 PWM1 PWM2 without Dead Band: PWM1 Active High and PWM2 Active Low 80
Figure 5 9 PWM1 (Active High) and PWM2 (Active Low) Outputs with Dead Band 80
Figure 5 10 PWM1 (Active Low) and PWM2 (Active High) Outputs with Dead Band 81
Figure 5 11 Both PWM1 and PWM2 Configured Active High with Dead Band 81
Figure 5 12 Both PWM1 and PWM2 Configured As Active Low with Dead Band 81
Figure 5 13 Inverter Phase with Two Power Devices Connected in Series 82
Figure 5 14 PWM Signal with Frequency 30kHz and Duty Cycle 50 and its Complement 84
Figure 5 15 The Experimental Board 85
Figure 5 16 Register Watch Window in CCS 86
Figure 5 17 PWM with f 20kHz, Duty Cycle 50 , without Dead-Band 87
Figure 5 18 PWM with f 30kHz, Duty Cycle 50 , without Dead-Band 87
Figure 5 19 PWM with f 40kHz, Duty Cycle 50 , without Dead-Band 88
Figure 5 20 PWM with f 20kHz, Duty Cycle 90 , without Dead-Band 88
Figure 5 21 PWM with f 20kHz, Duty Cycle 70 , without Dead-Band 88
Figure 5 22 PWM with f 20kHz, Duty Cycle 50 , Dead-Band 6 4µs 90
Figure 5 23 PWM with f 20kHz, Duty Cycle 50 , Dead-Band 4 4µs 90
Figure 5 24 PWM with f 20kHz, Duty Cycle 50 , Dead-Band 2 4µs 90
Figure 5 25 PWM with f 1kHz, 50 Duty Cycle and Dead-Band 448µs 91
Figure 6 1 Duty Cycle Modulation versus Analog Input Voltage 92
Figure 6 2 Sine-Modulated PWM Signal 93
Figure 6 3 Adding a File to the Probe 94
Figure 6 4 Connecting the Probe Point to a File 94
Figure 6 5 Plot of the Stored Sine Values in File 95
Figure 6 6 The Potentiometers and DIP Switches on the Board 96
Figure 6 7 Sine Modulated PWM to Control Inverters 97
Figure 6 8 PWM with F 9 5kHz, DIP 1 DIP 2 01 99
Figure 6 9 PWM with F 7 4kHz, DIP 1 DIP 2 10 99
Figure 6 10 PWM with F 120kHz, DIP 1 DIP 2 11 99
F i g u r e 6 1 1 T h e C o n v e r t e r C i r c u i t 100
Figure 6 12 Electrical Circuit of the Series Resonant DC-DC Converter 101
Figure 6 13 Series Resonant DC-DC Converter Equivalent Circuit 102
Figure 6 14 Transformer Set Up with a Fixed Primary Coil and a Movable Secondary Coil 103
Figure 6 15 Sampling of the Sinusoidal Current 104
Figure 6 16 Converter Frequency is Higher than the Switching Frequency 107
Figure 6 17 Converter Frequency is Equal to the Switching Frequency 107
Figure 6 18 Converter Frequency is Lower than the Switching Frequency 108
Figure 6 19 SRC Circuit with Snubber Capacitor C S Added Parallel to T1 110
Baris Bagci 7
Master’s Thesis List of Figures Tables
Figure 6 20 Commutating the Transistor Voltage Linearly from 0 to U in 110
Figure 6 21 UT1 (1 ) and Converter Current(2 ) when Dead-Time 0 5µs, without Capacitor 111
Figure 6 22 UT1 (1 ) and Converter Current(2 ) when Dead-Time 3µs 111
Figure 6 23 UT1 (1 ) and Converter Current(2 ) when Dead-Time 0 5µs 112
Figure B 1 Circuit Used in Control of SRC 136
Figure B 2 Photograph of the SRC Set-Up 136
Figure B 3 Circuit of the Experimental Set-Up 137
Figure B 4 Photograph of the Experimental Set-Up 137
Figure D 1 Schematic of the DSP 140
Figure D 2 Schematic of the P1 Header 140
Figure D 3 Schematic of the P2 Header 141
Figure D 4 Schematic of the P3 Parallel Interface 141
Figure D 5 Schematic of the P4 Header 142
Figure D 6 Schematic of the P5 Header 142
Figure D 7 Schematic of the P6 Power Connector 142
Figure D 8 Schematic of the P7 Header 143
Figure D 9 Schematic of the P8 Header 143
F i g u r e D 1 0 S c h e m a t i c o f t h e P 9 H e a d e r 143
Figure D 11 Schematic of the JTAG Controller 144
Tables
Table 1 1 Evolution of DSPs 34
Table 3 1 eZdsp F2812 Connectors 50
T a b l e 3 2 P 8 , I / O C o n n e c t o r s 52
Table 3 3 P9 , Analog Interface Connector 53
Table 5 1 Deadband Register Settings for Dead-Band Generation 89
Table 6 1 States of DIP Switches in Prg a 96
Table 6 2 States of DIP Switches in Prg b 98
T a b l e 6 3 S R C O p e r a t i n g M o d e s 102
Table E 1 The Sine Values Stored in File 145
Baris Bagci 8
Master’s Thesis Introduction
1. Introduction
1.1 Power Electronic and Electrical Drive Systems
The market for power electronics and power-electronic-controlled electrical drives is rapidly growing. Often, the application of power electronic and electrical drive (PE&ED) systems requires careful engineering because PE&ED systems are utilized as energy converters or as actuators embedded in larger engineering systems. Control systems are required to obtain the desired characteristics of the PE&ED systems and the entire application. The diversity of applications is reflected in a correspondingly wide range of control methods. Hence, a large variety and a large volume of control systems have to be designed, implemented and tested.
1.1.1 Power Electronic Applications
Power electronics constitutes an electrical engineering system, which is always embedded in a system comprising an electric power supply and an electrical load as depicted in Figure 1.1. Note that power electronics itself does not constitute a source of electric power but transforms electrical energy. Electrical energy can be supplied by the electric utility grid comprising remote energy sources and transmission devices. Alternatively, it might be supplied by local energy sources, such as solar cells, wind or hydro generators or energy storage elements like electrochemical batteries [1].
Figure 1.1 Power Electronic System Consisting of Power Electronics and Control Embedded between a Power Supply and an Electrical Load
If the characteristics of the energy source do not meet the requirements of the load then power electronics is used as an interface between the energy source and the load. This might for instance be related to the amplitude of dc systems, the amplitude and frequency of fixed frequency ac systems or disturbances caused by other loads connected to the same power supply. Thus, the task of power electronics can be defined as converting electric energy and controlling the flow of electric power by means of power semiconductor devices in accordance with the requirements of the load. The latter may comprise specifications on
Baris Bagci 9
Master’s Thesis Introduction
amplitude, frequency, and number of phases, allowed harmonic distortion and transient voltages. High efficiency is most often a major requirement for power electronic circuits due to the cost of energy and cooling systems.
Power electronics covers a wide range of applications including the following [1]:
• Energy conversion as part of electrical drives
• DC/DC converters of virtual any power range
• Unity-power-factor rectifiers for applications including railway traction drives which operate of a single-phase ac catenary supply
• Generation of (multi-phase) voltage systems of virtually any frequency or amplitude
• Power engineering applications such as ‘flexible ac transmission systems’ optimizing the utilization of electrical power transmission equipment
Most current power electronics (PE) systems are implemented using an intermediate dc link between two stages of power conversion. Depending on the energy storage element used, these systems impress voltages or currents on their loads and are thus called voltage source inverters (VSIs) or current source inverters (CSIs), respectively.
1.1.2 Switched Mode Operation
‘Switched mode operation’ is applied by power electronic circuits due to efficiency requirements and feasibility. In contrast, linear electronic systems use semiconductor devices as adjustable resistors by operating them in their linear region. This results in a low energy efficiency, which is not tolerable or even feasible at high energy levels or the energy density prevailing in power electronics [2]. For this reason, power electronics embodies power semiconductors used as switches that are either (ideally) fully on or fully off. The power semiconductors are operated that way that they switch between conducting and blocking states in a cyclic manner. The high efficiency achieved by this ‘switched mode’ operation is quite important due to the cost of wasted energy and the difficulty of removing the generated heat.
Most applications of switched mode operation involve the control of mean values to achieve the desired characteristics. Hence, the ratio of the on-state time of a semiconductor to the total
Baris Bagci 10
Master’s Thesis Introduction
cycle time is controlled. It is an important issue in control of power electronics to maximize the control bandwidth despite a limited switching frequency. The switching frequency usually has to be limited because the allowable total losses of the semiconductor devices have to be restricted. Besides off-state leakage and on-state conduction losses, the losses are related to switching losses caused by non-zero voltage and current during the finite duration of the switching operation. The total losses are most often limited by the heat dissipation capability of the package and the permissible power semiconductor junction temperature. A finite switching frequency causes VSI load currents or CSI load voltages to oscillate around the desired mean values.
1.1.3 Electrical Drive Applications
An electrical drive (ED) can be defined as a controlled electromechanical actuator for the purpose of ‘motion control’ of a larger mechanical engineering plant as shown in Figure 1.2. It consists of the electrical machine, the power converter, the control equipment and the mechanical load [3]. In all drives where the speed and position are controlled, a power electronic converter is needed as an interface between the input power and the motor [4].
Figure 1.2 Electrical Drive Consisting of Power Electronics, Electrical Machine and Control Embedded between a Power Supply and a Mechanical Load
It has to be emphasized that power electronic is used as tool to provide electric energy to electromechanical actuators for their movement and to achieve control of behavior of the actuators, thus achieving control of the behavior of the mechanical load. Thereby, the characteristics of the power supply to the electrical machine are used to control motion.
Examples of variable speed drive or motion control applications are:
• variable-speed drives for household appliances or industrial purposes
• high-performance servo drives for factory automation
• railroad traction drives
• maritime electrical propulsion systems
Baris Bagci 11
Master’s Thesis Introduction
1.1.3.1 Motion Control
Motion control deals with the use of high performance electric motors and is a very important part of industrial control systems. Motion control includes applications for speed and torque or position control in practically all branches of industry. An important advance in this field has been made during the last years by the introduction of microprocessor control systems. These systems are becoming a standard in motion control because of fast advances in microelectronics technology and well-known benefits, such as: [5,6,7]
• Greater accuracy
• Flexibility
• Repeatability
• Less noise
• Parameter sensitivity
• Higher interconnection capacity
As a consequence of this progress, more and more applications that have used simple electric drives for economic reasons are being replaced by motion control systems. This is a natural evolution considering the benefits offered by motion control systems in meeting the everincreasing needs for improved quality and greater productivity in all industries.
To facilitate this move towards motion control solutions, efforts are being made to continuously decrease the cost of these systems, especially considering their power electronics and control parts.
Motion Control System Requirements
Figure 1.3 presents the basic structure of a typical motion control system, which consists of:
• Electric motor (M)
• Power electronic block (PE)
• Digital control system (DCS)
Baris Bagci 12
Master’s Thesis Introduction
y*
Note:
Figure 1.3 Basic Structure of a Typical Motion Control System
The inputs to the digital controller are the reference quantity y and the process values, which are measured with a set of sensors and generally converted using analogue-to-digital (A/D) converters. These values are electrical (voltage V, current I) and mechanical (velocity w, position q) signals.
The DCS controls the PE through an output interface (OI). This interface consists of digital to analogue (D/A) converters, if the PE requires an analogue input, or of a simple isolation module, if the DCS directly controls the PE switching elements (transistors, IGBTs, etc.).
The requirements for such a system are demanding regarding steady state accuracy and dynamic behavior, sensitivity to external disturbances, measurement noise and parameter variation, and especially reliability and cost.
Inevitably, more and more quantities must be controlled simultaneously (position and/or speed, acceleration, torque, and current). All of these quantities are changing rapidly enough that the sampling time must be very small (typically in the range of 0.1 to 1 ms). Some of these quantities are measured; others can be estimated.
Invariably, there are analog inputs. The number of inputs can range from 5 to 8 for complex systems. This means that the microprocessor system must read the information from the corresponding sensors. Precision depends on the accuracy of the sensors and the converters. Typically these converters must have 10 or more bits of accuracy and a conversion time maximum of 10 ms.
Baris Bagci 13
Master’s Thesis Introduction
The extreme demands imply that sophisticated control algorithms must be executed in each sampling step. The control scheme of motion control systems is typically complex, even if the controller block is a simple PID (as it is in numerous applications).
For example, in the popular induction motor control principle the complexity derives from the induction motor, which is a nonlinear element. To linearize the induction motor, the equations must be reported to the rotor flux frame. The reference currents obtained in this way must be expressed in the stator frame so that the PE can be controlled. Control diagram complexity differs with the motor type and the system performance.
In many cases the simple PID controller is replaced by more sophisticated schemes, such as adaptive or optimal controllers, to obtain an improved behavior even when parameters change or disturbances occur.
Furthermore, the control scheme can become more complex if quantities necessary for control are estimated rather than measured. In this way the corresponding sensors are eliminated and the system becomes cheaper and more robust.
If analog control is completely eliminated, the digital control system must generate the switching commands for the PE elements. Depending on the motor and PE type, these commands must be computed following a specific algorithm.
For example, the pulse width modulation (PWM) strategy is usually employed for AC motors. The output value can be converted to the corresponding switching sequence either by software or hardware. The hardware solution is more complex but faster.
Aside from the motion control, the microprocessor system must communicate with other systems to receive commands and return process information. This usually requires a special motion control language consisting of a collection of instructions processed by the control system. The microprocessor thus receives the reference not as an array of values but as concise information used to construct an exact profile.
Baris Bagci 14
Master’s Thesis Introduction
A DSP is frequently used to accomplish such a large number of computations in the small sampling time (0.1 to 1 ms) provided. The DSP solution offers sophisticated control schemes with very good performance.
Because cost is an important restriction for most industrial applications, the scheme must be carefully chosen. An optimum solution must be balanced between the requirement for high performance and the cost of the microprocessor control system.
The cost of a DSP control system depends not only on the cost of the DSP but also the cost of external components (converters, filters, memory, specialized inputs and outputs such as an encoder and a PWM) [8].
A strong tendency in the field of motion control is to integrate the motor, the power converter, and the control electronics in a single, compact unit. This is possible because the size of power electronics is constantly being reduced. An intelligent motor is thus obtained with an extremely simple implementation, increased reliability, and reduced cost [9].
Baris Bagci 15
Master’s Thesis Introduction
1.2 Control Systems
Control intends to impose certain behavior on an engineering system (plant) in order to satisfy control criteria such as disturbance rejection, low steady-state error, fast transient response and robustness to parameter changes in the plant etc [10]. Control is used to ensure and increase the quality of the performance of the plant. The implementation of a control system or the emulation of a control design by rapid prototyping methods requires appropriate hardware structures.
1.2.1 Digital versus Analog Implementation
In power electronics systems, output voltage regulation has traditionally been accomplished using analog control concepts. In the analog controller, the analog signals of the output voltage and/or current are first processed by an analog transfer function using an operational amplifier with its appropriate compensation network. In this way, the transfer function applies the control laws to shape the output response of the switching converter. The analog controller then adjusts the duty cycle or switching frequency to drive the power switching devices. The main advantage of the analog control system is that the system operates in real time and can have very high bandwidth. Also, the voltage resolution of an analog system is theoretically infinite. However, an analog system is usually composed of hardware that does not lend itself to design changes, and advanced control techniques used to improve performance require an excessive number of analog components.
Even though dedicated analog integrated circuits remain the workhorse of controllers for switching converters, digital controllers are finding more and more applications. It is not only the steady price reduction that has made them attractive in various applications, but also the great functional developments of microcontrollers and digital signal processors (DSPs). As shown in Figures 1.4 and 1.5, the digital controller accepts the digitized sampled output voltage and current through analog-to-digital converters (ADCs). This information is then processed using a digital control algorithm, which is similar to the analog compensation network in terms of function. The output of the digital controller is then used to drive the power switching devices. In general, digital control offers some advantages over the analog counterpart. Some of the advantages are as follows:
Baris Bagci 16
Master’s Thesis Introduction
Digital components are less susceptible to aging and environmental variations. •
They are less sensitive to noise. •
Changing a controller does not require an alteration in the hardware. •
They can provide monitoring, self-diagnostics, and communication with a host computer •
or among several digital controllers.
The most important is they can facilitate some advanced control techniques, such as •
space vector modulation, adaptive control, fuzzy control, etc.
However, digital control systems are not without disadvantages when compared with analog control systems. Some of the disadvantages are as follows:
Finite signal resolution due to the finite wordlength of the ADCs, and DACs or PWM •
outputs, which cause the output less accurate. Analog control gives infinite resolution of the measured signal.
Time delays in the control loop due to both the sampling of ADCs and computation of the •
control algorithm by the processors.
Analog control can provide continuous processing of signal, thus allowing very high • bandwidth.
It may still need some analog interface circuits, increasing the overall system complexity •
and cost. However, this problem can be alleviated with more functions integrated into the controller or even application specific integrated circuits (ASICs).
Actually, DSPs or Microcontrollers are already widely used in AC motor drives and uninterruptible power supplies (UPSs), which are both inverter-based systems usually working at a few tens of kHz. They have permitted the application of advanced control techniques in these systems, which is hard to implement with analog control otherwise.
A digital AC drive consists of implementation of torque control by means of regulating the motor current which requires very high speed computation in the range of tens of microseconds, and speed control which requires relatively moderate computation intensity in the range of hundreds microseconds. All these functions have been implemented in one DSP or one microcontroller with/without a separate motion ASIC. This popularity has been due partly to availability and flexibility of desired algorithm implementation.
Baris Bagci 17
Master’s Thesis Introduction
1.2.1.1 Review of Today’s Servo Drive Systems
Today’s most servo motor drive systems are implemented by digital closed loop control instead of analog control. This has been primarily due to rapid advancement of Digital Signal Processor (DSP) and microcontrollers applied to motor control applications. In a typical servo control system, several functions are divided into tasks which run at different update rates depending on the required bandwidth and nature of the processing priority need - real-time operation versus delayed batch processes, scanned tasks versus one-time event driven tasks. Each task is controlled by a multitask operating system closely coupled with DSP or microcontroller interrupt structure.
A servo drive system in terms of a functional element, which deals with much closer machine control, requires fast processing, fast update rate and real-time process. They are closely tied with a specific motion peripheral hardware and it sometimes requires specific coding unique to peripheral hardware and interrupt structure inside of DSP or microcontroller.
On the contrary, tasks that are far apart from the machine side and are close to the host communication or man-machine interface side, require less frequent update and slow processing. However, it requires more memory intensive calculation since reference command generation over controlling parameter is more complicated than those, which are close to the machine side. For example, position reference command is much more complex as sophisticated motion profile generation advances. However, torque command is produced in a simple step function.
The fact is that torque is a fastest machine parameter, and needs to be controlled much more quickly than speed of motor shaft. Integral of torque is speed. Integral of speed is position. Integral of power results in motor temperature rise. Because of this chain of physical motor parameters, each parameter requires different speed of processing. It is typical that a real-time multi-tasking operating system is used to satisfy each required processing power [11].
Although digital control has been widely applied to motor drives and UPS applications, the digital control of power supplies faces slightly different technical challenges. In the case of motor drives, the controlled variable of interest is a mechanical quantity, such as position or velocity. Electrical dynamics are often included in the overall design model to achieve high
Baris Bagci 18
Master’s Thesis Introduction
performance goals, but the dominant time constants are associated with mechanical dynamics and are relatively large. Sampling periods are often on the order of several milliseconds to tens of milliseconds, so it is relatively easy to complete control calculations within a sampling period. In addition, the switching frequency is also about one order of magnitude lower than that of most power supplies. Therefore, it is also relatively easy to implement real time PWM control with the-state-of-art digital processors.
In the contrast, power supply applications focus on control of an electrical quantity, such as output voltage. Objectives often include excellent rejection of input and load of variations. The time constants of interest are often several orders of magnitude smaller than for motor drives. Hence, the higher sampling frequency is of greater concern.
Therefore, analog control concept is still the workhorse of most DC/DC converters. For most applications, especially low power DC/DC power supplies, analog control, which is usually realized by a single PWM control chip, still have advantages in terms of cost and simplicity. However, as the applications of power electronics are getting broader and the power electronics systems themselves more complex, the complexity of the system is beyond the capacity of analog control or the performance hardly satisfactory in some applications, e.g., some battery chargers, automotive HID ballast, voltage regulator modules (VRMs).
A microcontroller can be very inexpensive and possess many I/O functions (such as ADCs, timers, etc.), but its computing performance is often significantly lower than a typical DSP. For example, microcontroller may not support a fast multiplication or division instruction not to mention the shorter wordlength of the processor and longer machine cycle even for the same clock rate. Though DSP usually needs more supporting I/O chips, it has the potential of realizing high performance system even compared with analog control. There is also a tendency of integrating more I/O functions into DSPs.
As mentioned earlier, there are some major limitations for digital controller implementation of power converters. The first is output inaccuracy due to the finite wordlength of the ADCs, and DACs or PWM outputs. The second is achievable system bandwidth associated with the sampling and computing delays. The third one is the overall functional integration, which is closely related to the overall system structure and cost.
Baris Bagci 19
Master’s Thesis Introduction
So for practical purposes, DSP-based system can achieve real time PWM control, even cycleby-cycle control with satisfactory performance (as shown in Figure 1.5). While microcontroller-based systems have to rely on additional PWM control chips to accomplish the PWM switching function (for a few hundreds of kilohertz) and as an interface a digital- toanalog converter (DAC) is needed here (as shown in Figure 1.4) [12]. The PWM control is far from cycle-by-cycle. The control output from the controller will be updated at a relatively low speed compared to switching frequency and it is a sample and hold process in principle.
So from speed and accuracy point of view, DSP can achieve real-time PWM control up to a few hundreds of kilohertz without additional DAC and PWM control chip and microcontroller cannot and have to rely on additional DAC and PWM control chip for present-day power supplies. It should be noted that achievable bandwidth really depends on the complexity of the control algorithm and the capacity of the instruction set. We only consider the case of single output voltage regulation. It is also possible to realize parallel operation of multiple converters, e.g. VRMs, with more advanced control strategy. Finally, we have to point out that even DSP-based system cannot realize peak current mode control due to the excessive speed requirement of the current sensing though average current mode control is possible.
Figure 1.4 Typical Microcontroller-Based Digital Control System Diagram for PWM DC/DC Converter
Baris Bagci 20
Master’s Thesis Introduction
Figure 1.5 Typical DSP-Based Digital Control System Diagram for PWM DC/DC Converter
1.2.2 Digital PWM Control Using DSP
PWM Controllers
Pulse Width Modulation controllers are implemented using both analog and digital control schemes. Pulse width modulator produces a logic signal, which is periodic with frequency f and has duty cycle d. The signal is used to control the duration over which power transistor in the converter are switched on. The input to the pulse width modulator is an analog control signal. The modulator manipulates the analog control voltage to produce the duty cycle in proportion to it.
With the recent advances in the semi-conductor industry, microprocessors and digital signal processors are used in producing digital PWM. A PWM controller using DSP is shown in Figure 1.6 [13]. In this control scheme the parameters of interest like the output voltage, input voltage and current are fed into a set of preamplifiers and digitized using an A/D converter. These parameters are manipulated suitably in the digital signal processor where the required numerical values namely Ts, Ton, Ts, corresponding to switching period, on-time for the converter switches and start time for the A/D signal conversion are generated. The
Baris Bagci 21
Master’s Thesis Introduction
calculations of these values are based on a set of gain equations. The architecture of this
approach is shown in Figure 1.6.
Baris Bagci 22
Master’s Thesis Introduction
1.3 Digital Signal Processors
A Digital Signal Processor is a super-fast chip computer, which has been optimized for the detection, processing and generation of real world signals such as voice, video, music, etc, in real time. It is usually implemented in a single chip or nowadays just part of an IC, about 0.5 cm² to 4 cm² [14].
In contrast, a microprocessor is traditionally a much less powerful computer that performs the mundane tasks, often controlling other devices - e.g. keyboard entry, central heating, washing machine cycles, etc.
Digital signal processors were created many years after general-purpose processors. The need for digital signal processors was due to specific features of digital signal processing algorithms. These algorithms usually include MAC (multiplication and accumulation), where each item of a MAC is in turn a multiplication of other two items. Hence, the main operation in algorithms of digital signal processing is the combination of multiplication and accumulation.
Nearly every DSP is capable of performing a so-called MAC operation in one instruction cycle. The operation consists of a multiply and a subsequent addition (accumulation), as depicted in Figure 1.7.
Baris Bagci 23
Master’s Thesis Introduction
The rapid development of microelectronics makes the manufacturing of very fast digital signal processors easier all the time and also makes it possible to perform more demanding signal processing operations digitally. When compared to general purpose processors, digital signal processors are characterized by the capability of performing the mathematical operations of digital signal processing (DSP) very fast.
The central problem of digital signal processing is to enable systems to work in real time. This means that it is necessary to complete all operations of a signal processing algorithm within the discretization period of this signal. To reach high efficiency in computations mainly based on multiply and accumulate operations in general purpose processors is a difficult task. Therefore, the new type of processors - digital signal processors, which provide an easy and efficient way of realization of DSP algorithms in real time, was offered on market in the early 80s.
DSP is used in all kinds of applications that require digital manipulation of information or digital system control. DSP is especially important to digital cellular telephony and teletechnology in general.
Baris Bagci 24
Master’s Thesis Introduction
sensor in the cell
phone’s microphone.
Figure 1.8 In DSPs, an analog signal such as voice is digitized by an analog-to-digital converter (A/D). The DSP processes the digital signal, then a digital-to-analog converter (D/A) changes the signal back to analog [15].
What is actually the difference between digital signal processors and general-purpose processors? To reach the necessary speed in digital signal processors, the main hardwired operation of DSP is the multiply-accumulate operation, which can be performed within one clock cycle. From the architectural point of view digital signal processors use different, socalled modified Harvard processor architecture that enables command pipelining (processing parts of commands in parallel). Memory is divided into two parts: data memory and instruction memory. It is possible to move data directly between these two types of memory. This approach made possible to organize efficient parallelization of calculations, i.e. “fetch, decode, execute” phases of adjacent instructions can be performed in parallel.
Figure 1.9 Harvard Architecture [16]
Baris Bagci 25
Master’s Thesis Introduction
Conventional microprocessors use the Von Neumann architecture: program and data all in a single memory. Address and data buses are shared between instruction and data fetches [16].
Figure 1.10 Von Neumann Architecture
While digital signal processors are well suitable for signal processing, general-purpose processors are better on general computing applications. Desktop general-purpose processors have hardware support for floating point and integer arithmetic.
Often digital signal processors are divided into two types, floating-point processors and fixedpoint processors, depending on the type of arithmetic used in the processor for calculations. Digital signal processors can also be divided into algorithm-specific and application-specific processors. Desktop general-purpose processors must be able to support code written for previous designs of these processors. They must support object-code compatibility. In case of digital signal processors it is not so critical. Digital signal processors and general-purpose processors also differ in memory organization principles. For general-purpose processors it is traditional to use on-chip instruction and data caches as their only on-chip RAM. They also support off-chip memory and second-level caches. Digital signal processors usually have onchip RAM and very seldom use caches.
Usually most digital signal processors share several common features to support high-performance, repetitive, numerically intensive tasks. As already mentioned above, one of the central operations of most digital signal processors is the multiply and accumulate operation (MAC). All digital signal processors have the ability to perform multiply-accumulate operations in a single instruction cycle. To support such a feature, digital signal processors include accumulator and multiplier integrated into a special arithmetic processing unit in the data path of the processor. Some modern digital signal processors provide two or even more multiply-accumulate units. This feature allows multiply-accumulate operations to be performed in parallel. Generally digital signal processors provide extra “guard” bits in the accumulator to allow a series of multiply-accumulate operations to proceed without causing
Baris Bagci 26
Master’s Thesis Introduction
arithmetic overflow (when numbers exceed the maximum value the processor’s accumulator can hold).
A beneficial feature shared by digital signal processors is called multiple-access memory architecture. This means that it is common for most digital signal processors to provide the ability to complete several accesses to memory in a single instruction cycle. This feature allows the processor to fetch an instruction while simultaneously fetching operands and storing the result of a previous instruction to memory. For instance, for computing the vector dot product for an FIR filter, most digital signal processors are able to perform a MAC while simultaneously loading the data sample and coefficient for the next MAC. But on the other hand such single-cycle multiple memory accesses are often subject to some limitations. Usually, all but one of the memory locations accessed must reside on-chip, and multiple memory accesses can only take place with certain instructions. Digital signal processors provide multi-ported on-chip memories, multiple on-chip buses, and sometimes multiple independent memory banks to support simultaneous access of multiple memory locations.
Another feature often used to speed up arithmetic processing on digital signal processors is one or more dedicated address-generating units. This feature enables performing address calculation for operand access in parallel with the execution of arithmetic instructions. General-purpose processors usually require additional cycles to generate the addresses needed to load operands. Address generation units of digital signal processors usually support several addressing modes. These modes are register-indirect addressing with post increment/ decrement (for example, this mode is widely used during repetitive computations on data stored sequentially in memory). Another mode, called modulo addressing, is often supported to simplify the use of circular buffers. Some processors also support bit-reversed addressing, which increases the speed of fast Fourier (FFT) algorithms.
Many DSP algorithms involve performing repetitive computations. Because of this fact, most DSP processors provide special support for efficient looping. Special repeat or loop instruction is provided, allowing implementation of a for-next loop without spending extra instruction cycles for updating and testing the loop counter or branching back to the top of the loop. It is called zero-overhead looping.
Baris Bagci 27
Master’s Thesis Introduction
An additional feature shared by digital signal processors is the ability to allow low-cost, high-performance input and output. Most digital signal processors incorporate one or more serial or parallel I/O interfaces, and specialized I/O handling mechanisms such as low-overhead interrupts and direct memory access (DMA), which allow data transfers to proceed with little or no intervention from the rest of the processor [17].
There are a lot of DSP algorithms and many system applications use it. Digital signal processors find wide usage in speech coding/decoding, modem algorithms, image compression spectral estimation, hi-fi audio and so on. We do not describe the details of the general purpose digital signal processor architecture here, because one of the following chapters contains a description of TMSC320F2812 DSP developed by Texas Instruments, which has been used for the purposes of this work.
1.3.1 Data Path of a DSP
The data path of a digital signal processor is where the vital arithmetic manipulations of signals take place. DSP data paths are highly specialized to achieve high performance on the types of computation most common in DSP applications, such as multiply-accumulate operations. Registers, adders, multipliers, comparators, logic operators, multiplexers, and buffers represent 95% of a typical DSP data path.
Multiplier
A single-cycle multiplier is the essence of a DSP since multiplication is an essential operation in all DSP applications. An important distinction between multipliers in DSPs is the size of the product according to the size of the operands. In general, multiplying two n-bit fixed-point numbers requires a 2xn bits to represent the correct result. For this reason DSPs have in general a multiplier, which is twice the word length of the native operands.
Accumulators & Registers
Accumulators and registers hold intermediate and final results of multiply-accumulate and other arithmetic operations. Most DSP processors have two or more accumulators. In general, the size of the accumulator is larger than the size of the result of a product. These additional
Baris Bagci 28
Quote paper:
Baris Bagci, 2003, Programming and use of TMS320F2812 DSP to control and regulate power electronic converters, Munich, GRIN Publishing GmbH
This text can be quoted and accessed from this url:
Embed
DOI
Formatvorlage (Microsoft Word) für eine Diplomarbeit, Masterarbeit, Ha...
Für MS Word 2003 - Update 2010
Presentations, Models, Tutorials, Instructions
Elaboration, 25 Pages
Formatvorlage (Microsoft Word) für eine Diplomarbeit, Masterarbeit, Ha...
Für MS Word 2003 - Update 2010
Presentations, Models, Tutorials, Instructions
Elaboration, 25 Pages
Formatvorlage (OpenOffice) für eine Diplomarbeit, Masterarbeit, Hausar...
Presentations, Models, Tutorials, Instructions
Elaboration, 35 Pages
Formatvorlage / Vorlage zur Erstellung einer Diplomarbeit, Bachelorarb...
Presentations, Models, Tutorials, Instructions
Elaboration, 15 Pages
Formatvorlage / Vorlage für eine Diplomarbeit / Hausarbeit
Für MS Word 2007 - dotx
Presentations, Models, Tutorials, Instructions
Elaboration, 25 Pages
Anleitung zum Erstellen schriftlicher Arbeiten: Der Aufbau einer wisse...
Presentations, Models, Tutorials, Instructions
Elaboration, 20 Pages
Erstellen einer schriftlichen Hausarbeit
Presentations, Models, Tutorials, Instructions
Termpaper, 14 Pages
Grundtechniken wissenschaftlichen Arbeitens
Bibliografieren - Reden - Schr...
Presentations, Models, Tutorials, Instructions
Script, 46 Pages
Ratgeber zur Erstellung wissenschaftlicher Arbeiten. Diplomarbeiten - ...
Presentations, Models, Tutorials, Instructions
Elaboration, 39 Pages
Baris Bagci's text Programming and use of TMS320F2812 DSP to control and regulate power electronic converters is now available as a printed book
Baris Bagci has published the text Programming and use of TMS320F2812 DSP to control and regulate power electronic converters
Baris Bagci has uploaded a new text
Integrated Power Electronic Converters and Digital Control
Ali Emadi, Alireza Khaligh, Zhong Nie
Control in Power Electronics: Selected Problems
Marian P. Kazmierkowski, Kazmierkowskl, J. David Irwin
Control Design Techniques in Power Electronics Devices
Hebertt J. Sira-Ramirez, Ramón Silva-Ortigoza
0 comments