Motor Control

Chapter 4

DC Shunt Motor Control


Table of Contents


4.1 Hardware required


4.2 Connection procedure


4.3 PWM generation to run the DC Shunt Motor

4.1 Hardware required

  1.  RIO – cRIO 9054
    1.  Slot 1: NI 9220
    2.  Slot 3: NI 9401
    3.  Slot 4: NI 9401
  2.  Dual output DC DC Converter
  3.  1 HP DC Shunt motor with proximity sensor

4.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 outputs to the DC Shunt motor.
    1.  Output 1 + : Field Winding + (F)
    2.  Output 1 – : Field Winding – (FF)
    3.  Output 2 + : Armature Winding + (A)
    4.  Output 2 – : Armature Winding – (AA)
  4.  RIO Hardware Connection
    1.  Mod 4 / DIO 0 – Pin 14 – P1 Pulse input
    2.  Mod 4 / DIO 1 – Pin 16 – P2 Pulse input
    3.  Mod 4 / COM – Pin 13 – Pulse Ground
    4.  Mod 3 / DIO 0 – Pin 14 – Proximity output
    5.  Mod 3 / DIO 7 – Pin 25 – Proximity 5V input
    6.  Mod 3 / COM – Pin 13 – Proximity Ground

4.3 PWM generation to run the DC Shunt Motor

1. Open New VI under the FPGA Target

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

(a) Carrier Frequency (Hz): 10,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 PWM Express VI.


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

5. Create the controls for the Reset, Enable PWM, Frequency (periods/ticks) and Duty Cycle 1. Also create Boolean indicators for Pulse 1.


6. Repeat the setups 2-5 and create PWM output for Pulse 2.


7. Connect the Mod 4 digital output lines 0 and 1 to the PWM outputs Pulse 1 and Pulse 2 respectively.


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


9. 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 proximity sensor per revolution. The default value is 1.

(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.


10. Create the While loop for the speed measurement VI


11. Right Click on the Boolean Stop (1) button available in the While loop created in step 8 and select Create > Local Variable (2). Place Local Variable in the speed measurement loop (3).


12. Right Click on the Local Variable and select Change to Read (1). Connect the Stop Local variable output to the stop condition (2) of the speed measurement loop.


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


14. Add the Mod3/DIO 7 to Speed measurement loop and set it as Digital output. Connect Boolean Constant True to the Mod3/DIO 7 output. It is used to give 5V output to the proximity Sensor.


15. Save the FPGA VI (Name: DC_Shunt_Motor_QuickRun.VI) 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 (1) FPGA VI Call and Select the FPGA VI Saved in step 15 (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.


23. Save the VI in the name as

Front Panel of the RT VI for the control of DC Shunt Motor

24. Set the field Duty Cycle as 0.9 and Armature Duty Cycle as 0.1.

25. Turn on the power supply to the Dual DC-DC Converter.

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

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

28. Slowly increase the armature duty cycle and observe the motor speed. The DC Shunt Motor speed will vary with respect to the voltage applied to the armature winding and field winding.

29. Take the necessary readings by varying the both the armature and field 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 !!