DuckCar_Lab 1
docx
keyboard_arrow_up
School
Orange Coast College *
*We aren’t endorsed by this school
Course
A180
Subject
Mechanical Engineering
Date
Feb 20, 2024
Type
docx
Pages
9
Uploaded by khangtuonggia
EGME 476A: Dynamic and Control System Laboratory.
Car Model - Lab 1 Deliverable
Submitted By:
Khang Tuong
Jeremy Estorga
Chad Nguyen Due and submitted: 10-6-2023
Deliverable 1:
One plot of velocity vs time containing the data for different voltages:
Figure 1: Graph results of velocity of 3V, 4V, and 5V inputs.
Deliverable 2:
Table contains time constant and DC:
Table 1: Table results from the values of the Time constant obtained by two different methods and the value of DC gain
Voltage Input (V) Time Constant 1 (s)
Time Constant 2 (s)
DC Gain (
m
s
∗
V
)
3 Volt
0.715
0.8426
0.3260
4 Volt
0.720
0.9186
0.3538
5 Volt
0.774
0.9378
0.6781
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
Deliverable 3:
Description of the two methods:
Method 1
: Using a log-linear plot to calculate the time constant
First, we need to calculate the maximum steady-state velocity
by calculating the average of the last 50 data points. Then, calculate data points of the dimensionless velocity φ(t) by using the appropriate formula and data point. After that, we fit the first 15 values of the φ(t) and the time data points by using the “polyfit”
function in Matlab to get the slope of this plotted line (slope = −
1
τ
).
Finally, calculate the time constant by using the appropriate formulation
Method 2
: Using the initial slope to calculate the time constant:
First, we fit the first 15 values of the data by using the “polyfit” function in MATLAB to get the initial slope of the data. Then, we calculate the final steady-state velocity of the data by calculating the average of the last 50 data points. Calculate the time constant after obtaining the initial slope and the final velocity by using the appropriate formula.
MATLAB CODE: % Name: Khang Tuong, Chad Nguyen, Jeremy
% Plot Voltage 3,4,5
% Deliverable 1
% Import raw data from excel
filename1 = '3V.xlsx'
;
filename2 = '4V.xlsx'
;
filename3 = '5V.xlsx'
;
% Convert 3V data to table array
data_3V = readtable ( filename1,
"VariableNamingRule"
, "preserve"
);
% Data
from 4 voltage
t_3volt = table2array (data_3V(1:end,1)); % velocity at 3V
v_3volt = table2array(data_3V(1:end,2)); % time at 3V
% Convert 4V data to table array
data_4V = readtable ( filename2,
"VariableNamingRule"
, "preserve"
);
% Data
from 4 voltage
t_4volt = table2array (data_4V(1:end,1)); % velocity
v_4volt = table2array(data_4V(1:end,2)); % time
% Convert 5V data to table array data_5V = readtable ( filename3,
"VariableNamingRule"
, "preserve"
);
% Data
from 4 voltage
t_5volt = table2array (data_5V(1:end,1)); % velocity
v_5volt = table2array(data_5V(1:end,2)); % time
% Plot velocity vs. time for each voltage level
figure
scatter(t_3volt, v_3volt, 'r'
, 'LineWidth'
, 1); % 3 Voltage data in red
hold on
; scatter(t_4volt, v_4volt, 'g'
, 'LineWidth'
, 1); % 4 Voltage data in green
scatter(t_5volt, v_5volt, 'b'
, 'LineWidth'
, 1); % 5 Voltage data in blue
% Add labels and legend
xlabel(
'Time (s)'
);
ylabel(
'Velocity (m/s)'
);
legend(
'3V'
, '4V'
, '5V'
);
%% Deliverable 2
clc
% 3 Voltage
% Method 1: Using Log-linear plot % Calculate final steady state velocity by taking the average of the last 50 data points vss_3V = mean(v_3volt(end-50:end)); % Filter v to remove values greater than final steady state velocity to
% avoid negative value calculating phi
v_filt_3 = v_3volt(v_3volt <= vss_3V); % Calculate phi using filtered data to avoid negatives
phi_3V = log(abs(vss_3V - v_filt_3)./vss_3V); % Create the set of data includes the first 15 linear data points
int_t3V = t_3volt(1:15);
int_v3V = phi_3V(1:15); % Linear fit to the set of data to get the slope of the dimensionless
% velocity vs time plot for 3V
p = polyfit(int_t3V, int_v3V, 1);
slope = p(1);
% Calculate time constant tau = -1/slope;
% Print time constant
fprintf(
'The time constant using log-linear method for 3V: %.3f seconds\
n'
, tau);
% Plot % figure;
% plot(int_t3V, int_v3V,'o'); % xlabel('Time (s)');
% ylabel('Phi (m/s)');
% Method 2: Calculate the time constant using the initial slope for 3V datas
% Step 1: Create the set of datas for first 5 points when velocity increase
% linearly
int_t3V = t_3volt(1:5); int_v3V= v_3volt(1:5);
% Step 2: Fit set linear datas to get the initial slope initial_slope = polyfit(int_t3V, int_v3V, 1);
% Step 3: Get final steady state velocity by calculating the average datas
% from the last 50 values
final_v3V = mean(v_3volt(end-50:end)); % Calculate time constant use formula: tau = V_final / slope
tau = final_v3V / initial_slope(1);
% Print result fprintf(
'Time constant from initial slope for 3V: %f\n'
, tau);
% Find DC gain for 3V
% Define parameters
ka= 1.2; % V/V
Voltage_3 = 3; % Voltage
% Find Steady State velocity velss_3V = mean(v_3volt(end-50:end)); % Find Km km_3V = velss_3V / Voltage_3;
% Find DC gain at 3V
DC_gain_3V = ka*km_3V;
% Print result fprintf(
'DC gain at 3V : %f\n'
, DC_gain_3V);
fprintf(
'\n'
);
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
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
Related Documents
Related Questions
Please solve the following by hand and without the use of AI. Thank you!
arrow_forward
I was given a practice question for transforming equation. In the image I will have a slide the lecture note of an example of it being done but I do not understand what was done exactly. Please explain how to answer the question. Thank you
arrow_forward
K
mylabmastering.pearson.com
Chapter 12 - Lecture Notes.pptx: (MAE 272-01) (SP25) DY...
P Pearson MyLab and Mastering
Mastering Engineering
Back to my courses
Course Home
Scores
Course Home
arrow_forward
An object was dropped off the top of a building. The function
f(x) = -16x2 + 144 represents the height of the object above the
ground, in feet, x seconds after being dropped. Find and interpret the given function values and determine an appropriate domain for the function.
f(-3) =___
meaning that___
seconds after the object was
dropped, the object was___
feet above the ground. This
interpretation___in the context of the problem.
f(0.5)=___
meaning that___
seconds after the object was
dropped, the object was___
feet above the ground. This
interpretation____in the context of the problem.
f(8)=___
meaning that___
seconds after the object was
dropped, the object was___
feet above the ground. This
interpretation___in the context of the problem.
Based on the observations above, it is clear that an appropriate
domain for the function is___
arrow_forward
I need help in MATLAB. I saw my professor run the following code. I can't seem to get it to work. Can you help me get it working?
arrow_forward
How do you transform from ECEF to ECI? I have the r vector in ecef and eci and the modified julian date. How do you use the rotation matrices to get to r_eci.
r_ecef = [-1016.215157; 5431.875007; -3174.1];
r_eci = [-2010.4; -5147.4; -3174.1];
MJD = 57923.6666667; % Modified Julian Date
arrow_forward
I want to run the SGP4 propagator for the ISS (ID = 25544) I got from spacetrack.org in MATLAB. I don't know where to get the inputs of the function. Where do I get the inFile and outFile that is mentioned in the following function.
% Purpose:
% This program shows how a Matlab program can call the Astrodynamic Standard libraries to propagate
% satellites to the requested time using SGP4 method.
%
% The program reads in user's input and output files. The program generates an
% ephemeris of position and velocity for each satellite read in. In addition, the program
% also generates other sets of orbital elements such as osculating Keplerian elements,
% mean Keplerian elements, latitude/longitude/height/pos, and nodal period/apogee/perigee/pos.
% Totally, the program prints results to five different output files.
%
%
% Usage: Sgp4Prop(inFile, outFile)
% inFile : File contains TLEs and 6P-Card (which controls start, stop times and step size)
% outFile : Base name for five output files
%…
arrow_forward
Given the trasnfer function
G(s)
numerator and denominator
coefficients for Matlab code should
be:
O
s³+2s+1
2s4+2s²+1'
the
num= [1 0 2 1] and den=[2 020
1]
O num=[1 2 1] and den=[2 0 2 1 1]
O
num=[1 2 1] and den=[2 2 1]
O num=[1 0 2 1] and den=[2 2 0 1]
arrow_forward
Please follow the instructions and the requirements according to the pictures above and I kinda need the solution quickly. The language of the code is in Matlab, thank you in advance.
arrow_forward
Need help solving this problem. Please provide clear and concise steps.
arrow_forward
The arm angle, e (t), is controlled by a closed-loop system. The input (reference) to the system
is the desired angle, and the output is the actual angle. A controller uses the difference
between the desired angle and the actual angle to drive the motor, resulting in a motor torque
applied to the system.
motor
torque(t)
houlder joint
damping(B)
The customer wants to make a system to have
1) O steady-state error
2) Less than 10% overshoot
3) Less than 1-
For a step inp
**ling time
Arm length (/)
Mass(m)
g
design a controller to meet the design spec above.
1) Design a controller to meet the design spec.
2) Evaluate your controller using step response (time response)
3) Evaluate your closed-loop system using frequency response (e.g., Bandwidth,
Gain margin. Phase margin).
arrow_forward
Part III Capstone Problem
Interactive Physics - [Lab7Part3.IP]
Eile Edit World View Object Define Measure Script Window Help
Run StoplI Reset
圖|& 品凸?
Time
Length of Spring 22
6.00
dx
Center of Mass of Rectangle 2
5.000
Tension of Rope 3
Jain@
IFI
... N
ot
rot
***lad
Split
4.000
Velocity of Center of Mass of Rectangle 2
Vx Vx
V Vy
MM
Ve
- m/s
m/s
3.00
*** m/s
Vo
..* lad/s
2 00
Center of Mass of Rectangle 1
1.000
tol
rot
*.* rad
EVelocity of Center of Mass of Rectangle 1
Vx Vx
VVy
M
0.000
-m/s
w 30
m/s
w..
MI
Ve
母100
*** m/s
Vo
... rad/s
+
EAcceleration of Center of Mass of Rectangle 1
Ax Ax
A Ay
AUJAI
Ae
--- m/s^2
... m/s^2
-- m/s^2
.-- rad/s^2
3.00
Aø
Mass M1 = 2.25 kg is at the end of a rope that is 2.00 m in length. The initial angle with
respect to the vertical is 60.0° and M1 is initially at rest. Mass M1 is released and strikes M2
= 4.50 kg exactly horizontally. The collision is elastic. After collision, mass M2 is moving on
a frictionless surface, but runs into a rough patch 2.00…
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
![Text book image](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118170519/9781118170519_smallCoverImage.gif)
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337093347/9781337093347_smallCoverImage.gif)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118807330/9781118807330_smallCoverImage.gif)
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Related Questions
- Please solve the following by hand and without the use of AI. Thank you!arrow_forwardI was given a practice question for transforming equation. In the image I will have a slide the lecture note of an example of it being done but I do not understand what was done exactly. Please explain how to answer the question. Thank youarrow_forwardK mylabmastering.pearson.com Chapter 12 - Lecture Notes.pptx: (MAE 272-01) (SP25) DY... P Pearson MyLab and Mastering Mastering Engineering Back to my courses Course Home Scores Course Homearrow_forwardAn object was dropped off the top of a building. The function f(x) = -16x2 + 144 represents the height of the object above the ground, in feet, x seconds after being dropped. Find and interpret the given function values and determine an appropriate domain for the function. f(-3) =___ meaning that___ seconds after the object was dropped, the object was___ feet above the ground. This interpretation___in the context of the problem. f(0.5)=___ meaning that___ seconds after the object was dropped, the object was___ feet above the ground. This interpretation____in the context of the problem. f(8)=___ meaning that___ seconds after the object was dropped, the object was___ feet above the ground. This interpretation___in the context of the problem. Based on the observations above, it is clear that an appropriate domain for the function is___arrow_forwardI need help in MATLAB. I saw my professor run the following code. I can't seem to get it to work. Can you help me get it working?arrow_forwardHow do you transform from ECEF to ECI? I have the r vector in ecef and eci and the modified julian date. How do you use the rotation matrices to get to r_eci. r_ecef = [-1016.215157; 5431.875007; -3174.1]; r_eci = [-2010.4; -5147.4; -3174.1]; MJD = 57923.6666667; % Modified Julian Datearrow_forwardI want to run the SGP4 propagator for the ISS (ID = 25544) I got from spacetrack.org in MATLAB. I don't know where to get the inputs of the function. Where do I get the inFile and outFile that is mentioned in the following function. % Purpose: % This program shows how a Matlab program can call the Astrodynamic Standard libraries to propagate % satellites to the requested time using SGP4 method. % % The program reads in user's input and output files. The program generates an % ephemeris of position and velocity for each satellite read in. In addition, the program % also generates other sets of orbital elements such as osculating Keplerian elements, % mean Keplerian elements, latitude/longitude/height/pos, and nodal period/apogee/perigee/pos. % Totally, the program prints results to five different output files. % % % Usage: Sgp4Prop(inFile, outFile) % inFile : File contains TLEs and 6P-Card (which controls start, stop times and step size) % outFile : Base name for five output files %…arrow_forwardGiven the trasnfer function G(s) numerator and denominator coefficients for Matlab code should be: O s³+2s+1 2s4+2s²+1' the num= [1 0 2 1] and den=[2 020 1] O num=[1 2 1] and den=[2 0 2 1 1] O num=[1 2 1] and den=[2 2 1] O num=[1 0 2 1] and den=[2 2 0 1]arrow_forwardPlease follow the instructions and the requirements according to the pictures above and I kinda need the solution quickly. The language of the code is in Matlab, thank you in advance.arrow_forwardNeed help solving this problem. Please provide clear and concise steps.arrow_forwardThe arm angle, e (t), is controlled by a closed-loop system. The input (reference) to the system is the desired angle, and the output is the actual angle. A controller uses the difference between the desired angle and the actual angle to drive the motor, resulting in a motor torque applied to the system. motor torque(t) houlder joint damping(B) The customer wants to make a system to have 1) O steady-state error 2) Less than 10% overshoot 3) Less than 1- For a step inp **ling time Arm length (/) Mass(m) g design a controller to meet the design spec above. 1) Design a controller to meet the design spec. 2) Evaluate your controller using step response (time response) 3) Evaluate your closed-loop system using frequency response (e.g., Bandwidth, Gain margin. Phase margin).arrow_forwardPart III Capstone Problem Interactive Physics - [Lab7Part3.IP] Eile Edit World View Object Define Measure Script Window Help Run StoplI Reset 圖|& 品凸? Time Length of Spring 22 6.00 dx Center of Mass of Rectangle 2 5.000 Tension of Rope 3 Jain@ IFI ... N ot rot ***lad Split 4.000 Velocity of Center of Mass of Rectangle 2 Vx Vx V Vy MM Ve - m/s m/s 3.00 *** m/s Vo ..* lad/s 2 00 Center of Mass of Rectangle 1 1.000 tol rot *.* rad EVelocity of Center of Mass of Rectangle 1 Vx Vx VVy M 0.000 -m/s w 30 m/s w.. MI Ve 母100 *** m/s Vo ... rad/s + EAcceleration of Center of Mass of Rectangle 1 Ax Ax A Ay AUJAI Ae --- m/s^2 ... m/s^2 -- m/s^2 .-- rad/s^2 3.00 Aø Mass M1 = 2.25 kg is at the end of a rope that is 2.00 m in length. The initial angle with respect to the vertical is 60.0° and M1 is initially at rest. Mass M1 is released and strikes M2 = 4.50 kg exactly horizontally. The collision is elastic. After collision, mass M2 is moving on a frictionless surface, but runs into a rough patch 2.00…arrow_forwardarrow_back_iosarrow_forward_ios
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY
![Text book image](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118170519/9781118170519_smallCoverImage.gif)
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337093347/9781337093347_smallCoverImage.gif)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118807330/9781118807330_smallCoverImage.gif)
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY