Assignment EE4105 2019/20 Semester 2
Name: Tutorial Group No:
EE4105 Assignment – Weeks 1-3
Note: Submit HARDCOPY solutions to Computer Engineering II Lab (S2-B3b-08) by Friday, 14th Feb 2020, 21st Feb 2020 5:00 pm. Please provide independent work. (Alternatively, you may submit softcopy (zipped file containing your HW & Matlab code) directly to me at ebhsoong@ntu.edu.sg).
Run following commands once, before starting your Matlab programming session to generate true random numbers:
s = RandStream.create(‘mt19937ar’,’seed’,sum(100*clock)) ;
RandStream.setGlobalStream(s) ;
Q1 By simulating WGN in Matlab, find the probability that a WGN variable will be larger than value . WGN has mean and standard deviation . Run the following codes once to obtain the values for your simulation. These values should be noted in your solution.
= 4 – rand(1,1) ; = 3 ; = – 1 + 2*rand(1,1) ;
You also need to verify your results by evaluating the probability using erfc( ) function.
(See problem in page 13 of notes.)
Q2 (i) Explain the effect of following Matlab command: floor(20*rand(1,12))-10. Write necessary Matlab codes to verify the circular shifting property of DFT noted in page 18. The sequence should be chosen from the use of above Matlab command. The verification should be elaborated using figures.
Q3
Q4
(ii) Generate 2 random sequences each of length 6 by appropriately using the Matlab command in part (i). Use these sequences to verify the circular convolution property of DFT (as noted in page 21). The verification should be elaborated using sequence values and/or plots.
(i) Generate 2 random sequences of length 5 and 12 using the Matlab commands as in Q2. Obtain the linear convolution of the sequence using conv ( ) function. Using Matlab cconv ( ) function, explain and show how linear convolution can be obtained using circular convolution.
(ii) Write Matlab codes to elaborate how above linear convolution could be obtained using DFT and IDFT. You should show codes, sequences and results.
Simulation: Modify the program in Example 2.8 for a zero mean transmitted pulse of total length T, as shown below. (The pulse amplitude levels are +1 and -1.) Generate zero mean AWGN using randn ( ) function. Select noise variance such that the noise effect is clearly visible in the output plot as in Figure 2.5 (in page 22). Obtain the matched filter output. Show plots similar to those obtained with Example 2.8. Generate a set of 100 random transmitted bits of 0 and 1. (In a similar way as done in Q2.) Obtain
1
Assignment EE4105 2019/20 Semester 2
Q5
sampled matched filter output (at t=T) for each transmitted bit. Plot the generated sequence and matched filer output (100 values) in stem plots. Comment on yourresults with respect to the effect of noise.
(i) Consider the following continuous time signal with 𝒂 < 𝟎 . Find its Fourier transform (FT).
𝒙(𝒕) = 𝒆𝒂𝒕, 𝒕 ≥ 𝟎 𝟎, 𝒕 < 𝟎.
(ii) Selecting 𝒂 = log (0. 𝟕), plot and compare the above FT with DTFT plots you have seen in Example 2.2. Assume that the sampling frequency in Example 2.2 is 1 Hz.
(i) Determine the autocorrelation functions of the rectangular g1(t) and the triple pulse g2(t) shown in Figure 1 below. Investigate the concept of orthogonality. Are these 2 signals orthogonal? Explain why this is important?
Q6
(ii)
Figure 1
Simulation: Use Matlab code to verify and generate these output plots of R1(τ) and R2(τ) respectively. State any necessary assumptions e.g. selecting a suitable sampling frequency for your signal in t sec in Figure 1 above etc.
2