**Application of DSP in Power Conversion Systems — A Practical Approach for Multiphase Drives**

Hugo Guzman, Mario Bermúdez, Cristina Martín, Federico Barrero and Mario Durán

Additional information is available at the end of the chapter

http://dx.doi.org/10.5772/60450

#### **Abstract**

Digital Signal Processing is not a recent research field, but has become a powerful technology to solve engineering problems in the last few decades due to the intro‐ duction by Texas Instruments in 1982 of the Digital Signal Processor. Fast digital signal processors have quickly become a cornerstone of high-performance electrical drives, where power electronic conversion systems have heavy online computation burdens and must be controlled using complex control algorithms. In this sense, multiphase drives represent a particularly interesting case of study, where the computational cost highly increases with each extra phase. This technology has been recognized in recent times as an attractive electrical drive due to its usefulness in traction, more-electric aircraft applications and wind power generation systems. However, the complexity of the required control algorithms and signal processing techniques notably increases in relation with conventional three-phase drives. This chapter makes a revision of the necessities of a high-performance multiphase drive from the digital signal processing perspective. One of the most powerful Texas Instruments' digital signal processor (TMS320F28335) is used, and specific control algorithms, electronic circuits and acquisition processing methods are designed, implemented and analyzed to show its interest in the development of a high-performance multiphase drive.

**Keywords:** Digital Signal Processing, Digital Signal Processors, Multiphase Electri‐ cal Drives, Field-Oriented Control, Predictive Current Control Techniques

© 2015 The Author(s). Licensee InTech. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

### **1. Introduction**

Digital Signal Processing in Power Electronics is an important research area which mainly covers problems concerning the design and realization of algorithms using Digital Signal Processors (DSPs). A wide variety of solutions can be found at industry and in research fields involving DSP applications, mostly in accordance to conventional three-phase systems. This chapter will analyze the interest and utility of Digital Signal Processing in the specific field of multiphase electric drives. This area has significantly accelerated in the last decade due to their intrinsic features like higher fault tolerance, reduced torque ripple or better power splitting. With the number of conventional electrical drives continuously growing, the interest in multiphase ones is also rising, although they are not yet so common due to their complexity. The development of modern power electronic switches and the ability of modern DSPs to implement complex algorithms are allowing the control of multiphase drives in applications such as aerospace actuators, wind energy conversion systems, oil pumping or ultrahigh-speed elevators.

Power conversion systems are composed of different electrical and electronic components that need to be managed following specific constraints depending on the final application. Moreover, such systems are designed to work under different conditions and states; thus, several control algorithms can be found in a single DSP, and the designed control unit (based on the DSP) must be able to change between these different states, considering measured components and actuating on the overall equipment to work as desired. For this purpose, Digital Signal Processing based on DSPs must be done considering not only the inner control algorithm implementation, but also the proper signal adaptation going in or out the DSP.

The major benefit to readers of this chapter is the acquisition of specific knowledge concerning the processing of signals from current and/or speed sensors using a digital signal processor and the subsequent generation of the signals needed to control the power switches in a multiphase power converter, following the implemented controller commands. Hardware and software design for the specific application are included as illustrative examples for the considered systems.

The chapter is organized as follows:

First of all, the overall system features and constraints are presented, demonstrating the necessity for digital signal processing and the implementation of DSPs for such application. The specific characteristics needed for the multiphase drive application are also presented and the selected DSP (TMS320F28335) is described. Subsequently, the electrical and electronic hardware is explained and the acquisition/adaptation PCBs, developed in order to communi‐ cate the DSP with the overall system, are presented. The next section explains the software designed to control the power converters and electrical equipment, the current and speed sensors measurement and treatment, the implemented controller algorithm and the semicon‐ ductor switching signals. Finally, some results are depicted and conclusions are presented.

#### **2. Power conversion systems using multiphase induction machines**

Although the deadline for a complete replacement of petroleum-based fuels is uncertain, it is clear that the human being is in a race against time to replace conventional energy sources. In the last decade, the technology evolution in areas such as renewable energies or electric propulsion has been intense to achieve this goal [1]. Government policies are promoting the use of renewable energy sources (wind, photovoltaic) and new transportation systems (hybrid and electrical vehicles) aiming to fulfill environmental, economical and social needs [2]. From the technological point of view, the present time is a moment of challenge and the success of a technological approach will depend on the degree in which the society demands are satisfied. As far as the electrical vehicles (EVs) are concerned, where digital signal processing and power electronic fields are finding an important niche of application, some of the desirable features of an automotive drive include:


**1. Introduction**

162 Applications of Digital Signal Processing through Practical Approach

elevators.

considered systems.

The chapter is organized as follows:

Digital Signal Processing in Power Electronics is an important research area which mainly covers problems concerning the design and realization of algorithms using Digital Signal Processors (DSPs). A wide variety of solutions can be found at industry and in research fields involving DSP applications, mostly in accordance to conventional three-phase systems. This chapter will analyze the interest and utility of Digital Signal Processing in the specific field of multiphase electric drives. This area has significantly accelerated in the last decade due to their intrinsic features like higher fault tolerance, reduced torque ripple or better power splitting. With the number of conventional electrical drives continuously growing, the interest in multiphase ones is also rising, although they are not yet so common due to their complexity. The development of modern power electronic switches and the ability of modern DSPs to implement complex algorithms are allowing the control of multiphase drives in applications such as aerospace actuators, wind energy conversion systems, oil pumping or ultrahigh-speed

Power conversion systems are composed of different electrical and electronic components that need to be managed following specific constraints depending on the final application. Moreover, such systems are designed to work under different conditions and states; thus, several control algorithms can be found in a single DSP, and the designed control unit (based on the DSP) must be able to change between these different states, considering measured components and actuating on the overall equipment to work as desired. For this purpose, Digital Signal Processing based on DSPs must be done considering not only the inner control algorithm implementation, but also the proper signal adaptation going in or out the DSP.

The major benefit to readers of this chapter is the acquisition of specific knowledge concerning the processing of signals from current and/or speed sensors using a digital signal processor and the subsequent generation of the signals needed to control the power switches in a multiphase power converter, following the implemented controller commands. Hardware and software design for the specific application are included as illustrative examples for the

First of all, the overall system features and constraints are presented, demonstrating the necessity for digital signal processing and the implementation of DSPs for such application. The specific characteristics needed for the multiphase drive application are also presented and the selected DSP (TMS320F28335) is described. Subsequently, the electrical and electronic hardware is explained and the acquisition/adaptation PCBs, developed in order to communi‐ cate the DSP with the overall system, are presented. The next section explains the software designed to control the power converters and electrical equipment, the current and speed sensors measurement and treatment, the implemented controller algorithm and the semicon‐ ductor switching signals. Finally, some results are depicted and conclusions are presented.

These general characteristics are advantageous regardless of the wide range of EVs available in the market, which includes battery-powered electric vehicles (BEV) and plug-in electric vehicles (PHEV), hybrid electric vehicles (HEV) or fuel-cell electric vehicles (FCEV) [3]. Hybrid topologies combining internal combustion engine (ICE) and electrical motors (EM) can be classified into series, parallel and series-parallel types. Each vehicle topology has its own specific features and the general control of the vehicle can follow different approaches [4]. Nevertheless, the structure of the electric propulsion system is similar in all topologies and essentially consists of a battery, an electronic converter, an electric motor, and a speed and/or torque sensor [1]. Figure 1 presents a general schematic of an electric propulsion drive.

**Figure 1.** Example of an electric vehicle propulsion system.

The propulsion system is completed with the mechanical part, including transmission and wheels. The energy conversion process is controlled by the electric drive, which is the core of the electric propulsion system. In motor mode, the energy comes from the batteries to the wheels in a controlled manner by means of drive control, while in regenerative braking the energy is reversed back to the batteries. Failure of one of the drive phases may result in a complete breakdown of the propulsion system unless a proper post-fault control is applied to improve the vehicle reliability.

