FPGA Based Speed Control of SRM with Optimized Switching Angles by Self Tuning

The electromagnetic torque and speed in Switched Reluctance Motor (SRM) greatly depend on the excitation parameters i.e. turn-on angle, turn-off angle, dwell angle and magnitude of the phase currents of its phases. At lower speeds, a change in the current contributes the torque requirement which can be achieved either by voltage control (pulse width modulation) or instantaneous current control techniques. At high speeds, due to high back EMF, the regulation of current is crucial and achieved with the control of switching angles of phases. This type of control is referred as average torque control, where the torque is averaged over one stroke ( ) r N 2π . With constant dwell angle, advancing the phase angle influences the current into the phase winding at minimum inductance position. It has more time to get the current out of the phase winding before the rotor reaches the negative inductance slope. To maintain the speed of the motor at different load conditions, the turn-on and turn-off angles are adaptively varied. The change in dwell angle may be required where the turn-on and turn-off angle may not be sufficient to reach the required speed. In this paper, a new algorithm is proposed for self tuning of switching parameters of SRM. The proposed algorithm is simulated in MATLAB-Simulink and experimentally validated with Field Programmable Gated Array (FPGA) using MATLABsystem generator environment.


Introduction
Switched Reluctance Motor (SRM) runs by reluctance torque.It has many advantages compared with other drives such as simple construction, low cost and highly fault tolerant.The torque-speed characteristics of the motor can be modified as per the requirement of the application starting from the design stage.High starting torque and extremely high speed are possible.DC motors are preferred for variable-speed applications whereas AC motors with constant frequency have been used for constant speed applications.In contrast, SRM has a wide range of constant torque and power regions.
The speed and average torque can be controlled by varying any one or indeed all of the switching parameters.The combinations of these depend on the performance requirements, permissible level of complexity, and cost.Attempts have been made to estimate these parameters [1]- [7].Some of the early optimization methods assume non-saturable inductance and were valid for fixed speed and load, which needs extensive simulations of the machine model.
A simple thumb rule is used to choose the turn-on angle.The position of rotor and turn-on angle was calculated with a phase lock loop system and a micro controller (Intel-8751) [8].In [9], only turn-on angle has been tuned automatically based on the peak phase current and implemented with Digital Signal Processor (DSP).Turn-on angle defines the maximum average torque while the turn-off angle derives maximum efficiency [7].The analyses with fixed turn-off angle and varied turn-on angles were presented in [10].Online fine tune of turn-on angle with the pre-existing methods for better performance was addressed in [11] and high resolution position encoder was required for implementation.Optimal turn-off angle to attain maximum torque is maintained by self tuning, and the number of pulses from the encoder is counted to find the position of the rotor [12].The critical issues in the closed loop speed control of SRM based on the lead angle (turn-on) and conduction angle (dwell angle) have been addressed and control of the angles is implemented with micro processor, which can perform 1000 operation per second (Z-80, 2.5 MHz).The accurate position and phase current information are fed to the system to calculate the angle of advance [13].To have the optimum torque output, an analytical concept was introduced [1].It has some state variables and current by assuming a stepwise linear inductance profile is introduced to calculate the switching angles.The implementation was not discussed, as it required accurate position of the rotor.
At certain scenario, the change in switching angle at run time degrades the transient response.To overcome this issue, off-line optimization of switching angles was developed [5] [6].Optimal switching angles have been calculated at offline to have the maximum average torque and framed a look up table to refer, at run time [5] [14] [15].Two separate controllers have been used for calculating on and off angles.Calculation of turn-off angle needs the flux linkage waveform of the two neighboring phases [11] [16].A control algorithm has been designed for a wide range of speed with automatic tuning for efficient torque production.It consists of two parts for below and above rated speed.This has been implemented in DSP, with the achieved speed range of 500 to 2500 revolutions per minute (RPM), rated speed of 1500 RPM.Based on the rotor position information, a self tuning approach has been presented [17].The digital control issues and solutions were addressed with the self tuning algorithm, which has been tested for maximum speed [18].
At present the design of pumps and aerospace drives requires high speed and ultra high speed drives.Due to the complex structure of rotor, the stress on rotor at high speed and the demagnetization of magnetic materials under high temperature limits the application of permanent magnet motors to these applications.SRM has been the right candidate for the high speed application and can be made to run at ultra high speed.The feasibility of the ultra high speed for 1 kW, 6/2 SRM made by composite materials has been tested with the speed of 200,000 RPM in France [18].A 30 kW SRM with the speed of 52,000 RPM has been developed for gas turbine application [19].The angular position control for the high speed 6/2 SRM, and the maximum speed of 130,000 RPM has been realized with a special ASIC SR3P10K07A in China [20].From the literature the technique behind the implementation of the turn-on, turn-off and change in dwell angle for speed control have not been addressed as it requires a high resolution position encoder.
In this paper a self tuning algorithm has been developed to vary the speed by varying the excitation parameters without high resolution position encoder.It has been validated in a 8/6 pole, 0.5 hp SRM and also tested in loaded condition.It uses the digital position sensors which changes its values for every 15˚ of rotor rotation.The proposed algorithm has been simulated in MATLAB and it is found to have good dynamic control of the motor.The same was experimented with Xilinx NEXYS-4 FPGA Board using MATLAB-system generator.
Following assumptions are made in order to facilitate qualitative development of algorithm.
1) The winding inductance is a linear function of rotor position.
2) Phase power switching devices are all ideal and switching is achieved instantaneously.
The rest of the paper is organized as follows: Section 2 presents description of the system and control principle.The proposed algorithm and techniques to achieve the desired control is discussed in the Section 3. The simulation of algorithm and the results are given in Section 4. The analysis and real time implementation of the algorithm with FPGA are presented in Section 5.

