You are on page 1of 6

EE 4343 Lab#1

Identification of Motor Transfer Function

The block diagram for the DC motor module that will be used in today’s lab is shown in Figure 1. The
transfer function for this motor module could be found by measuring each of the static parameters in the
model.

TB
TL 1
Bj
N

- -
Vin Va
1
Ia Tm α
m ω
m θ
m θ
L Vpot
1 1 1 1
A Σ Ra Kt Σ J N
Kpot
+ + s s
-
Vtach
Kb -Ktach -Kb

Fig. 1: Motor Block Diagram


The following are the parameters of the motor and their notations used in the above presented model.

Gear Reduction N
Armature Resistance Ra
Potentiometer Constant K pot
Tachometer Constant K tach
Back EMF Constant Kb
Torque Constant Kt
Power Amplifier Gain A
Brake Constant Bj B j
Effective Motor Inertia J

The goal of this lab is to simplify the identification process by finding an approximate, first order
transfer function type, equivalent model for this system (1).
Vtach G
H ( s) = = (1)
Vin τs +1
To do so, we will find the overall gain G and the time constant τ of the circuit.

The model that you obtain after the first lab will be used in the second lab to design a controller for the
motor in order to control the rotation velocity of the motor by computing an appropriate input voltage.
The designed controller will be tested in the second lab on the actual motor system.

1
04/01/11
Setting up and performing the identification experiment:

1. Connecting the motor to the acquisition boards in the computer

Every computer is equipped with a acquisition board, NI-1200 or NI-6014, to allow connection with a
process. The connection is made using a terminal block to facilitate the access to the pins corresponding
to the input/output channels of the boards.

Hardware connections for NI-1200 card:


a. Begin by connecting the motor control module to the power supply. The module is marked
5V, 0V, +12V, -12V . Be sure the voltage supplied is correct.
b. Connect the enable ( E ) to ground on the Motor Drive Input.
c. Connect the Analog Output (pin 10 on terminal block) to Vin on the Motor Drive Input.
d. Connect the non-inverting Analog Input (pin 1 on terminal block) to Vout on the Tacho
Generator Output.
e. Connect Analog Ground (pin 11 on terminal block) to ground on the Tacho Generator Output
(make sure all the ground pins are connected together).

Hardware connections for NI-6014 card:

a. Begin by connecting the motor control module to the power supply. The module is marked
5V, 0V, +12V, -12V . Be sure the voltage supplied is correct.
b. Connect the enable ( E ) to ground on the Motor Drive Input.
c. Connect the Analog Output (pin 22 on terminal block) to Vin on the Motor Drive Input.
d. Connect the Analog Input (pin 68 on terminal block) to Vout on the Tacho Generator Output.
e. Connect Analog Ground (pin 55 on terminal block; make sure pin 62 is connected to pin 67)
to ground on the Tacho Generator Output (make sure all the grounds are connected together).

2
04/01/11
2. Setting up the matlab/simulink file

a. Click on the Simulink file "test.mdl" in the “Lab1” folder. The following block diagram opens
up.

Fig. 2: Simulink Block diagram for identification


The Analog Output block sends the desired input signal to the motor drives. The Analog input reads the
response of the motor to the input signal from the tacho generator and sends it to the Scope to be
visualized and saved.

b. 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. 3: Step input


c. Click on the Tools menu in the Simulink diagram and, in the Real-Time Workshop submenu,
select Build Model. You will see the Matlab command window pop up and the build process will be
displayed. Once the build is successfully completed click the “Connect to target” button and after the
connection is realized click on the arrow that appears in the simulink diagram. This will start running the
Simulink code for a number of seconds equal to the simulation time specified in the simulink diagram.

3
04/01/11
Note: Anytime a change is made in the simulink file, except changing the value of the step input
to be sent to the process, the file must be rebuilt.

3. Finding the gain G of the transfer function

a. The motor drives are capable of handling voltages from -5V to 5V for its full range of
operation. Vary the Final value field in Fig.3 between -2 and +2 in steps of 0.2V. Note the corresponding
Tacho-Generator steady-state output on the scope. Make a table showing the input voltage that you
specified (Vin ) and output voltage (Vtach).

b. Plot Vtach vs. Vin (the values from the table you made).

This plot, called “static characteristic”, will give information regarding the static input-output behavior of
the motor, in other words the static gain of the system. From the plot you can see that there exists a so
called "dead-zone" in the center, with two linear regions on each side of the dead-zone. Note down the
limits of the dead-zone.

