Motor Control

Chapter 7

SRM Motor


Table of Contents


7.1 Hardware required


7.2 Connection procedure


7.3 PWM generation to run the SRM Motor

7.1 Hardware required

  1.  RIO – cRIO 9054
    1.  Slot 3: NI 9401
    2.  Slot 4: NI 9401
  2.  SRM Motor Controller
  3.  1 HP SRM Motor with NPN Proximity sensor

7.2 Connection procedure

  1.  Using auto transformer, connect the three phase AC Supply to the AC input of the converter.
  2.  Connect the Multimeter in the DC Voltage mode across the Capacitor Voltage terminals (DC+ and DC-)
  3.  Connect the Converter output to the motor terminals.
    1.  + – Motor Winding Terminals A, B, C and D
    2.  1 – Motor Winding Terminal A’
    3.  2 – Motor Winding Terminal B’
    4.  3 – Motor Winding Terminal C’
    5.  4 – Motor Winding Terminal D’
  4.  RIO Hardware Connection
    1.  Mod 4 / DIO 0 – Pin 14 – G Pulse input
    2.  Mod 4 / DIO 1 – Pin 16 – G1 Pulse input
    3.  Mod 4 / DIO 2 – Pin 17 – G2 Pulse input
    4.  Mod 4 / DIO 3 – Pin 19 – G3 Pulse input
    5.  Mod 4 / DIO 4 – Pin 20 – G4 Pulse input
    6.  Mod 4 / COM – Pin 13 – Pulse Ground
    7.  Mod 3 / DIO 0 – Pin 14 –Proximity A Output
    8.  Mod 3 / DIO 1 – Pin 16 – Proximity B Output
    9.  Mod 3 / DIO 6 – Pin 23 – Proximity A 5V input
    10.  Mod 3 / DIO 7 – Pin 25 – Proximity B 5V input
    11.  Mod 3 / COM – Pin 12 – Proximity A Ground
    12.  Mod 3 / COM – Pin 13 – Proximity B Ground

7.3 PWM generation to run the SRM Motor

1. Open New VI under the FPGA Target

2. Select Function Palette > PE Libraries for FPGA VI > PWM > SRM Motor to the block diagram and configure it as given below.

(a) Carrier Frequency (Hz): 5,000

(b) Base Clock Frequency (MHz): 40

(c) Duty Cycle: 0.5

(d) Lookup Table Size: 1024 Samples 

3. Select Function Palette > PE Libraries for FPGA > Time > Loop time in ticks and connect it to the loop time input of SRM Motor. 

4. Set DIO Module line direction (refer 2.2.1)

(a) Mod 3: DIO 0-3: Input

(b) Mod 3: DIO 4-7: Output

(c) Mod 4: DIO 0-3: Output

(d) Mod 4: DIO 4-7: Output

5. Invert the Add Mod3/DIO0 and Mod3/DIO1 to the Proximity A and Proximity B respectively. (Invert the proximity sensor signal for NPN type sensor only). 

6. Create the controls for the Reset, Enable PWM, Frequency (periods/ticks) and Duty Cycle. Also create Boolean indicators for G, G1, G2, G3 and G4. 

7. Connect the Mod 4 digital output lines 0, 1, 2, 3 and 4 to the PWM outputs G, G1, G2, G3 and G4 respectively. 

8. Create the While Loop to run the program continuously. 

9. Add Mod3/DIO6 and Mod3/DIO7 to the while loop and set as constant True output. It will give the 5V to the proximity sensor. 

10. Select Function Palette > PE Libraries for FPGA > Time > Speed and add it to the block diagram. Connect the Mod3/ DIO0 to the pulse input. Create constants for the Base Clock, Pulse per revolution and Cycles to Filter.

(a) Base Clock: FPGA Base clock frequency

(b) Pulse per revolution: Number of pulses generated by hall sensor per revolution. The rotor having 6 poles and it will generate 6 pulses per revolution.

(c) Cycles to Filter: Number of Clock cycles to filter the noise signal in the proximity input. If noise signals are present in the hall sensor feedback, increase the value gradually up to 100 cycles. 

11. Create the While loop for the speed measurement VI. 

12. Right Click on the Boolean Stop button available in the While loop created in step 8 and select Create > Local Variable. Place Local Variable in the speed measurement loop. 

13. Right Click on the Local Variable and select Change to Read. Connect the Stop Local variable output to the stop condition of the speed measurement loop. 

14. Right Click on the Boolean Stop (in the PWM Loop) and Select Mechanical Action > Switch When pressed. 

15. Save the FPGA VI (Name: SRM Motor Quick Run) and click the Run button to compile it.

16. Create a New VI in the RT Target.

17. Select Function Palette > FPGA Interface > Open FPGA VI Reference and add it to the block diagram. Right click on the node and select Configure Open FPGA VI Reference. 

18. Select the VI based FPGA VI Call and Select the FPGA VI Saved in step 14 (1). Click OK button (2) to select the file. Again click the OK button save the configuration. Add constant to the FPGA Resource input of the Open FPGA VI Reference and Select RIO0 (3). 

19. Add Read / Write Control (Function Palette > FPGA Interface > Read / Write Control) to the block diagram and connect the FPGA VI Reference In and Error In.


20. Left Click on the Unselected and create the controls and indicators to access the variables available in the FPGA VI. 

21. Add the Close FPGA VI Reference (Function Palette > FPGA Interface > Close FPGA VI Interface) to the block diagram and connect the FPGA VI Reference In and Error In. 

22. Add the While loop to the read/write node with its controls & indicator. Add the Wait function (100ms delay) to the while loop. 

Block diagram of the RT VI for SRM Motor Control

Front panel of the RT VI for SRM Motor Control

 23. Save the VI in the name as

24. Manually rotate the motor shaft and ensure that both the proximity sensor feedbacks are measured, and we are getting all the four commutation states.

25. Turn on the power supply to the SRM Motor Controller.

26. Slowly increase the three-phase power supply using auto transformer and set the DC bus voltage as 300V.

27. Click the Enable PWM Button to set it as True.

28. Slowly increase the duty cycle and observe the motor speed. The SRM Motor speed will vary with respect to the duty cycle.

29. Take the necessary readings by varying the duty cycle.

30. Reduce the AC power supply to 0V using auto transformer.

31. Turn off the power supply to the inverter kit.

32. Stop the program.

error: Content is protected !!