Fourier Series Approximation Matlab HW1:
You are given a finite step function
x(t)=-1, 0<t<4
1, 4<t<8
.
Hand calculate the FS coefficients of x(t) by assuming
half- range expansion, for each case below and modify the
code.
Approximate x(t) by cosine series only (This is
even-half range expansion). Modify the below code and plot the
approximation showing its steps changing by included number of FS
terms in the approximation.
Approximate x(t) by sine series only (This is odd-half
range expansion).. Modify the below code and plot the approximation
showing its steps changing by included number of FS terms in the
approximation.
You are given a code below which belongs to a
different function, if you run this code it works and you will see
it belongs to ft=1 0<t<2 0 2<t<4 . In this code f(t) is
only approximated by even coefficients (cosine series).
Upload to BB learn using the Matlab HW1 link:
A multi page pdf file that shows
The hand calculations of FS coefficients
The original function plotted
The approximated functions plotted for b and
c.
A Comment on how FS expansion approximates
discontinuities in the function.
MATLAB CODE
_____________________________________________________________________________________________________________________________________________________________________
clear all
close all
% Example MATLAB M-file that plots a Fourier series
% Set up some input values
P = 4; %period = 2P
num_terms = 100; %approximate infinite series with finite number of
terms
% Miscellaneous setup stuff
format compact; % Gets rid of extra lines in output.
Optional.
% Initialize x-axis values from -1.25L to 1.25L. Middle number is
step size. Make
% middle number smaller for smoother plots
t = -4:0.001:4;
x=zeros(length(t),1); % reseting original half range
expanded function array
x(0<=t & t<2)=1; %
forming the original half range expanded function array for the
purpose of plotting only
x(2<t & t <4)=0;
x(t<0 & -2<t)=1;
x(t<-2 & t>-4)=0;
figure %plotting original half range
expanded function
plot(t,x)
axis([-4.5 4.5 -0.5 1.5])
%Starting to approximate f(t)
% Initialize y-axis values. y = f(t)
f = zeros(size(x'));
% Add a0/2 to series
a0 = 1;
f = f + a0/2;
% Loop num_terms times through Fourier series, accumulating in
f.
figure
for n = 1:num_terms
% Formula for an.
an = (2/(n*pi))*sin(n*pi/2);
bn=0;
% Add cosine and sine into f
f = f + an*cos(n*pi*t/P) +
bn*sin(n*pi*t/P);
% Plot intermediate f. You can comment
these three lines out for faster
% execution speed. The function pause(n)
will pause for about n
% seconds. You can raise or lower for
faster plots.
plot(t,f);
set(gca,'FontSize',16);
title(['Number of terms = ',num2str(n)]);
grid on;
if n < 5
pause(0.15);
else
pause(0.1);
end
xlabel('even approx');
end;
In: Mechanical Engineering
A single thread power screw is 36 mm in diameter with a pitch of 6 mm. A vertical load on the screw imposes a force of 9 kN. The coefficients of friction are 0.09 for the collar and 0.16 for the screw. The effective diameter of the collar is 52 mm. Find the overall efficiency and torque required to raise and lower this load.
In: Mechanical Engineering
Hi, I'm currently writing a Matlab program to simulate the Apollo 11 trajectory. Now I want to plot a 3D animated orbit which is a 60 by 58 nautical miles orbit. Can you provide a code or some idea of how to plot an orbit like this in 3D?
In: Mechanical Engineering
Provide two good reasons machine age thinking doesn’t work well for systems of any appreciable complexity
In: Mechanical Engineering
Why are good systems operational requirements and a maintenance & support concept important?
In: Mechanical Engineering
Determine the phase description of each the following substances.
You may choose 1) "Subcooled or compressed liquid", 2) "Saturated
fluid or saturated mixture", 3) Superheated vapor or superheated
gas. a) Water 101kPa & 25°C b)
Water 101kPa & 100°C c) Water 20kPa &
70°C d) Water 500kPa &
1300°C e) Water 10kPa & 340°C f) Water
10kPa & 30°C g) Water 1600kPa & 180°C h)
Water 17.5MPa & 330°C i) Ammonia 100kPa
& -25°C j) Ammonia 350kPa
& 0°C k) R134a 3000kPa & -20°C
In: Mechanical Engineering
the sources of energy loss contained in fluid power system can include
| A) |
fluid viscosity |
|
| B) |
the configuration of valves and fittings |
|
| C) |
piping materials |
|
| D) |
all of the above |
In: Mechanical Engineering
Use Laplace transformations to solve the following differential equations:
dy(t)/dt + a y(t) = b; I.C.s y(0) = c
d2y(t)/dt2 + 6 dy(t)/dt + 9 y(t) = 0; I.C.s y(0) = 2, dy(0)/dt = 1
d2y(t)/dt2 + 4 dy(t)/dt + 8 y(t) = 0; I.C.s y(0) = 2, dy(0)/dt = 1
d2y(t)/dt2 + 2 dy(t)/dt + y(t) = 3e-2t; I.C.s y(0) = 1, dy(0)/dt = 1
In: Mechanical Engineering
Calculate the heat of combustion and the stoichiometric fuel to air ratio (mass and molar) for 1) Methane and 2) Octane. Comment on whether the assumption of f<<1 is valid for these conditions.
In: Mechanical Engineering
Refrigerant 134a at p1 = 30
lbf/in2, T1 =
40oF enters a compressor operating at steady state with
a mass flow rate of 400 lb/h and exits as saturated vapor at
p2 = 160 lbf/in2. Heat
transfer occurs from the compressor to its surroundings, which are
at T0 = 40oF. Changes in kinetic and
potential energy can be ignored. The power input to the compressor
is 4 hp.
Determine the heat transfer rate for the compressor, in Btu/hr, and
the entropy production rate for the compressor, in
Btu/hr·oR.
In: Mechanical Engineering
A P - 51 Musta ng (WWII plane) is tested in the large wind tunnel at NASA Ames. The plane has a pitot - static probe system mounted. We want to test the P - 51 at a flight speed of 160 mph and altitude of 40,000 ft. T he wind tunnel’s test section has a cross - sectional area of 5000 ft 2 and a reservoir area of 100,000 ft 2 .
What pressure is needed in the reservoir to drive this flow?
a. Does Bernoulli’s equation apply here? i. Hint: What flow condition is required for Bernoulli’s equation?
b. If 1 60 mph is the true airspeed, what is the static and stagnation pressure? i. Hint: You are given the flight altitude as 40,000 ft.
c. W h at reservoir pressure is needed to achieve this test section velocity and pressure?
In: Mechanical Engineering
The metal titanium, which is useful in making alloys to resist high temperatures and extremely corrosive environments, adopts two crystal structures – close-packed hexagonal (α-phase) at room temperature and body-centred cubic (β-phase) above 882 °C. Under favourable circumstances, the α phase can dissolve up to 32 atomic % (nearly 15 wt %) of oxygen whereas the β phase can dissolve very little oxygen at the transition temperature (882 °C) and a little more at higher temperatures. Oxygen atoms have a radius of approximately 0.7 x 10-10 m.
a) Given that the “distance of closest approach” between two titanium atoms is approximately 2.92 x 10-10 m, calculate the radii of the octahedral and tetrahedral interstices in both the hexagonal and cubic forms of titanium. .
Answer..................................................................................................................... ..............................................................................................................................
.............................................................................................................................. ..............................................................................................................................
.............................................................................................................................. .............................................................................................................................. .............................................................................................................................. .............................................................................................................................. ..............................................................................................................................
b) Use your answers to part a) to explain why the solubility of oxygen is different in the two structures of titanium? .
Answer:................................................................................................................................................ .......................................................................................................................................................................... .......................................................................................................................................................................... .......................................................................................................................................................................... ..................................................................................................................................................................
c) Can you explain how a metal that is capable of dissolving so much oxygen below 882 °C can simultaneously have excellent oxidation resistance? .
Answer:................................................................................................................................................. .......................................................................................................................................................................... .......................................................................................................................................................................... ..........................................................................................................................................................................
In: Mechanical Engineering
Autodesk Inventor 2019 Essentials Plus: Creating and Editing Sketched Features
If the answer is FALSE write a complete sentence explanation of why the answer is FALSE.
1.What is a base feature?
2.When creating a revolve feature, which objects can be used as an axis of revolution?
3.Explain how to create a linear diameter (diametric) dimension on a sketch.
4.Name two ways to edit an existing feature.
5.True__ False__ Once a sketch becomes a base feature, you cannot delete or add constraints, dimensions, or objects to the sketch.
6.True__ False__ By default geometry that is projected from one face to a sketch will update automatically based on changes to the original projected geometry.
7.Explain what the Asymmetric option does for the extrude and revolve commands.
8.Where do you set the physical material property of a part?
9.True__ False__ After setting a part’s material properties, the Appearance setting in the Quick Access Toolbar must be set to Color Matching for the appearance to match the material of the part.
10.True__ False__ By default, when a feature is deleted, the feature’s sketch will be maintained.
In: Mechanical Engineering
Would you like to explain more to me relate with Course Mechanical Behaviour in 50-70 word
a. Stress
b. Shear stress
c. Strain
d. Elongation
e. Safety Factor
f. Deflection
g. Deformation
h. Modulus Young
In: Mechanical Engineering
Determine the chimney height required to preserve design flow in a natural recirculation boiling water reactor channel with the following characteristics:
System pressure: 7.136 MPa
Reactor height 1.83 m
Feedwater temperature 260 Celsius
Combined pressure in losses in the channel, chimney, and downcomer: 1344.5 Pa
Average channel density in the core: 642.9 kg / m^3
Two-phase friction losses in the chimney 137.9 Pa
Friction losses in the downcomer: 68.9 Pa
Friction drop in channel: 606.7 Pa
Average exit void fraction: 44%
Feedwater added near the top of chimney
In: Mechanical Engineering