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.
Table of Contents
Abstract
Acknowledgements
Declaration
List of Figures & Tables
1. Introduction
1.1 Power Electronic and Electrical Drive Systems
1.1.1 Power Electronic Applications
1.1.2 Switched Mode Operation
1.1.3 Electrical Drive Applications
1.1.3.1 Motion Control
1.2 Control Systems
1.2.1 Digital versus Analog Implementation
1.2.1.1 Review of Today’s Servo Drive Systems
1.2.2 Digital PWM Control Using DSP
1.3 Digital Signal Processors
1.3.1 Data Path of a DSP
1.3.2 Peripherals of a DSP
1.4 Digital Signal Processing
1.4.1 The History of DSP
2. The TMS320F2812 DSP
2.1 Overview
2.2 The Peripherals of F2812
3. The eZdsp F2812 Board
3.1 Overview
3.2 eZdsp F2812 Connectors
4. DSP Software Development
4.1 Basic Software Tools Required
4.2 Code Composer Studio
4.2.1 Creating a New Project
4.2.2 Adding Files to a Project
4.2.3 Building and Running the Program
4.2.4 Introduction to Breakpoints
4.2.5 Watch Window
4.2.6 Probe Points
4.2.7 Displaying Graphs
5. PWM
5.1 Definition
5.2 Event Manager PWM Waveform Generation
5.3 Generation of PWM Outputs
5.3.1 Asymmetric and Symmetric PWM Generation
5.3.2 Program Example
5.3.3 Dead-Time Generation on the TMS320C2812
5.3.3.1 Configuring PWM Outputs with Dead Band
5.4 Creating a PWM Signal with Fixed Duty Cycle and Frequency
5.5 Creating a PWM Signal with Variable Duty Cycle and Frequency
6. Applications
6.1 Creating a Sine Modulated PWM Signal
6.1.1 Sine Modulated PWM Generation to Control Inverters
6.2 Control of a Half-Bridge of a Switched Mode Power Supply
6.3 Control of a Series Resonant DC-DC Converter
6.3.1 The Series Resonant DC-DC Converter
6.3.1.1 SRC Operation Principle
6.3.2 The Snubber Effect
7. Conclusion and Recommended Continuation
7.1 Conclusion
7.2 Future Work
Bibliography
Appendix
A. Program Codes
B. Circuitry and Wiring Diagram of the Experimental Set-Up
C. Acronyms and Abbreviations
D. Schematics of the eZdsp F2812 Board
E. Sine Values Contained in sinus.dat
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.
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.
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.
illustration not visible in this excerpt
List of Figures & Tables
Figures
Figure 1.1 Power Electronic System Consisting of Power Electronics and Control
Figure 1.2 Electrical Drive Consisting of Power Electronics, Electrical Machine and Control
Figure 1.3 Basic Structure of a Typical Motion Control System
Figure 1.4 Typical Microcontroller-Based Digital Control System Diagram for PWM DC/DC Converter
Figure 1.5 Typical DSP-Based Digital Control System Diagram for PWM DC/DC Converter
Figure 1.6 Architecture of Digital PWM Using Digital Signal Processor
Figure 1.7 MAC Operation
Figure 1.8 In DSPs, an Analog Signal such as Voice is Digitized by an Analog-to-Digital Converter
Figure 1.9 Harvard Architecture
Figure 1.10 Von Neumann Architecture
Figure 2.1 A New TI DSP Product Line: 32-bit Flash Mixed Signal DSP
Figure 2.2 C28x DSP Core
Figure 2.3 On-Chip 12-bit Analog-to-Digital Converter
Figure 2.4 2 On-Chip Event Managers
Figure 2.5 TMS320F2812 DSP Simplified Hardware Diagram
Figure 2.6 IQmath Library: Floating Point on a Fixed Point Machine
Figure 2.7 IQmath Approach
Figure 2.8 Block Diagram of the F2812 ADC Module
Figure 3.1 Block Diagram of the eZdsp F2812
Figure 3.2 eZdsp F2812 Connector Positions
Figure 3.3 Top View of the eZdsp F2812 Board
Figure 3.4 P1 Pin Locations
Figure 3.5 Connector P2 Pin Locations
Figure 3.6 P4/P8/P7 Connectors
Figure 3.7 Connector P5/P9 Pin Locations
Figure 4.1 Steps Taken during DSP Software Development
Figure 4.2 The Project Creation Window
Figure 4.3 The Project Manager Window
Figure 4.4 The Watch Window
Figure 4.5 The File I/O Dialog
Figure 4.6 Changing the Address and Length Values in the File I/O Dialog
Figure 4.7 The Brake/Probe Points Dialog
Figure 4.8 The Graph Property Dialog
Figure 5.1 Decomposition of PWM Signal
Figure 5.2 Asymmetric PWM Waveform Generation with Compare Unit and PWM Circuits
Figure 5.3 Symmetric PWM Waveform Generation with Compare Units and PWM Circuits
Figure 5.4 PWM Signal and its Complement at the Pins PWM3&4 and PWM9&10
Figure 5.5 PWM Signal and its Complement at the Pins PWM5&6 and PWM11&12
Figure 5.6 PWM Signals plus Complemented PWM with Dead-Time
Figure 5.7 PWM Signals plus PWM with Dead-Time
Figure 5.8 PWM1 & PWM2 without Dead Band: PWM1 Active High and PWM2 Active Low
Figure 5.9 PWM1 (Active High) and PWM2 (Active Low) Outputs with Dead Band
Figure 5.10 PWM1 (Active Low) and PWM2 (Active High) Outputs with Dead Band
Figure 5.11 Both PWM1 and PWM2 Configured Active High with Dead Band
Figure 5.12 Both PWM1 and PWM2 Configured As Active Low with Dead Band
Figure 5.13 Inverter Phase with Two Power Devices Connected in Series
Figure 5.14 PWM Signal with Frequency=30kHz and Duty Cycle=50% and its Complement
Figure 5.15 The Experimental Board
Figure 5.16 Register Watch Window in CCS
Figure 5.17 PWM with f=20kHz, Duty Cycle=50%, without Dead-Band
Figure 5.18 PWM with f=30kHz, Duty Cycle=50%, without Dead-Band
Figure 5.19 PWM with f=40kHz, Duty Cycle=50%, without Dead-Band
Figure 5.20 PWM with f=20kHz, Duty Cycle=90%, without Dead-Band
Figure 5.21 PWM with f=20kHz, Duty Cycle=70%, without Dead-Band
Figure 5.22 PWM with f=20kHz, Duty Cycle=50%, Dead-Band=6.4µs
Figure 5.23 PWM with f=20kHz, Duty Cycle=50%, Dead-Band=4.4µs
Figure 5.24 PWM with f=20kHz, Duty Cycle=50%, Dead-Band=2.4µs
Figure 5.25 PWM with f=1kHz, 50% Duty Cycle and Dead-Band=448µs
Figure 6.1 Duty Cycle Modulation versus Analog Input Voltage
Figure 6.2 Sine-Modulated PWM Signal
Figure 6.3 Adding a File to the Probe
Figure 6.4 Connecting the Probe Point to a File
Figure 6.5 Plot of the Stored Sine Values in File
Figure 6.6 The Potentiometers and DIP Switches on the Board
Figure 6.7 Sine Modulated PWM to Control Inverters
Figure 6.8 PWM with F=9.5kHz, DIP#1DIP#2=01
Figure 6.9 PWM with F=7.4kHz, DIP#1DIP#2=10
Figure 6.10 PWM with F=120kHz, DIP#1DIP#2=11
Figure 6.11 The Converter Circuit
Figure 6.12 Electrical Circuit of the Series Resonant DC-DC Converter
Figure 6.13 Series Resonant DC-DC Converter Equivalent Circuit
Figure 6.14 Transformer Set Up with a Fixed Primary Coil and a Movable Secondary Coil
Figure 6.15 Sampling of the Sinusoidal Current
Figure 6.16 Converter Frequency is Higher than the Switching Frequency
Figure 6.17 Converter Frequency is Equal to the Switching Frequency
Figure 6.18 Converter Frequency is Lower than the Switching Frequency
Figure 6.19 SRC Circuit with Snubber Capacitor CS Added Parallel to T1
Figure 6.20 Commutating the Transistor Voltage Linearly from 0 to Uin
Figure 6.21 UT1(1) and Converter Current(2) when Dead-Time=0.5µs, without Capacitor
Figure 6.22 UT1(1) and Converter Current(2) when Dead-Time=3µs
Figure 6.23 UT1(1) and Converter Current(2) when Dead-Time=0.5µs
Figure B.1 Circuit Used in Control of SRC
Figure B.2 Photograph of the SRC Set-Up
Figure B.3 Circuit of the Experimental Set-Up
Figure B.4 Photograph of the Experimental Set-Up
Figure D.1 Schematic of the DSP
Figure D.2 Schematic of the P1 Header
Figure D.3 Schematic of the P2 Header
Figure D.4 Schematic of the P3 Parallel Interface
Figure D.5 Schematic of the P4 Header
Figure D.6 Schematic of the P5 Header
Figure D.7 Schematic of the P6 Power Connector
Figure D.8 Schematic of the P7 Header
Figure D.9 Schematic of the P8 Header
Figure D.10 Schematic of the P9 Header
Figure D.11 Schematic of the JTAG Controller
Tables
Table 1.1 Evolution of DSPs
Table 3.1 eZdsp F2812 Connectors
Table 3.2 P8, I/O Connectors
Table 3.3 P9, Analog Interface Connector
Table 5.1 Deadband Register Settings for Dead-Band Generation
Table 6.1 States of DIP Switches in Prg a
Table 6.2 States of DIP Switches in Prg b
Table 6.3 SRC Operating Modes
Table E.1 The Sine Values Stored in File
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].
illustration not visible in this excerpt
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 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 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].
illustration not visible in this excerpt
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
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 ever-increasing 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)
illustration not visible in this excerpt
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.
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.
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].
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:
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.
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 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.
So for practical purposes, DSP-based system can achieve real time PWM control, even cycle-by-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- to-analog 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.
illustration not visible in this excerpt
Figure 1.4 Typical Microcontroller-Based Digital Control System Diagram for PWM DC/DC Converter
illustration not visible in this excerpt
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 calculations of these values are based on a set of gain equations. The architecture of this approach is shown in Figure 1.6.
illustration not visible in this excerpt
Figure 1.6 Architecture of Digital PWM Using Digital Signal Processor
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.
illustration not visible in this excerpt
Figure 1.7 MAC Operation
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.
illustration not visible in this excerpt
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, so-called 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.
illustration not visible in this excerpt
Figure 1.9 Harvard Architecture [16]
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].
illustration not visible in this excerpt
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 fixed-point 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 on-chip 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 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.
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 bits are called guard bits. These bits allow accumulating values without the risk of overflow and without rescaling. N additional bits allow up to 2n accumulations to be performed without overflow. Guard bits method is more advantageous than scaling the multiplier product since it allows the maximum precision to be retained in intermediate steps of computations.
ALU
Arithmetic logic units implement basic arithmetic and logical operations. Operations such as addition and subtraction are performed in the ALU.
Shifter
In fixed-point arithmetic, multiplications and accumulations often induce a growth in the bit width of results. Scaling is then necessary to pass results from stage to stage and is performed through the use of shifters.
1.3.2 Peripherals of a DSP
Most digital signal processors provide on-chip peripherals and interfaces to allow the DSP to be used in an embedded system with a minimum amount of external hardware to support its operation and interfacing.
Serial Port
A serial interface transmits and receives data one bit at a time. These ports have a variety of applications like sending and receiving data samples to and from A/D and D/A converters and codecs, sending and receiving data to and from other microprocessors or DSPs, communicating with other hardware. The two main categories are synchronous and asynchronous interface. The synchronous serial ports transmit a bit clock signal in addition to the serial bits. The receiver uses this clock to decide when to sample received data. On the opposite, asynchronous serial interfaces do not transmit a separate clock signal; they rely on the receiver deducing a clock signal from the data itself.
Direct extension of serial interfaces leads to parallel ports where data are transmitted in parallel instead of sequentially. Faster communication is obtained through costly additional pins.
Host Port
Some DSPs provide a host port for connection to a general-purpose processor or another DSP. Host ports are usually specialized 8 or 16 bit bi-directional parallel ports that can be used to transfer data between the DSP and the host processor.
Link Port or Communication Port
This kind of port is dedicated to multiprocessor operations. It is in general a parallel port intended for communication between the same types of DSPs.
Interrupt Controller
An interrupt is an external event that causes the processor to stop executing its current program and branch to a special block of code called an interrupt service routine. Typically this code deals with the origin of the interrupt and then returns from the interrupt. There are different interrupt sources: on-chip peripherals: serial ports, timers, DMA,…
External interrupt lines: dedicated pins on the chip to be asserted by external circuitry
Software interrupts: also called exceptions or traps, these interrupts are generated under software control or occurs for example for floating-point exceptions (division-by-zero, overflow and so on).
DSPs associate interrupts with different memory locations. These locations are called interrupt vectors. These vectors contain the address of the interrupt routines. When an interrupt occurs, the following scenario is often encountered:
Save program counter in a stack
Branch to the relevant address given by the interrupt vector table
Save all registers used in the interrupt routine
Perform dedicated operations
Restore all registers
Restore program counter
Priority levels can be assigned to the different interrupt through the use of dedicated registers. An interrupt is acknowledged when its priority level is strictly higher that current priority level.
Timers
Programmable timers are often used as a source of periodic interrupts. Completely software-controlled to activate specific tasks at chosen times. It is generally a counter that is preloaded with a desired value and decremented on clock cycles. When zero is reached, an interrupt is issued.
DMA
Direct Memory Access is a technique whereby data can be transferred to or from the processor’s memory without the involvement of the processor itself. DMA is commonly used to provide improved performance with input/output devices. Rather than have the processor read data from an I/O device and copy the data into memory or vice versa, a separate DMA controller can handle such transfers in parallel.
1.4 Digital Signal Processing
To ‘digital signal process’ is to manipulate signals that have either originated in, or are to be exported to, the real world, where those signals are represented as digits (numbers) [14]. Application of digital processing devices to transmit, store and process analog signals require their representation in units of discrete points as numerical values. This means that an integral part of DSP applications is the conversion of the real world signals – analog voice, music, video, engine speed, ground vibration – to numerical values for processing by the DSP – a process termed analog to digital conversion (A/D). Discretization can be performed by analog-to-digital converter (ADC) at the input of DSP system. Going in the other direction – the conversion of numerical values generated within the DSP to real world signal – a process termed digital to analog conversion (D/A) is also involved. Restoration of signal back to analog form is made via digital-to-analog converter (DAC) at the output. To digitally represented signals different mathematical operations can be applied and that is the essence of digital signal processing.
Digital signal processing is used in a wide range of applications, in which the nature of processed signals can be very different – radio, sound, video etc. Fundamental to DSP is the fact that any real world signal, e.g. music, can be accurately represented by samples of the signal taken at periodic intervals. These samples can then be converted into numbers (e.g. representing the volume of the music at the sample point), and these numbers are expressed in binary form. The level of processing complexity can vary depending on application specifics and performance requirements.
Why did digital signal processing become so popular? The answer is in fact that digital signal processing has several advantages compared to analog signal processing. DSP systems are able to complete the tasks inexpensively so to say. Especially it refers to control part of applications. It is much more difficult to control analog signals processing. First of all, analog systems are more sensitive to environment conditions. For example, analog circuit performance can depend a lot on its temperature and change behavior according to changes in its temperature. Analog components have certain tolerances in their values. That means that two circuits of the same design can respond differently having little differences in their internal analog components. In contrast, two digital systems with identical functionality will produce the same results on the same input. This makes digital systems more predictable and reliable than analog.
DSP systems are reprogrammable. One DSP system can be programmed to perform different tasks. If you want to change functionality on analog system - other physical components should be installed. Analog components tend to have different size for different values. For example to increase capacitance, bigger capacitor should be used. In DSP processing you would need only to increase the value in the program, but the hardware part stays unchanged.
Depending on class of applications different aspects are important. The largest class of DSP applications is inexpensive high-volume embedded systems, such as modems, cellular telephones, pagers and so on. Here, cost and power consumption are factors of main importance. Another class is processing large amounts of data using complex algorithms, like in sonars, radars and seismic exploration. Performance and multiprocessor support are favorites among aspects for these applications. A separate category consists of Personal Computer (PC) -based multimedia applications. It becomes very popular to integrate DSP systems into PCs to perform multimedia functions, like voice mail or music synthesis Performance is also important for these devices because the DSP part can be asked to execute several algorithms simultaneously. Memory capacity may be an important issue to consider in these applications too [17].
[...]
- Quote paper
- Baris Bagci (Author), 2003, Programming and use of TMS320F2812 DSP to control and regulate power electronic converters, Munich, GRIN Verlag, https://www.grin.com/document/24105
-
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X.