The electric propulsion has been traditionally obtained from conventional DC machines but nowadays three-phase AC machines are more appropriate solutions due to their lower cost and higher reliability [5]. Consequently, the standard option for the drive in the propulsion system is the use of three-phase induction or permanent magnet synchronous motors (PMSM), two-level voltage source inverters (VSI's), field-oriented control (FOC) and pulse width modulation (PWM). However, many other options can be explored for optimal drive design:


The final decision on a particular topology is always a trade-off between different desirable features. The topology explored in this work uses a five-phase induction motor supplied from a two-level inverter and controlled with a predictive control strategy, to promote the reliability, efficiency and performance characteristics of the propulsion drive (Fig. 2).

**Figure 2.** Schematic diagram of a five-phase two-level induction motor drive.

The key features of the proposed propulsion system and drive control include:


The propulsion system is completed with the mechanical part, including transmission and wheels. The energy conversion process is controlled by the electric drive, which is the core of the electric propulsion system. In motor mode, the energy comes from the batteries to the wheels in a controlled manner by means of drive control, while in regenerative braking the energy is reversed back to the batteries. Failure of one of the drive phases may result in a complete breakdown of the propulsion system unless a proper post-fault control is applied to

The electric propulsion has been traditionally obtained from conventional DC machines but nowadays three-phase AC machines are more appropriate solutions due to their lower cost and higher reliability [5]. Consequently, the standard option for the drive in the propulsion system is the use of three-phase induction or permanent magnet synchronous motors (PMSM), two-level voltage source inverters (VSI's), field-oriented control (FOC) and pulse width modulation (PWM). However, many other options can be explored for optimal drive design: **•** Motor type: PMSM provide higher torque density, small size and weight, and good efficiency [6], but squirrel cage induction motors possess interesting features for electric

**•** Number of phases: Three-phase motors are available off-the-shelf and can benefit from the economy of scales. However, multiphase motors can provide higher robustness due to its inherent fault-tolerant characteristic, lower noise and vibrations [7], higher torque density by current harmonic injection [8], lower per phase current rating [9] or ripple-free post-fault

**•** Converter type: Although matrix [11] or multilevel [12] converters have been proposed for EV applications, the standard option is the use of a two-level VSI. This option becomes natural for EVs with multiphase motors due to the Amps per phase current reduction. DC buck/boost converters can also be included into the drive topology [1], but the motor and

**•** Control strategy: The electric drive control can be implemented using any of the extensive options available in literature, from the simple scalar control to artificial-intelligence-based controls [5]. Control schemes based on model reference adaptive control (MRAC) or sliding mode control (SMC) can be found in [13], and popular control strategies like the fieldoriented control (FOC) or the direct torque control (DTC) have been addressed in [12]. Nevertheless, the finite-control set model based predictive control (FCS-MPC) has been introduced in the last decade and it is a promising candidate to replace standard schemes (or to become a part of other existing methods like FOC) due to its simplicity and good perform‐ ance [14-16]. The increment in the available computing power of modern microprocessors makes this strategy now plausible for controlling conventional and multiphase drives, and a wide variety of predictive current controllers have been recently presented [17-21].

The final decision on a particular topology is always a trade-off between different desirable features. The topology explored in this work uses a five-phase induction motor supplied from a two-level inverter and controlled with a predictive control strategy, to promote the reliability,

efficiency and performance characteristics of the propulsion drive (Fig. 2).

propulsion of EVs including low cost, low maintenance and ruggedness [5].

improve the vehicle reliability.

164 Applications of Digital Signal Processing through Practical Approach

drive operation [10].

inverter control are not affected.

**•** Fault-tolerant operation (multiphase motor).

#### **3. Hardware description: Power converter and electronic control unit**

An experimental test rig has been implemented to emulate the aforementioned multiphase propulsion drive. This test-bench is shown in Fig. 3. The system is composed of a symmetrical five-phase induction motor (IM) with distributed windings that has been constructed rewind‐ ing a conventional three-phase IM. The electrical drive is mechanically coupled to a DC motor, which can provide a programmable mechanical load torque to the system. Notice that each motor (DC motor and 5-phase IM) is controlled independently using two different power converters. An incremental encoder is also coupled to the shaft to measure the rotational speed.

The five-phase motor is driven by two conventional three-phase two-level voltage source inverters (VSIs), with an independent external DC power supply as the DC-Link. A DSP-based Electronic Control Unit (ECU) is used in order to control the power converters switching sequence, depending on the demanded control action. Switching signals are sent from the ECU to the power converter drivers, being 0 V for OFF state and 15 V for ON state. For control purposes, four phase currents are measured with hall-effect sensors included on the power converters and the remaining fifth current is estimated considering that the IM is arranged with only one isolated neutral point. The hall-effect current sensors allow measurements in a range of ±25 A. Each semiconductor driver provides an error signal that triggers ON (0 V) under low- or high-voltage condition and overcurrent operation. The aforementioned signals are classified as input or output signals of the ECU. Switching signals are regarded as output signals while error signals and current/speed measurements are considered as input signals.

The ECU is connected to a host PC using a standard RS232 cable. Then, the user of the system can manage the entire system using a developed host PC software that governs the ECU. The software that runs in the DSP, configures its internal peripherals, the communication protocol, the data acquisition system, and the control algorithm is programmed using the DSP's manufacturer proprietary software.

The measured speed and current signals as well as the digital errors obtained from the power converter (i.e., errors generated in the semiconductors' drivers) are received and processed in the DSP. If no error is detected, the processor executes the control algorithm and provides the switching signals to the power converters semiconductors (the implemented algorithm will be described in the next section).

**Figure 3.** Multiphase drive experimental test-bench.

A summary of the described input and output (I/O) signals is provided in Table 1, where their electrical characteristics are also detailed.

In order to properly select a DSP among those commercially available, it is necessary to identify the number and type of input/output signals that the system will handle. A more detailed scheme of the DSP, including the managed I/O signals, is presented in Fig. 4. As schematically Application of DSP in Power Conversion Systems — A Practical Approach for Multiphase Drives http://dx.doi.org/10.5772/60450 167


**Table 1.** Electronic Control Unit I/O signals and their electrical characteristics.

The ECU is connected to a host PC using a standard RS232 cable. Then, the user of the system can manage the entire system using a developed host PC software that governs the ECU. The software that runs in the DSP, configures its internal peripherals, the communication protocol, the data acquisition system, and the control algorithm is programmed using the DSP's

The measured speed and current signals as well as the digital errors obtained from the power converter (i.e., errors generated in the semiconductors' drivers) are received and processed in the DSP. If no error is detected, the processor executes the control algorithm and provides the switching signals to the power converters semiconductors (the implemented algorithm will

eQEP

**FIVE-PHASE IM MOTOR DRIVE**

**DC MOTOR DRIVE DC MOTOR FIVE-PHASE IM** 

A summary of the described input and output (I/O) signals is provided in Table 1, where their

In order to properly select a DSP among those commercially available, it is necessary to identify the number and type of input/output signals that the system will handle. A more detailed scheme of the DSP, including the managed I/O signals, is presented in Fig. 4. As schematically

*a b*

**Figure 3.** Multiphase drive experimental test-bench.

electrical characteristics are also detailed.

ADC

SIGNAL I/O

4

PWM

RS232 <sup>5</sup> DSP

COMM

CONTROL UNIT

*a b c d e*

*DC-Link*

manufacturer proprietary software.

166 Applications of Digital Signal Processing through Practical Approach

be described in the next section).

RS232

shown, error and measured signals (currents and speed) correspond to DSP's inputs, while communication, semiconductor switching and auxiliary general purpose signals are consid‐ ered as outputs. In what follows, a short summary of I/O signals of the ECU is presented.

**Figure 4.** Signal requirements for the ECU.

The semiconductors' drivers possess an error signal that is automatically triggered in case of an excessive temperature, overcurrent or overvoltage condition on the power converter. In case that an abnormal working condition is detected, the ECU should interrupt the power converter switching process, avoiding further damage in the electric and electronic system.

Due to the analog nature of the measured signals (remember that currents and speed sensors are required), an Analog-to-Digital Converter (ADC) stage is necessary before providing measured values to the processor. Such stage is commonly found on commercially available DSPs, being only necessary to select its working conditions and enabling signals.

The semiconductor switching signals are provided from the DSP to the drivers by means of the enhanced Pulse Width Modulator (ePWM) modules. Therefore, for the designed experi‐ mental test-rig, the DSP must include at least five ePWM modules in order to control the power converter connected to the five-phase electrical drive.

Different auxiliary signals, found on the General Purpose Input Output (GPIO) module, are considered for reset, system configuration and initialization purposes. For instance, the reset signal is used to restart the system in the presence of a system error or if it is demanded by the test-rig operator. Regarding the system configuration, three general purpose (GPIO) signals are used to manage and control the power converter through electric contactors. Remaining GPIOs are used to turn ON/OFF warnings and error light indicators and to trigger external measurement equipment such as an oscilloscope.

The chosen DSP must also manage the communication protocol RS232 in order to allow an external operator to control the system using an implemented Human Machine Interface (HMI) software that runs in a personal computer. Consequently, a Serial Communication (SCI) module must be integrated in the ECU.

Taking into account the previous requirements, the TMS320F28335 Texas Instruments DSP has been selected among other devices. The characteristics of the TMS320F28335 are summarized in Table 2.


**Table 2.** Texas Instruments TMS320F28335 DSP characteristics.

Notice that the DSP I/O signal voltage threshold is between 0/3.3 V, while the rest of the signals of the system work at higher voltage levels. Consequently, it is necessary to implement some voltage adaptation stages between the different system signals and the DSP. In what follows, an explanation of the different adaptation stages for current, speed, error and switching signals is presented.

**a.** Measured current adaptation stage

The semiconductor switching signals are provided from the DSP to the drivers by means of the enhanced Pulse Width Modulator (ePWM) modules. Therefore, for the designed experi‐ mental test-rig, the DSP must include at least five ePWM modules in order to control the power

Different auxiliary signals, found on the General Purpose Input Output (GPIO) module, are considered for reset, system configuration and initialization purposes. For instance, the reset signal is used to restart the system in the presence of a system error or if it is demanded by the test-rig operator. Regarding the system configuration, three general purpose (GPIO) signals are used to manage and control the power converter through electric contactors. Remaining GPIOs are used to turn ON/OFF warnings and error light indicators and to trigger external

The chosen DSP must also manage the communication protocol RS232 in order to allow an external operator to control the system using an implemented Human Machine Interface (HMI) software that runs in a personal computer. Consequently, a Serial Communication (SCI)

Taking into account the previous requirements, the TMS320F28335 Texas Instruments DSP has been selected among other devices. The characteristics of the TMS320F28335 are summarized

Notice that the DSP I/O signal voltage threshold is between 0/3.3 V, while the rest of the signals of the system work at higher voltage levels. Consequently, it is necessary to implement some voltage adaptation stages between the different system signals and the DSP. In what follows,

Power supply 5 V Output voltage range -0.3 to 4.6 V Input voltage range -0.3 to 4.6 V High-level input/output voltage 3.3 V Low-level input/output voltage 0 V Floating-point Unit Yes PWM outputs 6 32-Bit Capture inputs of auxiliary PWM outputs 6 12-Bit Analog-to-Digital Converter (ADC) 16 Serial Peripheral Interface (SPI) 1 Serial Communications Interface (SCI) 3 General purpose I/O pins 88

**Name Characteristics**

converter connected to the five-phase electrical drive.

168 Applications of Digital Signal Processing through Practical Approach

measurement equipment such as an oscilloscope.

**Table 2.** Texas Instruments TMS320F28335 DSP characteristics.

module must be integrated in the ECU.

in Table 2.

As mentioned above, the measuring range of hall-effect sensors is ±25 A, being the maximum/ minimum possible current to be measured on a power converter phase. Moreover, the halleffect sensor has a transformation ratio of 1/1000, which means that the output current of the sensor is ±25 mA. The aim of the current adaptation circuit is to transform the current meas‐ urement into an equivalent voltage signal within the allowed DSP I/O threshold. The electrical circuit schematic of the adaptation stage is presented in Fig. 5, where the hall-effect sensor is represented by an ideal current source. In general, the designed circuit contains the following stages:


**Figure 5.** Schematic of the measured current adaptation circuit.

#### **b.** Measured speed adaptation stage

The test-rig speed is measured by means of an incremental encoder from the manufacturer Hohner with reference 10-11657-2500. This device measures speeds between ±1000 rpm and gives two types of squared waves that are 90 electrical degrees out of phase, which are usually called channel A and channel B. The reading of one channel provides information about the speed of rotation, while the acquisition of the second channel allows obtaining the rotational direction. Another signal called channel I (or index) is also available, which gives the position of absolute zero on the encoder shaft. This signal is a squared impulse with the phase and width centered on channel A. The set of three signals (Fig. 6) has an equivalent output voltage of ±5 V and must be adapted to the DSP's voltage threshold (0/3.3 V).

**Figure 6.** Graphic representation of the A, B and I incremental signals obtained from the Hohner's encoder with refer‐ ence 10-11657-2500.

The speed measurement adaptation circuit shown in Fig. 7 consists of the following stages:


**Figure 7.** Schematic of the measured speed adaptation circuit.

The three adapted signals are then received by the eQEP peripheral module in the DSP, which is in charge of calculating the rotational speed. This module offers two different first-order approximations for speed estimation, which should be implemented for either high- (1) or lowspeed operation (2) [22]:

$$w\left(k\right) \equiv \frac{\mathbf{x}\left(k\right) - \mathbf{x}\left(k-1\right)}{T} = \frac{\Delta X}{T} \tag{1}$$

$$w\left(k\right) \equiv \frac{X}{t\left(k\right) - t\left(k - 1\right)} = \frac{X}{\Delta T} \tag{2}$$

where

**A**

360°

170 Applications of Digital Signal Processing through Practical Approach

**•** Unity gain buffer amplifier for circuit stage isolation.

R1

**Figure 7.** Schematic of the measured speed adaptation circuit.

ence 10-11657-2500.

control unit. **•** Voltage divider.

Vin

±5V

180° 90° Values expressed in

**Figure 6.** Graphic representation of the A, B and I incremental signals obtained from the Hohner's encoder with refer‐

The speed measurement adaptation circuit shown in Fig. 7 consists of the following stages: **•** Optocoupler circuit that allows the electrical isolation of the speed sensor and the electronic

VCC

The three adapted signals are then received by the eQEP peripheral module in the DSP, which is in charge of calculating the rotational speed. This module offers two different first-order

**•** Safety diodes that prevent the output signal from exceeding the voltage limits.

electrical degrees

Rotation sense-CLOCKWISE

**B**

**I**

+

VCC

0/3.3V

3.3V

D1

D2

R2 Vout

R3

*v*(*k*): Velocity at the time instant k

*x*(*k*): Position at the time instant k

*x*(*k* −1): Position at the time instant k-1

*T* : Fixed unit time or inverse of velocity calculation rate

Δ*x*: Incremental position movement in unit time

*t*(*k*): Time instant k

*t*(*k* −1): Time instant k-1

*X* : Fixed unit position

Δ*T* : Incremental time elapsed for unit position movement

(1) is the conventional approach for speed estimation in electrical drives working at high speed. This method is based on counting the number of encoder pulses *x*(*k*)− *x*(*k* −1) in an established period of time (*T*) which can be defined as the inverse of the DSP calculation rate (150 MHz in our case) [22]. The encoder count (position) is read at the beginning of each speed control loop. Then, the speed estimate is computed by multiplying the number of pulses by the known constant 1/*T* (Fig. 8).

**Figure 8.** Electrical drive speed estimation under high-speed operation.

However, the speed estimation method based on (1) has an inherent accuracy limit directly related to the resolution of the electrical drive encoder and the sampling period *T*, making difficult to obtain an accurate speed estimation at low-speed working conditions [22]. Conse‐ quently, at low-speed operation the calculation method is changed to (2), in order to obtain a more precise measurement. In this case, the motor speed is calculated by measuring the elapsed time between successive pulses (Fig. 9). The width of each pulse is defined by the motor speed for a given encoder resolution (2500 pulses per revolution in our case).

**Figure 9.** Electrical drive speed estimation under low-speed operation.

The DSP eQEP peripheral module is mainly formed by the units shown in the right side of Fig. 10 [23] and its functioning can be summarized as follows [22]. The encoder adapted signals A, B, I in Fig. 6, now labeled as EQEPA, EQEPB and EQEPI, are received by the Quadrature Decoder Unit (QDU), which calculates the speed direction and generates the clock for the pulses counter. The working characteristics of this pulses counter are set in the Position Counter and Control Unit (PCCU) [22]. The eQEP peripheral includes an integrated Quadra‐ ture Capture Unit (QCAP) to measure the elapsed time between consecutive pulses as shown in Fig. 9. This feature is typically implemented for low-speed measurement using equation (2). In addition, the eQEP peripheral contains a 16-bit watchdog timer (QWDOG) used to ensure the proper module operation. Finally, a 32-bit Unit Time Base (UTIME) is included to generate periodic interrupts, based on the internal clock (SYSCLKOUT), for the encoder signals measurement and speed/direction estimation.

**Figure 10.** Electrical drive speed estimation process.

#### **c.** Power converter signal adaptation stage

In the power converter it is necessary to carry out the signal adaptation of both the semicon‐ ductor's switching and driver error signals.

The semiconductors drivers operate with a voltage threshold between 0/15 V, switching ON when triggered with 15 V and OFF with 0 V. The semiconductors' switching signals come from the DSP of the ECU. Then their voltage level is given between 0/3.3 V and must be adapted to meet the 0/15 V driver threshold. Each phase of the power converter consists of two semicon‐ ductors, which, for safety reasons, cannot be active at the same time to avoid short circuits. This implies that the switching signal of one semiconductor will be the complementary of the other one. The switching signal adaptation circuit (Fig. 11) contains the following stages:


**Figure 11.** Schematic of the semiconductor switching signal adaptation circuit.

difficult to obtain an accurate speed estimation at low-speed working conditions [22]. Conse‐ quently, at low-speed operation the calculation method is changed to (2), in order to obtain a more precise measurement. In this case, the motor speed is calculated by measuring the elapsed time between successive pulses (Fig. 9). The width of each pulse is defined by the motor speed

*X*

0 *t(k-1) t(k)* t

The DSP eQEP peripheral module is mainly formed by the units shown in the right side of Fig. 10 [23] and its functioning can be summarized as follows [22]. The encoder adapted signals A, B, I in Fig. 6, now labeled as EQEPA, EQEPB and EQEPI, are received by the Quadrature Decoder Unit (QDU), which calculates the speed direction and generates the clock for the pulses counter. The working characteristics of this pulses counter are set in the Position Counter and Control Unit (PCCU) [22]. The eQEP peripheral includes an integrated Quadra‐ ture Capture Unit (QCAP) to measure the elapsed time between consecutive pulses as shown in Fig. 9. This feature is typically implemented for low-speed measurement using equation (2). In addition, the eQEP peripheral contains a 16-bit watchdog timer (QWDOG) used to ensure the proper module operation. Finally, a 32-bit Unit Time Base (UTIME) is included to generate periodic interrupts, based on the internal clock (SYSCLKOUT), for the encoder signals

A

32-Bit Unit Time Base

SYSCLKOUT

Quadrature Capture (QCAP)

QEP Watchdog (QWDOG)

Quadrature Decoder (QDU)

**eQEP-DSP**

EQEPA EQEPB

EQEPI R3

0/3.3V

In the power converter it is necessary to carry out the signal adaptation of both the semicon‐

3.3V D1 D2

VCC R2 Vout

**+ -**

VCC

Position Counter-Control (PCCU)

for a given encoder resolution (2500 pulses per revolution in our case).

**Figure 9.** Electrical drive speed estimation under low-speed operation.

172 Applications of Digital Signal Processing through Practical Approach

measurement and speed/direction estimation.

CH. A CH. B INDEX

**Figure 10.** Electrical drive speed estimation process.

**c.** Power converter signal adaptation stage

ductor's switching and driver error signals.

Vin ±5V R1

Correspondingly, the semiconductors driver error signals are given in a voltage level of 0/15 V. As in previous cases, such voltage level exceeds the DSP's allowed voltage threshold (0/3.3 V), and consequently must be adapted. The adaptation circuit (Fig. 12) consists of an opto‐ coupler, which provides an electrical isolation between the power converter and the electronic control unit, and the required voltage level adaptation. Moreover, a LED is placed in series with the optocoupler resistance in order to generate a light signal in case of an error.

**Figure 12.** Error signal adaptation circuit schematic.

The aforementioned designed circuits along with the selected DSP are finally mounted on a set of Printed Circuit Boards (PCB), constituting the Modular Electronic Control Unit (MECU, patent pending) shown in Fig. 13 and placed within the power converter module, allowing to measure four phase currents, the electrical machine speed, handle the power converter error signals and control the semiconductors' switching sequence.

**Figure 13.** Modular electronic control unit printed circuit boards.

## **4. Software design: Data acquisition, signal processing and control algorithm implementation**

In this section the control algorithm is detailed. Before describing the algorithm, it is necessary to understand how the hardware and the software meet. The electrical drive power converters include some current sensors to measure the stator currents in the multiphase machine. Voltage levels are obtained, corresponding to the measured stator currents, and these values are adapted to the available DSP's voltage levels and then converted into digital values using the analog-to-digital converter module of the DSP. The implemented algorithm uses these digital values to control the multiphase machine. The complete system operation flowchart is presented in Fig. 14.

When the operation of the system starts, the control algorithm guarantees that error signals are not activated before switching the power converter. Notice that if an error in a driver is detected while the system is on, the DSP stops the switching process, shutting down the system to avoid any damage. In any case, the control algorithm includes a stop signal to allow the testrig operator to halt the entire system anytime. The control algorithm operates during normal operation of the multiphase drive, reading stator currents and forcing these values to follow the reference ones.

**Figure 14.** System operation flowchart.

The aforementioned designed circuits along with the selected DSP are finally mounted on a set of Printed Circuit Boards (PCB), constituting the Modular Electronic Control Unit (MECU, patent pending) shown in Fig. 13 and placed within the power converter module, allowing to measure four phase currents, the electrical machine speed, handle the power converter error

signals and control the semiconductors' switching sequence.

174 Applications of Digital Signal Processing through Practical Approach

**Figure 13.** Modular electronic control unit printed circuit boards.

**algorithm implementation**

presented in Fig. 14.

**4. Software design: Data acquisition, signal processing and control**

In this section the control algorithm is detailed. Before describing the algorithm, it is necessary to understand how the hardware and the software meet. The electrical drive power converters include some current sensors to measure the stator currents in the multiphase machine. Voltage levels are obtained, corresponding to the measured stator currents, and these values are adapted to the available DSP's voltage levels and then converted into digital values using the analog-to-digital converter module of the DSP. The implemented algorithm uses these digital values to control the multiphase machine. The complete system operation flowchart is

The most common control strategy in the multiphase drive case is the well-known Rotor-Flux Oriented Control (RFOC) method, based on multiple inner current control loops (linear stator current PI controllers and PWM modulators) commanded by outer controllers (speed/torque and flux PI controllers). A modified RFOC controller is implemented in our case. While the external control loops of a conventional high-performance RFOC drives is maintained, an alternative to the inner current controller based on the model predictive control (MPC) is applied. The inner control method is also known as finite-control set model-based predictive control method (FCS-MPC) because the number of switching states in a power converter is finite and only one switching state is applied during the whole sampling period. Notice that the FCS-MPC method is used as a case example in this work due to its recent interest in the development of high-performance three-phase and multiphase drives [15, 16, 24, 25] and power converters [26, 27].

The basic scheme of FCS-MPC is presented in Fig. 15, and runs in the processor unit as follows. The control action is obtained solving an optimization problem at each sampling period, where a model of the real system is used to predict its output. This prediction is carried out for each possible input, or switching vector, of the power converter to determine which one minimizes a defined cost function (the basis of the optimization problem). Notice that the model of the real system, also called predictive model, must be used considering all possible voltage vectors of the power converter, which suggests a high-computational cost for the digital signal processing technique.

Different cost functions can be used to express different control criteria. In our case, an absolute current error is used to define the cost function. The reference stator currents, *i s* \* ¯ (*k*), and the stator phase currents of the machine, *i s* ¯ (*k*), are measured and processed by the DSP every sampling period. The machine state-space model is then used to predict the current evolution, *i* ^ *s* ¯ (*k* + 1), depending on the different possible switching states *Si j* (*k* + 1) and considering the VSI DC-Link voltage and measured phase currents *i s* ¯ (*k*). Subsequently, the cost function *J* is evaluated considering predicted and reference stator phase currents, and the switching vector that provides the lowest value of the cost function, *Si optimum*(*k* + 1), is applied to the power converter during the next sampling period. This process is depicted in the flow diagram shown in Fig. 16.

**Figure 15.** Finite-Control Set Model-Based Predictive Control scheme.

It is important to note that different cost functions (3) can be defined depending on the specific application in order to include different control constraints (*Ci* ). In our case, the cost function only depends on the reference and predicted currents in the stationary reference frame. However, different control criteria aimed to optimize the multiphase drive performance such as DC-Link voltage balancing, switching stress minimization, common-mode voltage reduc‐ tion or stator current harmonic minimization can be included, increasing also the complexity of the control strategy and the digital signal processing capacity of the entire system. Every considered constraint can have a different degree of importance in the cost function using weighting factors (*Wi* ). This is one of the advantages of the FCS-MPC technique, a flexible control method where different constraints can be easily introduced without increasing the complexity of the algorithm.

$$J = \mathbb{W}\_1 \mathbb{C}\_1 + \mathbb{W}\_2 \mathbb{C}\_2 + \dots + \mathbb{W}\_i \mathbb{C}\_i \tag{3}$$

Application of DSP in Power Conversion Systems — A Practical Approach for Multiphase Drives http://dx.doi.org/10.5772/60450 177

**Figure 16.** FCS-MPC flow diagram.

Different cost functions can be used to express different control criteria. In our case, an absolute

sampling period. The machine state-space model is then used to predict the current evolution,

evaluated considering predicted and reference stator phase currents, and the switching vector

converter during the next sampling period. This process is depicted in the flow diagram shown

*i \* s(k)*

*s* ¯

*s* \* ¯

(*k* + 1) and considering the VSI

*Si*

*MINIMIZER FUNCTION Min(J)*

> *SEQUENCER j=1...N*

). In our case, the cost function

*POSSIBLE VOLTAGE VECTORS*

(*k*). Subsequently, the cost function *J* is

*optimum*(*k* + 1), is applied to the power

(*k*), are measured and processed by the DSP every

*Si j (k+1)*

*j*

*COST FUNCTION*

*PREDICTIVE MODEL*

). This is one of the advantages of the FCS-MPC technique, a flexible

11 22 ... *i i J WC WC WC* = + ++ (3)

*J*

*îs(k+1)*

(*k*), and the

5

*optimum(k+1)*

current error is used to define the cost function. The reference stator currents, *i*

*s* ¯

(*k* + 1), depending on the different possible switching states *Si*

DC-Link voltage and measured phase currents *i*

176 Applications of Digital Signal Processing through Practical Approach

that provides the lowest value of the cost function, *Si*

*i \* s*a

*i \* s*b

*i \* sx i \* sy*

*i \* sz*

Notations

**Figure 15.** Finite-Control Set Model-Based Predictive Control scheme.

application in order to include different control constraints (*Ci*

*is*a

*is*b

*isx isy isz*

*Si j*

*iabcd is(k) abcde TO* ab*xyz*

*abcde TO* ab*xyz*

*Si*

*is(k)*: measured stator currents. *îs(k+1)*: predicted stator currents. *is\*(k)*: reference stator currents.

*i \* s(k)*

*(k+1)*: One of the possible switching voltage vector.

*optimum(k+1)*: Switching voltage vector that minimices *J*.

It is important to note that different cost functions (3) can be defined depending on the specific

only depends on the reference and predicted currents in the stationary reference frame. However, different control criteria aimed to optimize the multiphase drive performance such as DC-Link voltage balancing, switching stress minimization, common-mode voltage reduc‐ tion or stator current harmonic minimization can be included, increasing also the complexity of the control strategy and the digital signal processing capacity of the entire system. Every considered constraint can have a different degree of importance in the cost function using

control method where different constraints can be easily introduced without increasing the

*is(k)*

*Vdc*

stator phase currents of the machine, *i*

*i* ^ *s* ¯

in Fig. 16.

*i \* abcd*

weighting factors (*Wi*

complexity of the algorithm.

FCS-MPC can be classified in two categories depending on the prediction horizon *Np* they implement. Prediction horizon can be defined as the number of future states in time that the controller predicts in order to select the most suitable control action [25]. The shortest predic‐ tion horizon can be defined as *Np* =1, where measured variables are determined in the instant *k*, then the optimum switching state is calculated for *k* + 1 and applied at *k* + 1. Larger prediction horizons (*Np* ≥2) predict the behavior of the electrical drive for future instants *k* + 2, *k* + 3, ... and select the optimum VSI switching state to be applied on *k* + 1 (Fig. 17). It has been dem‐ onstrated that larger prediction horizon results in better performance [27]. However, the increase in the prediction horizon results in higher computational cost and is not suitable for real-time implementation in low and medium power drive applications [28]. One disadvant‐ age of the FCS-MPC technique is that, unlike other aforementioned techniques (such as PI-PWM methods), it provides a variable switching frequency in the power converter.

**Figure 17.** FCS-MPC prediction horizon principle.

In order to apply the FCS-MPC to a real high-performance multiphase drive, a Digital Signal Processor (DSP) is required due to the heavy computational cost involved. All on-line digital signal processing algorithms are implemented in the DSP. This is the case of the predictive model based on the machine modeling equations, which must be discretized to be program‐ med in the DSP [29, 30]. In our case, the stator phase currents and rotor flux in the stationary reference frame are assumed as state variables [29], and the obtained equations can be summarized as follows:

$$\frac{d}{dt}\overrightarrow{i\_{s\alpha\theta}} = -\left(\frac{1}{\sigma\tau\_s} - \frac{1-\sigma}{\sigma\tau\_r}\right)\overrightarrow{i\_{s\alpha\theta}} + \frac{1-\sigma}{\sigma\tau\_r}\overrightarrow{\lambda\_{rs\theta}} - j\frac{1-\sigma}{\sigma\mathcal{L}\_m}\alpha\overrightarrow{\lambda\_{rs\theta}} + \frac{1}{\sigma\mathcal{L}\_s}\overrightarrow{v\_{s\alpha\theta}}\tag{4}$$

$$\frac{d}{dt}\overrightarrow{i\_{sxy}} = -\frac{1}{\tau\_{ls}}\overrightarrow{i\_{sxy}} + \frac{1}{L\_{ls}}\overrightarrow{v\_{sxy}}\tag{5}$$

$$\frac{d}{dt}\stackrel{\cdots}{i\_{sz}} = -\frac{1}{\tau\_{ls}}\stackrel{\cdots}{i\_{sz}} + \frac{1}{L\_{ls}}\stackrel{\cdots}{v\_{sz}}\tag{6}$$

$$\frac{d}{dt}\overrightarrow{\lambda\_{ra\theta}} = \frac{L\_m}{\tau\_r}\overrightarrow{i\_{sa\theta}} - \frac{1}{\tau\_r}\overrightarrow{\lambda\_{ra\theta}} - j o\_r\overrightarrow{\lambda\_{ra\theta}}\tag{7}$$

Application of DSP in Power Conversion Systems — A Practical Approach for Multiphase Drives http://dx.doi.org/10.5772/60450 179

$$
\overrightarrow{\mathcal{A}\_{s\alpha\emptyset}} = \sigma L\_s \overrightarrow{i\_{s\alpha\emptyset}} + k\_r \overrightarrow{\mathcal{A}\_{r\alpha\emptyset}} \tag{8}
$$

where *kr*, *τr*, *σ*, *τs* and *τls* are obtained from the electrical parameters (stator, rotor and mutual inductances, *L <sup>s</sup>*, *L <sup>r</sup>* and *L <sup>m</sup>*, and stator and rotor resistances, *R*s and *R*<sup>r</sup> ) of the machine, as it is defined in (9), (10), (11), (12) and (13), respectively.

$$k\_r = \frac{L\_m}{L\_r} \tag{9}$$

$$
\sigma\_r = \frac{L\_r}{R\_r} \tag{10}
$$

$$\sigma = 1 - \frac{L\_w^2}{L\_s L\_r} \tag{11}$$

$$
\pi\_s = \frac{L\_s}{R\_s} \tag{12}
$$

$$
\tau\_{ls} = \frac{L\_{ls}}{R\_s} \tag{13}
$$

Rewriting equations (4)-(8) in terms of their real and imaginary components in matrix form:

$$
\frac{d}{dt} \begin{bmatrix} x \\ \end{bmatrix} = \begin{bmatrix} A \\ \end{bmatrix} \begin{bmatrix} x \\ \end{bmatrix} + \begin{bmatrix} B \\ \end{bmatrix} \begin{bmatrix} u \\ \end{bmatrix} \tag{14}
$$

$$\begin{bmatrix} \mathbf{y} \end{bmatrix} = \begin{bmatrix} \mathbf{C} \end{bmatrix} \begin{bmatrix} \mathbf{x} \end{bmatrix} \tag{15}$$

where

*k*, then the optimum switching state is calculated for *k* + 1 and applied at *k* + 1. Larger prediction horizons (*Np* ≥2) predict the behavior of the electrical drive for future instants *k* + 2, *k* + 3, ... and select the optimum VSI switching state to be applied on *k* + 1 (Fig. 17). It has been dem‐ onstrated that larger prediction horizon results in better performance [27]. However, the increase in the prediction horizon results in higher computational cost and is not suitable for real-time implementation in low and medium power drive applications [28]. One disadvant‐ age of the FCS-MPC technique is that, unlike other aforementioned techniques (such as PI-

*t(k+1) t(k+2)*

In order to apply the FCS-MPC to a real high-performance multiphase drive, a Digital Signal Processor (DSP) is required due to the heavy computational cost involved. All on-line digital signal processing algorithms are implemented in the DSP. This is the case of the predictive model based on the machine modeling equations, which must be discretized to be program‐ med in the DSP [29, 30]. In our case, the stator phase currents and rotor flux in the stationary reference frame are assumed as state variables [29], and the obtained equations can be

> 11 1 1 1 *s s r r r s s r r m m s*

uuur uuur uuuur uuuur uuuur

1 1 *sxy sxy sxy ls ls*

1 1 *sz sz sz ls ls*

> ab

l

*<sup>d</sup> i iv*

t *L* =- + uur uur uur

*<sup>m</sup>* 1 *r s r rr r r <sup>d</sup> <sup>L</sup> i j dt*

 t=-- uuuur uuur uuuur uuuur

ab

t

l

ab

*<sup>d</sup> i ij v dt L L <sup>L</sup>*

*<sup>d</sup> i iv*

t *L* =- + uuur uuur uuuur

æ ö -- - =- - + - + ç ÷

 st

ab

ss

*Ts*

*S1*

*S2*

*Sn*

ab

s

 s

 s  wl

ab

 wl ab

(4)

(5)

(6)

(7)

*Si optimum*

PWM methods), it provides a variable switching frequency in the power converter.

*S1*

*S2*

*Sn*

*Si optimum*

*Ts*

*t(k)*

*Ci*

**Figure 17.** FCS-MPC prediction horizon principle.

summarized as follows:

ab

st

 st

*dt*

*dt*

ab

l

è ø

*C\* i*

178 Applications of Digital Signal Processing through Practical Approach

$$\begin{bmatrix} \mathbf{x} \\ \end{bmatrix} = \begin{bmatrix} \mathbf{i}\_{s\alpha} \ \mathbf{i}\_{s\beta} \ \mathbf{i}\_{s\alpha} \ \mathbf{i}\_{s\alpha} \ \mathbf{i}\_{s\beta} \ \mathbf{i}\_{s\omega} \ \mathbf{i}\_{r\alpha} \ \mathbf{x} \\ \end{bmatrix}^{T} \tag{16}$$

 *<sup>T</sup> s s sx sy sz u vvvvv* a bé ù <sup>=</sup> é ù ë û ë û (17)

$$
\begin{bmatrix} \mathbf{y} \ \end{bmatrix} = \begin{bmatrix} \mathcal{A}\_{s\alpha} \mathcal{A}\_{s\beta} \end{bmatrix}^T \tag{18}
$$

0 000 0 000 0 0 000 0 0 0 0 00 0 0 1 1 1 1 1 1 1 1 0 00 0 0 0 0 000 0 0 000 1 1 1 1 1 *r s r r m m r s r m rm ls ls ls r r r r A L L L L* s s s w st st st s s s s w st st s st t t t w t w t æ ö - - - - - ç ÷ è ø æ ö - - - - - ç ÷ è ø - é ù ê ú é ù = ë û ê - - - <sup>ú</sup> ê ú ë û (19) <sup>1</sup> 0 000 <sup>1</sup> 0 000 <sup>1</sup> 0 0 00 <sup>1</sup> 000 0 <sup>1</sup> 0 0 00 0 0 000 0 0 000 *s s ls ls ls L L L B L L* s s é ù ê ú é ù = ë û ë û (20) 0 000 0 0 0000 *s r s r L k C L k* s s é ù é ù ë û <sup>=</sup> ê ú ë û (21)

Next, the machine state-space equations (14)-(15) are discretized using a sample period *Ts* and assuming constant inputs and constant electrical parameters during the whole sampling period [30]. Notice that the matrix *A* includes constant and variable components that depend on the instantaneous value of the electrical speed (*ωr*). The matrix *A* has been divided into a constant matrix *Ac* and a speed-dependent one *A<sup>ω</sup>* , to simplify the discretization process as follows:

Application of DSP in Power Conversion Systems — A Practical Approach for Multiphase Drives http://dx.doi.org/10.5772/60450 181

$$
\begin{bmatrix} A \\ \end{bmatrix} = \begin{bmatrix} A\_c \\ \end{bmatrix} + \begin{bmatrix} A\_o \\ \end{bmatrix} \tag{22}
$$

$$\mathbb{E}\left[\mathbf{x}\begin{bmatrix}k+1\\k\end{bmatrix}\right] = \left[\boldsymbol{\Phi}\right]\mathbb{X}\left[k\right] + \left[\boldsymbol{\Gamma}\right]\mathbb{X}\left[k\right] \tag{23}$$

$$
\mathbb{E}\left[y\begin{bmatrix}k+1\\ \end{bmatrix}\right] = \begin{bmatrix}\mathbb{C} \\ \end{bmatrix} \mathbb{x}\begin{bmatrix}k+1\\ \end{bmatrix} \tag{24}
$$

$$\left[\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\/\!\!\!\!\!\/\!\!\!\/\!\!\/\!\!\/\!\!\/\*\!\/\!\/\!\/\!\/\!\/\!\/\!\/\/\!\/\/\,\tag{25}$$

$$\left[\!\!\!\!\!\!\!\!\/\!\!\/\!\!\/\!\/\!\/\!\/\!\/\!\/\!\/\!\/\/\!\/\/\!\/\/\,\tag{25}$$

$$
\begin{bmatrix} \Gamma \ \end{bmatrix} = \int\_0^\top e^{\int A^\top \mathbf{J} \cdot \mathbf{r}} \begin{bmatrix} \mathbf{B} \ \end{bmatrix} d\tau = e^{\int A\_s \mathbf{J} \cdot \mathbf{r}\_s} \begin{bmatrix} \mathbf{B} \ \end{bmatrix} T\_s \tag{26}
$$

The obtained [Φ] matrix is based on a constant term *e Ac Ts* , which is calculated off-line, and a time-varying term *e A<sup>ω</sup> Ts* , which can be defined as stated in [30] applying the Cayley-Hamilton theorem:

*T*

1 1 1 1

æ ö - - - - - ç ÷ -

*s r m rm*

1

*ls*

t

1

*ls*

t


1

*r*


t

*r*

w

1

*r*

t


*r*

w

*r*

(19)

(20)

w

 s

> s

0 00 0 0


ë û ë û (18)

st

s

s

s

*r*

w

*L L*

 st

*L L*

 s

*s s y* a b

 é ù = é ù l l

0 000

s

1 1 1 1

é ù ê ú

æ ö - - - - - ç ÷

0 0 000 0


1

*ls*

t

<sup>ú</sup> ê ú

ë û

<sup>1</sup> 0 000

é ù ê ú

<sup>1</sup> 0 000

<sup>1</sup> 0 0 00

*s*

*L*

s

<sup>1</sup> 000 0

*ls*

*L*

*ls*

*L*

*ls*

ë û (21)

*L*

<sup>1</sup> 0 0 00

0 0 000 0 0 000

0 0000 *s r*

é ù é ù ë û = ê ú

s

*L k*

ë û

0 000 0

Next, the machine state-space equations (14)-(15) are discretized using a sample period *Ts* and assuming constant inputs and constant electrical parameters during the whole sampling period [30]. Notice that the matrix *A* includes constant and variable components that depend on the instantaneous value of the electrical speed (*ωr*). The matrix *A* has been divided into a constant matrix *Ac* and a speed-dependent one *A<sup>ω</sup>* , to simplify the discretization process as

*s r*

*L k*

*s r r m m*

0 0 0 00 0

0 000

 st

è ø

st

s

180 Applications of Digital Signal Processing through Practical Approach

 st

è ø

0 0 000

0 0 000

*s*

*L*

s

*B*

*C*

s

é ù = ë û

0

ê

st

*A*

follows:

é ù = ë û

$$e^{\left[\alpha\_{u}\right]\_{r\_{s}}^{r\_{s}}} = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & L\_{n} \frac{1 - \cos\left(\alpha\_{r} T\_{s}\right)}{\sigma L\_{s} L\_{r}} & L\_{n} \frac{\sin\left(\alpha\_{r} T\_{s}\right)}{\sigma L\_{s} L\_{r}} \\ 0 & 1 & 0 & 0 & 0 & -L\_{n} \frac{\sin\left(\alpha\_{r} T\_{s}\right)}{\sigma L\_{s} L\_{r}} & L\_{n} \frac{1 - \cos\left(\alpha\_{r} T\_{s}\right)}{\sigma L\_{s} L\_{r}} \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \cos\left(\alpha\_{r} T\_{s}\right) & -\sin\left(\alpha\_{r} T\_{s}\right) \\ 0 & 0 & 0 & 0 & 0 & \sin\left(\alpha\_{r} T\_{s}\right) & \cos\left(\alpha\_{r} T\_{s}\right) \end{bmatrix} \tag{27}$$

To summarize, the implemented predictive current control (PCC) technique is based on a fast inner current FCS-MPC controller with an outer speed PI RFOC-based regulator, offering better system performance (higher control bandwidth) than using conventional RFOC methods with cascaded PI controllers [25]. The inner PCC controller has been described before, where the predicted stator currents in the stationary reference frame are used in order to control the multiphase drive. The outer speed controller generates current references in a rotating reference frame from an outer PI-based speed control loop. Constant flux operation (reference speed under its nominal value) is supposed, and a constant *d* -current reference is imposed. These stator current references are then mapped in the *α* - *β* - *x* - *y* stationary reference frame in order to be used in the cost function (28) as it is shown in Fig. 18. The same method‐ ology has also been applied in recent scientific studies [16, 20, 24].

The reference stator current vector in the *x* - *y* plane can be null or non-null depending on the type of multiphase machine. The *α* - *β* stator current components contribute to torque pro‐ duction, while *x* - *y* stator current components do not in distributed windings multiphase machines. This is our case with the five-phase induction machine with distributed windings used for experimentation. Then, zero reference is set in our controller for the *x* - *y* current components to avoid harmonic generation and reduce the copper losses in the drive. The weighting factors in the cost function (28) are adjusted in order to favor those switching states (32 for the five-phase two-level VSI used), which maximize *α* - *β* currents and at the same time provide minimum *x* - *y* currents. The overall control aim is to generate the desired electric torque to the drive, which implies the generation of sinusoidal stator current references in *a b* - *c* - *d* - *e* phase coordinates in steady state. In the stationary *α* - *β* - *x* - *y* reference frame and steady state, the control aim is equivalent to generate a reference stator current vector in the *α* - *β* plane, which is constant in magnitude but changing in its electrical angle following a circular trajectory.

$$J = A \left| \overleftarrow{i\_{s\alpha}} \right| + B \left| \overleftarrow{i\_{s\beta}} \right| + C \left| \overleftarrow{i\_{s\alpha}} \right| + D \left| \overleftarrow{i\_{s y}} \right| \tag{28}$$

Each *α* - *β* - *x* - *y* current term in the cost function is defined as:

$$\overline{\dot{i}\_{s\alpha}} = \stackrel{\circ}{i\_{s\alpha}} \left(k+1\right) - \hat{\dot{i}}\_{s\alpha} \left(k+1\right) \stackrel{\circ}{i\_{s\beta}} = \stackrel{\circ}{i\_{s\beta}} \left(k+1\right) - \hat{\dot{i}}\_{s\beta} \left(k+1\right) \tag{29}$$

$$
\overline{\hat{i\_{sx}}} = \hat{i\_{sx}} \left(k+1\right) - \hat{i\_{sx}} \left(k+1\right),
\overline{\hat{i\_{sy}}} = \hat{i\_{sy}} \left(k+1\right) - \hat{i\_{sy}} \left(k+1\right) \tag{30}
$$

**Figure 18.** General scheme of the implemented PCC controller.

## **5. Application results**

The reference stator current vector in the *x* - *y* plane can be null or non-null depending on the type of multiphase machine. The *α* - *β* stator current components contribute to torque pro‐ duction, while *x* - *y* stator current components do not in distributed windings multiphase machines. This is our case with the five-phase induction machine with distributed windings used for experimentation. Then, zero reference is set in our controller for the *x* - *y* current components to avoid harmonic generation and reduce the copper losses in the drive. The weighting factors in the cost function (28) are adjusted in order to favor those switching states (32 for the five-phase two-level VSI used), which maximize *α* - *β* currents and at the same time provide minimum *x* - *y* currents. The overall control aim is to generate the desired electric torque to the drive, which implies the generation of sinusoidal stator current references in *a b* - *c* - *d* - *e* phase coordinates in steady state. In the stationary *α* - *β* - *x* - *y* reference frame and steady state, the control aim is equivalent to generate a reference stator current vector in the *α* - *β* plane, which is constant in magnitude but changing in its electrical angle following a

*s s sx sy J Ai Bi Ci Di*

( ) ( ) ( ) ( ) \* \* 1 1 , 1 1 <sup>ˆ</sup> <sup>ˆ</sup> *ss s ss s i ik ik i ik ik*

> *i \* s*a

*i \* s*b

*i \* sx*

*i \* sy*

*is(k)*

 b b

= +++ (28)

 b= +- + = +- + (29)

> *COST FUNCTION*

*PREDICTIVE MODEL*

*<sup>J</sup> <sup>i</sup>*

*îs(k+1)*

5

*optimum(k+1)*

*Si*

*MINIMIZER FUNCTION Min(J)*

> *SEQUENCER j=1...N*

*POSSIBLE VOLTAGE VECTORS*

*Si j (k+1)*

( ) ( ) ( ) ( ) \* \* 1 1 , 1 <sup>ˆ</sup> <sup>1</sup> <sup>ˆ</sup> *sx sx sx sy sy sy i ik ik i ik ik* = +- + = +- + (30)

*\* s(k)*

*Vdc*

w*m is(k)*

 b

a

Each *α* - *β* - *x* - *y* current term in the cost function is defined as:

 a

*dq*

ab

q

aa

182 Applications of Digital Signal Processing through Practical Approach

*PI*

*i \* sd i \* sq*

*i \* sd*

> *POSITION ESTIMATOR*

> > *abcde TO* ab*xyz*

**Figure 18.** General scheme of the implemented PCC controller.

*i \* sq*

> *is*b

*isx isy*

*is*a

circular trajectory.

+ -

w*\* m*

> w*m*

> > *iabcd*

In this section, experimental results are provided to validate the interest in the design of highperformance and complex power drives of real-time digital signal processing implemented using DSPs.

A DC-Link voltage of 300 V is used and the switching frequency is fixed to 10 kHz. A constant *d*-current component of 0.52 A is also imposed, and a maximum phase current of 2.1 A is selected for safety reasons. The five-phase induction machine specifications are detailed in Table 3, while the estimated electrical parameters of the machine, used in the discretized predictive model implemented in the DSP, are summarized in Table 4.


**Table 3.** Five-phase induction machine specifications.


**Table 4.** Electrical parameters of the five-phase induction machine.

The developed PCC is tested under various working conditions, including steady state operation and different torque and speed references to show that PCC provides fast reference tracking and accurate steady-state behavior at different operating points. A speed and torque response test is conducted first. Obtained results are shown in Fig. 19, where the speed response is depicted in the upper plot and the *q*-current in the lower plot. Under no load condition (*TL* =0), a reference speed step change from 0 to 500 rpm (Fig. 19, upper plot, red line) is demanded on (*t* =0.1 *s*). Steady state operation and correct speed reference tracking is obtained at approximately (*t* =1.5 *s*). Notice that a small *q*-current component is observed at steady state with no load condition, due to the fact that the IM is mechanically coupled to the DC-Machine in the experimental test-rig (Fig. 3), requiring a small current in order to maintain the reference speed (Fig. 19, lower plot). Next, a load torque of approximately 28% of the nominal torque (*Tn*) is demanded at (*t* =1.8 *s*). Due to the load torque change, the speed reference tracking is instantaneously affected, being necessary for the system to provide an extra *q*-current until the reference speed is achieved. As observed in the *q*-current component plot, the implemented predictive current controller provides proper current tracking under the different working conditions, providing almost instantaneous response to reference current changes.

**Figure 19.** Speed and torque response test. The speed response is shown in the upper plot while the *q*-current under the different working conditions is shown in the lower plot. First, the electrical drive speed performance is evaluated with a reference speed step change from 0 to 500 rpm, under no load condition, at *t* =0.1 *s*. Then, at *t* =1.8 *s* a load torque of 28% of the nominal torque (*TL*) is demanded.

The developed PCC is tested under various working conditions, including steady state operation and different torque and speed references to show that PCC provides fast reference tracking and accurate steady-state behavior at different operating points. A speed and torque response test is conducted first. Obtained results are shown in Fig. 19, where the speed response is depicted in the upper plot and the *q*-current in the lower plot. Under no load condition (*TL* =0), a reference speed step change from 0 to 500 rpm (Fig. 19, upper plot, red line) is demanded on (*t* =0.1 *s*). Steady state operation and correct speed reference tracking is obtained at approximately (*t* =1.5 *s*). Notice that a small *q*-current component is observed at steady state with no load condition, due to the fact that the IM is mechanically coupled to the DC-Machine in the experimental test-rig (Fig. 3), requiring a small current in order to maintain the reference speed (Fig. 19, lower plot). Next, a load torque of approximately 28% of the nominal torque (*Tn*) is demanded at (*t* =1.8 *s*). Due to the load torque change, the speed reference tracking is instantaneously affected, being necessary for the system to provide an extra *q*-current until the reference speed is achieved. As observed in the *q*-current component plot, the implemented predictive current controller provides proper current tracking under the different working conditions, providing almost instantaneous response to reference

184 Applications of Digital Signal Processing through Practical Approach

*TL* = 0 *TL* = 0.28\**Tn*

**Figure 19.** Speed and torque response test. The speed response is shown in the upper plot while the *q*-current under the different working conditions is shown in the lower plot. First, the electrical drive speed performance is evaluated with a reference speed step change from 0 to 500 rpm, under no load condition, at *t* =0.1 *s*. Then, at *t* =1.8 *s* a load

torque of 28% of the nominal torque (*TL*) is demanded.

current changes.

**Figure 20.** Reversal test. The speed reference is changed from 500 rpm to -500 rpm, under no load condition. The speed response is shown in the upper figure while a zoom-in of the obtained current waveforms in the *α* - *β* plane during the zero-crossing speed operating point are shown in the lower plot.

A speed reversal test changing from 500 rpm to -500 rpm is also applied under no load condition (although the IM and DC machines are mechanically coupled, no extra load torque is demanded). The speed is depicted in the upper plot of Fig. 20, while a zoom-in of the obtained *α* - *β* currents during the zero-speed crossing point are shown in the lower plot. Notice that once again the implemented controller provides an adequate performance, effectively achieving the speed reference. Finally, the machine currents under steady state operation are shown in Fig. 21. Phase currents are shown in the upper plot, while the *α* - *β* and *x* -*y* plots are shown in the lower plot. Notice that phase currents are symmetrical, equally displaced and do not exceed the maximum current limit of 2.1 A.

One of the main concerns in applications where digital signal processing is involved is the computational cost of the implemented algorithm. This can even be considered as the most critical issue in real-time applications, based on DSPs or microprocessors. Then, determining if the control unit is able to implement demanded operations in certain programmed sampling periods is fundamental. This computational burden is associated with the required mathe‐ matical task and DSP's modules (mainly eQEP and A/D for the data acquisition, SCI for external communication operations, and ePWM for the power converter control actions). The real-time implemented algorithm is analyzed in detail in Fig. 22. This figure shows the relative time-consuming load of every implemented task in a sampling period. It can be appreciated that the most time-demanding task corresponds to the PCC control, followed by the analogto-digital conversion process, while other implemented processes (such as data logging and PC-DSP communication) and the speed PI control loop are not heavy from a computational load perspective. control, followed by the analog-to-digital conversion process, while other implemented processes

(such as datalogging and PC-DSP communication) and the speed PI control loop are not heavy from a

Figure 21. Steady state phase currents. Phase currents are shown in the upper plot, while currents in the -and -plane are shown in the lower plot. Time % **Figure 21.** Steady state phase currents. Phase currents are shown in the upper plot, while currents in the *α* - *β* and *x y* plane are shown in the lower plot.

**Figure 22.** Algorithm real-time implementation details and task distribution in a sampling period.

100

<H1>Conclusion

#### **6. Conclusion**

that the most time-demanding task corresponds to the PCC control, followed by the analogto-digital conversion process, while other implemented processes (such as data logging and PC-DSP communication) and the speed PI control loop are not heavy from a computational load perspective. control, followed by the analog-to-digital conversion process, while other implemented processes (such as datalogging and PC-DSP communication) and the speed PI control loop are not heavy from a



i x s vs iy s

i x s [A]

Other Process

PCC Control

PCC Control

Other Process


A/D Conversion PI Control

A/D Conversion PI Control

i

Figure 21. Steady state phase currents. Phase currents are shown in the upper plot, while currents in

**Figure 21.** Steady state phase currents. Phase currents are shown in the upper plot, while currents in the *α* - *β* and *x* -

y s [A]

i <sup>α</sup> s vs i β s

i α s [A]

Time %

Time %

<H1>Conclusion

*y* plane are shown in the lower plot.

Figure 22. Algorithm real-time implementation details and task distribution in a sampling period.

**Figure 22.** Algorithm real-time implementation details and task distribution in a sampling period.

100

100


the -and -plane are shown in the lower plot.

i

β s [A]

computational load perspective.

186 Applications of Digital Signal Processing through Practical Approach

Digital signal processing constitutes the cornerstone of numerous applications. Power electronics and the development of high-performance drives is one of them. In general, the development of a high-performance drive is a complex field where data acquisition, data adaptation and discretization, data processing, control systems and finally physical interaction using actuators with the real system are required. This complexity exponentially increases if multiphase drives are involved, as it is the case analyzed in this chapter, where a highperformance multiphase drive based on a symmetrical five-phase induction machine with sinusoidally distributed windings is analyzed from the perspective of the digital signal processing field. The specific requirements for data acquisition, processing and control in the studied electrical drive are detailed, starting with the required signals for its safety operation. Insights of the electrical adaptation stages, needed to process the data in the DSP, are then provided. The electronic adaptation circuits are also shown like a fundamental part in the processing task. Finally, the control system is summarized (the PCC method is used as a case example due to its recent interest in the field) and experimental results are provided to show the system operation.

#### **Author details**

Hugo Guzman1\*, Mario Bermúdez2 , Cristina Martín2 , Federico Barrero2 and Mario Durán1

\*Address all correspondence to: hugguzjim@uma.es

1 Universidad de Málaga, España

2 Universidad de Sevilla, España

#### **References**


[5] M.E.H. Benbouzid, D. Diallo and M. Zeraoulia, "Advanced Fault-Tolerant Control of Induction-Motor Drives for EV/HEV Traction Applications: From Conventional to Modern and Intelligent Control Techniques," *IEEE Transact Vehicular Technol*, vol. 56,

[6] K.T. Chau, C.C. Chan and C. Liu, "Overview of Permanent-Magnet Brushless Drives for Electric and Hybrid Electric Vehicles," *IEEE Transact Indust Electron*, vol. 55, no. 6,

[7] S. Williamson and S. Smith, "Pulsating Torque and Losses in Multiphase Induction

[8] S. Dwari and L. Parsa, "Fault–Tolerant Control of Five–Phase Permanent–Magnet Motors With Trapezoidal Back EMF," *IEEE Transact Indust Electron*, vol. 58, no. 2, pp.

[9] E. Levi, R. Bojoi, F. Profumo, H.A. Toliyat and S. Williamson, "Multiphase Induction Motor Drives – A Technology Status Review," *IET Electric Power Applic*, vol. 1, no. 4,

[10] J.R. Fu and T.A. Lipo, "Disturbance-Free Operation of a Multiphase Current-Regulat‐ ed Motor Drive with an Opened Phase," *IEEE Transact Indust Applic*, vol. 30, no. 5,

[11] T.F. Podlesak, D.C. Katsis, P.W. Wheeler, J.C. Clare, L. Empringham and M. Bland, "A 150-kVA Vector-Controlled Matrix Converter Induction Motor Drive," *IEEE*

[12] F. Khoucha, S.M. Lagoun, K. Marouani, A. Kheloui and M.E.H. Benbouzid, "Hybrid Cascaded H-Bridge Multilevel-Inverter Induction-Motor-Drive Direct Torque Con‐ trol for Automotive Applications," *IEEE Transact Indust Electron*, vol. 57, no. 3, pp.

[13] Y. Wang, X. Zhang, X. Yuan and G. Liu, "Position-Sensorless Hybrid Sliding-Mode Control of Electric Vehicles With Brushless DC Motor," *IEEE Transact Vehicular Tech‐*

[14] S. Kouro, P. Cortés, R. Vargas, U. Ammann and J. Rodríguez, "Model Predictive Control—A Simple and Powerful Method to Control Power Converters," *IEEE Trans‐*

[15] M.R. Arahal, F. Barrero, S. Toral, M.J. Durán, R. Gregor, "Multi–phase current control using finite–state model–predictive control," *Control Engin Pract*, vol. 17, no. 5, pp.

[16] F. Barrero, M.R. Arahal, R. Gregor, S. Toral and M.J. Durán, "A Proof of Concept Study of Predictive Current Control for VSI-Driven Asymmetrical Dual Three-Phase AC Machines," *IEEE Transact Indust Electron*, vol. 56, no. 6, pp. 1937–1954, 2009.

*Transact Indust Applic*, vol. 41, no. 3, pp. 841–847, 2005.

*act Indust Electron*, vol. 56, no. 6, pp. 1826–1838, 2009.

Machines," *IEEE Transact Indust Applic*, vol. 39, no. 4, pp. 986–993, 2003.

no. 2, pp. 519–528, 2007.

188 Applications of Digital Signal Processing through Practical Approach

pp. 2246–2257, 2008.

476–485, 2011.

pp. 489–516, 2007.

pp. 1267–1274, 1994.

892–899, 2010.

579–587, 2009.

*nol*, vol. 60, no. 2, pp. 421–432, 2011.

## *Edited by Sudhakar Radhakrishnan*

This book is recommended to readers who can ponder on the collection of chapters authored/co-authored by various researchers as well as to researchers around the world covering the field of digital signal processing. This book highlights current research in the digital signal processing area such as communication engineering, image processing and power conversion system. The entire work available in the book mainly focusses on researchers who can do quality research in the area of digital signal processing and related fields. Each chapter is an independent research, which will definitely motivate young researchers to further study the subject. These six chapters divided into three sections will be an eye-opener for all those engaged in systematic research in these fields.

Photo by ninog / DollarPhotoClub

Applications of Digital Signal Processing through Practical Approach

Applications of Digital Signal

Processing through Practical

Approach

*Edited by Sudhakar Radhakrishnan*