You are on page 1of 4

ME 728

Computer Control of Electro-Mechanical Systems


Brush Motor ID and z Transform Lab
Objective
We will use a modified version of the hardware of the previous lab to develop a discrete transfer
function for the brush motor system. The ID process will consist of applying a constant voltage
to the open loop motor and recording the position and time. From the data, the coefficients of
the discrete model of the motor will be determined.

Procedure
The VI is the same as the previous lab. A constant voltage will be applied to the open loop
motor (feedback multiplier = 0) and the position and time will be recorded by LabVIEW. The
coefficients will be determined through least squares estimation.
The open loop transfer function of the brush motor has the form
G( s ) =

Ka
s( s + b )

(1)

where K is the amplifier gain which can be assumed to have a value of 5. The constants a and b
will be determined through the lab exercise.
1) Set the size of the step input so that the product of the proportional gain KP and the
step input size is 1.0 volts. Set the feedback multiplier to zero and set the sample
time on the ZOH to -1. Set the final time to 2 seconds and set the time step to 0.002
seconds. Set the decimation on the position data collector so that a 0.05 second
sample of the motor response is obtained.
2) Put the recorded data into a spreadsheet. Use FTP in the Measurements and
Automation Explorer to move the data file from the real-time target to the host
machine.
3) Determine the time response of the application of a unit step input to the transfer
function of Eq. (1).
>
>
>

>

>

4) Modify the spreadsheet so that a least squares estimate of the constants a and b is
obtained through the use of the solver facility.
a=8.26 b=1.45
5) From knowledge of the time response, the sample time, and the parameters,
develops the discrete transfer function of the motor.
See the hand writing.
6) Is the transfer function of step (5) the discrete equivalent of Eq. (1) found in
Appendix VIII of the text?
The z-transformation of step (5) is not equal to the z-transformation of Eq. (1)

7) Using the same values for the parameters a and b, determine the transfer function
should the sample time be 0.5 seconds.

8) Apply a discrete unit step to each transfer function and invert the transform in
order to develop the time history. What are your conclusions? This step is
probably best performed in a spreadsheet.
When a continuous function is sampled the sampled values obviously match the system. This is
because inverse laplacians are not related to the sample period. However, the inverse of a z
transform is dependent on the sample length. This makes sense as we expect more accurate
results for smaller sample periods.

time

position calculated
dev
devsquared for 0.5second
0
0
0
0
0
0
0.05 0.034558
0.050406172 0.015848 0.000251165
0.1 0.166504
0.196895593 0.030392 0.000923649
0.15 0.392699
0.432748082 0.040049 0.001603929
0.2 0.706858
0.751713474 0.044855 0.002012014
0.25 1.102699
1.147978751 0.04528 0.002050256
0.3 1.57708
1.616137462 0.039057 0.001525485
0.35 2.123717
2.151161292 0.027444 0.000753189
0.4 2.733186
2.748373611 0.015188 0.000230664
0.45 3.396062
3.403424879 0.007363 5.4212E-05
0.5 4.112345
4.112269769 -7.5E-05 5.65974E-09
4.112269769
0.55 4.875752
4.871145887 -0.00461 2.12163E-05
0.6 5.686283
5.676553988 -0.00973 9.46537E-05
0.65 6.537654
6.525239567 -0.01241 0.000154118
0.7 7.429867
7.414175743 -0.01569 0.000246216
0.75 8.359778
8.34054734 -0.01923 0.000369818
0.8 9.321105
9.301736078 -0.01937 0.000375155
0.85 10.31385
10.2953068 -0.01854 0.000343813
0.9 11.33173
11.31899468 -0.01273 0.000162061
0.95 12.37788
12.37069328 -0.00718 5.15772E-05
1 13.4523
13.44844349 -0.00386 1.48727E-05
13.44844349
1.05 14.54872
14.55042323 0.001707 2.91464E-06
1.1 15.67341
15.67493786 0.001532 2.34661E-06
1.15 16.81066
16.82041127 0.009749 9.50482E-05
1.2 17.96991
17.98537756 0.015468 0.000239246
1.25 19.14487
19.16847339 0.023607 0.000557309
1.3 20.34181
20.36843075 0.026619 0.000708558
1.35 21.55447
21.58407032 0.029603 0.000876356
1.4 22.77969
22.81429527 0.034607 0.001197663
1.45 24.01433
24.05808548 0.043751 0.001914192
1.5 25.26469
25.31449218 0.049804 0.002480456
25.31449218
1.55 26.52761
26.58263295 0.055025 0.003027746
1.6 27.8031
27.86168711 0.058592 0.003433036
1.65 29.08801
29.15089136 0.062885 0.003954568
1.7 30.3792
30.44953577 0.070335 0.004946981
1.75 31.68296
31.75696011 0.073998 0.005475721
1.8 32.99301
33.07255029 0.079544 0.006327294
1.85 34.31562
34.39573518 0.080118 0.006418922
1.9 35.64137
35.72598359 0.084615 0.007159629
1.95 36.9734
37.0628015 0.089398 0.007991914
2 38.31172
38.40572943 0.094007 0.008837397
38.40572943
sum=
0.076885365

a= 8.261084
b= 1.45015
k=
5

You might also like