$24
Work on these questions as a homework first: answer the analytical parts of the questions and write the answers on a paper, write a MATLAB program (or many such programs) to perform the tasks that need computation, print your MATLAB code(s), print your computer outputs (numerical and graphic) whenever needed; the collection of all those will be your lab report. Bring your code (in a computer readible form) to the lab; transfer your code to one of the lab computers; run and show your TA the results. Answer all the questions your TAs may ask. Modify your lab report, including any modifications needed in your MATLAB codes, during the lab hours in the lab. Finally, hand your TAs the lab report prepared as described above. Your report will get a grade based on your preparedness when you come to the lab, performance of your codes in the lab (any modifications needed and conducted during the lab hours included), your answers to the oral questions during your demo(s) in the lab, and the entire content of the submitted report at the end of the lab.
******************************
A digital computer can only store and process digital signals. Digital signals are signals that are both discrete (in terms of its variable) and quantized (in terms of its value). Here in this lab practice, you will investigate discrete cosine signals. A discrete cosine signal is defined only over integers like any other discrete signal and given by the most general form, x[n] = A cos[ωn + ϕ], n ∈ (−∞, ∞). A is the amplitude, ω is the normalized frequency (in radians; you may interpret it as “radians per sample”), and ϕ is the phase shift, also in radians.
1- x1[n] = cos[0.17πn] for n ∈ (−∞, ∞). Generate and store in a file a finite segment of this discrete cosine signal for n ∈ [0, 127]. Discuss the quantization associated with this x1[n] when it is generated and stored by a computer.
a) Retrive the file from the memory, and read and print x1[6], x1[11], x1[111], x1[127].
b) Plot x1[n], n ∈ [0, 127], adopting a graphic style which clearly shows the discrete nature of the signal. Make sure that you label the axes of the graph properly. What is the value of ω.
2- Repeat (1) for x2[n] = cos[2.4πn].
3- Repeat (1) for x3[n] = cos[−1.6πn].
Compare your results for (2) and (3) above, and discuss.
4- Repeat (1) for x4[n] = cos[0.125πn].
5- Repeat (1) for x5[n] = cos[0.125πn + 1.4].
Compare your results for (4) and (5) above, and discuss.
6- Repeat (1) for x6[n] = cos[0.32πn].
7- Repeat (1) for x7[n] = cos[0.02πn].
8- Repeat (1) for x8[n] = cos[πn].
9- Repeat (1) for x9[n] = cos[1.02πn].
Compare your results in (7) and (9) and discuss.
10- Repeat (1) for x10[n] = cos[0.98πn].
Compare your results for (8), (9) and (10) above, and discuss.
11- Repeat (1) for x11[n] = cos[n].
12- Repeat (1) for x12[n] = cos[0.3n + 0.3].
A discrete signal x[n] is said to be periodic if an integer N can be found, such that, x[n + N] = x[n] for all n; in that case, N is a period of x[n]. Note that N, is not unique if it exists; minimum positive N is called the fundamental period. If a period cannot be found, as defined above, then the signal is not a periodic signal.
13- Using the above definition, find the fundamental period for each xi[n] given above; if the period does not exist (in other words, if the signal is not periodic), clearly justify the reason.
14- Write the most general property that ω must satisfy to have a periodic discrete cosine, and the corresponding fundamental period.
15- Compare and discuss the periodicity properties of discrete cosine signals with that of the continuous cosine signals.
(⃝cLevent Onural, 2018. Prepared only for the students registered to EEE321 course at Bilkent University in 2018-2019
fall semester. Not to be distributed to others by any means.)