2. Introduction
A speed control algorithm is proposed for
variable speed switched reluctance motor
(SRM) drives taking into account the effects of
mutual inductances.
The control scheme adopts two or more
phase excitation: exciting two or more
adjacent phases can overcome the problems
associated with single-phase excitation such
as large torque ripple, increased acoustic
noise, and rotor shaft fatigues.
8. Microcontroller Programing
o #include <reg51.h>
o #define off 0
o #define on 1
o sbit pin7 = P1^7; // label pin7 is port 1 pin 7 a phase
o sbit pin6 = P1^6; // label pin6 is port 1 pin 6 b phase
o sbit pin5 = P1^5; // label pin5 is port 1 pin 5 c phase
o void delay(void);
o main()
o {
o TMOD = 0x01;
o // timer 0 mode 1,
o // TH0 TL0 = 16 bit register
o while(1)// keep repeating the following section
o {
o pin5= off;
o pin6= off;
o pin7 = on;
o // pin 7 to 5 volts, i.e. logic 1
o // use timer 0 to generate delay
o delay();
o pin7 = off;
o // pin 7 to 0 vlts, i.e. logic 0
o // repeat timer delay
o pin6= on;
o delay();
o pin6= off;
o pin5= on;
o delay();
o pin5= off;
o }
o }
o void delay(void)//20 ms loop
o {
o TH0 = 0xB9; // hex B9 into TH0
o TL0 = 0x90; // hex 90 into TL0
o TR0 = on; // start timer
o while(!TF0);// wait here until TF0 = 1
o TR0 = off; // stop timer
o TF0 = off; // clear overflow flag
o }
9.
10. Programing For improved
sequence
#include <reg51.h>
#define off 0
#define on 1
sbit pin7 = P1^7; // label pin7 is port 1 pin 7 a
phase
sbit pin6 = P1^6; // label pin6 is port 1 pin 6 b
phase
sbit pin5 = P1^5; // label pin5 is port 1 pin 5 c
phase
void delay(void);
main()
{
TMOD = 0x01;
// timer 0 mode 1,
// TH0 TL0 = 16 bit register
while(1)// keep repeating the following section
{ pin6=pin5=0;
pin7=1;
delay();
pin6=1;
delay();
pin7=0;
delay();
pin5=1;
delay();
pin6=0;
delay();
pin7=1;
delay();
}
}
void delay(void)//20 ms loop
{
TH0 = 0xB9; // hex 6F into TH0
TL0 = 0x90; // hex FF into TL0
TR0 = on; // start timer
while(!TF0);// wait here until TF0 = 1
TR0 = off; // stop timer
TF0 = off; // clear overflow flag
}