Theory and System Control Strategy
SRM is an electric motor in which torque is produced by its movable part to move to a position, where the inductance of the excited winding is maximum [20].SRM has simple and robust structure.Due to the absence of magnets and rotor windings it became very popular among variable speed drives.When the rotor poles are aligned with the stator poles, diametrically opposite stator poles are excited.In the same position another set of rotor poles are out of alignment with respect to a different set of stator poles.The rest of the stator poles are excited to bring another set of rotor poles into alignment.By switching the stator phases sequentially, the rotor is put into continuous motion.The direction of the rotor and generation of the torque is based on the switching sequence of the stator phases.

Control Principle
The phase windings of the motor are excited at the onset of increasing inductance, producing positive torque.Before the start of negative inductance profile, current must be commutated to avoid negative torque and hence torque ripples.The voltage equation of SRM can be written as [21] ( ) The voltage Equation (1) consists of resistive voltage drop ( Ri ), inductive voltage drop respectively.It can be written as At high speeds in order to maintain the rated current, the power switches along with the phases are kept ON throughout the stroke.Now the chopping of voltage would reduce the average applied voltage and hence the current and torque.The peak flux linkage during the stroke is given as s d V θ ω , where d θ , ω are dwell angle and speed respectively [22].Due to high back EMF, the supply voltage is insufficient for chopping the current.Figure 1 shows a cycle of inductance profile, flux and current waveform of single phase of SRM [23].
If o θ of winding is advanced by i θ on the onset of the rising inductance region, the inductance of the cir- cuit is minimum.This allows the current to build up rapidly.When the inductance profile starts increasing, the rising inductance and back EMF causes the current to fall until the switch is opened at some angle x θ .When the switch is OFF, due to opposing polarity being applied to the winding, the current flow starts decreasing more rapidly.To maintain peak flux at higher speeds, dwell angle must be increased proportionally with speed [23].Let 0 v be the phase voltage at the unaligned inductance region and the corresponding current be 0 i .Neg- lecting the resistive drop, Equation (2) at unaligned position can be rewritten as where u L , the unaligned inductance which is constant.Hence d 0 d With the above relation, it is inferred that advancing the phase excitation (θ), will increase the current ( 0 i ) for constant voltage ( 0 v ).The torque equation of SRM is given as From ( 5), ( 6) For constant l T and J, increasing current will increase accelerating torque and hence increases the speed.

Calculation of Turn-On and Turn-Off Angle
The turn-on and turn-off angles are the variables with respect to the speed of the motor and controller parameters.With increasing speed, fixed turn-on, turn-off angles may decrease electromagnetic torque and cause tail current, which leads to negative torque.To attain the maximum torque and efficiency, the switching parameters have to be adjusted proportional to speed.It is proposed that the calculation of turn ON angle of SRM as [8], In [4] the proposed turn-off angle theory with the assumption of non-saturable, piecewise linear gauge curve model, given as ( ) where R a and R u are reciprocals of the aligned (L a ) and unaligned (L na ) inductances.

