MECH 450 Lab Assignment 2...
MECH 450 Lab Assignment 2...
201700430
Mahaba Alteneiji
201804597
Mouza Alameri
201808014
Sara Alblooshi
Submitted to:
Eng. Rihab K. Hamza
Date of Submission: 15/2/2024
MECH 450 Laboratory Assignment 1 2/15
Table of Contents
1) What is a Mathematical modelling? and why needed? ...................................................... 3
2) Obtaining the modeling equation of the DC motor system described above using first
principles. Draw free body diagram for all sub systems to show your work. .............................. 4
3) Then, Take Laplace to find the Transfer function of the speed of the DC motor system that
related the output of the system (ωo) to the input of the system vin (the motor Volt). Which
order is your system? .................................................................................................................. 6
4) Finding the analytical solution of the system and using the analytical solution to suggest a
procedure for finding the open loop gain Ko and the time constant τ. ...................................... 7
5) What is a step response? How can be implemented? What is the range of possible
voltage for the step? .................................................................................................................... 8
6) Give full details of the LabVIEW program used to conduct an experimental open loop step
response in the real system and recording the process response. Explain how the program
works. ........................................................................................................................................ 10
7) Arranging the data collected to represent a step response of an incremental system by
shifting the data to start from zero. Plot the graphs and use it to find the system gain Ko and
time constant from each graph and take the average. (Show the 3 plots for the different step
response conducted at the Lab. Must show your work on the graph). .................................... 12
8) Now write the Transfer function of your system in terms of the angular speed and motor
voltage with the known parameters. ........................................................................................ 15
The below schematic diagram is a model for a geared DC motor. The gearbox has a gear
ratio N, and connects the motor shaft to the output shaft. The motor shaft, which
includes the motor armature, has mass moments of inertia Jm and a friction-damping
coefficient Bm, while the output shaft includes the external load and has a mass
moments of inertia Jo and a friction-damping coefficient Bo. The armature circuit model
is also shown in the figure and has a resistance R and a back emf constant Kb. The
angular velocities of the motor shaft and the output shaft ωn and ωo are positive in the
direction shown.
Mathematical modeling is a process that uses math concepts to explain systems functions. The
control systems can be represented with a set of mathematical equations known as mathematical
model. These models are useful for analysis and design of control systems. Analysis of control
system means finding the output when we know the input and mathematical model. moreover,
design of control system means finding the mathematical model when we know the input and the
output. Also we can know the order of the system theoretically and find parameters of function
like the gain, k_° and time constant to find system step response. Differential equation model,
Transfer function model and State space model are mathematical models are mostly used.
To find transfer function for the system getting the mathematical model as first
step. In our system have electrical model and a mechanical model.
• Apply KVL:
∑𝑉 = 0
𝑉𝑖𝑛 = + + 𝑉𝐵 1
𝑉𝑖𝑛 = 𝑉𝑅 + 𝑉𝐵
𝑉𝑖 = 𝑖𝑎𝑅𝑎 + 𝐾𝑒𝜔𝑚 2
∑ 𝐽𝛼 = 𝝉
𝜏𝑚 − 𝜏𝜊 − 𝑏𝑚 𝜔𝑚 = 𝐽𝑚 𝜔̇ 𝑚 3
𝑁𝜏𝜊 − 𝑏𝜊 𝜔𝜊 = 𝐽𝜊 𝜔̇ 𝜊 4
𝑏𝑜𝜔𝑜+𝐽𝑜𝜔̇𝑜 5
𝜏𝑜 =
𝑁
To solve for output angular speed 𝜔𝑚, Since 𝜏𝑚 = 𝐾𝑡𝑖𝑎and 𝜔𝑚 = 𝑁𝜔̇ 𝑜, so:
𝑏𝑜𝜔𝑜+𝐽𝑜𝜔̇ 0
𝑘𝑡 𝑖𝑎 − − 𝑏𝑚 𝜔𝑚 = 𝐽𝑚 𝜔̇ 𝑚 7
𝑁
𝑏𝑜𝜔𝑜+𝐽𝑜𝜔̇0 1
𝑖𝑎 = + (𝑏𝑚 𝑁𝜔𝑚 + 𝐽𝑚 𝑁𝜔̇ 𝑜) ( ) 8
𝑁 𝑘𝑡
𝐾𝑜 𝑉𝑖𝑛 = 𝜏𝜔̇o + 𝜔o
applying the Laplace Transform for equation 9 we will get the speed transfer
function equation
𝐾𝑜 𝜔(𝑠)
𝐺(𝑠) = = 11
𝜏𝑠 + 1 𝑣𝑖𝑛
3) Then, Take Laplace to find the Transfer function of the speed of the
DC motor system that related the output of the system (ωo) to the
input of the system vin (the motor Volt). Which order is your system?
𝐾𝑜 𝑉𝑖𝑛 = 𝜏𝜔𝑜̇ + 𝜔𝑜
Laplace Transform:
𝜔𝑜 (𝑠) 𝐾𝑜
→ 𝐾𝑜 𝑉𝑖𝑛 (𝑠) = (𝜏𝑠 + 1)𝜔𝑜 (𝑠) → =
𝑉𝑖𝑛 (𝑠) 𝜏𝑠 + 1
Jo
τ = Jm NR a ( ) R a
N
4) Finding the analytical solution of the system and using the analytical
solution to suggest a procedure for finding the open loop gain Ko and
the time constant τ.
Transfer Function:
𝜔𝑜 (𝑠) 𝐾𝑜 𝐾𝑜
𝐺(𝑠) = = → 𝜔𝑜 (𝑠) = × 𝑉𝑖𝑛 (𝑠)
𝑉𝑖𝑛 (𝑠) 𝜏𝑠 + 1 𝜏𝑠 + 1
In the context of finding the transfer function of a system, a step response refers to the
reaction of the system to an instantaneous change or step input in its input signal. This
input change is typically a sudden transition from one steady-state value to another.The
step response provides valuable information about the system's dynamic behavior, such
as its settling time, overshoot, and stability. By analyzing the step response, engineers
can deduce important system characteristics and parameters, which are essential for
deriving the system's transfer function. During a step response experiment, the input
signal is abruptly changed, and the system's output response is observed over time until
it reaches a new steady-state condition. This observed response data is then used to
construct plots and analyze the system's behavior, ultimately leading to the
determination of its transfer function.
connected to the other side. A write measurement file icon was employed to save the
data in an Excel sheet. Specifying the file's location, such as the desktop, was crucial. The
append to file option was selected to ensure all readings were saved in a single file, and
it was linked using the input motor voltage and the output velocity.
The range of possible voltage for the step response in finding the transfer function
depends on the specific characteristics of the system being studied. In the provided
scenario, three trials were conducted with varying voltage ranges:
These voltage ranges were selected to observe the system's response across different
input levels and to ensure that the step response adequately captures the system's
dynamics. However, the actual range of possible voltage inputs could vary depending on
factors such as the motor's specifications, system constraints, and experimental
objectives.
The research utilized LABVIEW software to translate the motor speed's input voltage into
degrees per second. Initially, users input the desired speed and observe the response on
the main page. The input, facilitated by a numeric control icon, is sent through the
output DAQ assist and amplified to initiate motor action. Subsequently, the front panel
displays numeric data indicating the motor speed in degrees per second. Additionally, a
waveform graph is employed to visualize one or more plots of evenly sampled
measurements. Afterwards, the code was generated within the block diagram. Moreover,
the "while loop" icon was selected, serving as a framework to continuously execute a
single line of code until meeting a predetermined condition. Subsequently, the graphical
source code of the LabVIEW program was integrated. Ultimately, the "stop button" in the
block diagram was connected to the conditional terminal. Within the block diagram, the
output functionality (represented by the DAQ Assistant icon) was employed. This
interface allows users to define measurement tasks, specify channels, and adjust scales.
Subsequently, signals to be generated were selected, including the voltage analog
output. The physical channel supported for this purpose was designated as a0, indicating
its role in receiving the voltage output for motor speed. With this configuration, the
connection between the motor and the DAQ was successfully established. Additionally,
the generation mode was configured to single sample on demand. Subsequently, a
second DAQ Assistant icon was selected, this time from the input menu, and signals were
acquired by pressing the voltage analog input buttons. The physical channel supported
for this task was also a0, signifying its role in receiving the input motor speed in degrees
per second. Moreover, the generation mode was adjusted to continuous sample. In the
block diagram, the data retrieved from the DAQ was multiplied by the tachometer gain
of our system using the multiplication icon. This process aimed to derive the angular
speed in degrees per second. Subsequently, the multiplication operation was connected
to the DAQ, and the resulting output speed was linked to the opposite side. For each
trial, starting from 3 to 10 volts, the system was allowed to reach a constant angular
speed before stopping the program and storing the values in an Excel file. Subsequently,
trials were conducted from 4 to 6 volts and finally from 6 to 8 volts. To save our data in
an Excel sheet, we employed the "Write measurement file" icon. It's essential to specify
the file's location, such as the desktop. Following that, we selected "add to file" to store
all readings in a single file. This was then connected with the input motor voltage and
output velocity. After recording the step response data for each trial, graphs will be
generated using the LabVIEW data. Finally, the final transfer function will be calculated
by averaging the gain and time constant.
The positional transfer function can be derived from the speed equation, as position is
the integral of speed. This equation represents a first-order transfer function, where 𝑘𝑜
represents the motor's open-loop steady-state gain and τ represents the time constant.
249.21
𝐾= = 35.6
(10 − 3)
63% ∗ 249.2 = 156.996
𝑎𝑡 𝑦 = 156.996 , 𝑥 = 3.7 (𝑡𝑖𝑚𝑒 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡)
𝑤 35.61
𝑡𝑟𝑎𝑛𝑠𝑓𝑒𝑟 𝑓𝑢𝑛𝑐𝑎𝑡𝑖𝑜𝑛 ∶ =
𝑉𝑛 3.5𝑠 + 1
79.68
𝐾= = 39.84
(6 − 4)
63% ∗ 79.68 = 50.1984
𝑎𝑡 𝑦 = 50.1984 , 𝑥 = 4.1 (𝑡𝑖𝑚𝑒 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡)
𝑤 39.84
𝑡𝑟𝑎𝑛𝑠𝑓𝑒𝑟 𝑓𝑢𝑛𝑐𝑎𝑡𝑖𝑜𝑛 ∶ =
𝑉𝑛 4.1𝑠 + 1
68.29
𝐾𝑔𝑎𝑖𝑛` = = 34.143
(8 − 6)
63% ∗ 68.29 = 43.145
𝑎𝑡 𝑦 = 43.145, 𝑥 = 3.8 (𝑡𝑖𝑚𝑒 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡)
𝑤 34.143
𝑡𝑟𝑎𝑛𝑠𝑓𝑒𝑟 𝑓𝑢𝑛𝑐𝑎𝑡𝑖𝑜𝑛 ∶ =
𝑉𝑛 3.8𝑠 + 1
Average value of Ko
After analyzing the data gathered in the Excel file, the time constant and open-loop gain
were determined to finalize the transfer function. The data indicated a time constant of
under 4 seconds, illustrating the system's rapid response. Furthermore, the positive trend
in open-loop gain reflected a gradual increase in speed. It's worth noting that variations
in trial values may occur due to human reading errors or environmental factors such as
friction and vibration, which could potentially destabilize the system. Additionally,
oscillations observed in the graphs might be attributed to motor friction. Addressing this
issue and enhancing system response could involve transitioning from an open-loop to a
closed-loop system with feedback mechanisms.