Laboraory #2 Speral Analysis of Digial Baseband Signals SYSC 4600 Digial Communiaions Deparmen of Sysems and Compuer Engineering Fauly of Engineering Carleon Universiy Oober 206
Deparmen of Sysems & Compuer Engineering Page 2 of 8 Purpose and Objeives he purpose of his laboraory experimen is o observe and undersand he effes of differen line oding ehniques on he speral haraerisis of digial baseband signals. I builds on Laboraory #, whih you should review. You are enouraged o refer bak o ha lab manual while working on his lab. Prelaboraory Exerise. Review lab #. 2. Read he lab manual. 3. Draw he power speral densiy (PSD) (in db) of polar NRZ signalling, where s 0 ( ) shown in Figure is used o represen a message bi of 0, and s ( ) is used for a. he PSD of polar NRZ signaling and independen message bis is given by 2 P( f ) = H ( f ), where H ( f ) is he Fourier ransform of he ransmi filer h ( ), and h ( ) s 0( = ). s 0 ( ) s ( ) Figure. Signals used wih polar NRZ.
Deparmen of Sysems & Compuer Engineering Page 3 of 8 Laboraory Preliminaries: Improving Your Simulaor he simulaor you developed in lab # is a good sar, bu i does have some drawbaks ha should be reified before ommening his lab. Make he following hanges o your simulaor:. he ransmi filer pulse shape should be normalized o have uni energy. he reangular pulse shape should be as shown in Figure 2. Figure 2. Normalized reangular pulse shape. I is a good idea o always use normalized pulse shapes, so ha he ransmi filer neiher amplifies nor aenuaes he signal. We wan he ransmied energy per symbol o be he same regardless of he pulse shape, o make i easier o sudy he effes of he pulse shape on sysem performane wihou he effes being obsured by poenially differen ransmied signal srenghs (average energy per bi). 2. he modulaor should be modified so ha he ransmied bandpass signal, v ( ), has he same energy as he baseband signal, v ( ). his is done by using a saling faor of 2, so ha v ( ) v( ) 2 os( 2π f ) =. A similar hange mus be made in he demodulaor so ha r = r 2 os 2π f. o ( ) ( ) ( ) h ( ) 3. o make he disree-ime onvoluion performed in he deeor beer mimi he oninuous-ime onvoluion ha would be performed by an analogue reeive filer, you should muliply he resul of he disree-ime onvoluion by s. You should also make sure ha he impulse response of he reeive filer is normalized o uni energy, jus like he pulse shape used by he ransmi filer. Here are some oher suggesions ha will make your simulaor easier o mainain and possibly run faser.. Beause MALAB.m files are inerpreed a run-ime, no ompiled in advane, loops an run very slowly. I is imporan o replae loops in your program wih veor operaions wherever possible. Speed was no an issue in lab #, bu is more imporan in his lab (you ll noie your program someimes akes a few seonds o run). o avoid using a loop for he symbol mapper you an use (for polar signaling) SM = [+ -]; v = SM(a+);
Deparmen of Sysems & Compuer Engineering Page 4 of 8 where a is he MALAB veor onaining he message bis. Elemens in a ha have a value of 0 will be mapped o he value of he firs elemen of he SM array, and values of will be mapped o he value of he seond elemen of he SM array. 2. he deision devie an be implemened wihou a loop by using ah = (r < 0); where r is he MALAB veor onaining he deeor oupu. 3. o generae he reeive filer impulse response (mahed filer), use hr = fliplr(h); where h is he MALAB veor onaining he sampled ransmi filer pulse shape. Afer making hese hanges you should run your simulaor and verify ha no ransmission errors our. For his lab we will use he following parameers: N a = 28 bis, = 0. 0 seonds, η = 64 samples per symbol, and f = 400 Hz. Use a randomly-generaed message.
Deparmen of Sysems & Compuer Engineering Page 5 of 8 Sep : Sperum of Polar Non-Reurn-o-Zero (NRZ) Signals We are ineresed in he PSD of he ransmied baseband signal, v ( ), when polar NRZ signalling is used. One mehod o esimae he sperum of a signal is o square he magniude of he disree Fourier ransform of he sampled signal. his an be aomplished wih he following MALAB ommands: v = v(:ns); Vf = ffshif(ff(v)); PSD = Vf.*onj(Vf) * s / Ns; v and N s = N a η is he oal num-. he MALAB veor PSD will onain an esimae of he sperum over,, a N s poins wih an inremen of 2s 2 s N s. s where v is he MALAB veor onaining he samples of ( ) ber of samples of v ( ) he inerval % runae o firs Ns samples % Calulae FF % Calulae PSD Quesion. Plo he sperum of ( ) v (in db) vs. frequeny (in Hz). Make sure your frequeny sale is orre. Limi he x-axis o he range from -750 o 750 Hz, and limi he y- axis o he range from -50 db o 0 db. On he same graph, bu in a differen olour, plo he heoreial PSD ha you found in he pre-lab, evaluaed a he same frequenies. Your graph should look similar (bu no idenial) o he one shown in Figure 3. 0 Experimenal heoreial 0-0 PSD -20-30 -40-50 -600-400 -200 0 200 400 600 frequeny (Hz) Figure 3. PSD of polar NRZ. By omparing he heoreial and experimenal resuls, i should be apparen ha alhough he wo urves are similar, he experimenal resuls are muh more jagged. I is desirable o ge a
Deparmen of Sysems & Compuer Engineering Page 6 of 8 smooher urve (and hene higher auray) for he experimenal resuls. Inreasing η doesn help (higher values of η does however allow us o esimae he sperum a higher frequenies), and inreasing N a doesn help eiher (inreasing N a does allow us o esimae he sperum wih a higher resoluion, bu his doesn make he graph smooher). Insead we will use wha is known as Barle s mehod, whih involves aking he average of several differen esimaes of he sperum. Quesion 2. Rerun your simulaor and generae anoher graph of he sperum. I should be similar o, bu slighly differen han, he graph you produed for Quesion. Why is i differen? Modify your simulaor by puing nearly everyhing in a big loop. Insead of jus ransmiing one message of N a bis, you will ransmi several differen randomly seleed messages, one afer he oher. Le N f be he oal number of simulaed messages ha are ransmied. For eah message your program should alulae (bu no plo) he sperum of v ( ) for ha message. Afer he loop your program should plo he average of hese spera. Your program should also prin he oal number of bi errors ha ourred (his should be equal o zero). Quesion 3. Plo he sperum of v ( ) averaged over N f = 0 messages. Shown he heoreial sperum in he same graph. Are he experimenal resuls less jagged han in Quesion? Repea wih N f = 00 and N f = 000. Do he experimenal resuls mah he heoreial ones? How and why do hey differ? Keep a opy of he MALAB array onaining your esimaed sperum for polar NRZ wih N = 000 you ll need i in Sep 5. f Sep 2: Polar vs. Unipolar Non-Reurn-o-Zero (NRZ) Signals Unipolar NRZ involves using a reangular pulse wih a posiive ampliude o represen a message bi of, and sending nohing (0 vols for seonds) o represen a 0. o simulae unipolar NRZ, hange your symbol map o 0 if an = 0 v n = SM[ an ] =. 2 if an = he ampliude of 2 is used o ensure ha unipolar NRZ has he same average ransmied energy per bi as polar NRZ. Beause he symbol map has hanged, he deision rule should be hanged o 0 if r 2 2 ˆ n a n =. if rn > 2 2 Quesion 4. Plo he sperum of ( ) v (in db) vs. frequeny (in Hz) for unipolar NRZ, using f N = 000. Limi he x-axis o he range from -750 o 750 Hz, and limi he y-axis o he range from -50 db o 0 db. On he same graph, plo he heoreial PSD for
Deparmen of Sysems & Compuer Engineering Page 7 of 8 polar NRZ ha you found in he pre-lab. Commen on he similariies and differenes. Keep a opy of he MALAB array onaining your esimaed sperum for unipolar NRZ. Sep 3: Polar and Unipolar Reurn-o-Zero (RZ) Signals Reurn-o-zero (RZ) signalling involves using a pulse shape he drops bak down o 0 vols halfway hrough he symbol period. he pulse shape is shown in Figure 4. 2 h ( ) Figure 4. Normalized reurn-o-zero pulse shape. Implemen his pulse shape and modify your symbol map and deision devie o use polar signalling again. Quesion 5. Generae a graph showing he experimenal sperum of polar RZ and he heoreial sperum of polar NRZ. Plo he spera in db from -50 o 0 db for frequenies over he range from -750 o 750 Hz. Commen on he similariies and differenes. Keep a opy of he MALAB array onaining your esimaed sperum for polar RZ. Modify your symbol map and deision devie o use unipolar signalling again. Quesion 6. Generae a graph showing he experimenal sperum of unipolar RZ and he heoreial sperum of polar NRZ. Plo he spera in db from -50 o 0 db for frequenies over he range from -750 o 750 Hz. Commen on he similariies and differenes. Keep a opy of he MALAB array onaining your esimaed sperum for unipolar RZ. 2 Sep 4: Manheser Coding Manheser oding uses he pulse shape shown in Figure 5. Similar o polar RZ, his pulse shape also always gives an ampliude ransiion in every symbol period o failiae synhronizaion. I also has an average value of zero (no DC offse), regardless of he ransmied message.
Deparmen of Sysems & Compuer Engineering Page 8 of 8 h ( ) 2 Figure 5. Pulse shape for Manheser oding. Implemen his pulse shape, and modify your symbol map and deision devie o use polar signalling again. Quesion 7. Generae a graph showing he experimenal sperum of Manheser oding, and he heoreial sperum of polar NRZ. Plo he spera in db from -50 o 0 db for frequenies over he range from -750 o 750 Hz. Commen on he similariies and differenes. Keep a opy of he MALAB array onaining your esimaed sperum for Manheser oding. Sep 5: Comparison Quesion 8. Generae a single graph showing he experimenal sperum of he following line odes:. Polar NRZ 2. Unipolar NRZ 3. Polar RZ 4. Unipolar RZ 5. Manheser oding Use a differen olour for eah line ode. Plo he spera in db from -50 o 0 db for frequenies over he range from -750 o 750 Hz. Commen on he similariies and differenes. Quesion 9. Unipolar RZ is no used in praie. Why no? Laboraory Repor Insruions Please email a sof-opy of your.m file o your A, and inlude a hard-opy wih your repor. Please email a sof-opy of your repor o he A in addiion o submiing a hard-opy.