lab1 Modeling - Mechanical parameters
docx
keyboard_arrow_up
School
Arizona State University, Tempe *
*We aren’t endorsed by this school
Course
324
Subject
Aerospace Engineering
Date
Apr 3, 2024
Type
docx
Pages
8
Uploaded by ColonelMusic7302
1
st
team member’s Name (Last, First): Lab station #: ____
2
nd
team member’s Name: Date: ___________
3
rd
team member’s Name:
Modeling your plant: mechanical parameters
MAE 318: System Dynamics and Controls lab 1
Before you start designing controllers for your customer, it is important to model your system
mathematically. You will save a lot of time and resources if you try controllers in simulations for this
mathematical model, rather than trying it directly on the setup. In your MAE 318 course you learned how to model an electromechanical plant like a DC motor. For this
lab, your task will be to identify the mechanical parameters of our plant. 1
Pre-lab deliverable
Please write the answers to these questions and submit them on canvas before coming to the lab, as a
pdf file. The answers can be obtained by reading this whole lab handout or some research
. Pre-labs are
to be submitted individually
, they are not worked on as a team. 1.
What is dry friction and what is viscous friction? Research on your own and explain them in a
few sentences each. Also provide formulae to calculate force or torque on a moving mass, due
to dry and viscous friction separately. (2 points)
2.
When you give a voltage V
a
to a dc motor, it moves. Derive step by step (using KVL and
Newton’s laws) the differential equation that relates the voltage V
a
to the motor speed ω
. (2 points)
3.
Write the solution expression (as a function of time) to the following differential equation:
˙
y
+
ay
+
b
=
0
, for initial condition y
(
0
)
=
y
0
. That is, find the solution y
(
t
)
(
a
and b
are constants). (2 points)
4.
Describe in a few sentences what two experiments will be performed in this lab and what three
quantities/parameters they intend to measure? (2 points, EM@FSE(c))
5.
For your set-up you are using a voltage-controlled DC motor+gearbox to model the drive train of
a car. But do the modern electrical cars use DC motors? Research at least two electrical cars
brands you know of and see what type of motors they use. (2 points, EM@FSE(c))
If they do not use the DC motors, then is your set-up with a DC motor still of any value for your
customer? (2 points, EM@FSE(i))
2
The Lab Setup
2. 1 Overview
The experimental setup used throughout the term is shown in Fig. 1. It includes a Personal Computer
(PC) with a USB port that sends and receives information to/from the Arduino board. Arduino interface
(IDE) is the software on the computer that helps facilitate this information exchange. Arduino, using a
digital to Analog converter (DAC) provides low-power control signal to a motor controller that
transforms the low-power control signal to high-power control signal (voltage) to drive the DC motor.
The DC motor is connected through a coupler to a driveshaft that rotates an aluminum disk. Inside the
housing holding the aluminum disk, there are two independent magnets which may be used to add
linear (viscous) damping to the system using a phenomenon known as eddy-current damping. Though,
this need for extra damping will not arise in these set of labs. Along the driveshaft, a rotary encoder is
used to measure the angle θ
of the disk. The encoder signal is read directly by Arduino, and the Arduino
IDE displays that angle data on the computer, via the serial monitor. Figure 1: The lab experimental setup.
Motor Controller
DAC
3
Lab experiments
The mechanical part of the motor-disk setup (shown in Fig. 2) is described by Equation (1) below: T
=
K
t
i
=
J
¨
θ
+
B
˙
θ
+
B
0
,
(1)
where T
is the motor-generated torque, K
t
is the motor torque constant, J
is the moment of inertia of
the rotating disk along with the motor armature and shafts, B
is the damping coefficient for the viscous
friction on the rotating shaft, and B
0
is a constant dry/Coulomb friction on the shaft. The electrical part
of the motor is described by Equation (2) below:
V
a
=
i R
a
+
K
e
˙
θ,
(2)
where V
a
is the voltage applied to the motor from the controller-amplifier, i
is the current flowing
through the motor windings, R
a
is the resistance of the motor windings, K
e
is the motor back-EMF
constant, and ˙
θ
is the motor rotational velocity. Note that the inductance of the motor windings is
considered negligible. You can combine the equations (1) and (2) to get a single relation between the
applied voltage V
a
and the motor speed ˙
θ
as:
V
a
=
R
a
K
t
J
¨
θ
+
(
R
a
K
t
B
+
K
e
)
˙
θ
+
R
a
K
t
B
0
(3)
The purpose of this labs is to identify the
mechanical parameters of the motor in
Equation (1), and the purpose of the next
lab will be to identify the electrical
parameters of the motor in Equation (2). To identify the mechanical parameters, two
experiments will be performed. The first
experiment
identifies
the
friction
parameters B
and B
0
, then the second
experiment identifies the motor torque
constant K
t
.
Note, that inertia J
is the inertia of the
rotating disc plus the inertia of motor’s
rotor and shaft. The inertia of the rotating
disk is given by 1
2
mr
2
, where m
is the disk mass and r
the radius. The disk is made of Aluminum, which has a density of ρ
. The volume of the disk is given by V
=
π r
2
w
where w
is the width of the disk. Therefore, the inertia of the rotating disk is given by: J
=
1
2
mr
2
=
1
2
ρV r
2
=
1
2
ρπ r
4
w
. Where
ρ
=
2800
kg
/
m
3
, w
=
1
∈
¿
0.0254
m
, and r
=
4
∈
¿
0.1016
m
. The inertia of the motor’s rotor and shaft can be experimentally calculated or looked up in the motor specification sheets online, it is 0.015 kgm
2
. But actually
, you don’t need to know J
!! If you divide by J
on both sides of the equation (1), only _
_
+
_
_
Figure 2: The model of the DC motor.
_
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
parameters you see and you need are B
J
, B
0
J
and K
t
J
. Those are the ones we shall calculate from the experiments in this lab. It’s only those three combinations of the four parameters that appear in the final motor equation (3) or the transfer function. Make sure you understand this point. 3.1
Experiment 1: Identify B
and B
0
If you disconnect the motor from the power, i.e. open the circuit, you’ll ensure that i
=
0
and the
equation (1) can be rearranged as below (using ω
=
˙
θ
as the motor speed). ˙
ω
+
B
J
ω
+
B
0
J
=
0
.
(4)
If you give some initial speed ω
0
to the disc and let the disc go, it will slowly come to rest due to friction,
while following the solution to the above differential equation: ω
(
t
)
=
(
ω
0
+
B
0
B
)
e
−
t
B
J
−
B
0
B
(5)
This is a typical response of 1
st
order system to initial condition. Its graph is shown in Figure 3. The
constant τ
=
J
B
is the mechanical time constant. We’ll find the values of B
0
B
and B
J
by using the curve
fitting toolbox.
Experiment Procedure
1.
Disconnect the motor from the motor controller, i.e. open the circuit. Turn off the 24V supply.
2.
Make sure the magnets are far from the disk.
3.
Navigate to the Arduino file (.ino) for Experiment_1. It is located
in the folder C:
\
Users
\
Student
\
Desktop
\
MAE318
\
LAB1. 4.
Let your TA make sure you understand the code and all the
functions inside it.
5.
Open it and upload the code
to the Arduino board. Your TA will
provide the needed instructions.
6.
Open the serial monitor on PC. You should see two data
columns. First one is time in millisec
, second is the disc speed
in rad/sec
. Make sure the baudrate in the serial monitor is as
same as the one in Serial.begin() from the Arduino code.
7.
Spin the disk
so that it rotates toward you! Place your hand on
top of the disk, grip it, and then give it one fluent pull, moving it
downwards. If the angular velocity is negative, you can swap
the channel A and B wires
on Arduino, or just change the sign in the MATLAB code later on.
Don’t pull too hard! The initial angular velocity can be around 9-15 rad/s
. 8.
Stop the Arduino after the disc stops
. Simplest way to do that is to unplug Arduino USB power
supply. Other neater options exist e.g. executing the “return” command conditioned on some
serial input or externally attached button, or just a simple if statement timed for 2-3 seconds in
the code. But we’ll forego those for simplicity in these MAE 318 labs.
9.
Copy all the data from the serial monitor into an appropriately named .txt file (e.g.
groupXLab2Exp1Test1.txt). Make sure the first and the last lines have no missing data, and the
whole file looks like a matrix.
0
0.5
1
1.5
2
time (s)
0
5
10
15
angular speed (rad/s)
_
Figure 3: Typical response (decay) of a first order system to initial conditions.
10.
Run the MATLAB file corresponding to Experiment-1, with your saved .txt file name in the code.
It should plot the angular speed of the disk vs. time. Let your TA explain the MATLAB code and
the fit command
used in there. Chose the initial speed properly to get a good fit, or redo it!
11.
Find the instances t
0
and t
1
to get a clean chunk of data in the ramp down phase
like in the
Figure 3, using the data cursor and obtain the parameters to complete one row
in the table-1 in
Results and Evaluation section. The instant t
0
should be when the hand is off the disk and the
speed is between 9-15 rad/s. The data is noisy, so click in the middle of the noisy value, at some
average initial speed at the instant t
0
.
The instant t
2
should be when the speed has slowed
down to about 0 rad/s. The data is noisy, so click in the middle of the noisy values, at some
average final speed for the instant t
1
.
12.
Make sure the fit-line produced by the MATLAB matches the experimental data properly!
Otherwise please ask your TA for help. 13.
Repeat
the above steps many times to fill many rows & compute the average value of B
J
and
B
0
J
.
3.2
Experiment 2: Identify K
t
If you provide some voltage (and hence current) to the motor, motor will start from rest and ultimately
reach a steady state speed. At steady state ¨
θ
= ˙
ω
=
0
, and the equation (1) can be rearranged as below: K
t
i
=
Bω
+
B
0
.
(6)
Hence, by measuring the steady state current i
, and the steady state speed ω
, and using the value of
B
/
J
and B
0
/
J
from the previous experiment you can calculate K
t
/
J
. To measure current, a very small resistor
called power resistor ¿
) is placed in series
with the motor, as shown in Figure 4. By
measuring the voltage V
p
across the
power resistor (by digital multimeter,
DMM), the current in the motor can be
calculated by Ohm’s law as i
=
V
p
R
p
.
Experiment Procedure
1.
Make sure the magnets are far
from the disk, and that the motor
is wired correctly
: a.
24VDC power supply:
The green banana plug wire corresponds to the negative ground
terminal, and purple banana plug wire corresponds to the positive high voltage
terminal.
_
_
+
_
_
Figure 4: Circuit for measuring motor current .
_
_
b.
Make sure the red and black motor leads are connected directly to the corresponding
red and black leads of the motor controller.
c.
Finally, verify that the orange and black cables from the digital multi-meter (DMM) are
connected across the power resistor. Make sure the DMM is set to read mV.
d.
Make sure the power resistor or anything else is not touching the aluminum plate, as
this will short-circuit
the setup.
2.
Navigate to the Arduino file (.ino) for Experiment_2. It is located in the folder C:
\
Users
\
Student
\
Desktop
\
MAE318
\
LAB1, and open it. Let your TA explain the code to you.
3.
Write a value for the DAC voltage variable, as suggested in the table-2 from the
Results and Evaluation section. Note this voltage variable is in ‘DAC units’. A DAC value of 0 corresponds to 0V provided to the motor controller. A value of 4095 corresponds to 5V provided to the motor controller. And 1.5 to 4 V provided to the motor controller corresponds to 0 to 24V provided to the motor.
4.
Turn on the 24-volt power supply. Before you turn on the power
, it’s operator’s job to visually and verbally ensure that all team members are ready for the motor to be turned on. All loose articles should be cleared from the experimental platform. Students should also check that electrical components are not being accidentally shorted against the aluminum experimental platform. Groups sharing the power supply should communicate between each other.
5.
Upload the code
to the Arduino board. Your TA will provide the needed instructions.
6.
Open the serial monitor on PC. You should see three data columns. First one is time in
milliseconds
, second is the disc angular speed in rad/s
, and the third is your provided voltage in
DAC units. Make sure the baudrate in the serial monitor is as same as the one in Serial.begin()
from the Arduino code.
7.
Disk will reach steady state speed in a second or less. 8.
Measure the voltage V
p
across the power resistor using the DMM. If the reading is noisy, use a
visual average. Record it in the table-2. 9.
Stop the Arduino after a few seconds
. You only need a couple of seconds worth of data.
Simplest way to do that is to unplug its USB power supply. 10. Copy all the data from the serial monitor into an appropriately named .txt file (e.g.
groupXLab1Exp2Test4.txt). Make sure the first and the last lines have no missing data, and the
whole file looks like a matrix.
11.
Run the MATLAB file corresponding to Experiment-2, with your saved .txt file name in the code. It should plot the angular speed of the disk vs. time. To find the average steady state speed
, the code will ask you pick the start and end of the steady state portion. Define the instances t
1
and t
2
by clicking with the cursor and note the average speed in rad/s in the command window and on the figure title. Record it in the table-2 to complete one row
.
12.
Repeat the above steps couple of times to fill many rows & compute the average value of K
t
J
.
NOTE:
Please make sure to understand all the details in the Arduino and MATLAB codes. In future
you’ll have to write your own MATLAB and ARDUINO codes
!
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
4
Post-lab deliverable: Results and Evaluation
Please complete the tables and write the answers to these questions and submit them on canvas as a
pdf file. Post-labs are to be submitted one per team. On the submission document, only write the names
of members who actually participated.
Table-1: Experiment 1 Data
NOTE:
Find the instances t
0
and t
1
to get a
clean ramp down phase chunk of data
.
Make sure the initial angular velocity around t
0
is around 9-15 rad/s
Test #
B
J
(s
-1
)
B
0
J
(rad/s)
1
2
3
4
5
6
Average: B
J
=
¿
______________ Average: B
0
J
=
¿
______________ (6 points)
Table-2: Experiment 2 Data
NOTE:
Make sure to choose DAC number so that the steady state angular velocity is around 9-15 rad/s. You don’t have to stick
to the DAC numbers in the tables below for that.
Test #
DAC
voltage
(number)
V
p
(mV)
i
(steady) = V
p
/
R
p
(A)
ω
(steady)
(rad/s)
K
t
J
=
Bω
+
B
0
Ji
(rad/As
2
)
1
2000
2
2100
3
2200
4
2300
5
2400
6
2500
(Be careful of unit conversions from mA to A)
Average: K
t
J
=
¿
__________________ (4 points)
4.1 Post Lab Questions for Submission
1.
Question:
Propose a different experiment to measure the value of K
t
that doesn’t involve measuring the speed of the disk! Explain in a few sentences with a diagram. (2 points, EM@FSE(b))
2.
Question:
You may have noticed that numerical differentiation can get very noisy. Even though angular data looks quite smooth or minimally noisy, the angular speed data obtained by differentiation is significantly noisier. What may be the reason for it? Research on your own. Hint:
Think about what you are dividing by what, and the numerical size of the denominator.
(2 points)
3.
Question:
Research about the ‘smooth’ command used in the MATLAB code. Explain in a few sentences what does it do quantitatively
. What does 5 in the smooth(x, 5) mean? (1 point)
4.
Question:
It takes a certain minimum amount of current to overcome the dry friction and make the motor move. Calculate this current for your setup using the motor parameters you have calculated. (2 points)
5.
Question:
Assume there was no dry friction (
B
0
=
0
) and there was only the linear viscous friction. How the graph in figure 3 will look like, after the disc is given some initial speed ω
0
and let go? Paste it below. Do the same if there was no viscous friction (
B
=
0
) but just the dry friction. (2 points)
6.
Question
: Continuing with the theme of one of the pre-lab questions: A few types of motors available these days are: brushed DC motors (you are using this in the labs), brushless DC motors, AC induction motors, AC synchronous motors etc. In the pre-lab you researched on their use in the electric cars. Now look up some journal papers (e.g. on google scholar) or patents and comment on which direction the motor technology is evolving for their use in the electric cars. (1 point, EM@FSE(e))
Note:
If you have time, research about methods of operation of the motors mentioned above and how they are controlled.