Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MATLAB Problem: Convolution Description of linear time-invariant (LTI) system We

ID: 3349373 • Letter: M

Question

MATLAB Problem: Convolution Description of linear time-invariant (LTI) system We consider a continuous-time (CT) LTI system with impulse response h(t)=u(t)-u(t-6) and input signal x(t)=5[u(t)-u(t-4)]. As signals must be sampled for processing, convolution is performed in discrete time. As a result, the CT signals are first sampled, using sampling period Ts to obtain rnl(nT), n-0,.. , Nx-1, where N is the total number of samples of r[n], and hn-h(nT,) n=0, 1, . . . , Mh-1, where Mh the total number of samples of h1n). The parameters T, N, and Nh are selected based on the duration T,-4 s and Th-6 s of r(t) and h(t), respectively, and their corresponding maximum frequencies. In particular, Nr is obtained from (N 1)Ts-T, and similarly Nh is obtained from (Nh -1)Ts-Th In order to avoid aliasing (loss of information), Ts must be selected such that the largest frequency wmax radians/s (present when considering both x(t) and h(t)) satisfies a max

Explanation / Answer

% Creating our sine-signal
clear
t = -50:50;
Fs = 25;   
x=sin(2*pi*(1/Fs)*t);

% Creating our impulse responses. They're unit steps, going from all-zeroes to all-ones.
h1 = [zeros(1,50) ones(1,50)];   
h2 = [zeros(1,40) ones(1,60)];   

% Calculating the convolusion result of the square signals above with our original sine-signal.
convPlot1 = conv(x,h1);
convPlot2 = conv(x,h2);

% Plot and check our result.
plot(convPlot1)
plot(convPlot2)