Description
Lets start with the following filter:
Find the differential equation for the input x(t) and output y(t) relationship of the voltages.
Express it in discrete time by substituting for example
dt
dy(t)
for
Ts
y[n] y[n 1]
where Ts will be
the sample period.
Calculate its z transform and solve for H[z] = Y[z]/X[z]. Use R = 1000 Ω and C = 0.01 μF, and fs
= 40 000 Hz.
By using the help command in Matlab, familiarize with the command freqz
Plot its frequency response using the following:
[h,w]=freqz(b,a);
plot(40000*w/(2*pi),abs(h))
Your parameters a and b in the command above come from your derivation of H[z].
In general, in order to obtain the impulse response of a system, we would set up an experiment in
the lab where we would generate an impulse and measure the response of the system. This is not
feasible in most cases. Think of δ(t) in the frequency domain. Would noise be a good choice as a
testing signal?
Use the following type of noise X = normrnd(0,1,512,30);
That is 30 realizations of 512 Gaussian distributed samples. Instead of building an RC circuit, we
will let Matlab compute the output as
x(t) y(t)
y = filter(b,a,X);
You will be using 30 examples. Average them and see if you obtain a similar result as before.
What if you use more than 30 examples, is the result better?
Another choice of testing signal is the chirp, given that name because its “resemblance” to the
sound of some birds
x(t) = sin(2πf0(t + Kt2
)), where f0 is the initial frequency and K is a real constant.
For these type of signals the concept of Instantaneous Frequency IF is very helpful:
( )
2
1
t
dt
d
IF
, where
x(t) sin(t)
Sample a chirp (t = nTs) and use the same amount of samples N for n = 0,2, …, N-1 as before in
order to compare it with the noise input example. Choose the parameters f0 and K as to obtain the
best identification of your system. Look at the chirp in the frequency domain first and
experiment with different values, although you can derive these values theoretically from the
expression of the chirp, IF.
You can identify the system using the commands iddata and arx. Use the command help in
Matlab and familiarize with these commands. Use the chirp you created and use it as an input to
obtain the output using the results you obtained from the difference equation you found that
described the system. Afterwards, these two system identification commands should give you
similar parameters of the difference equation coefficients that you calculated theoretically. Think
of how useful it is to have input and output signals from a circuit you have no idea what it is and
that you can describe the system as easily as this. But, there is always a but, you do need the
parameters M and N and if you do not know the order of the model you may end up with
identifying a system that can give you trouble.
Problems
5.3.4 5.3.6 5.3.7 5.4.3 part (a)
5.4.10 5.5.4 5.6.5 5.8.14
5.5-4 -7(z+1)
A causal LTID system H(2) = 32(21)(2)
has a periodic input x[n] that сycles through
the 4 values 3, 2, 1, and 2. That is, x[n] =
[…, 3, 2, 1, 2, 3, 2, 1, 2,…], where x[0] =
3.
(a) Plot the magnitude response |H(e/)| over
-27 S S 27.
(b) Plot the phase response LH(e2) over
-2µ ≤≤2л.
(c) Determine the system output y[n] in
response to the periodic input x[n].
5.4-10
x[n] Σ
Consider the LTID system shown in
Fig. P5.4-10, where parameter c is an arbitrary,
real constant.
Figure P5.4-10
Σ y[n]
(a) Show the canonic direct form, a cascade,
and a parallel realization of
5.4-3 Repeat Prob. 5.4-2 for
H[z]= 5z+2.2
z2+z+0.16
5.3-7 (a) Find the output y[n] of an LTID system
specified by the equation
2y[n+2]-3y[n+1]+y[n]
= 4x[n+2] -3x[n+1]
for input_x[n] = (4)-“u[n] and initial
conditions y[-1] = 0 and y[-2] =1.
(b) Find the zero-input and the zero-state
components of the response.
(c) Find the transient and the steady-state
components of the response.
5.8-14 Use partial fraction expansions, z-transform
tables, and a region of convergence (0.5 < |z <
2) to determine the inverse z-transform of
1 (a) X1[z]= 1+1+82-2-12-3
1
(b) X2l2]=2-3(2-z~1)(1 +2z-¹)
5.6-5 Figure P5.6-5 displays the pole-zero plot of a
second-order real, causal LTID system that has
H[1]=-1.
1
Figure P5.6-5
(a) Determine the five constants k, b1, b2, a1,
and a2 that specify the transfer function
H[z]=k+b1z+b2 2²+ajz+a2
(b) Using the techniques of Sec. 5.6, accurately
hand-sketch the system magnitude response
|H[e]| over the range (-n <&<л).
(c) A signal x(t) = cos(27ft) is sampled at a
rate Fs = 1 kHz and then input into the
above LTID system to produce DT output
y[n]. Determine, if possible, the frequency
or frequencies f that will produce zero
output, y[n] =0.