I is phase current (A);
m θ is rotor position middle angle (˚).

Proposed Algorithm
The assumption of non-saturable inductance for the estimation of turn-off angle does not hold good for complete range of current [6].The calculation of turn-on and turn-off angles at run time, increases the computations and thereby time consuming, made inappropriate for high speed of operations.A look-up table with pre-calculated turn-on and turn-off angles can be used, but the intermediate values have to be calculated using interpolation technique.Equations ( 8) and ( 9) are used to calculate turn-on, turn-off angles respectively for various current and speed at offline.It is inferred that the minimum required change in excitation parameters is 1%, hence the algorithm is structured to change the excitation parameters by 1% till the desired speed is reached.The proposed algorithm is for 8/6 pole 4 phase SRM can be modified for any number of poles and phases.In this motor all the four phases has to be excited once in a stroke, with the stroke angle of ( ) 60 2πNr .According to the stator and rotor pole geometry, allowable dwell angle for the phase excitation is 15 to the maximum of 30 to avoid negative torque and torque ripples.From the two digital position sensors the position of the rotor poles are found for every 15˚ and the excitation patterns are derived using decoder.
Consider the excitation of phase 3, as shown in Figure 2 the dwell angle starts at 30 and ends at 45 with respect to rotor position.It should be noted that the maximum allowable dwell angle is 30 and ON θ starts from 15 .At same instant the excitation ( ON θ ) of phase 2 also starts.The delay in phase excitation can be done with the inclusion of a delay routine program, after sensing the phase excitation signal.But it is difficult to advance the phase excitation as it requires the assumption of turn-on time.Hence to advance the dwell angle a new logic is presented as follows.The maximum dwell angle for any phase is calculated by logical OR of the excitation pattern of present phase and its previous phase.For instance, to estimate the maximum dwell angle for phase 3, the excitation signals of phase 3 and phase 2 from the decoder are logically ORed.
The maximum dwell angle for phase 3 is from 15 to 45 of rotor position, during this interval required for the phase is integrated.The output of the integrator is in the form of saw tooth ( ) int V .A variable 'K' is de- fined with initial value of the time taken by the rotor to move 30˚.It is calculated from the speed of the motor and equivalent to the width/height of the saw tooth of integrated wave.
Figure 3 shows the PWM wave generated for the excitation of the phase, according to the conditions given in (8).where ph V is the supply to the phase windings.With increase in 'K', the pulse width gets reduced and hence dwell angle.
With a change in motor speed, the new value of K is calculated, by comparing the set speed with actual speed.If the difference is positive, the K value is decreased by 1%, else K increased by 1%.For the 8/6 pole SRM, 1% corresponds to 0.15˚.This procedure is repeated till the set speed is attained.It is expressed by Equation (9) as follows.
0.01 if  For higher value of K, phases will always be OFF, on the other hand for lesser value of K the phase will always be ON.Hence, the value of K is restricted within the range of 1/4th to 3/4th of K for better performance.

Flow Chart
Figure 4 shows the flow chart for the proposed speed control algorithm.The outputs from the sensor signals are decoded to generate the phase excitation pattern.Two consecutive signals are ORed to fix the maximum dwell angle of the later phase.Then the ORed signal has been integrated ( int V ).Value of K is initially calculated from actual speed a ω .
The difference (e) between the set speed and actual speed is evaluated.The value of K is modified, the phase excitation signal ( ph V ) is generated by Equations ( 12) and (13).

Simulation of Proposed Algorithm
The proposed algorithm for speed control is simulated with pre-determined excitation pattern as shown in Table 1, in MATLAB Simulink environment.The complete Simulink block diagram for speed control is shown in

Sensor Module
The

Decoder
With digital decoder, sensor outputs are mapped to the phase excitation as per Expression (15)

Integrator and PWM Generator
In the next stage, two adjacent phases have been ORed and passed through integrator.Output is compared with 2 K .The PWM is generated for phase excitation as given by Equation (12).

