LING5250/LING2250
Computational Analysis and Modeling of Biological Signals and Systems
Homework 2

Linear Shift-Invariant Systems

  1. The system T in the figure below is known to be shift-invariant. When the inputs to the system are x1[n], x2[n] and x3[n], the responses of the system are y1[n], y2[n], y3[n] respectively.
    1. Could the system T be linear? Explain.
    2. If the input x[n] to the system T is δ[n] (i.e. a unit impulse at time 0), what is the system response y[n]?
    3. Determine all possible inputs x[n] for which the response of the system T can be determined from the given information alone.


     

  2. The system L in the figure below is known to be linear. When the inputs to the system are x1[n], x2[n], x3[n], the response is y1[n], y2[n], y3[n] respectively.
    1. Could the system L be shift-invariant? Explain.
    2. If the input x[n] to the system is δ[n], what is the system response?


     

  3. Create a vector of length 24 containing an impulse at location 5, a step edge at location 12, and a unit-slope ramp starting from location 18. Convolve this signal with the "two-point averager": [0.5, 0.5], and the "two-point differencer": [0.5,-0.5]. How does the differencer respond to the various features?
  4. Show that the two convolution results computed above may be added together to reconstruct the original signal. Would this be true for an arbitrary input signal? Why or why not?
  5. Write an MATLAB function mksine to construct a vector of samples of a sine function. The function should take arguments size, period, amplitude, and phase (where size is the length of the vector, and period is the length of the period in samples). The phase should be measured from the first sample (that is, the first sample is at the origin). Plot a couple of examples to check that your code is working.
  6. Compute the convolution of each of two 24-sample sinusoids of period 24 and period 4 with the two filters described above (the "two-point averager" and the "two-point differencer". Note the amplitude of the results. What can we conclude about the "decomposition" accomplished by these convolutions?
  7. Construct a matrix that will represent the action of a shift-invariant linear system (the non-zero elements of) whose impulse response is [1 2 3]', on an arbitrary seven-element input vector. (Hint: the input vector will have the dimensions 7x1; the matrix will thus have to have the dimensions Nx7, where 'N' is chosen so that the result will have the right size for the consequences of convolving a seven-element vector (the input) with a three-element vector (the impulse response).
  8. Write a MATLAB function that will imitate the basic behavior of the built-in function conv(a,b), but will accomplish it by constructing a matrix M out of 'b' and then multiplying 'a' by M. How does 'b' appear in the rows and columns of M?