Question

In: Electrical Engineering

Calculate several samples of the unit impulse and impulse responses of y(n) = -0.75 y(n–1) +...

Calculate several samples of the unit impulse and impulse responses of y(n) = -0.75 y(n–1) + x(n) – 0.3 x(n–1) – 0.4 x(n-2).

Re-write the equation in standard form and then indicate the name of each coefficient (a1, etc.). Use the filter() function in MATLAB to check your results to 1 and 2.

Solutions

Expert Solution

Code:

N =10; % number of samples

%% unit impulse

x_1 = 0; % x(-1)

x0 = 1;

for n = 1:N-1

x(n) = 0;

end

d = 1;

% in MATLAB index zero won't exist

% d is for adjusting MATLAB index

% so in below line y(0+d) is true value of y(0)

y(0+d) = 1; % Initial condition assumption

%% impulse response

y(1+d) = -0.75*y(0+d)+ x(1) - 0.3*x0 - 0.4*x_1;

y(2+d) = -0.75*y(1+d)+ x(2) - 0.3*x(1) - 0.4*x0;

for n=3:N-1

y(n+d)= -0.75*y(n-1+d) + x(n) - 0.3*x(n-1) - 0.4*x(n-2);

end

y

%% Filter

b = [ 1 -0.3 -0.4]; %

a = [1 0.75]; %

X = [1, zeros(1,N-1)];

Y = filter(b,a,X)

% subplot(2,1,1)

% plot([0:N-1],y)

% title('equation response')

% subplot(2,1,2)

% plot([0:N-1],Y)

% title('filter output')

Output:

Response from equation

Response from filter()


Related Solutions

Compute the unit-­pulse response h[n] for the discrete-­time system y[n + 2] - 2y[n + 1]...
Compute the unit-­pulse response h[n] for the discrete-­time system y[n + 2] - 2y[n + 1] + y[n] = x[n] (for n = 0, 1, 2, 3)
(a) Let Y be distributed N(0, 1), i.e. the standard normal variable. Calculate P(Y <= 1.96),...
(a) Let Y be distributed N(0, 1), i.e. the standard normal variable. Calculate P(Y <= 1.96), P(Y <= 0) and P(Y > 0.6772). Bound P(Y > 3). (b) Let Y be distributed N(1, 4). Calculate P(Y < 1), P(Y > 2), P(1 ≤ Y ≤ 2). (c) Let Y be distributed χ 2 1 . Calculate P(Y < 1), P(Y > 3.8416) using the results of the first question. (d) Let Y be distributed χ 2 3 . Calculate P(Y...
Section 1: Given a system y[n]-y[n-1]+y[n-2]=x[n] (refer to M3.2 on textbook) In class, we analytically derived...
Section 1: Given a system y[n]-y[n-1]+y[n-2]=x[n] (refer to M3.2 on textbook) In class, we analytically derived the solutions of second order difference equations, including zero-input response, unit impulse response, zero-state response and total response. The Matlab has imbedded commands to do the same job. Get familiar with the following commends, and use them to get (0≤n≤40) a) unit impulse response and plot it b) zero-input response and plot it, with initial conditions of y[-1]=1 and y[-2]=2 c) zero-state response and...
1. The differential equation y''+4y=f(t) and y'(0)=y(0)=0 a. Find the transfer function and impulse response. b....
1. The differential equation y''+4y=f(t) and y'(0)=y(0)=0 a. Find the transfer function and impulse response. b. If f(t)=u(t)-u(t-1). Find the y(t) by convolution and Laplace techniques. u(t) is unit step function. c. If f(t)= cos(t) ; find the y(t) by convolution and Laplace techniques. 2. The differential equation y''+3y'+2y=e^(-3t) and y'(0)=y(0)=0 a. Find the system transfer function and impulse response. b. Find the y(t) by convolution and Laplace techniques. 3. y''+3y'+2y=f(t) and y'(0)=y(0)=0 Plot y(t) without any calculations and write...
4. Given Pseudocode: Algorithm3(n): y = 0 for i = 1 to n do y =...
4. Given Pseudocode: Algorithm3(n): y = 0 for i = 1 to n do y = 1 while y < i2 do y=2y return y a. What's the output of Algorithm3(n) as a function of n? b. What's the running time of Algorithm3(n) as a function of n? Represent this as a summation. c. Prove the running time to be O(n log n).
1) Suppose that a firm’s production function is q=10L^0.25 K^0.75. The cost of a unit of...
1) Suppose that a firm’s production function is q=10L^0.25 K^0.75. The cost of a unit of labor is $30 and the cost of a unit of capital is $90. a. The firm is currently producing 120 units of output. Derive the cost-minimizing quantities of labor and capital (i.e. in the long run). What is the total cost? b. The firm now wants to increase output to 160 units. If capital is fixed at the level you found in part a)...
Solve the following recurrence relation for the given initial conditions. y(n+2) - 0.3y(n + 1) + 0.02y(n) = 10 y(0) = 2; y(1) = 0
Solve the following recurrence relation for the given initial conditions.y(n+2) - 0.3y(n + 1) + 0.02y(n) = 10        y(0) = 2;    y(1) = 0
Agnes can produce either 1 unit of X or 1 unit of Y in an hour,...
Agnes can produce either 1 unit of X or 1 unit of Y in an hour, while Brenda can produce either 2 units of X or 4 units of Y in an hour. Given the above fact, the opportunity cost of producing a unit of X is
Consider two independent random samples with the following results: n 1 =160 x 1 =84     n...
Consider two independent random samples with the following results: n 1 =160 x 1 =84     n 2 =95 x 2 =72 Use this data to find the 90% confidence interval for the true difference between the population proportions. Copy Data Step 1 of 3 : Find the point estimate that should be used in constructing the confidence interval. Round your answer to three decimal places.
Y ∼ N (10, 36), What are probabilities of... 1. Y > 10 2. Y >...
Y ∼ N (10, 36), What are probabilities of... 1. Y > 10 2. Y > 11 3. |Y − 11| > 1 4. Y/2 > 5 5. Y/2 > 4 6. |(Y/2) − 4| > 1
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT