Mtech DSP MC Lab Manual Gr22
Mtech DSP MC Lab Manual Gr22
by
Dr. Vinay Kumar Awaar
Associate Professor
DEPARTMENT OF
ELECTRICAL & ELECTORNICS ENGINEERING
CERTIFICATE
This is to certify that this book is a bonafide record of practical work
Name : ......................................
Roll No : …..................................
Date : …...................................
Introduction:
A digital signal processor (DSP) is an integrated circuit designed for high-speed
data manipulations, and is used in audio, communications, image manipulation, and
other data-acquisition and data-control applications. The microprocessors used in
personal computers are optimized for tasks involving data movement and inequality
testing. The typical applications requiring such capabilities are word processing,
database management, spread sheets, etc. When it comes to mathematical
computations, the traditional microprocessor is deficient particularly where real-time
performance is required. Digital signal processors are microprocessors optimized for
basic mathematical calculations such as additions and multiplications.
A DSP system can be defined as an electronic system which can make use of
digital signaling processing. Further which is the application of the mathematical
operations to represent signals digitally. These signals are represented digitally as
sequences of samples. Often, these samples are obtained from physical signals through
the ADC and digital signals can be converted back to physical signals through DAC.
Digital signal processing enjoys several advantages over analog signal processing. The
most significant of these is that DSP systems can accomplish tasks inexpensively that
would be difficult or even impossible using analog electronics. Examples of such
applications include speech synthesis, speech recognition, and high-speed modems
involving error-correction coding. These tasks involve a combination of signal processing
and control (e.g., making decisions regarding received bits or received speech) that is
extremely difficult to implement using analog techniques.
When we look for the applications DSP processors in electrical engineering, there
are many environments where they can be used in controlling circuits such as in
Inverter, controlled rectifier, protection systems, reactive power compensation systems
like DVR, controlling speeds of motors like BLDC etc.
Page |1
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Types of DSP:
Digital signal processing can be separated into two categories - fixed point
and floating point. These designations refer to the format used to store and manipulate
numeric representations of data. Fixed-point DSPs are designed to represent and
manipulate integers – positive and negative whole numbers – via a minimum of 16 bits,
yielding up to 65,536 possible bit patterns (216). Floating-point DSPs represent and
manipulate rational numbers via a minimum of 32 bits in a manner like scientific
notation, where a number is represented with a mantissa and an exponent (e.g., A x 2B,
where 'A' is the mantissa and ‘B’ is the exponent), yielding up to 4,294,967,296 possible
bit patterns (232).
The term ‘fixed point’ refers to the corresponding way numbers are represented,
with a fixed number of digits after, and sometimes before, the decimal point. With
floating-point representation, the placement of the decimal point can ‘float’ relative to
the significant digits of the number. For example, a fixed-point representation with a
uniform decimal point placement convention can represent the numbers 123.45,
1234.56, 12345.67, etc, whereas a floating-point representation could in addition
represent 1.234567, 123456.7, 0.00001234567, 1234567000000000, etc. As such,
floating point can support a much wider range of values than fixed point, with the ability
to represent very small numbers and very large numbers.
With fixed-point notation, the gaps between adjacent numbers always equal a
value of one, whereas in floating-point notation, gaps between adjacent numbers are
not uniformly spaced – the gap between any two numbers is approximately ten million
times smaller than the value of the numbers (ANSI/IEEE Std. 754 standard format), with
large gaps between large numbers and small gaps between small numbers.
Programing Language:
DSPs are programmed in the same languages as other scientific and engineering
applications, usually assembly or C. Programs written in assembly can execute faster,
while programs written in C are easier to develop and maintain. In traditional
applications, such as programs run on personal computers and mainframes, C is almost
always the first choice. If assembly is used at all, it is restricted to short subroutines that
must run with the utmost speed.
Page |2
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
However, DSP programs are different from traditional software tasks in two
important respects. First, the programs are usually much shorter, say, one-hundred lines
versus ten-thousand lines. Second, the execution speed is often a critical part of the
application. This is the reason why many uses a DSP in the first place, for its blinding
speed. These two factors motivate many software engineers to switch from C to
assembly for programming Digital Signal Processors.
Architecture Overview:
Newer implementations support standard IEEE JTAG control for boundary scan
and/or in-circuit debugging. The original TMS32010 and its subsequent variants is an
example of a CPU with a modified Harvard architecture, which features separate
address spaces for instruction and data memory but the ability to read data values from
instruction memory. The TMS32010 featured a fast multiply-and-accumulate useful in
both DSP applications as well as transformations used in computer graphics.
➢ TMS320C1x, the first generation 16-bit fixed-point DSPs. All processors in these
series are code-compatible with the TMS32010.
o TMS32010, the very first processor in the first series introduced in 1983,
using external memory.
o TMS320M10, the same processor but with an internal ROM of 3 KB
o TMS320C10, TMS320C15 etc.
Page |3
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
C2000 series
C5000 Series
Page |4
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
off-loading this function from the DSP. This ultimately led to the creation of a
dual core ARM7+C54x DSP, which later evolved into the OMAP product line.
• TMS320C55x generation - fixed-point, runs C54x code but adds more internal
parallelism (another ALU, dual MAC, more memory bandwidth) and registers,
while supporting much lower power operation.
• Today, most C55x DSPs are sold as discrete chips
• OMAP1 chips combine an ARM9 (ARMv5TEJ) with a C55x series DSP.
• OMAP2420 chips combine an ARM11 (ARMv6) with a C55x series DSP.
C6000 Series
Page |5
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
The TMS320C28x is a 32-bit fixed point DSP that specializes in high performance
control applications such as, robotics, industrial automation, mass storage devices,
lighting, optical networking, power supplies, and other control applications needing a
single processor to solve a high-performance application.
Page |6
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Page |7
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Page |8
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
1. Connect the ezDSP with the Computer with parallel port cable and Power on the
ezDSP board
2. Open SdConfigEx v5 from the desktop
3. Double Click XDS510PP-SPI515 and select 378.
4. Double click 378 and select emu and Change the Emulator port mode to EPP as
shown below
Page |9
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
P a g e | 10
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
7. Now Press the EMU with Tick Button or Go to Emulator Menu and Select Test.
8. JTAG IR Length of 38 Message will display in Configuration tab as shown below
9. If the Emulator rest and JTAG IR length as 38 shows the connection between the
system and ezDSP is OK.
10. Now close SD Config.
P a g e | 11
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
1. Open CCS V6
2. Go to Help Menu->Code Composer Studio License Information
3. Go to Upgrade Tab-> launch License setup
4. Select Evaluate(90days) or Free License (Onboard and XDS 100 Emulators)
5. Press Finish Button.
1. Open CCSv6
2. It will ask for workspace location (By default it is user directory) and select OK
3. Go to Project Menu-> Import Existing CCS Project
4. Now Select the search directory to F2812_example_nonBIOS_ram and press
finish button
5. Go to File menu ->New->Target Configuration File and Press finish button in the
newly opened window
6. Now it will ask you to select the Connection Type and Board Type and save as
shown below
P a g e | 12
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
1. Open CCSv6
2. Go to File Menu-> New -> CCS Project
3. Type Project name and other Leave it to default
4. Select Device family as C2000 and variant as 281X Fixed Point and EZDSPf2812
5. Connection as Spectrum Digital ezDSP F2812 Parallel port Emulator
6. Select project templates as empty project and press finish button
7. Now add source files and Cmd by right click the project name in the Project
Explorer
8. Follow the Step s 5 to 12 from Instructions to configure and run sample
programs in CCS V6.
P a g e | 13
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To run a program that configures the CPU timer and counter
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
#include "DSP28x_Project.h"
void main(void)
InitSysCtrl();
DINT;
P a g e | 14
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
EALLOW;
PieVectTable.TINT0 = &cpu_timer0_isr;
PieVectTable.TINT1 = &cpu_timer1_isr;
PieVectTable.TINT2 = &cpu_timer2_isr;
EDIS;
InitCpuTimers();
#if (CPU_FRQ_60MHZ)
#endif
#if (CPU_FRQ_50MHZ)
#endif
P a g e | 15
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
#if (CPU_FRQ_40MHZ)
#endif
CpuTimer0Regs.TCR.all = 0x4001;
CpuTimer1Regs.TCR.all = 0x4001;
CpuTimer2Regs.TCR.all = 0x4001;
IER |= M_INT1;
IER |= M_INT13;
IER |= M_INT14;
PieCtrlRegs.PIEIER1.bit.INTx7 = 1;
EINT;
ERTM;
for(;;);
CpuTimer0.InterruptCount++;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
P a g e | 16
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
CpuTimer1.InterruptCount++;
EDIS;
EALLOW;
CpuTimer2.InterruptCount++;
EDIS;
//======================================================================
// No more.
//======================================================================
P a g e | 17
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch Variables:
CpuTimer0.InterruptCount
CpuTimer1.InterruptCount
CpuTimer2.InterruptCount
Observe the timer registers and configuration of CPU Timer0, 1, & 2 and increments a
counter each time the timer asserts an interrupt.
P a g e | 18
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To run a program to find square of a given number using for loop
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
unsigned int k;
void main(void)
{
unsigned int i;
while(1)
{
for(i=0; i<100; i++)
k=i*i;
}
}
//======================================================================
// No more.
//======================================================================
P a g e | 19
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch variables:
Observe the variables at each step forward at watchdog and find the square of the given
number.
P a g e | 20
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To run a program to find factorial of a given number using for loop
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
#include<stdio.h>
int main()
{
int input,i,result=1;
printf("please input a Integer: ");
scanf("%d",&input);
for(i=input;i>0;i--)
{
result=result*i;
}
printf("the factorial of %d is %d\n",input,result);
}
//======================================================================
// No more.
//======================================================================
P a g e | 21
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch variables:
result
Observe the variables at each step forward at watchdog and find the factorial of the
given number.
P a g e | 22
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To run a program that blinks the onboard LEDs.
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
//######################################################################
#######
#include "DSP28x_Project.h" // Device Headerfile and Examples Include File
#include "f2802x_common/include/adc.h"
#include "f2802x_common/include/clk.h"
#include "f2802x_common/include/flash.h"
#include "f2802x_common/include/gpio.h"
#include "f2802x_common/include/pie.h"
#include "f2802x_common/include/pll.h"
#include "f2802x_common/include/timer.h"
#include "f2802x_common/include/wdog.h"
P a g e | 23
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
uint16_t interruptCount = 0;
ADC_Handle myAdc;
CLK_Handle myClk;
FLASH_Handle myFlash;
GPIO_Handle myGpio;
PIE_Handle myPie;
TIMER_Handle myTimer;
void main(void)
{
CPU_Handle myCpu;
PLL_Handle myPll;
WDOG_Handle myWDog;
P a g e | 24
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
// Setup the PLL for x10 /2 which will yield 50Mhz = 10Mhz * 10 / 2
PLL_setup(myPll, PLL_Multiplier_10, PLL_DivideSelect_ClkIn_by_2);
P a g e | 25
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
P a g e | 26
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
GPIO_setLow(myGpio, GPIO_Number_0);
GPIO_setHigh(myGpio, GPIO_Number_1);
GPIO_setLow(myGpio, GPIO_Number_2);
GPIO_setHigh(myGpio, GPIO_Number_3);
for(;;){
asm(" NOP");
}
P a g e | 27
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
// Toggle GPIOs
GPIO_toggle(myGpio, GPIO_Number_0);
GPIO_toggle(myGpio, GPIO_Number_1);
GPIO_toggle(myGpio, GPIO_Number_2);
GPIO_toggle(myGpio, GPIO_Number_3);
Watch Variables:
Monitor the GPIO0-4 LEDs blink on (for 500 msec) and off (for 500 msec) on the
TMS320F28027 Launchpad.
P a g e | 28
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To write a program to acquire a signal from ADC terminals.
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
Software:
• Code composer studio 5.5.0
• Windows 8 OS.
Program:
#include "f2802x_common/include/adc.h"
#include "f2802x_common/include/clk.h"
#include "f2802x_common/include/flash.h"
#include "f2802x_common/include/gpio.h"
#include "f2802x_common/include/pie.h"
#include "f2802x_common/include/pll.h"
#include "f2802x_common/include/wdog.h"
P a g e | 29
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
CLK_Handle myClk;
FLASH_Handle myFlash;
GPIO_Handle myGpio;
PIE_Handle myPie;
void main()
ADC_Handle myAdc;
CPU_Handle myCpu;
PLL_Handle myPll;
WDOG_Handle myWDog;
P a g e | 30
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
WDOG_disable(myWDog);
CLK_enableAdcClock(myClk);
(*Device_cal)();
CLK_setOscSrc(myClk, CLK_OscSrc_Internal);
// Setup the PLL for x10 /2 which will yield 50Mhz = 10Mhz * 10 / 2
PIE_disable(myPie);
PIE_disableAllInts(myPie);
CPU_disableGlobalInts(myCpu);
CPU_clearIntFlags(myCpu);
P a g e | 31
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
#ifdef _FLASH
#endif
// Initalize GPIO
CLK_setClkOutPreScaler(myClk, CLK_ClkOutPreScaler_SysClkOut_by_1);
PIE_setDebugIntVectorTable(myPie);
PIE_enable(myPie);
ADC_enableBandGap(myAdc);
ADC_enableRefBuffers(myAdc);
ADC_powerUp(myAdc);
ADC_enable(myAdc);
ADC_setVoltRefSrc(myAdc, ADC_VoltageRefSrc_Int);
ADC_enableTempSensor(myAdc);
P a g e | 32
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
ADC_setSocSampleWindow(myAdc, ADC_SocNumber_0,
ADC_SocSampleWindow_7_cycles);
ADC_setSocSampleWindow(myAdc, ADC_SocNumber_1,
ADC_SocSampleWindow_7_cycles);
FLASH_setup(myFlash);
for(;;)
P a g e | 33
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
ADC_forceConversion(myAdc, ADC_SocNumber_0);
ADC_forceConversion(myAdc, ADC_SocNumber_1);
while(ADC_getIntStatus(myAdc, ADC_IntNumber_1) == 0) {
// Clear ADCINT1
ADC_clearIntFlag(myAdc, ADC_IntNumber_1);
//======================================================================
// No more.
//======================================================================
P a g e | 34
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch Variables:
temp =
degC =
degK =
This program shows how to convert a raw ADC temperature sensor reading into deg. C
or deg. K.
P a g e | 35
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To run a program that can generates PWM pulses at 1 kHz for different duty cycles.
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
• CRO
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
#include "DSP28x_Project.h"
extern void InitSysCtrl(void);
void Gpio_select(void);
void Setup_ePWM1(void);
void main(void)
{
InitSysCtrl();
EALLOW;
SysCtrlRegs.WDCR= 0x00EF;
EDIS;
Gpio_select();
Setup_ePWM1();
ERTM;
while(1);
P a g e | 36
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
void Gpio_select(void)
{
EALLOW;
GpioCtrlRegs.GPAMUX1.all = 0;
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;
GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1;
GpioCtrlRegs.GPAMUX2.all = 0;
GpioCtrlRegs.GPBMUX1.all = 0;
GpioCtrlRegs.GPADIR.all = 0;
GpioCtrlRegs.GPBDIR.all = 0;
EDIS;
}
void Setup_ePWM1(void)
{
EPwm1Regs.TBCTL.bit.CLKDIV = 0;
EPwm1Regs.TBCTL.bit.HSPCLKDIV = 1;
EPwm1Regs.TBCTL.bit.CTRMODE = 2;
EPwm1Regs.AQCTLA.all = 0x0060;
EPwm1Regs.AQCTLB.all = 0x0600;
EPwm1Regs.TBPRD = 37500;
EPwm1Regs.CMPA.half.CMPA = EPwm1Regs.TBPRD / 2;
EPwm1Regs.CMPB = EPwm1Regs.TBPRD / 2;
}
//================================================================
// No more.
//================================================================
P a g e | 37
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch variables
GpioCtrlRegs.GPAMUX1.bit.GPIO0
GpioCtrlRegs.GPAMUX1.bit.GPIO1
By connecting the GPIO 0 and GPIO 1 pins to the CRO, PWM pulses can be observed.
Graphs:
P a g e | 38
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To run a program that can generates PWM pulses at 5 kHz for 25% duty cycles.
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
• CRO
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
#include "DSP28x_Project.h"
extern void InitSysCtrl(void);
void Gpio_select(void);
void Setup_ePWM1(void);
void main(void)
{
InitSysCtrl();
EALLOW;
SysCtrlRegs.WDCR= 0x00EF;
EDIS;
Gpio_select();
P a g e | 39
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Setup_ePWM1();
ERTM;
while(1);
}
void Gpio_select(void)
{
EALLOW;
GpioCtrlRegs.GPAMUX1.all = 0;
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;
GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1;
GpioCtrlRegs.GPAMUX2.all = 0;
GpioCtrlRegs.GPBMUX1.all = 0;
GpioCtrlRegs.GPADIR.all = 0;
GpioCtrlRegs.GPBDIR.all = 0;
EDIS;
}
void Setup_ePWM1(void)
{
EPwm1Regs.TBCTL.bit.CLKDIV = 0;
EPwm1Regs.TBCTL.bit.HSPCLKDIV = 1;
EPwm1Regs.TBCTL.bit.CTRMODE = 2;
EPwm1Regs.AQCTLA.all = 0x0060;
EPwm1Regs.AQCTLB.all = 0x0090;
EPwm1Regs.TBPRD = 750;
EPwm1Regs.CMPA.half.CMPA = 1250;
}
//================================================================
// No more.
//================================================================
P a g e | 40
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch variables
GpioCtrlRegs.GPAMUX1.bit.GPIO0
GpioCtrlRegs.GPAMUX1.bit.GPIO1
By connecting the GPIO 0 and GPIO 1 pins to the CRO, PWM pulses can be observed.
Graph:
P a g e | 41
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To run a program that can generates PWM pulses at 5 kHz for 25% duty cycles.
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
• CRO
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
#include "DSP28x_Project.h"
extern void InitSysCtrl(void);
void Gpio_select(void);
void Setup_ePWM1A(void);
void main(void)
{
InitSysCtrl();
EALLOW;
SysCtrlRegs.WDCR= 0x00EF;
EDIS;
DINT;
Gpio_select();
P a g e | 42
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Setup_ePWM1A();
ERTM;
while(1);
}
void Gpio_select(void)
{
EALLOW;
GpioCtrlRegs.GPAMUX1.all = 0;
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;
GpioCtrlRegs.GPAMUX2.all = 0;
GpioCtrlRegs.GPBMUX1.all = 0;
GpioCtrlRegs.GPADIR.all = 0;
GpioCtrlRegs.GPBDIR.all = 0;
EDIS;
}
void Setup_ePWM1A(void)
{
EPwm1Regs.TBCTL.bit.CLKDIV = 0;
EPwm1Regs.TBCTL.bit.HSPCLKDIV = 1;
EPwm1Regs.TBCTL.bit.CTRMODE = 2;
EPwm1Regs.AQCTLA.all = 0x0006;
EPwm1Regs.TBPRD = 1500;
}
//================================================================
// No more.
//================================================================
P a g e | 43
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch variables
GpioCtrlRegs.GPAMUX1.bit.GPIO0
GpioCtrlRegs.GPAMUX1.bit.GPIO1
By connecting the GPIO 0 and GPIO 1 pins to the CRO, PWM pulses can be observed.
Graph:
P a g e | 44
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Objective:
To run a program that can generates ePWM pulses with a dead region.
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
• CRO
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
#include "DSP28x_Project.h"
void InitEPwm1Example(void);
interrupt void epwm1_isr(void);
Uint32 EPwm1TimerIntCount;
Uint16 EPwm1_DB_Direction;
P a g e | 45
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
void main(void)
{
InitSysCtrl();
InitEPwm1Gpio();
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
EALLOW;
PieVectTable.EPWM1_INT = &epwm1_isr;
EDIS;
EALLOW;
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;
EDIS;
InitEPwm1Example();
EALLOW;
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1;
EDIS;
EPwm1TimerIntCount = 0;
IER |= M_INT3;
PieCtrlRegs.PIEIER3.bit.INTx1 = 1;
EINT;
ERTM;
P a g e | 46
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
for(;;)
{
asm(" NOP");
}
P a g e | 47
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
EPwm1Regs.DBFED--;
EPwm1Regs.DBRED--;
}
}
EPwm1TimerIntCount++;
EPwm1Regs.ETCLR.bit.INT = 1;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
void InitEPwm1Example()
{
EPwm1Regs.TBPRD = 6000;
EPwm1Regs.TBPHS.half.TBPHS = 0x0000;
EPwm1Regs.TBCTR = 0x0000;
EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN;
EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE;
EPwm1Regs.TBCTL.bit.HSPCLKDIV = TB_DIV4;
EPwm1Regs.TBCTL.bit.CLKDIV = TB_DIV4;
EPwm1Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW;
EPwm1Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
EPwm1Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO;
EPwm1Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;
EPwm1Regs.CMPA.half.CMPA = 3000;
EPwm1Regs.AQCTLA.bit.CAU = AQ_SET;
EPwm1Regs.AQCTLA.bit.CAD = AQ_CLEAR;
EPwm1Regs.AQCTLB.bit.CAU = AQ_CLEAR;
EPwm1Regs.AQCTLB.bit.CAD = AQ_SET;
P a g e | 48
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
//=================================================================
// No more.
//=================================================================
P a g e | 49
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch variables
GpioCtrlRegs.GPAMUX1.bit.GPIO0
GpioCtrlRegs.GPAMUX1.bit.GPIO1
EPwm1Regs.TBCTL.bit.CTRMODE
EPwm1Regs.DBCTL.bit.OUT_MODE
EPwm1Regs.ETSEL.bit.INTSEL
By connecting the GPIO 0 and GPIO 1 pins to the CRO, PWM pulses with dead-band can
be observed.
Graph:
P a g e | 50
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Program No 10: Generation of gate signals for 3-phase voltage source inverter.
Date:
Objective:
To run a program that can generates the SVPWM pulses to gating the 3-phase Inverter
switches.
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
• CRO
Software:
• Code Composer Studio 6.0
• MATLAB/Simulink
Program:
#include "SVPWM_Pulses.h"
#include "rtwtypes.h"
#include "rt_nonfinite.h"
#include "SVPWM_Pulses_private.h"
#include "c2000_main.h"
#include "F2802x_Device.h"
P a g e | 51
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
#include "f2802x_examples.h"
#include <stdlib.h>
#include <stdio.h>
void init_board(void);
void enable_interrupts(void);
extern Uint16 RamfuncsLoadEnd;
void config_schedulerTimer(void);
void disable_interrupts(void);
volatile int IsrOverrun = 0;
static boolean_T OverrunFlag = 0;
void rt_OneStep(void)
{
if (OverrunFlag++) {
IsrOverrun = 1;
OverrunFlag--;
return;
}
P a g e | 52
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
void main(void)
{
volatile boolean_T noErr;
memcpy(&RamfuncsRunStart,&RamfuncsLoadStart,(Uint32)(&RamfuncsLoadEnd-
&RamfuncsLoadStart));
SVPWM_Pulses_terminate();
disable_interrupts();
}
//======================================================================
// No more.
//======================================================================
P a g e | 53
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch variables
GpioDataRegs.GPADAT.all
GpioDataRegs.GPBDAT.all
We can observe the SVPWM waveforms by connecting GPIO pins to the CRO
Graph:
P a g e | 54
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To run a program that can run the program in FLASH memory.
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
• CRO
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
#include "DSP28x_Project.h"
#define PWM1_INT_ENABLE 1
#define PWM2_INT_ENABLE 1
#define PWM3_INT_ENABLE 1
P a g e | 55
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Uint32 EPwm1TimerIntCount;
Uint32 EPwm2TimerIntCount;
Uint32 EPwm3TimerIntCount;
Uint32 LoopCount;
void main(void)
{
InitSysCtrl();
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
P a g e | 56
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
PieVectTable.EPWM3_INT = &EPwm3_timer_isr;
EDIS;
InitEPwmTimer();
EPwm2_timer_isr()
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash();
EPwm1TimerIntCount = 0;
EPwm2TimerIntCount = 0;
EPwm3TimerIntCount = 0;
LoopCount = 0;
IER |= M_INT3;
PieCtrlRegs.PIEIER3.bit.INTx1 = PWM1_INT_ENABLE;
PieCtrlRegs.PIEIER3.bit.INTx2 = PWM2_INT_ENABLE;
PieCtrlRegs.PIEIER3.bit.INTx3 = PWM3_INT_ENABLE;
EALLOW;
GpioCtrlRegs.GPBMUX1.bit.GPIO34 = 0;
GpioCtrlRegs.GPBDIR.bit.GPIO34 = 1;
EDIS;
for(;;)
{
DELAY_US(DELAY);
LoopCount++;
GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1;
}
P a g e | 57
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
void InitEPwmTimer()
{
EALLOW;
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0;
EDIS;
InitEPwm1Gpio();
InitEPwm2Gpio();
InitEPwm3Gpio();
// Setup Sync
EPwm1Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN; // Pass through
EPwm2Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN; // Pass through
EPwm3Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN; // Pass through
EPwm1Regs.TBCTL.bit.PHSEN = TB_ENABLE;
EPwm2Regs.TBCTL.bit.PHSEN = TB_ENABLE;
EPwm3Regs.TBCTL.bit.PHSEN = TB_ENABLE;
EPwm1Regs.TBPHS.half.TBPHS = 100;
EPwm2Regs.TBPHS.half.TBPHS = 200;
EPwm3Regs.TBPHS.half.TBPHS = 300;
EPwm1Regs.TBPRD = PWM1_TIMER_TBPRD;
EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP; // Count up
EPwm1Regs.ETSEL.bit.INTSEL = ET_CTR_ZERO; // Select INT on Zero event
EPwm1Regs.ETSEL.bit.INTEN = PWM1_INT_ENABLE; // Enable INT
EPwm1Regs.ETPS.bit.INTPRD = ET_1ST; // Generate INT on 1st event
P a g e | 58
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
EPwm2Regs.TBPRD = PWM2_TIMER_TBPRD;
EPwm2Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP; // Count up
EPwm2Regs.ETSEL.bit.INTSEL = ET_CTR_ZERO; // Enable INT on Zero event
EPwm2Regs.ETSEL.bit.INTEN = PWM2_INT_ENABLE; // Enable INT
EPwm2Regs.ETPS.bit.INTPRD = ET_2ND; // Generate INT on 2nd event
EPwm3Regs.TBPRD = PWM3_TIMER_TBPRD;
EPwm3Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP; // Count up
EPwm3Regs.ETSEL.bit.INTSEL = ET_CTR_ZERO; // Enable INT on Zero event
EPwm3Regs.ETSEL.bit.INTEN = PWM3_INT_ENABLE; // Enable INT
EPwm3Regs.ETPS.bit.INTPRD = ET_3RD; // Generate INT on 3rd event
EPwm1Regs.CMPA.half.CMPA = PWM1_TIMER_TBPRD/2;
EPwm1Regs.AQCTLA.bit.PRD = AQ_SET;
EPwm1Regs.AQCTLA.bit.CAU = AQ_CLEAR;
EPwm1Regs.AQCTLB.bit.PRD = AQ_SET;
EPwm1Regs.AQCTLB.bit.CAU = AQ_CLEAR;
EPwm2Regs.CMPA.half.CMPA = PWM2_TIMER_TBPRD/2;
EPwm2Regs.AQCTLA.bit.PRD = AQ_SET;
EPwm2Regs.AQCTLA.bit.CAU = AQ_CLEAR;
EPwm2Regs.AQCTLB.bit.PRD = AQ_SET;
EPwm2Regs.AQCTLB.bit.CAU = AQ_CLEAR;
EPwm3Regs.CMPA.half.CMPA = PWM3_TIMER_TBPRD/2;
EPwm3Regs.AQCTLA.bit.PRD = AQ_SET;
EPwm3Regs.AQCTLA.bit.CAU = AQ_CLEAR;
EPwm3Regs.AQCTLB.bit.PRD = AQ_SET;
EPwm3Regs.AQCTLB.bit.CAU = AQ_CLEAR;
EALLOW;
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1; // Start all the timers synced
EDIS;
}
P a g e | 59
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
EPwm1TimerIntCount++;
EPwm1Regs.ETCLR.bit.INT = 1;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
}
// This ISR MUST be executed from RAM as it will put the Flash into Standby
interrupt void EPwm2_timer_isr(void)
{
EPwm2TimerIntCount++;
FlashRegs.FPWR.bit.PWR = FLASH_STANDBY;
EPwm2Regs.ETCLR.bit.INT = 1;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
}
//=================================================================
// No more.
//=================================================================
P a g e | 60
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch variables
EPwm3TimerIntCount++;
EPwm2TimerIntCount++;
EPwm3TimerIntCount++;
After loading the program in to the Launchpad, by connecting the GPIO pins to the CRO,
the output can be seen on the CRO.
Graph:
P a g e | 61
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Date:
Objective:
To run a program that can vary the speed of a DC motor.
Equipment required:
Hardware:
• Laptop
• TMS320F28027 Launchpad
• XDS100v2 USB cable
Software:
• Code Composer Studio 6.0
• Windows 8 OS.
Program:
#include "DSP281x_Device.h"
#include <stdio.h>
void Delay_5ms(long);
void main(void)
{
EALLOW;
SysCtrlRegs.WDCR = 0x0068;
SysCtrlRegs.SCSR = 0;
SysCtrlRegs.PLLCR.bit.DIV = 10;
SysCtrlRegs.HISPCP.all = 0x1;
SysCtrlRegs.LOSPCP.all = 0x2;
GpioMuxRegs.GPAMUX.all = 0x0;
GpioMuxRegs.GPBMUX.all = 0x0;
GpioMuxRegs.GPADIR.all = 0x0;
GpioMuxRegs.GPBDIR.all = 0x00FF;
P a g e | 62
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
EDIS;
while(1)
{
GpioDataRegs.GPBDAT.all = 0xFF;
Delay_5ms(5000);
GpioDataRegs.GPBDAT.all = 0x0;
Delay_5ms(5000);
}
}
void Delay_5ms(long end)
{
long i;
for (i = 0; i <(10000 * end); i++);
}
//======================================================================
// No more.
//======================================================================
P a g e | 63
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Result:
Watch variables
GpioDataRegs.GPADAT.all
GpioDataRegs.GPBDAT.all
Observe the speed of the DC motor varies with the delay of 5000 ms.
P a g e | 64
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Program No 13: Speed control of BLDC motor with a velocity control mode.
Date:
Objective:
To run a program that can vary the speed of a BLDC motor.
Equipment required:
Hardware:
• Laptop
• DC voltage :J9.
P a g e | 65
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
• The velocity control mode is used to control the speed using PI controller.
• The actual speed and desired speed difference is fed as an input to PI controller.
• The PI controls the duty cycle by varying Kp proportional gain and the integral
gain Ki is given as PWM pulses to the switches in the inverter. This method
controls the voltage amplitude required to maintain the desired speed.
• The velocity control mode is stable at higher speeds, but if the speed is lowered
the system tends to unstable.
• If the motor is spinning at a higher speed, there would be many commutation
intervals per second and the velocity feedback value will improve many times per
second. Whereas, if the motor is rotating at a lower speeds the commutation rate
will be low.
P a g e | 66
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Observations:
Graph:
P a g e | 67
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Program No 14: Speed control of an induction motor with v/f control mode.
Date:
Objective:
To run a program that can vary the speed of a an induction motor.
Equipment required:
Hardware:
• Laptop
P a g e | 68
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
// Setup the PLL for x12 /2 which will yield 60Mhz = 10Mhz * 12 / 2
PLL_setup(myPll, PLL_Multiplier_12, PLL_DivideSelect_ClkIn_by_2);
P a g e | 69
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
PIE_disableAllInts(myPie);
CPU_disableGlobalInts(myCpu);
CPU_clearIntFlags(myCpu);
P a g e | 70
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
FLASH_setup(myFlash);
GPIO_setMode(myGpio, GPIO_Number_0, GPIO_0_Mode_GeneralPurpose);
GPIO_setDirection(myGpio, GPIO_Number_0, GPIO_Direction_Output);
GPIO_setMode(myGpio, GPIO_Number_1, GPIO_1_Mode_GeneralPurpose);
GPIO_setDirection(myGpio, GPIO_Number_1, GPIO_Direction_Output);
GPIO_setMode(myGpio, GPIO_Number_2, GPIO_2_Mode_GeneralPurpose);
GPIO_setDirection(myGpio, GPIO_Number_2, GPIO_Direction_Output);
GPIO_setMode(myGpio, GPIO_Number_3, GPIO_3_Mode_GeneralPurpose);
GPIO_setDirection(myGpio, GPIO_Number_3, GPIO_Direction_Output);
GPIO_setHigh(myGpio, GPIO_Number_0);
GPIO_setHigh(myGpio, GPIO_Number_1);
GPIO_setHigh(myGpio, GPIO_Number_2);
GPIO_setHigh(myGpio, GPIO_Number_3);
while (1)
{
ADC_forceConversion(myAdc, ADC_SocNumber_0);
ADC_forceConversion(myAdc, ADC_SocNumber_1);
// Clear ADCINT1
ADC_clearIntFlag(myAdc, ADC_IntNumber_1);
P a g e | 71
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
int i;
int j;
i=10000;
j=i-temp;
GPIO_setHigh(myGpio, GPIO_Number_0);
GPIO_setHigh(myGpio, GPIO_Number_1);
DELAY_US(temp);
GPIO_setLow(myGpio, GPIO_Number_0);
GPIO_setLow(myGpio, GPIO_Number_1);
DELAY_US(j);
GPIO_setHigh(myGpio, GPIO_Number_2);
GPIO_setHigh(myGpio, GPIO_Number_3);
DELAY_US(temp);
GPIO_setLow(myGpio, GPIO_Number_2);
GPIO_setLow(myGpio, GPIO_Number_3);
DELAY_US(j);
}
}
//====================================================================
=======
// No more.
//====================================================================
=======
P a g e | 72
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
3) Once it is debugged, take an expression of a variable i.e. to vary in GUI. Here, in this example
TEMP is the variable which is considered for the varying the DUTY CYCLE. First of all declare
this temp as a global variable it means at the top of code just like shown below.
P a g e | 73
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
4) Once we declare temp as a global variable, add it to watch expression to see how it varies.
5) Now go to VIEW button and select GUI composer in it, once it is opened it is seen as below,
P a g e | 74
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
6) Go to new project, then it will ask to assign a name to it; then assign a name. Here in this
example it is saved as NEW as a project name.
7) We can see palette, outline, and GUI vars on its left side, go to palette and GUI composer in it
and instrumentation.
P a g e | 75
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
8) Once we open an instrumentation, we can find many dials in it; select the dial shown below by
drag and dropping it.
9) Once we select the dial, go to the widgets which is on right side, and assign temp into its Title
and we can set the range of dial as shown below. Here we need to change the Title, Minimum
value and Maximum value.
P a g e | 76
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
P a g e | 77
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
12) First save the folder of the example project at any local disk or desktop.
13) We define one location to save this project into it at LOCATION.
14) Select f28027 device
15) Select XDS 100v2 USB connection.
16) And browse the program file which we have saved in particular location; then browse that
particular coded (.c) file from location. And click OK.
17) After go to CCS and enable silicon real time mode as shown below; it is to be done after
build and debug process.
P a g e | 78
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
18) After enabling it, just to run the program and go to GUI composer and click PREVIEW
MODE on right side shown as arrow. And now we can vary the knob and see the respected
changes in watch expression which correspondingly changes the speed of the induction motor.
P a g e | 79
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
Objective:
To study the speed of a PMSM motor.
Equipment required:
Hardware:
• JSK-3PHVSI-1KW-SP6(Device) module.
• 310V AC PMSM Motor coupled With DC Shunt Motor.
• 1-Ph Auto Transformer.
• Patch chords.
• Power chords.
CONNECTION PROCEDURE
1. Connect the power chord to the AC input of the device module (JSK-
3PHVSI-1KW) provided at the back of the module.
2. Connect power chord to FPGA BASED MATLAB INTERFACE (JSK-
RTI1807-FPGA) board.
3. Connect 2 pin power chord to dc motor field supply.
4. Connect A, AA terminals of DC SHUNT Motor to Resistive Load.
5. Connect the 230 VAC supply to the AUTO transformer and connect the
output of Auto transformer to the terminals Ph, N AC INPUT of the 3φ
VSI module.
6. Connect the PMSM Motor R, Y,B terminal to Power module R,Y,B
Terminal.
7. Connect the PMSM Motor speed feedback terminal to Power module.
8. Connect FPGA controller 40pin and 20 pin from FPGA controller to 3$
VSI module.
9. Connect the MOTOR body to EB SUPPLY earth.
P a g e | 80
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
CONNECTION DIAGRAME
EXPERIMENT PROCEDURE:
P a g e | 81
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
JSKLAB INSTRUMENTS
CHENNAI - 100
1. REF SPEED:
2. ACTUAL
SPEED:
8. Switch on the MCB. Vary the Auto transformer voltage from minimum up to 310V DC of
DC LINK voltage.
9. Now, vary the REFERENCE SPEED of the motor. Now, the ACTUAL SPEED also will be
maintain in same from Min. to Max. OR Max.to Min., because of its running in closed loop
condition.
10. Now, vary the resistive load (across the A & AA terminal of DC SHUNT MOTOR).
11. Now, the current of the PMSM motor will be increase; but the speed will be maintaining
constant.
12. All pwm pulses & current waveforms can be able to see with respect to ground.
13. Vary the resistive load step by step; that time also the speed will be maintaining in constant.
14. After finishing the experiment, make the zero voltage of AUTO transformer & SWITCH
OFF the MCB.
15. Then, SWITCH OFF all systems.
P a g e | 82
Department of Electrical & Electronics Engineering, GRIET-HYD.
Digital Signal Processing and Microcontroller Lab
PROTECTION CIRCUIT:
1. During running time any over current (Idc, Ir, Iy, Ib) happen means the protection circuit will
be enabling.
2. First make the voltage zero in AUTO transformer; then wait sometime up to the
DC LINK VOLTAGE is zero.
3. Then press the reset button of FPGA BASED MATLAB INTERFACE (JSK-RTI1807-
FPGA)
Board.
4. Now press the RESET button of the module (JSK-3PHVSI-1KW).
5. Don’t see the output voltage waveform without isolation of scope.
6. Don’t short the high voltage & low voltage terminals.
P a g e | 83
Department of Electrical & Electronics Engineering, GRIET-HYD.
Department of Electrical & Electronics Engineering
Vision of Institute:
To be among the best of the institutions for engineers and technologists with
attitudes, skills and knowledge and to become an epicenter of creative solutions .
Mission of Institute:
To achieve and impart quality education with an emphasis on practical skills and
social relevance.
Vision of Department:
The Vision of Electrical and Electronics Engineering Department is to become a
nationally and internationally leading institution of higher learning, building upon
the culture and values of universal science and contemporary education, and a
center of research and education generating the knowledge and the technologies
which lay the groundwork in shaping the future in Electrical and Electronics
Engineering.
Mission of Department:
To provide Technical knowledge and soft skills required to succeed in life, career
and help society to achieve self-sufficiency.