a)MATLAB:
clc;close all;clear all;
n=0:1:10
%y1(n) to input x1(n)=sin(2*pi*n/10)
x1=sin(2*pi*n/10)
y1=2*x1
subplot(421)
stem(n,x1,'r');xlabel('n');ylabel('x1(n)');title('x1(n)=sin(2*pi*n/10)')
subplot(422)
stem(n,y1,'b');xlabel('n');ylabel('y1(n)');title('y1(n)=2*x1(n)')
%y2(n) to input x2(n)=cos(2*pi*n/10)
x2=cos(2*pi*n/10)
y2=2*x2
subplot(423)
stem(n,x2,'g');xlabel('n');ylabel('x2(n)');title('x2(n)=cos(2*pi*n/10)')
subplot(424)
stem(n,y2,'b');xlabel('n');ylabel('y2(n)');title('y2(n)=2*x2(n)')
%y3(n) to input x3(n)=x1(n)+x2(n)
x3=x1.+x2
y3=2*x3
subplot(425)
stem(n,x3,'m');xlabel('n');ylabel('x3(n)');title('x3(n)=x1(n)+x2(n)')
subplot(426)
stem(n,y3,'b');xlabel('n');ylabel('y3(n)');title('y3(n)=2*x3(n)')
%y3(n) to input x3(n)=x1(n)+x2(n)
y4=y1+y2
subplot(427)
stem(n,y4,'b');xlabel('n');ylabel('y4(n)');title('y4(n)=y1(n)+y2(n)')
if(y3==y4)
disp('outputs consistent with a linear system')
else
disp('Not linear')
end
Command window:
y3 =
Columns 1 through 9:
2.00000 2.79360 2.52015 1.28408 -0.44246 -2.00000 -2.79360 -2.52015 -1.28408
Columns 10 and 11:
0.44246 2.00000
y4 =
Columns 1 through 9:
2.00000 2.79360 2.52015 1.28408 -0.44246 -2.00000 -2.79360 -2.52015 -1.28408
Columns 10 and 11:
0.44246 2.00000
outputs consistent with a linear system
____________________________________________________
b) i) Linearity for x1=[0,1],x2=n
MATLAB:
clc;close all;clear all;
n=0:1:10
%y1(n) to input x1(n)=[0,1]
x1=[0,1,zeros(1,length(n)-2)]
y1=x1.^2
subplot(421)
stem(n,x1,'r');xlabel('n');ylabel('x1(n)');title('x1(n)')
subplot(422)
stem(n,y1,'b');xlabel('n');ylabel('y1(n)');title('y1(n)=x1(n).^2')
%y2(n) to input x2(n)=n
x2=n
y2=x2.^2
subplot(423)
stem(n,x2,'g');xlabel('n');ylabel('x2(n)');title('x2(n)')
subplot(424)
stem(n,y2,'b');xlabel('n');ylabel('y2(n)');title('y2(n)=x2(n).^2')
%y3(n) to input x3(n)=x1(n)+x2(n)
x3=x1.+x2
y3=x3.^2
subplot(425)
stem(n,x3,'m');xlabel('n');ylabel('x3(n)');title('x3(n)=x1(n)+x2(n)')
subplot(426)
stem(n,y3,'b');xlabel('n');ylabel('y3(n)');title('y3(n)=x3(n).^2')
%y3(n) to input x3(n)=x1(n)+x2(n)
y4=y1+y2
subplot(427)
stem(n,y4,'b');xlabel('n');ylabel('y4(n)');title('y4(n)=y1(n)+y2(n)')
if(y3==y4)
disp('outputs consistent with a linear system')
else
disp('Not linear')
end
Command window:
y3 =
0 4 4 9 16 25 36 49 64 81 100
y4 =
0 2 4 9 16 25 36 49 64 81 100
Not linear
ii)Linearity:
clc;close all;clear all;
n=0:1:10
%y1(n) to input x1(n)=[0,1]
x1=[0,1,zeros(1,length(n)-2)]
y1=x1.^2
subplot(421)
stem(n,x1,'r');xlabel('n');ylabel('x1(n)');title('x1(n)=sin(2*pi*n/10)')
subplot(422)
stem(n,y1,'b');xlabel('n');ylabel('y1(n)');title('y1(n)=x1(n).^2')
%y2(n) to input x2(n)=n
x2=n
y2=x2.^2
subplot(423)
stem(n,x2,'g');xlabel('n');ylabel('x2(n)');title('x2(n)=cos(2*pi*n/10)')
subplot(424)
stem(n,y2,'b');xlabel('n');ylabel('y2(n)');title('y2(n)=x2(n).^2')
%y3(n) to input x3(n)=x1(n)+x2(n)
x3=x1.+x2
y3=x3.^2
subplot(425)
stem(n,x3,'m');xlabel('n');ylabel('x3(n)');title('x3(n)=x1(n)+x2(n)')
subplot(426)
stem(n,y3,'b');xlabel('n');ylabel('y3(n)');title('y3(n)=x3(n).^2')
%y3(n) to input x3(n)=x1(n)+x2(n)
y4=y1+y2
subplot(427)
stem(n,y4,'b');xlabel('n');ylabel('y4(n)');title('y4(n)=y1(n)+y2(n)')
if(y3==y4)
disp('outputs consistent with a linear system')
else
disp('Not linear')
end
Command window:
y3 =
5 4 4 6 8 10 12 14 16 18 20
y4 =
10 4 4 6 8 10 12 14 16 18 20
Not linear
b(i) Time invariant:
clc;close all;clear all;
n=0:1:4
%y1(n) to input x1(n)=[0,1]
x=[0,1,zeros(1,length(n)-2)]
subplot(221)
stem(n,x,'r');xlabel('n');ylabel('x(n)');title('x(n)')
n0=2
%plot y(n-k)
y=x.^2
for k=1:length(n)
y1(k+n0)=y(k)
end
m=0:1:max(n)+n0
subplot(222)
stem(m,y1,'b');xlabel('n');ylabel('y(n-k)');title('y(n-k)')
for k=1:length(n)
x1(k+n0)=x(k)
end
subplot(223)
stem(m,x1,'r');xlabel('n');ylabel('x(n-no)');title('x(n-no)')
y=x1.^2
subplot(224)
stem(m,y,'b');xlabel('n');ylabel('y(n,k)');title('y(n,k)')
if(y1==y)
disp('the system is time invariant')
else
disp('the system is time variant')
end
Command window:
the system is time invariant
>> y
y =
0 0 0 1 0 0 0
>> y1
y1 =
0 0 0 1 0 0 0
ii)time invariant:
clc;close all;clear all;
n=0:1:4
%y1(n) to input x1(n)=[0,1]
x=[0,1,zeros(1,length(n)-2)]
subplot(221)
stem(n,x,'r');xlabel('n');ylabel('x(n)');title('x(n)')
n0=2
%plot y(n-k)
y=(2*x)+(5*(n==0))
for k=1:length(n)
y1(k+n0)=y(k)
end
m=0:1:max(n)+n0
subplot(222)
stem(m,y1,'b');xlabel('n');ylabel('y(n-k)');title('y(n-k)')
for k=1:length(n)
x1(k+n0)=x(k)
end
subplot(223)
stem(m,x1,'r');xlabel('n');ylabel('x(n-no)');title('x(n-no)')
y=(2*x1)+(5*(m==0))
subplot(224)
stem(m,y,'b');xlabel('n');ylabel('y(n,k)');title('y(n,k)')
if(y1==y)
disp('the system is time invariant')
else
disp('the system is time variant')
end
the system is time variant
>> y
y =
5 0 0 2 0 0 0
>> y1
y1 =
0 0 5 2 0 0 0
Question 2 (a) Determine whether the discrete time system which has an output y[n] 2*x[n] over...
The impulse response h(t) of a linear time-invariant system is 2*pi[(t-2)/2]. Find and plot the output when the system is driven by an input signal that is identical to the impulse response.
Consider the discrete-time system with input x[n] and output y[n] described by : y[n]=x[n]u[2-n] Which of the following properties does this system possess? Justify your answer in each case. Do not use Laplace transforms a) Memoryless b)Time-invariant c) Linear d)Casual e) Stable
9. Determine whether the following systems are invertible. If so, find the inverse. If not, find 2 input signals that produce the same output. (a) y)-r (b) yn]-ewl, where a is a real number (c) yt)-vx(t) for real-valued signals x(t) (d) yIn] xIn] (complex conjugate) 10. In most of the book, we will be discussing ways to analyze linear time-invariant (LTI) systems. As we will explore in much more detail later, the response of an LTI system to a particular...
3.5. The response of a linear and time-invariant system to the input signal x[n]= 6[n] is given by Sys {on]}= { 2,1, -1} n=0 Determine the response of the system to the following input signals: n] = 8[n]+6[n - 1 r[n] 6[n]26n - 1][n - 2] [n] un]- un - 5] xn] = а. b. C. 1 (u[n]- u[n - 5]) d.
1. Consider a discrete-time system H with input x[n] and output y[n]Hn (a) Define the following general properties of system H () memoryless;(ii BIBO stable; (ii) time-invariant. (b) Consider the DT system given by the input-output relation Indicate whether or not the above properties are satisfied by this system and justify your answer.
Q.5 (a) Show that a linear, time-invariant, discrete-time system is stable in the bounded- input bounded-output sense if, and only if the unit sample response of the system, h[n], is absolutely summable, that is, Alfa]]<00 | [n]| < do ***** (13 marks] (b) Consider a linear, time-invariant discrete-time system with unit sample response, hin), given by hin] = a[n] – đặn – 3 where [n] is the unit sample sequence. (1) Is the system stable in the bounded-input bounded-output sense?...
For a continuous time linear time-invariant system, the input-output relation is the following (x(t) the input, y(t) the output): , where h(t) is the impulse response function of the system. Please explain why a signal like e/“* is always an eigenvector of this linear map for any w. Also, if ¥(w),X(w),and H(w) are the Fourier transforms of y(t),x(t),and h(t), respectively. Please derive in detail the relation between Y(w),X(w),and H(w), which means to reproduce the proof of the basic convolution property...
2. (a) For each sample of a discrete time signal x[n] as input, a system S outputs the value y[n- . Determine whether the system S is i. linear ii. time-invariant 1ll. causal iv. stable Each of your answers should be supported by justification. In other words, show your reasoning (b) Consider a stable linear time-invariant (LTI) system with transfer function H(z). It is required to design a LTI compensator system G(z) that is in cascade with H(z) such that...
Realize the system which generates the output y1(n)-1/2 [x(n)+x(-n)] and y2(n)-1/2 [x(n)-x(-n)] using matlab. By generating signals xl(n)-sin(on) and x2(n)-cos(on) for various values of o-[0,/6, ,3Tt/2, 1.9T/2) obtain 3. a) Output yl(n) and y2(n) b) Critically analyze the system outputs y 1 (n) and y2(n) and find out the type of filter obtained. Realize the system which generates the output y1(n)-1/2 [x(n)+x(-n)] and y2(n)-1/2 [x(n)-x(-n)] using matlab. By generating signals xl(n)-sin(on) and x2(n)-cos(on) for various values of o-[0,/6, ,3Tt/2, 1.9T/2)...
Problem 4. Given the input/output system represented by t-1 y(t) = 2 ( x(y - 3) dy where x(t) is the input and y(t) is the output, a) Determine whether the system is linear or non-linear. b) Determine the impulse response h(t, to) of the system by setting x(t)= 8(t–to). c) Determine whether the system is time invariant or time variant. d) Determine whether the system is causal or non-causal.