Note: Every time you have to determine the value of a parameter that describes the static
characteristics of a system, we will determine the value finding the slope of a line. This gives you
information about how does the system amplifies or attenuates the input signal.
Due to nonlinearities in the physical motor module some of the measured characteristics will exhibit
saturation and/or a dead-band. In these cases, the value we will use for the parameter is the slope of the
linear part of the characteristic. You should also determine the saturation and dead-band limits in case we
wish to construct a more detailed model.

Compute the slope of the linear region. The value that results will be the DC gain of the motor’s model.

c. Repeat steps a. and b. two more times. Take the average of the three slopes. This mean value
is the gain G of the transfer function in equation (1).

4. Finding the value of the time constantτ

The parameter we wish to find, in order to have a full first order transfer function description of the
motor, is τ , the time constant, in the equation (1).
The time constant characterizes the dynamic behavior of the system. To find it we need to look at the step
response on the motor, not only at the steady state value of it (as it was done in the previous step).

You will use the same simulink file.

a. Make sure that the simulation time is set up in such a way to see on the plot the steady state of
the system’s response, keeping in mind that you are interested now in the dynamical characteristics of the
system such as rising time and settling time which you need to see as clear as possible.

b. Set the final value in the step input block to a value that is not inside the dead-band.

c. Build the Simulink diagram. Run the code. The step response of the motor for the input step
will be shown on the Scope. Click on the “binoculars” button to have a well scaled image of the
signal.

4
04/01/11
Adjust the simulation time in the case that it does not satisfy the specifications at a.

d. Set up the scope to save the signal data in the Matlab Workspace.
By clicking on the “parameters” button in the Scope window a new window containing the
scope parameters will open up. In this window in the “Data history” tab you will select that the data be
saved to workspace. Give a name for your data and specify a format for it.

Note: In the case that at home you use a Matlab version other than R14, save the data in the “Array”
format. In this case the data will be saved in the workspace as a two column matrix. The first column is
the time column and specifies the moments in time at which the actual signal values, in the second
column, were collected.

To plot the data in matlab you only have to plot the second column of this array versus the first column.

e. Execute the step response simulation again.

Note: If you return to the Matlab command window and type "who" on the screen the names of the
variables in the workspace will appear. You will see also the name of the variable that contains you data.

Plot the step response in Matlab.


For a first order transfer function the time constant τ is defined as the time required for the step
response to go from 0% to 63.2% of its final value. Determine this value of the time constant from the
obtained plot.

Important:
Save your data in order to plot it in the lab report.
If at home you have Matlab R14 you only have to go in the workspace window, right click on the
data you need to save and select “save as”. Then give a name to the file where you want to save the data
and select the folder where you wish to save it.
Do not forget to take the data with you on your flash drives or disks when you leave the lab!
If you do not have the Matlab R14 version (or you don’t know what version of Matlab you have),
in order to see the data in your matlab you have to save it in ASCII format using the command “save” in
the Command window.
Example: if the name of your data is “data” you will use the command:
save destination_file_name –ascii data
where destination_file_name is the name of the file, chosen by you, that you want to save your data in.
After you execute this command, the file with the name that you chose will appear in the current directory
that you are working on.
For further details about the save command type “help save” in the Command window.

You can load the data that you saved in your Matlab workspace by clicking, in the Matlab
window, the File menu and selecting Import data.

f. Repeat step e for two other different input step values that respect the specifications at b. Note
that the control input can take any value in the -5V and 5V.
Find the time constants. Take the average of the time constants. This mean value is the time
constant τ of the transfer function in (1).

Write the transfer function model of the motor system.

5
04/01/11
Lab Report:

The lab report should include an introduction, procedure, and conclusion. You are responsible for
everything listed in all lab procedures, in addition to what is listed here.

1. Prepare a table of the motor model parameters you identified. Be sure to identify the motor module
you were working with. Give some thought as to how many of the figures in each parameter are
significant. As a rule, only the least significant digit you report should be substantially uncertain.

Your lab report should include tables showing G, τ (for each step response you measured).

2. The plot of Vtach vs Vin is nonlinear. Explain the existence of the “dead zone”.
Comment on what sort of problems might arise due to these nonlinearities if one were to design a speed
controller for the motor module. For what interval in the control input would you expect the controlled
system to have the desired performances that one would obtain in simulation using the identified model?

3. Why did you model the plant with a first order transfer function?

4. Calculate the poles and zeros of the obtained transfer function.

5. Comment on obtained transfer function. Is the system stable? Is there any steady state error? Perform
steady state error analysis if feasible.

Important: The lab report is individual work and should not be done in groups even if the experiments in
the lab were done in a group.

6
04/01/11