Professional Documents
Culture Documents
1. A displacement sensor has an input range of 0.0 to 3.0 cm and a supply voltage Vs = 0.5
V. Results from a calibration experiment are given in the table below
1
Displacement x (cm) 0.0 0.5 1.0 1.5 2.0 2.5 3.0
Output voltage (mV) 0.0 16.5 32.0 44.0 51.5 55.5 58.0
Ideal straight line 0 9.67 19.33 29.0 38.67 48.33 58.0
Non-linearity 0.0 6.83 12.67 15.0 12.83 7.17 0.0
b = 15.0, which in terms of the full-scale
We see that the maximum non-linearity is N
deflection (O = 58.0) is
15
× 100 ≈ 25.9%
58 − 0.0
(b) The performance of the system can easily be improved by instead fitting the optimal
straight line, using the principle of least-squares. Give the necessary equations for
finding the slope K and the intersection a of the straight line using the data in the
table above.
Note: You do not need to solve for the actual numerical values of K and a. (2p)
Solution: Fitting the straight line by the method of least squares means solving the
following over-determined system of equations
O = Ia,
where
0 1 0
16.5
1 0.5
32 1 1
,a = a .
O = 44 ,I = 1 1.5
K
51.5
1 2
55.5 1 2.5
58 1 3
This gives the least-squares estimate of a and K as
ab T
−1 T 7.696
a= b = I I
b I O≈
K 19.393
(c) Explain why the method in (b) gives a better average result.
Solution: Since the principle of least-squares minimizes the sum of squares of the
errors over the entire range, the result is better than for the straight line fit in (a),
where only two of the calibration points are used. (1p)
2
where θ is the true temperature and θM is the measured temperature (in Kelvin). The
model equations and the corresponding uncertainties are given in the table below.
(a) Calculate the mean output θM and the mean error E = θ − θM for an input tempera-
ture of 320 K. (2p)
Solution: Mean output (at 320 K):
!
3 × 103
β −4
Rθ = K 1 exp = 5 × 10 exp ≈ 5.895 kΩ
θ 320
! !
1 1
V O = VS − a1 = −3 − 0.77 V ≈ 0.3867 V
1 + 3.3
R
1 + 3.3
5.895
θ
(b) Calculate the standard deviation of the output error E for an input of 320 K. (3p)
Solution: The standard deviation of the error is the same as the standard deviation
of the output, since the standard deviation only depends on the uncertainty of the
elements, not the mean values of them. Doing the error propagation calculations we
get that
2 2 2
3 × 103
∂Rθ β 2
σ2Rθ = σ2K1 = exp 2
σK1 = exp 0.5 × 10−4 ≈ 0.3475
∂K1 θ 320
2 2 2
∂VO ∂VO ∂VO
σV2O = σ2Rθ + σV2s + σ2a1 =
∂ ∂Vs ∂a1
!2 !2
330Vs 1
= 2
σ2Rθ + − a1 σV2s + (−Vs )2 σ2a1 ≈ 0.00257
(10Rθ + 33) 1 + 3.3
Rθ
3
∂θM 2 2 ∂θM 2 2
σ2θM= σa2 + σVO ≈ 15.4265
∂a2 ∂VO
This gives the standard deviation of the error as
q
σθM = σ2θM ≈ 3.93 K
Calculate the system output and the corresponding dynamic error when the force input
signal is (5p)
1 1
F (t) = 50 sin 10t + sin 30t + sin 50t .
3 5
Solution: The overall system transfer function is (the product of the three transfer func-
tions in the figure)
−3
10 τ 50
G (s) = 20 = Inserting the numbers =
1 + τs 1 2
ω2n
s + ω2ξn s + 1
−3 !
10 · 0.1 50
= 20 1 2
=
1 + 0.1s
502
s + 2·0.2
50 s + 1
0.1
=
(1.0 + 0.1s) (.0004s2 + .008s + 1.0)
Now, replacing s with jω where ω is the angular frequency of the input, we can compute
the output by the principle, sinusoid in gives sinusoid out, i.e. the output signal is given
by
|G ( jω)| sin (ωt + ]G ( jω)) ,
where |G ( jω)| is the absolute value of the transfer function and ]G ( jω) is the phase of
the transfer function. Doing this for each of the sinusoids in the input signal we obtain
0.1
|G ( jω)| = =
(1.0 + 0.1 jω) .0004 ( jω)2 + .008 jω + 1.0
0.1
=
2
(1.0 + 0.1 jω) .0004 ( jω) + .008 jω + 1.0
4
n o
Re (1.0 + 0.1 jω) .0004 ( jω)2 + .008 jω + 1.0
]G ( jω) = tan−1 0.1 − tan−1 n o
Im (1.0 + 0.1 jω) .0004 ( jω)2 + .008 jω + 1.0
n o
2
Re (1.0 + 0.1 jω) .0004 ( jω) + .008 jω + 1.0
= − tan−1 n o
2
Im (1.0 + 0.1 jω) .0004 ( jω) + .008 jω + 1.0
4. An ultrasonic transit-time flowmeter is used to measure the average flow velocity v (m/s)
through a pipe.
Transducer B
Transducer A
A short ultrasonic pulse is first transmitted from Transducer B to Transducer A and then
from Transducer A to Transducer B. The cross-correlation function R(β) between the two
pulses is shown in the figure below.
2
R(β)
−2
−4
−6
−30 −20 −10 0 10 20 30 40
lag, β [samples]
5
where θ is the angle between the transducers and the center axis of the flow, c is the speed
of sound through the fluid, and D is the pipe diameter.
Assuming that θ = π/6 rad, c = 1480 m/s, D = 10 cm, and the sampling frequency of the
A/D converter used to measure the pulses is fs = 10 MHz:
∆Tsamp 6
∆T = = 7 seconds = 6 × 10−7 s = 0.6 µs.
fs 10
Using this together with the numbers given in the problem, we obtain the average
flow velocity as
∆T · c2 6 × 10−7 · 14802
v= = m/s ≈ 3.79 m/s
2D cot θ 2 · 0.1 · cot (π/6)
c (T ) = a0 + a1 T + a2 T 2 ,
6
For a deviation of 2σθ = 0.02 rad, this would mean (for the example in (a)), that the
uncertainty is increased by
5. We have a differential pressure flowmeter setup designed for incompressible fluids. The
volume flow rate is given by
s
A2 2 (P1 − P2 )
Q= r 2 ,
A2
ρ
1 − A1
where A1 and A2 are the cross-sectional areas of the pipe where the pressures P1 and P2
are measured, respectively. The problem now is that we do not know the fluid density.
Assuming we can control the volume flow rate, Q to within some uncertainty, i.e. the
flow rate can be said to be normally distributed as N (Q, σQ ), derive an expression for the
least-squares estimator of the flow rate, using the Gauss-Newton linearization method,
that based on the calibration measurements also estimates the unknown fluid density ρ. (5p)
Solution: Given that the cross-sectional areas are constant, and only the pressures change,
let’s assume that the volume flow rate we are actually able to set is
ym = Qm (P1 , P2 ; ρ) + em ,
where
em ∼ N(0, σQ ).
We then have the problem of finding an estimate of the flow rate, Qb so that the sum of
squares of the errors is minimized. For repeated calibration measurements, this can be
written on vector form as
y1 Q1 (X1 ;ρ) e1
y2 Q2 (X2 ;ρ) e2
y = .. = f (X;ρ) + e = .. + .. ,
. . .
yM QM (XM ;ρ) eM
where T
X = P1,m P2,m .
The subscript n denotes pressures measured for experiment m, where m = 1, 2, . . . , M.
ρ = ρ0 . We can then use
Now, assuming we have an initial guess of the density, let’s say b
7
the Gauss-Newton linearization method to find the estimate of ρ that miminizes the sum
of squares of the errors
T
J = y−Q b y−Q b .
where H (ρ) is the gradient of the model with respect to the unknown parameter ρ, i.e.
h1
∂Q (X;ρ) h2
H (ρ) = = ,
∂ρ
hM
where
s
d r A2 2 (P1,m − P2,m )
hm = =
dρ 2 ρ
1 − AA21
s
d Lm Lm K
= K =− 2q ,
dρ ρ 2ρ Lm
ρ
where
A2
K=r 2
1 − AA21
Lm = 2 (P1,m − P2,m )
So, for each element in the gradient vector, the only things that vary are the measured
pressures.