Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Q1a Q1b

Q1c

Q1d

Q1e: From graphs, we find:

fsignal [Hz] 500 9600 9900 9950


fdiscrete [Hz] 1/(20*0.1ms) = 500 1/(25*0.1ms) = 400 1/(100*0.1ms) = 100 1/(200*0.1ms) = 50

Apperently, it applies: if f<½∙fsample then: fdiscrete = fsignal

if f>½∙fsample then: fdiscrete = fsample - fsignal

Remark: you can also makes the plausible as follows. If a analogue signal x(t)=sin(∙t) with =2∙∙f is sampled at a
sample rate of fsample, then it applies for the discrete signal x[n]:

2∙𝜋∙𝑓∙𝑛 𝑓 𝑓 − 𝑓𝑠𝑎𝑚𝑝𝑙𝑒
𝑥[𝑛] = sin(𝜔 ∙ 𝑛 ∙ 𝑇𝑠𝑎𝑚𝑝𝑙𝑒 ) = sin ( ) = sin (2 ∙ 𝜋 ∙ 𝑛 ∙ ( − 1)) = sin (2 ∙ 𝜋 ∙ 𝑛 ∙ ( ))
𝑓𝑠𝑎𝑚𝑝𝑙𝑒 𝑓𝑠𝑎𝑚𝑝𝑙𝑒 𝑓𝑠𝑎𝑚𝑝𝑙𝑒

So, the frequency that is observed after digitizing can be f (analogue frequency) or f - fsample.
Q2

Q3a. x[n] = u[n] – 2 ∙ u[n-2] + u[n-4]

b. x[n] = (n-3) ∙ u[n-3]

c. x[n] = (n ∙ u[n] – 2 ∙(n-6) ∙ u[n-6]) ∙ u[12-n]

Q4a. FIR-filter because the output is calculated only from input terms

b. Step-response: x[n] = { 4 3 2 1 0 0 0 0 0 0 0 0 … }

Impuls response: x[n] = { 4 -1 -1 -1 -1 0 0 0 0 0 … }

Q5a. First order IIR-filter because an older output sample is used to calculate a new output sample.

b.
n 0 1 2 3 4 5 6 7 8 9
Step response 0.5 0.95 1.355 1.7195 2.0476 2.3428 2.6085 2.8477 3.2566 3.4309
Impulse response 0.5 0.45 0.4050 0.3645 0.3281 0.2952 0.2657 0.2391 0.2152 0.1743

c. In steady state, it applies: x[n] = 1 and y[n] = y[n-1] = ysteady_state. If we input this in the difference equation, we have:
ysteady_state = 0.5 ∙ 1 + 0.9 ∙ ysteady_state → ysteady_state∙ (1 – 0.9) = 0.5 → ysteady_state = 0.5 / 0.1 = 5.

Q5a. Second order IIR-filter because a 2-samples delayed output sample is used to calculate a new output sample.

c. In steady state, it applies: x[n] = 1 and y[n] = y[n-1] = y[n-2] = ysteady_state. If we input this in the difference equation,
we find: ysteady_state = 1 + 1.97 ∙ ysteady_state - 0.98 ∙ ysteady_state → ysteady_state∙ (1 – 0.99) = 1 → ysteady_state = 1 / 0.01 = 100.

d. Matlab-script: see below. Graphs are shown on next page.


n = 0:300;
x1 = (n==0); % unit impulse function
x2 = (n>=0); % unit step function

a = [1 -1.97 0.98]; % output terms of difference equation


b = [1 0 0]; % input terms of difference equation
y1 = filter(b, a, x1); % impulse response
y2 = filter(b, a, x2); % step response

subplot(2,1,1); plot(n, y1, 'ored');


grid on; grid minor;

subplot(2,1,2); plot(n, y2, 'ored');


grid on; grid minor;

You might also like