ME491 Aberystwyth University Passive Filter and Linear Regression Lab Please finish it in 2 or 3 days
Remember before u handle this work, this work is so important to me, so i will revise it many times before i turn it in and I will rate u depend on your work quality such as providing correct and full response and meet all requirements in the attached instructions. Please avoid the Lack of depth in your response and plagiarism bcz Ill check it with the ((Turn it in website.))
I need the following:
See the main lab manual and the attached PDF file
Then write A professional lab by meeting all the requirements for all parts
Provide me with all the MATLAB files
——
Requirement for Lab report
1. Derivation in writing, or typed up in LATEX or MS Word
2. MATLAB/Octave code or script with proper comments
3. Graph resulting from the MATLAB/Octave code or script
4. Brevity will be rewarded September 15, 2019
Mechatronics
Lab 1: Passive Filters, Linear Regression and Fourier Series
Requirement for Lab report
1.Derivation in writing, or typed up in L ATEXor MS Word
2.MATLAB/Octave code or script with proper comments
3.Graph resulting from the MATLAB/Octave code or script
4.Brevity will be rewarded
4. The lab is due ONLINE on Friday (Sept 27th)
(Q1). Passive First Order Filter: The response of an AC signal to capacitance and inductance is frequency dependent with 90o phase gap. However, when combined with a
resistor, both the magnitude and phase responses are dependent on frequency. For
the below given circuit
VL
+
+
L
Vs
?
?
+
R
VR
?
(a) Derive the response of voltage (magnitude and phase) across inductor ( VL)
and resistor (VR) given the AC Voltage signal Vs. Write the response in non?L
?
instead of
dimensional terms i.e.
. What is the response for ? ?c
?c
R
and ? ?c?
(b) Write a MATLAB/Octave function that observes the frequency output for this
circuit. The inputs of the function are the values of capacitance L in Henry,
resistance R in Ohms and range of frequencies (vector of frequencies from f1
to f2 f?
range = f1 : (step) : f2).
Hint:
Input format – plotRLResponse(freqRange, R, L) where
freqRange = range of frequency. Units – Hertz(Hz) : 1 × N row vector
R = resistance value expressed in Ohms (?): 1 × 1 scalar
L = inductance value expressed in Henry(H) : 1 × 1 scalar
ME 491/ME 591
1
Fall 2019
September 15, 2019
Mechatronics
(Q2). Butterworth Filter: First order filters do not generate flat frequency response. To
obtain flatter responses, higher order filters are used. For the below given filter
L1
Vs
L3
C2
R4
(a) Show that for AC voltage signal of
Vout
Vs = exp (i?t) and known values of
L1, C2, L3, R4.
Vout (i?)
Vs (i?)
=
R4
(i?)3(L1C2L3) + (i?)2(L1C2R4) + (i?)(L1 + L3) + R4
(2.1)
The denominator is third order polynomial in ?, hence, the filter is 3rd order.
What is the response of the filter at ? ? 0 and ? ? ??
(b) For L1 = 3H, C2 = 2/3F, L3 = 1H, R4 = 2? show that the gain varies with
angular frequency ? in the following manner
1
Vout
Vs = ?1 + ?6
(2.2)
Plot this response in MATLAB/Octave and compare it with equivalent first
1
Vout
order normalized response (Q1 for ?c = 1) of
?
=
. For nth order
Vs
1 + ?2
1
Vout
filter the response is
?
Vs = 1 + ?2n . Compare previous responses with
that of higher order filters – n = 4, 5.
ME 491/ME 591
2
Fall 2019
September 15, 2019
Mechatronics
(Q3). Wheatstone Bridge: Bridge circuits are a common way to measure component values by comparing them to known values. Often an unknown element is put in
one arm and then the bridge is nulled by adjusting the other arm or varying the
frequency. Wheatstone bridge comprises of four resistors and is used to measure
unknown electrical resistance. A wheatstone bridge has ability to provide extremely
accurate measurements unlike a voltage divider.
I1
Vs
+
?
A
I3
Q
Ix
VG
P
I2
Rx
B
(a) The wheatstone bridge is called to be balanced when the voltage difference
between points P and Q is zero, i.e. VG = 0. Find the relationship between
the resistances R1, R2, R3, Rx for the case when the bridge is balanced.
(b) For the case when the bridge is not balanced, find the voltage drop Vtt in terms
of resistors and Vs
ME 491/ME 591
3
Fall 2019
September 15, 2019
Mechatronics
(Q4). Linear Least Squares: Linear regression can be viewed as minimization of least
squares error. For a linear relationship between dependent variable y and independent variable x, m, c denote the linear unknowns.
y = mx + c
(4.1)
For N data points (xi, yi) ?i ? [1, N ] The error ei between the measured quantity
and the model predicted value is
ei = (mxi + c ? yi)
(4.2)
(a) Rewrite the error as
2
3
2
e1
6
6 6 e2 7
e = Az ? b, where e =
7 A=6
6
7
6
4 . 5
4
eN
x1
x2
.
xN
3
2
17
1
6
7b=6
7
6
4
. 5
1
3
y1
y2 7
7z=
7
. 5
yN
m
b
(4.3)
1
Prove that the solution to min ||e||2 is
z 2
z? = Ab
where the pseudoinverse A = (AT A)?1AT . This is commonly referred to as
the linear least squares method.
(b) For the below given data, the relationship between y, x seems linear
y = a1 x + a2
(4.4)
Using linear least squares method, write MATLAB/Octave code to find a1, a2
y
4
x
y
0
0.76934
0.25 0.63397
0.5 0.84662
0.75 1.3108
1
1.8832
1.25 1.4951
1.5
1.9678
1.75 2.0061
2
2.5293
x
2.25
2.5
2.75
3
3.25
3.5
3.75
4
4.25
y
2.1652
2.6331
2.9506
3.2752
3.5736
3.3965
3.1896
3.5644
3.6721
3
2
1
x
0
0
ME 491/ME 591
4
1
2
3
4
Fall 2019
September 15, 2019
Mechatronics
(c) For the below given data, the relationship between y, x is modeled as
y = a1x + a2ex + a3
Find a1, a2, a3 by linear least squares method. Write the code in MALTAB/Octave.
y
16
x
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2
y
0.65388
0.708971
1.72722
0.979738
0.747464
2.29931
2.38776
1.99884
1.79418
x
2.25
2.5
2.75
3
3.25
3.5
3.75
4
4.25
y
2.87462
3.71765
4.82369
5.6908
7.4943
9.32481
10.8799
14.0756
18.0808
12
8
4
x
0
1
ME 491/ME 591
5
2
3
4
5
Fall 2019
September 15, 2019
Mechatronics
(Q5). Fourier Series: Fourier series allows representation of complicated signals as superposition (linear combination) of sine and cosine waves utilizing the orthogonality
between the trigonometric functions. Any signal can be represented as a sum of N
sinusoidal terms
XN
S (t) = a0 +
N
2
2?n t
T
a cos
n
n=1
+ b sin
n
2?n t
T
(5.1)
i.e., for n, m ? I
Z
2?
T /2
cos
T
?T /2
Z
T /2
2?
sin
T
?T /2
Z
2?
T /2
cos
?T /2
Z
T
T /2
nt
cos
nt
sin
nt
sin
2?
cos
T
?T /2
2?
T
2?
T
2?
T
Z
nt dt =
(a) Show that
an =
T
2
bn =
T
Z
T /2
sin
SN (t) cos
Z T /2
SN (t) sin
2?
T
?m, n
nt dt = 0
2?n
T
2?n
T
?T /2
=n
0 ,m = n
T
,m = n
2
mt dt = 0,
T /2
?T /2
T
,m
2
mt dt =
?T /2
2
0 ,m = n
mt dt =
t dt
(5.2)
t dt
(5.3)
(b) For a periodic square wave function
+1, t ? [?T /2, 0]
?1, t ? (0, +T /2]
Ssquare (t) =
(5.4)
show that the Fourier Series representation is
SN =
XN
4
n=1
(2n ? 1)?
sin
2?
T
(2n ? 1)t
(5.5)
Write a MATLAB function squareFourierWave(N) that plots the sum of the
N terms of the obtained Fourier Series. Observe the plots as N increases from
2, 4, 8, · · · , 1024 and compare with the original piecewise continuous
function.
ME 491/ME 591
6
Fall 2019
September 15, 2019
Mechatronics
(c) Similar to previous part, find the Fourier Series coefficients for the following
periodic Sawtooth Wave function
Ssawtooth(t) =
2t
T
(5.6)
Write a MATLAB function sawtoothFourierWave(N) that plots the sum the
first N terms of the series.
ME 491/ME 591
7
Fall 2019
September 15, 2019
Mechatronics
Lab 1: Passive Filters, Linear Regression and Fourier Series
Requirement for Lab report
1.
2.
3.
4.
4.
Derivation in writing, or typed up in LATEX or MS Word
MATLAB/Octave code or script with proper comments
Graph resulting from the MATLAB/Octave code or script
Brevity will be rewarded
The lab is due ONLINE on Friday (Sept 27th)
(Q1). Passive First Order Filter: The response of an AC signal to capacitance and inductance is frequency dependent with 90o phase gap. However, when combined with a
resistor, both the magnitude and phase responses are dependent on frequency. For
the below given circuit
VL
+
L
+
Vs
?
?
+
R
VR
?
(a) Derive the response of voltage (magnitude and phase) across inductor (VL )
and resistor (VR ) giventhe AC Voltage signal Vs . Write the response in non?
?L
dimensional terms i.e.
instead of
. What is the response for ? ?c
?c
R
and ? ?c ?
(b) Write a MATLAB/Octave function that observes the frequency output for this
circuit. The inputs of the function are the values of capacitance L in Henry,
resistance R in Ohms and range of frequencies (vector of frequencies from f1
to f2 ? frange = f1 : (step) : f2 ).
Hint:
Input format – plotRLResponse(freqRange, R, L) where
freqRange = range of frequency. Units – Hertz(Hz) : 1 × N row vector
R = resistance value expressed in Ohms (?): 1 × 1 scalar
L = inductance value expressed in Henry(H) : 1 × 1 scalar
ME 491/ME 591
1
Fall 2019
September 15, 2019
Mechatronics
(Q2). Butterworth Filter: First order filters do not generate flat frequency response. To
obtain flatter responses, higher order filters are used. For the below given filter
L1
Vs
L3
C2
R4
Vout
(a) Show that for AC voltage signal of Vs = exp (i?t) and known values of
L1 , C2 , L3 , R4 .
R4
Vout (i?)
=
3
2
Vs (i?)
(i?) (L1 C2 L3 ) + (i?) (L1 C2 R4 ) + (i?)(L1 + L3 ) + R4
(2.1)
The denominator is third order polynomial in ?, hence, the filter is 3rd order.
What is the response of the filter at ? ? 0 and ? ? ??
(b) For L1 = 3H, C2 = 2/3F, L3 = 1H, R4 = 2? show that the gain varies with
angular frequency ? in the following manner
1
Vout
=?
Vs
1 + ?6
(2.2)
Plot this response in MATLAB/Octave and compare it with equivalent first
1
Vout
order normalized response (Q1 for ?c = 1) of
=?
. For nth order
Vs
1 + ?2
1
Vout
= ?
. Compare previous responses with
filter the response is
Vs
1 + ? 2n
that of higher order filters – n = 4, 5.
ME 491/ME 591
2
Fall 2019
September 15, 2019
Mechatronics
(Q3). Wheatstone Bridge: Bridge circuits are a common way to measure component values by comparing them to known values. Often an unknown element is put in
one arm and then the bridge is nulled by adjusting the other arm or varying the
frequency. Wheatstone bridge comprises of four resistors and is used to measure
unknown electrical resistance. A wheatstone bridge has ability to provide extremely
accurate measurements unlike a voltage divider.
I1
A
R
1
R3
Vs
+
?
I3
Q
Ix
VG
P
R2
I2
Rx
B
(a) The wheatstone bridge is called to be balanced when the voltage difference
between points P and Q is zero, i.e. VG = 0. Find the relationship between
the resistances R1 , R2 , R3 , Rx for the case when the bridge is balanced.
(b) For the case when the bridge is not balanced, find the voltage drop VG in terms
of resistors and Vs
ME 491/ME 591
3
Fall 2019
September 15, 2019
Mechatronics
(Q4). Linear Least Squares: Linear regression can be viewed as minimization of least
squares error. For a linear relationship between dependent variable y and independent variable x, m, c denote the linear unknowns.
y = mx + c
(4.1)
For N data points (xi , yi )?i ? [1, N ] The error ei between the measured quantity
and the model predicted value is
ei = (mxi + c ? yi )
(4.2)
(a) Rewrite the error as
?
?
?
e = Az ? b, where e = ?
?
?
e1
e2
..
.
?
x1
x2
..
.
?
?
?
?
?A = ?
?
?
eN
1
1
..
.
?
?
?
?
?
?
?b = ?
?
?
xN 1
y1
y2
..
.
?
?
m
?
?z =
b
?
yN
(4.3)
1
Prove that the solution to min ||e||2 is
z 2
z ? = A b
where the pseudoinverse A = (AT A)?1 AT . This is commonly referred to as
the linear least squares method.
(b) For the below given data, the relationship between y, x seems linear
y = a1 x + a2
(4.4)
Using linear least squares method, write MATLAB/Octave code to find a1 , a2
y
4
x
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2
y
0.76934
0.63397
0.84662
1.3108
1.8832
1.4951
1.9678
2.0061
2.5293
x
2.25
2.5
2.75
3
3.25
3.5
3.75
4
4.25
y
2.1652
2.6331
2.9506
3.2752
3.5736
3.3965
3.1896
3.5644
3.6721
3
2
1
0
ME 491/ME 591
4
0
1
2
3
4
Fall 2019
x
September 15, 2019
Mechatronics
(c) For the below given data, the relationship between y, x is modeled as
y = a1 x + a2 e x + a3
Find a1 , a2 , a3 by linear least squares method. Write the code in MALTAB/Octave.
y
16
x
0
0.25
0.5
0.75
1
1.25
1.5
1.75
2
y
0.65388
0.708971
1.72722
0.979738
0.747464
2.29931
2.38776
1.99884
1.79418
x
2.25
2.5
2.75
3
3.25
3.5
3.75
4
4.25
y
2.87462
3.71765
4.82369
5.6908
7.4943
9.32481
10.8799
14.0756
18.0808
12
8
4
0
ME 491/ME 591
5
1
2
3
4
5
Fall 2019
x
September 15, 2019
Mechatronics
(Q5). Fourier Series: Fourier series allows representation of complicated signals as superposition (linear combination) of sine and cosine waves utilizing the orthogonality
between the trigonometric functions. Any signal can be represented as a sum of N
sinusoidal terms
N
2?n
2?n
a0 X
+
an cos
t + bn sin
t
(5.1)
SN (t) =
2
T
T
n=1
i.e., for n, m ? I
Z
T /2
cos
?T /2
T /2
2?
2?
0 ,m 6= n
nt cos
mt dt =
T
,m = n
T
T
2
2?
2?
0 ,m 6= n
nt sin
mt dt =
sin
T
,m = n
T
T
?T /2
2
Z T /2
2?
2?
cos
nt sin
mt dt = 0,
?m, n
T
T
?T /2
Z T /2
Z T /2
2?
2?
cos
nt dt =
sin
nt dt = 0
T
T
?T /2
?T /2
Z
(a) Show that
T /2
2?n
SN (t) cos
t dt
T
?T /2
Z
2 T /2
2?n
bn =
SN (t) sin
t dt
T ?T /2
T
2
an =
T
Z
(b) For a periodic square wave function
+1, t ? [?T /2, 0]
Ssquare (t) =
?1, t ? (0, +T /2]
(5.2)
(5.3)
(5.4)
show that the Fourier Series representation is
SN =
N
X
n=1
4
(2n ? 1)?
sin
2?
(2n ? 1)t
T
(5.5)
Write a MATLAB function squareFourierWave(N) that plots the sum of the
N terms of the obtained Fourier Series. Observe the plots as N increases from
2, 4, 8, · · · , 1024 and compare with the original piecewise continuous function.
ME 491/ME 591
6
Fall 2019
September 15, 2019
Mechatronics
(c) Similar to previous part, find the Fourier Series coefficients for the following
periodic Sawtooth Wave function
Ssawtooth (t) =
2t
T
(5.6)
Write a MATLAB function sawtoothFourierWave(N) that plots the sum the
first N terms of the series.
ME 491/ME 591
7
Fall 2019
Purchase answer to see full
attachment
Why Work with Us
Top Quality and Well-Researched Papers
We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Free Unlimited Revisions
If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.
Prompt Delivery and 100% Money-Back-Guarantee
All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.
Original & Confidential
We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.
24/7 Customer Support
Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.
Essays
No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.