EE 4343/5320 Lab # 2
Speed Control of Motor Using Zeigler-Nichols Tuning
Prepared by: Nitin Swamy & Ognjen Kuljaca
The block diagram for the DC motor module to be used in today’s lab is shown in Fig. 1.The transfer function for this motor module was found in Lab 1 by measuring each of the static parameters in the model. In this lab, we shall use the motor transfer function to design and tune a PID controller for speed control using Zeigler-Nichols tuning.
Fig. 1: Motor Block Diagram
The following is a list of the parameters in the model above, and some typical measurements.
Gear Reduction9
Armature Resistance6.5
Potentiometer Constant29.2x10-3V/degrees
Tachometer Constant0.471
Back EMF Constant3.81x10-3V/rpm
Torque Constant36.4x10-3N*m/A
Power Amplifier Gain2.24
Brake ConstantB0433.12x10-9N*m/rpm
Effective Motor InertiaJ[N m s2, oz in s2]6x10-6N*m*s2 , oz*in*s2
For details on the Zeigler-Nichols method, refer to class notes on the class web page.
Procedure:
Hardware connections (for PCI-1200 card):
- Begin by connecting the motor control module to the power supply. The module is marked 5V, 0V, +12V, -12V (Fig. 6). Be sure the voltage supplied is correct.
- Connect the enable () to ground on the Motor Drive Input.
- Connect the Analog Output (pin 10 on terminal block) to Vin on the Motor Drive Input.
- Connect the non-inverting Analog Input (pin 1 on terminal block) to Vout on the Tacho Generator Output.
- Connect Analog Ground (pin 2 on terminal block) to ground on the Tacho Generator Output.
- Connect the inverting Analog Input (pin 11 on terminal block) to the ground on the Motor Drive Input. Be sure that the brake is in the off position.
Hardware connections (for AT MIO 16E-4 card):
a. Begin by connecting the motor control module to the power supply. The module is marked 5V, 0V, +12V, -12V (Fig. 6). Be sure the voltage supplied is correct.
b. Connect the enable () to ground on the Motor Drive Input.
c. Connect a BNC cable to CH0 on the ANALOG OUTPUTS part of the SC-2075 board. Connect the positive lead of the BNC (red) to Vin on the Motor Drive Input. Connect the negative lead (black) of the BNC to ground on Motor Drive Input.
d. Connect a BNC cable to CH1(CH2) on the FLOATING DIFFERENTIAL ANALOG INPUTS part of the SC-2075 board. Connect the positive lead of the BNC (red) to Vout on the Tacho Generator Output. Connect the negative lead (black) of the BNC to ground on Tacho Generator Output.
The Transfer Function of the motor module was identified in Lab 1 as
/ ( 1 )where G = Transfer function gain, = time constant.
Using this model, a speed controller has to be designed using the Ziegler-Nichols recommendation. This work needs to be done prior to implementing the controller in the lab.
Note: If the controller is not designed before the lab session, the defaulting group will not be allowed to perform the lab and the entire group will forfeit all the points for the lab!!
Controller implementation- Part I:
a. Click on the Simulink file " speedcontrol.mdl" on the desktop. The following block diagram opens up.
Fig. 2: Simulink Block diagram for speed control.
b. Double-click on the PID block. The following window opens up:
Fig. 3: PID parameters
Fill in the PID parameters according to your design.
c. Double-click on the step block in the block diagram. This is the input signal to the motor. The following window should be seen:
Fig. 4: Step input
The controller will be implemented for achieving maximum speed (corresponding to a step input of 5V).
The Simulation parameters should be set for a step response (as in Lab1).
d. Clickon theTools option in the Simulink diagram. Choose Build Model and build the model. You will see the Matlab command window pop up and the build process will be displayed. Once the build is successfully completed, click on the arrow in the diagram. This will start running the Simulink code.
e. There are four signals of interest that need to be recorded- Scope: Error, Scope1: control signal, Scope2: Ouput voltage and Scope4: Speed Output.
As in Lab 1, all these signals are saved in the workspace after the Simulink code is run.
Plot these four signals with respect to time.
Controller Implementation- Part II:
a. Click on the Simulink file " speedctrlwithspeedinp.mdl" on the desktop. The following block diagram opens up.
Fig. 5: Speed control with speed input.
This block diagram is similar to the one on Part I, but there are additional gain blocks that represent a conversion factor between speed and voltage (K= 62. 54 rpm/V).
b. Make atablethat will convert the following voltages to corresponding speed inputs:
-5V, -3V, 2.5V and 5V.
c. Run the Simulink code with these voltage input values.
d. Repeat step e. from Part I for these voltage values.
Lab Report:
Include an introduction, procedure, and conclusion. You are responsible for everything listed in all lab procedures, in addition to what is listed here.
1. Analyze the obtained step response. Compute:
a). The peak overshoot (in %).
b). Settling time.
c). % steady state error.
2. Obtain the mathematical formula for the steady-state error of the motor module for a step input of 5V. Compare the theoretical value with the value obtained in from the graphs.
3. Using the model in ( 1 ), design a compensator using the Root Locus technique for the specifications overshoot, settling time and error obtained from above. How does your compensator compare with the Zeigler-Nichols design ?
Fig. 6: Motor module
1
10/11/18