Professional Documents
Culture Documents
Realization of Fpga Based Q-Format Arithmetic Logic Unit For Power Electronic Converter Applications
Realization of Fpga Based Q-Format Arithmetic Logic Unit For Power Electronic Converter Applications
Chapter 2
chip implementation in FPGA for generating PWM pulses using VSI fed
induction motor.
2.1. Introduction
Due to the flexibility of simple hardware, the fixed point processors are
such applications, the designer has to use the proper signal processing
resources and its domain use [5], development tools [132-137], and
commonly used type of data formats are: (i) Fixed Point Representation
performed and the final result is stored in accumulator every time at the
end of each arithmetic operation. At last, the Most Significant Bit (MSB)
[130].
for fixed point format with integer part (Qm), fixed point format with
fractional part (Qn) and fixed point format with integer + fractional part
In general, the fixed point format data are scaled to integer number,
(LSB) in the result is truncated. The MSB is taken as the final result. In
case of integer fixed point format Qm, all 16 bit will give the correct
result. Therefore, the entire result (both MSB and LSB) has to be stored
accuracy and also this is not suitable for single chip implementations. In
final the result is not affected even after truncation of LSB. Finally, Qn
and Qm.n representation need one WL and Qm needs two WLs which
arithmetic. In 16 bit format with proper scaling, the error is still reduced
8 bit format and therefore, it needs only an 8 bit register to store the
results. Hence, the Qm.n Format based signal processing will reduce the
i. Occupies less FPGA resources i.e. less area in the chip [28-32, 95,
107].
21
iii. Multiplications of two 8 bit numbers with proper scaling requires one
8 bit register to store the result [29, 95], whereas, in integer format it
arithmetic operations.
DSP. In this Thesis, fixed point implementation with both integer and
The block diagram and the functional flow of QALU is shown in Fig.
2.1 and Fig. 2.2 respectively. The functional flow for addition and its
pseudo code are shown in Fig. 2.3 and Fig. 2.4 respectively.
22
QADD/QSUB QSQRT
QALU
QMULT CONTROLLER QDIVIDE
QSQR QMOD
Start
Stop
Start
Is both the
numbers are in
same Qm.n format
No
Yes
Shift and sign extend to align the decimal places
Stop
Pseudo code:
Functional unit name: QADD
Input: two numbers
Output: addition result of two numbers
Steps:
1. Convert the given tow numbers into Qm.n format
2. If both the numbers are in same Qm.n format then perform the signed
addition else Shift and sign extend to align the decimal places.
3. Setting the overflow bit, if any overflow occurs
End
basics are discussed in this section and the detailed explanation is given
the resultant product will not have overflow. The common way for
The functional flow for multiplication and its pseudo code are shown
Start
Stop
Pseudo code:
Functional unit name: QMULT
Input: two numbers
Output: multiplication of two numbers
Steps:
1. Convert the given tow numbers into Qm.n format
2. Perform the signed multiplication
3. Adjust the resultant Qm.n format according to the requirement(either
16/32-bit)
End
electronic converter control has been simulated using ModelSim 5.7 and
fixed and Q-Format has been obtained for unsigned and signed data
Fig. 2. 7.
26
unsigned data 0.25 and 0.75 is 0.1875 which is the actual result. From
the results shown in Fig. 2.31, the result achieved using Q- Format is
0.1875 which is the actual result. For the same data the result achieved
from integer fixed point format is 0D00 H. The actual result evaluated by
simulation using ModelSim 5.7 and synthesis using Xilinx 9.2i are
considered.
for different fs and fo. The result for SVPWM pulse patterns in 6 sectors
with fs=20 kHz is shown in Fig. 2.8. The SVPWM patterns have been
The Experimental setup for QALU based SVPWM controller fed three
phase VSI is shown in Fig. 2.9. The experimentation has been carried out
with the FPGA hardware SPARTAN XC3S400PQ208 from Xilinx. Inc. The
and induction motor. In the experiments, the fo has been varied from 0.3
switching patterns are achieved. The results for PWM output in the
different channels are obtained and the PWM patterns in the channels
P1-P4 are shown in the Fig. 2. 10. The three phase inverter output wave
varying fs is obtained. The result of the inverter output line to line voltage
Power module
Driver circuit
Pulse P1
5 V / div
Pulse P4
25 ms /div
20 ms / div
Fig. 2. 11. Inverter output voltage, U Y-B and U B-R Line to line
voltage: f0 = 20 Hz, fs =12.28 kHz
30
2.4.2. Discussions
single FPGA. And also the host processor such as DSP is not required.
QALU applied to a PEC control is verified. The results show that the Q-
Format implementation takes total gate count of 348 and integer fixed
resources and due to this feature the speed of execution will also be
the error in Q-format based operation is zero and in integer fixed point
Format when compared to integer fixed format. The PWM modulator with
verified.
31
2.5. Conclusion
using VHDL which performs the arithmetic and logic functions in the
the algorithm accuracy has been improved as well as the FPGA resource
integer fixed point for signal processing. The proposed signal processing
concept and QALU can be used for PEC control applications to generate
the accurate PWM pattern in real time. Moreover, the proposed signal
processing method is more suitable for single chip FPGA and SoC
PWM control in a single FPGA and area efficient digital PWM control is
verified.