Generation of K and Limiter Module
From the actual speed the value of K is calculated and it is divided into 1/4K, 3/4K, to identify the safe region of operation.Finally the set speed is compared with actual speed and the error is generated.As per the algorithm the phase excitation signal is generated.

Simulation Results
After building reasonable speed the switch has been closed to initiate the proposed speed control algorithm.
With change in set speed, the motor respond to the variations dynamically and it is shown in Figure 6.
The set speeds are 6000, 5000 and 5500.The generated PWM, and the comparison of K with integrated wave to increase and decrease the speed is shown in Figure 7 and Figure 8.It shows the varied dwell angle to decrement and increment of speed.
The system responds to the variation of the set speed with respect to the higher and lower than actual speed.

Real Time Implementation
Two primary platforms available for the implementation of the proposed speed control algorithm are FPGA and DSP.FPGAs are primary logic blocks connected by programmable wires to built unconventional processors.Combination of these logic blocks can be designed to function as per the proposed algorithm.FPGA has the highest level of re-configurability which makes it suitable for this kind of application, than DSP.MATLAB-System Generator Toolbox provides a way of Direct Real Time Simulation and Implementation (DRTSI) using a FPGA that provides lower level of abstraction and modular design.
The above block diagram shows the complete model of the real time implementation of the algorithm (Figure 9).Speed is calculated by counting the number of pulses from the sensor outputs.Speed error generator block generates the difference (error) between set speed and actual speed.The change in K and PWM generation is done as discussed in section III.The value of K within the limit is verified by saturation limiter.

Experimental Results
8/6 motor is used for testing the proposed speed control algorithm and the specifications given in appendix.The system has been tested for wide range of speed and supplying a load of 200 Newton meter/second.The experimental setup of the developed speed control algorithm is shown in Figure 10, which includes the FPGA Nexys-4 board, power converter and SRM with eddy current load.The signals from the sensors are analyzed with the DSO.
With the sensors signal (S0, S1) as '10', phase 2 has been excited.The following scope waveform shows the same with the speed (rated) of 3000 RPM.When the speed is decreased to 1600 RPM, automatically the controller excites the phase at the appropriate time and it is shown in Figure 11 and Figure 12.
Increasing the speed (up to 6000 RPM), the controller automatically advances the phase excitation and it is shown in Figure 13.

Observation
Real time implementation of developed speed control algorithm has been realized with Nexys-4 FPGA Board.The digital control issues are addressed and the solutions are as follows: 1) Signals from the position sensors are not of sufficient logic level.Hence to make it recognizable by Nexys-4 board, the signal is conditioned.For signal conditioning, Schmitt trigger with comparator circuit has been incorporated.
2) While calculating the speed, due to the high speed computation of FPGA (10 nano seconds per task), the unwanted glitches in the sensors output are misinterpreted as valid signal.The following Figure 14 depicts the presence of unwanted glitches of sensor signal.With the frequency of the glitch known, the appropriate filters (Low pass or High pass) can be incorporated in the conditioning circuit, which increases the complexity of the circuit.But the frequency of the glitches varies with speed.With the known operating speed range of the motor, the sampling period has been varied, thereby the effect of the glitches are avoided.Here the full range of the speed has been taken as 1000 -10,000 RPM. Figure 15 shows both the sensor signals without glitches.

Figure 1 .
Figure 1.Flux, current and linear variation of inductance waveforms.
set speed is fixed.The ORed signal ( )O Vwhich has been used to generate PWM

Figure 2 .
Figure 2. ORed signal of consecutive phases and its integrated wave.

Figure 5 .
It consists of Sensor module, decoder, Integrator & PWM generator, Generation of K & Limiter module.The following section elaborate on the logic used to realize these blocks.

Figure 4 .
Figure 4. Flow chart of the proposed speed control algorithm.

Figure 6 .
Figure 6.Simulated results for different set speeds.

Figure 7 .
Figure 7. PWM generation for increment in speed.

Figure 8 .
Figure 8. PWM generation for decrement in speed.

Figure 10 .
Figure 10.Experimental set up of the speed control system.

Figure 14 .
Figure 14.Sensor output with the presence of glitches.
(14)tical sensor signals S 0 , S 1 has four different output states.It is modeled as per Expression(14)