ECEN 4652/5002 Communications Lab Spring 2014 2-23-15 P. Mathys Lab 7: Amplitude Modulation with Suppressed Carrier 1 Introduction Many channels either cannot be used to transmit baseband signals at all, or pass signal energy very inefficiently, except for a relatively narrow passband region at frequencies substantially higher than those contained in a baseband message signal. A well-known example is electromagnetic transmission of radio signals at a frequency fc in free space which requires an antenna of length comparable to λc /2 for a dipole, or λc /4 for a monopole, where λc = 3 × 108 /fc is the wavelength in meters corresponding to fc in Hz. Thus, transmission at fc = 10 kHz would require an antenna of length comparable to 15 km for a dipole, whereas at fc = 900 MHz a length of 8.3 cm is enough for the monopole antenna of a cell phone. 1.1 Amplitude Modulation with Suppressed Carrier The most straightforward way to shift a signal spectrum from baseband to a passband location with center frequency fc is to make use of the frequency shift property of the Fourier transform (FT) which says that m(t) ej(2πfc t+θc ) ⇐⇒ M (f − fc ) ejθc . Thus, Ac m(t) ej(2πfc t+θc ) is a complex-valued bandpass signal with amplitude Ac and center frequency fc if m(t) is a (bandlimited) baseband signal. To make this into a real bandpass signal x(t), write x(t) = Re{Ac m(t) ej(2πfc t+θc ) } = Re Ac m(t) cos(2πfc t + θc ) + j sin(2πfc t + θc ) = Ac m(t) cos(2πfc t + θc ) , where for the last equality it is assumed that m(t) is real-valued. The signal x(t) obtained in this way is a AM-DSB-SC (amplitude modulation, double side-band, suppressed carrier) signal with carrier frequency fc , carrier phase θc and Fourier transform Ac M (f − fc ) ejθc + M (f + fc ) e−jθc . x(t) = Ac m(t) cos(2πfc t + θc ) ⇐⇒ X(f ) = 2 In the frequency domain this can be visualized as follows (setting θc = 0) X(f ) M(f ) Mm Ac Mm 2 f −fm 0 fm LSB USB −fc fc 0 fc −fm fc +fm −fc −fm −fc +fm 1 f From the figure it is evident that if the bandwidth of m(t) is fm , then the bandwidth of x(t) is 2fm , which explains the “DSB” in AM-DSB-SC. It is also clear that if m(t) has no dc component (which is the case for speech and music signals, for instance), then x(t) has no component at the carrier frequency fc , which is where the “SC” comes from. The portion of the spectrum of x(t) for which fc − fm ≤ |f | < fc is called the lower side-band (LSB), whereas the portion for which fc < |f | ≤ fc + fm is called the upper side-band (USB). To recover m(t) undistorted from x(t), fc ≥ fm is required, but usually fc fm in practice. The block diagram of an AM-DSB-SC transmission system is shown in the following figure. Noise n(t) mw (t) Transmitter LPF at fm m(t) × x(t) Ac cos(2πfc t + θc ) Carrier Oscillator Channel HC (f ) + Channel Model r(t) × Receiver v(t) LPF at fL m̂(t) 2 cos(2πfc t + θc ) Local Oscillator The transmitter consists of a LPF that bandlimits the wideband message signal mw (t) to |f | ≤ fm and the modulator which multiplies the resulting message signal m(t) with the output Ac cos(2πfc t + θc ) of the carrier oscillator. The channel is modeled as a filter HC (f ) with noise added at the output. In the receiver the incoming signal r(t) is multiplied by the local oscillator signal cos(2πfc t + θc ) and then lowpass filtered at fL . Assuming an ideal channel with attenuation γ and no noise such that r(t) = γ x(t), the demodulation operation can be described as v(t) = 2r(t) cos(2πfc t+θc ) = 2γAc m(t) cos2 (2πfc t+θc ) = γAc m(t) 1 + cos(4πfc t+2θc ) . Assuming that fc ≥ fm , the second term, which is a AM-DSB-SC signal with carrier frequency 2fc and carrier phase 2θc , can be removed by lowpass filtering at fL = fm and thus m̂(t) = γAc m(t) . In the absence of noise and other channel impairments this is an exact replica of the transmitted message signal, scaled by γAc . If m(t) is a wide-sense stationary process with mean E[m] and autocorrelation function Rm (τ ), then the autocorrelation function of the AM-DSB-SC signal x(t) can be computed as Rx (t1 , t2 ) = E Ac m(t1 ) cos(2πfc t1 + θc ) A∗c m∗ (t2 ) cos(2πfc t2 + θc ) = |Ac |2 E[m(t1 ) m∗ (t2 )] cos(2πfc t1 + θc ) cos(2πfc t2 + θc ) {z } | {z } | 1 = Rm (t1 − t2 ) = 2 cos 2πfc (t1 − t2 ) + cos 2πfc (t1 + t2 ) + 2θc |Ac |2 = Rm (t1 − t2 ) cos 2πfc (t1 − t2 ) + cos 2πfc (t1 + t2 ) + 2θc . 2 2 Note that x(t) is a cyclostationary process with period 1/fc . The time-averaged autocorrelation function of x(t) is Z 1/fc |Ac |2 Rm (τ ) cos(2πfc τ ) . Rx (t + τ, t) dt = R̄x (τ ) = fc 2 0 Thus, if m(t) has PSD Sm (f ), then the PSD of the AM-DSB-SC signal x(t) is |Ac |2 Sx (f ) = Sm (f − fc ) + Sm (f + fc ) . 4 The PSD of a speech signal after AM-DSB-SC modulation with fc = 8000 Hz and fm = 4000 Hz is shown in the following graph. PSD, Px=0.0072139, Px(f1,f2) = 49.9999%, Fs=44100 Hz, N=44100, NN=3, ∆f=1 Hz 0 10log10(Sx(f)) [dB] −10 −20 −30 −40 −50 −60 1.2 0 2000 4000 6000 8000 f [Hz] 10000 12000 14000 16000 Coherent AM Reception An idealizing assumption which is tacitly made in the AM-DSB-SC transmission system block diagram given earlier, is that the local oscillator at the receiver is synchronized with the carrier oscillator at the transmitter. To see why this synchronism between transmitter and receiver is important, assume that the local oscillator signal is 2 cos(2πfc t), but the received AM-DSB-SC signal is r(t) = γAc m(t) cos(2πfc t + θe ), i.e., there is a phase error θe between transmitter and receiver. Now the receiver computes v(t) = 2γAc m(t) cos(2πfc t + θe ) cos(2πfc t) = γAc m(t) cos θe + cos(4πfc t + θe ) , and thus m̂(t) = γAc cos θe m(t) , after the LPF at fL = fm . A small phase error |θe | π/2 therefore attenuates m(t) by cos(θe ) ≈ 1, which presents no big problem, but phase errors close to ±90◦ attenuate m(t) substantially or even suppress it altogether. This is especially annoying when θe varies with time and m̂(t) changes periodically in intensity. On the positive side, however, this means that two AM-DSB-SC signals, such as xi (t) = Ac mi (t) cos(2πfc t) , and xq (t) = Ac mq (t) cos(2πfc t + π/2) , 3 can use the same carrier frequency fc to transmit two independent message signals mi (t) and mq (t). This is known as quadrature amplitude modulation (QAM), and xi (t) is called the in-phase component of the AM signal at fc , whereas xq (t) is called the quadrature component. At any rate, it is crucial for the correct demodulation of AM signals with suppressed carrier, that the receiver is phase (and frequency) synchronized with the transmitter. Receivers of this type are called synchronous or coherent receivers. In practice the maintenance of exact phase synchronism between two oscillators in different physical locations is quite a non-trivial problem and requires a considerable amount of active hardware and/or software. 1.3 AM-SSB-SC and AM-VSB-SC One of the disadvantages of AM-DSB-SC is that it occupies twice the bandwidth of the original message signal. One straightforward way to reduce the bandwidth to the original value is to only keep one of the sidebands of the AM signal and suppress the other one. The resulting AM signals are known as AM-SSB-LSB (amplitude modulation, single sideband, lower sideband) and as AM-SSB-USB (amplitude modulation, single sideband, upper sideband) depending on whether the lower or upper sideband is kept. To convert AM-DSB-SC to AM-SSB-SC (either LSB or USB), the AM-DSB-SC signal can be filtered with a bandpass filter (BPF) as shown in the following block diagram. mw (t) LPF at fm m(t) × x(t) BPF HBx (f ) xB (t) Ac cos(2πfc t + θc ) Carrier Oscillator For AM-SSB-USB, for example, the transmitter filter HBx (f ) is chosen as shown in the following figure. Filter for AM-SSB-USB HBx (f ) 1 −fc −fm −fc −fc +fm fc −fm 0 fc fc +fm f A problem with this filter are the sharp cutoffs needed near fc , especially if m(t) has a dc component (which is the case for analog TV broadcast signals, for instance). To alleviate this problem, vestigial sideband (VSB) modulation can be used. This is essentially a compromise between AM-DSB and AM-SSB, with a well controlled (usually linear) overall transition from the passband of HB (f ) to the stopband near fc , extending over a range of 2∆ around fc . Depending on whether the lower or upper sideband is kept, the resulting 4 AM signal is either called AM-VSB-LSB (amplitude modulation, vestigial sideband, lower sideband) or AM-VSB-USB (amplitude modulation, vestigial sideband, upper sideband). An example of a filter HB (f ) that converts a AM-DSB-SC signal to a AM-VSB-USB-SC signal is shown in the following figure. Filter for AM-VSB-USB HB (f ) 1 −fc −fm −fc −fc −∆ −fc +fm fc −fm 0 −fc +∆ fc fc −∆ f fc +fm fc +∆ Demodulation of AM-SSB-SC signals and AM-VSB-SC signals is done in a similar fashion as for AM-DSB-SC by multiplying the received signal with the local oscillator signal 2 cos(2πfc t + θc ), followed by lowpass filtering at fm . To remove noise and/or interference from the unused (portion of the) sideband, a BPF should be used at the input of the receiver, as shown in the following blockdiagram. r(t) BPF HBr (f ) rB (t) × v(t) LPF at fL m̂(t) 2 cos(2πfc t + θc ) Local Oscillator For AM-SSB-SC the same BPF can be used for both the transmitter and the receiver. For AM-VSB-SC the product HBx (f )HBr (f ) of the frequency responses of the BPFs at the transmitter and receiver must be equal to HB (f ) as shown above. 1.4 Bandpass Filters Suppose you have a lowpass filter hL (t) ⇔ HL (f ), e.g., an LPF with trapezoidal frequency response and thus HL (f ) sin(2πfL t) sin(2παfL t) hL (t) = πt 2παfL t 1 ⇐⇒ −(1+α)fL 0 −(1−α)fL 5 0≤α≤1 (1+α)fL (1−α)fL f By making use of the frequency shift property of the FT, this LPF can be converted to a BPF hBP (t) ⇔ HBP (f ) which is symmetric about some center frequency fc ≥ (1 + α) fL (where α = 0 for an ideal LPF) by hBP (t) = 2 hL (t) cos(2πfc t) ⇐⇒ HBP (f ) = HL (f ) ∗ [δ(f − f c) + δ(f + fc )] . BPFs that are obtained from ideal LPFs (i.e., α → 0) are well suited for picking out one particular signal from several FDM (frequency division multiplexed) signals, or for generating SSB (single sideband) AM signals from DSB AM signals. BPFs that are obtained from LPFs with trapezoidal frequency response can be used for similar tasks, but in addition they can also be used to convert frequency to amplitude (in the transition region of the BPF) and to generate VSB (vestigial sideband) AM signals. 1.5 Carrier Frequency Extraction Let r(t) be a received noiseless AM-DSB-SC signal with attenuation γ, i.e., r(t) = γ x(t) = γAc m(t) cos 2π(fc + fe )t + θe , where fe is the frequency error and θe is the phase error between the transmitter and the receiver. To obtain (an estimate of) the error signal ψ(t) = 2πfe t + θe from r(t), start from squaring r(t) to obtain γ 2 A2c m2 (t) 1 + cos 4π(fc + fe )t + 2θe . r2 (t) = γ 2 A2c m2 (t) cos2 2π(fc + fe )t + θe = 2 Multiplying this by 2 cos(4πfc t) yields vi (t) = γ 2 A2c m2 (t) 1 + cos 4π(fc + fe )t + 2θe cos 4πfc t = A(t) 2 cos 4πfc t + cos(4πfe t + 2θe ) + cos 4π(2fc + fe )t + 2θe , where A(t) = γ 2 A2c m2 (t)/2 is a time-varying amplitude. Simlarly, multiplying by -2 sin 4πfc t results in vq (t) = −γ 2 A2c m2 (t) 1 + cos 4π(fc + fe )t + 2θe sin 4πfc t = A(t) − 2 sin 4πfc t + sin(4πfe t + 2θe ) − sin 4π(2fc + fe )t + 2θe . Thus, after lowpass filtering with 2fe < fL < fc , wi (t) = A(t) cos(4πfe t + 2θe ) and wq (t) = A(t) sin(4πfe t + 2θe ) . Finally, the error estimate ψ(t) is obtained by taking an inverse tangent and dividing by 2 as follows 1 −1 wq (t) ψ(t) = tan . 2 wi (t) This whole process is shown in blockdiagram form in the next figure. 6 × r(t) (.)2 r 2 (t) vi (t) LPF at fL tan−1 • 2 cos 4πfc t × vq (t) wi (t) LPF at fL wq (t) wi (t) ÷2 ψ(t) wq (t) −2 sin 4πfc t Note that, before the division by 2 to obtain ψ(t), it is crucial that the phase (which is only resolved modulo 2π by the inverse tangent) is unwrapped. To demodulate the received AM-DSB-SC signal r(t), the local oscillator term 2 cos(2πfc t + ψ(t)) is then used instead of the 2 cos(2πfc t + θc ) term shown in an earlier blockdiagram. 2 Lab Experiments E1. AM-DSB-SC Transmitter/Receiver. (a) Write a Matlab function, called amxmtr10 which performs the tasks of a AM-DSB-SC transmitter, i.e., bandlimits the message signal to fm (using trapfilt) and then multiplies the result with the output of the carrier oscillator. The header of amxmtr10 looks as follows: function xt = amxmtr10(tt,mt,fcparms,fmparms) %amxmtr10 Amplitude Modulation Transmitter V1.0 % >>>>> xt = amxmtr10(tt,mt,fcparms,fmparms) <<<<< % where % xt: transmitted AM signal % tt: time axis for m(t), x(t) % mt: modulating (wideband) message signal % fcparms = [fc thetac] % fc: carrier frequency % thetac: carrier phase in deg (0: cos, -90: sin) % fmparms = [fm km alpham] LPF at fm parameters % no LPF at fm if fmparms = [] % fm: highest message frequency % km: LPF h(t) truncation to -km/2fm <= t <= km/2fm % alpham: LPF at fm frequency rolloff parameter, linear % rolloff over range 2*alpham*fm Note that the sampling frequency Fs is not passed on explicitly to amxmtr10. It is computed in amxmtr10 from the spacing of the time values in tt using Fs = (length(tt)-1)/(tt(end)-tt(1)); %Compute Fs 7 Test your transmitter using the message signal Fs = 44100; %Sampling rate tt = [0:Fs-1]/Fs; %Time axis mt = (cos(2*pi*3000*tt)+cos(2*pi*5000*tt)); %Message signal as input. Set fc = 8000 Hz, θc = 0◦ , fm = 4000, km ≈ 10 . . . 20, and αm = 0.05. The LPF at the transmitter should remove the frequency component at 5000 Hz. The 3000 Hz cosine should be moved to fc ± 3000 Hz so that the PSD looks as shown below. PSD, Px=0.2498, Px(f1,f2) = 0.1249, Fs=44100 Hz, N=44100, NN=1, ∆f=1 Hz 0.07 0.06 0.05 Sx(f) 0.04 0.03 0.02 0.01 0 0 2000 4000 6000 8000 f [Hz] 10000 12000 14000 16000 (b) Use the speech signal in speech701.wav and the music signal in music701.wav to generate AM-DSB-SC signals x1 (t) and x2 (t), respectively, with fc = 8000 Hz, fm = 4000 Hz, km ≈ 10 . . . 20, and αm = 0.05. Use θc = −90◦ for the speech signal and θc = 0◦ for the music signal. Create a third signal x3 (t) = (x1 (t) + x2 (t))/2. Look at the PSDs of each of the three signals. Does the bandwidth for x3 (t), which contains two message signals, change? Also look at the PSDs of the squared AM signals x21 (t), x22 (t), and x23 (t). Is there any additional information that you can get from the squared signals? If so, what is this information and for which of the three signals is it actually present? Save the three signals for later use. (c) Write a Matlab function called amrcvr10 that demodulates a received AM-DSB-SC signal r(t) and produces an estimate m̂(t) of the transmitted message m(t). Here is the header for this function 8 function mthat = amrcvr10(tt,rt,fcparms,fmparms) %amrcvr10 Amplitude Modulation Receiver, V1.0 % >>>>> mthat = amrcvr10(tt,rt,fcparms,fmparms)<<<<< % where % mthat: demodulated message signal % tt: time axis for r(t), mhat(t) % rt: received AM signal % fcparms = [fc thetac] % fc: carrier frequency % thetac: carrier phase in deg (0: cos, -90: sin) % fmparms = [fm km alpham] LPF at fm parameters, % no LPF at fm if fmparms = [] % fm: highest message frequency % km: LPF h(t) truncation to -km/2fm <= t <= km/2fm % alpham: LPF at fm frequency rolloff parameter, linear % rolloff over range 2*alpham*fm Test your receiver with the AM-DSB-SC signals that you produced in part (b). Use the same fm , km and αm as for the transmitter. Can you recover the speech and music signals from x3 (t) without any interference between the two signals? (d) Analyze and, if possible, demodulate the AM signals in the wav-files amsig701.wav, amsig702.wav, and amsig603.wav. State and interpret your observations on both, how the relevant graphs of the signals look, and how the demodulated signals sound. (e) The file AMsignal_005.bin is a binary file that contains the I and Q components of several radio signals in the frequency range from 0 to 120 kHz. The sampling rate of the file is Fs = 240 kHz and the bandwidth allowed for each station is 10 kHz. Use this file as input from a File Source in the GNU Radio Companion (GRC). Build a flowgraph in the GRC for tuning to and demodulating AM-DSB-SC and, more generally QAM signals (i.e., the sum of two AM-DSB-SC signals at the same carrier frequency, one with a cosine and one with a sine carrier). Find all radio signals in AMsignal_005.bin and characterize their properties, such as fc , θc , AM-DSB vs QAM, stability of fc , interference between different stations, etc. Try to demodulate the signals as cleanly as possible. Here is an example of a flowgraph that can be used to analyze the different signals. 9 Note that some parameters are left blank and you have to decide (and make the case) for the best (or at least a good) choice. In the QT GUI Sink consider looking at the Constellation Display in addition to the Frequency and Time Domain Displays to distinguish between AM-DSB and QAM signals (why?). E2. AM-SSB/VSB Transmitter/Receiver. (a) FIR LPF/BPF with Trapezoidal H(f ). Modify your trapfilt function so that it can be used as either a lowpass or a bandpass filter with trapezoidal frequency response. The header of the extended function is shown below. function [yt,ord] = trapfilt(xt,Fs,fparms,k,alpha) %trapfilt Delay compensated FIR LPF/BPF filter with trapezoidal % frequency response % >>>>> [yt,ord] = trapfilt(xt,Fs,fparms,k,alpha) <<<<< % where % yt: filter output y(t), sampling rate Fs % ord: filter order % xt: filter input x(t), sampling rate Fs % Fs: Sampling rate of x(t), y(t) % fparms = fL for LPF, cutoff freq fL in Hz % fparms = [fL fc] for BPF, center freq fc, BW 2*fL % k: h(t) is truncated to -k/2fL <= t <= k/2fL % alpha: frequency rolloff parameter, linear rolloff % over range 2*alpha*fL To test your modified trapfilt function, estimate the parameters of the BPF whose frequency response is shown below and recreate h(t) ⇔ H(f ) with your trapfilt function. 10 FT Approximation , Fs=44100 Hz, N=44100, ∆f=1 Hz 1.4 1.2 |X(f)| 1 0.8 0.6 0.4 0.2 0 0 2000 4000 6000 8000 10000 12000 14000 16000 0 2000 4000 6000 8000 f [Hz] 10000 12000 14000 16000 200 ∠X(f) [deg] 100 0 −100 −200 (b) Extend the Matlab functions amxmtr10 and amrcvr10 so that they can also be used transmit and receive AM-SSB-SC and AM-VSB-SC. Call the new functions amxmtr11 and amrcvr11. The header of amxmtr11 is: 11 function xt = amxmtr11(tt,mt,fcparms,fmparms,fBparms) %amxmtr11 Amplitude Modulation Transmitter, V1.1 % >>>>> xt = amxmtr11(tt,mt,fcparms,fmparms,fBparms) <<<<< % where % xt: transmitted AM signal % tt: time axis for m(t), x(t) % mt: modulating (wideband) message signal % fcparms = [fc thetac] % fc: carrier frequency % thetac: carrier phase in deg (0: cos, -90: sin) % fmparms = [fm km alpham] LPF at fm parameters % no LPF at fm if fmparms = [] % fm: highest message frequency % km: LPF h(t) truncation to -km/2fm <= t <= km/2fm % alpham: LPF at fm frequency rolloff parameter, linear % rolloff over range 2*alpham*fm % fBparms = [fL fB kB alphaB] BPF at fB parameters, % no BPF if fBparms = [] % fL: BW of BPF is 2*fL % fB: center freq of BPF % kB: BPF h(t), truncation to -kB/2fL <= t <= kB/2fL % alphaB: BPF frequency rolloff parameter, linear % rolloff over range 2*alphaB*fL The parameters in fBparms are used to select the upper or lower sideband. For SSB alphaB is chosen close to 0 (≈ 0.05) and for VSB alphaB is chosen so that ∆ = αB fL . For instance, for AM-VSB-USB-SC with fc = 8000 Hz, fm = 4000 Hz, and ∆ = 1000 Hz, fBparms=[2500 10500 20 0.4]. The following graph shows the PSD of an AM-SSB-USB-SC signal with fc = 8000 Hz and fm = 4000 Hz. The speech signal in speech601.wav was used as message signal m(t). PSD, Px=0.0035935, Px(f1,f2) = 50%, Fs=44100 Hz, N=44100, NN=3, ∆f=1 Hz 0 10log10(Sx(f)) [dB] −10 −20 −30 −40 −50 −60 0 2000 4000 6000 8000 f [Hz] 10000 12000 14000 16000 The same m(t) was used for the AM-VSB-LSB-SC signal whose PSD is shown in the next graph. The parameters of this signal are fc = 8000 Hz, fm = 4000 Hz, and ∆ = 1000 Hz. 12 PSD, Px=0.0026165, Px(f1,f2) = 49.9999%, Fs=44100 Hz, N=44100, NN=3, ∆f=1 Hz 0 10log10(Sx(f)) [dB] −10 −20 −30 −40 −50 −60 0 2000 4000 6000 8000 f [Hz] 10000 12000 14000 16000 The header of the receiver function amrcvr11 is: function mthat = amrcvr11(tt,rt,fcparms,fmparms,fBparms) %amrcvr11 Amplitude Modulation Receiver, V1.1 % >>>>> mthat = amrcvr11(tt,rt,fcparms,fmparms,fBparms)<<<<< % where % mthat: demodulated message signal % tt: time axis for r(t), mhat(t) % rt: received AM signal % fcparms = [fc thetac] % fc: carrier frequency % thetac: carrier phase in deg (0: cos, -90: sin) % fmparms = [fm km alpham] LPF at fm parameters, % no LPF at fm if fmparms = [] % fm: highest message frequency % km: LPF h(t), truncation to -km/2fm <= t <= km/2fm % alpham: LPF at fm frequency rolloff parameter, linear % rolloff over range 2*alpham*fm % fBparms = [fL fB kB alphaB] BPF at fB parameters, % no BPF if fBparms = [] % fL: BW of BPF is 2*fL % fB: center freq of BPF % kB: BPF h(t), truncation to -kB/2fL <= t <= kB/2fL % alphaB: BPF frequency rolloff parameter, linear % rolloff over range 2*alphaB*fL If there is no noise or interference with other signals, then the AM-DSB-SC receiver without BPF works fine for AM-SSB-SC and AM-VSB-SC signals. But if noise and/or interfering signals are present in the frequency band of the suppressed sideband, then a BPF at the front end of the receiver is necessary so that only the desired signal is passed to the demodulator. (c) Test your amxmtr11 and amrcvr11 functions by using speech701.wav as message signal to generate AM-SSB-LSB-SC, AM-SSB-USB-SC, AM-VSB-LSB-SC, and AM-VSB-USB-SC 13 signals, and demodulating them with the AM receiver function. Use Fs = 44100 Hz, fm = 4000 Hz, fc = 8000 Hz, θc = 0◦ , and, in the case of AM-VSB, ∆ = 1000 Hz. Look at the PSDs Sx (f ) of all four AM signals x(t) and also at the PSDs of x2 (t). Are they what you expect them to be? If not, why not? (d) Analyze and demodulate the signals in the wav-files amsig704.wav and amsig705.wav. Determine the important parameters such as fc , θc , SSB or VSB, USB or LSB, fm and, in the case of VSB, ∆. Which parameters can you obtain from PSDs? For which ones do you actually have to demodulate the received signals? Note that the signals may have noise and/or interference from other signals added. If this is the case, try to eliminate as much of the noise/interference as possible. Explain your strategy! (e) Revisit those AM signals in the files amsig701.wav, amsig702.wav, and amsig703.wav that you could not demodulate properly in E1(d). Try if using an AM-SSB receiver (which removes one of the sidebands before demodulation) helps. If so, can you explain why? (f ) Extra credit. Use the GNURadio Companion to separate the two radio signals in the file AMsignal_005.bin at fc = 70 and fc = 75 kHz which are too close together by keeping only the sidebands that are not affected by interference. Show the flowgraph of your receiver in your lab report and explain how your receiver works to eliminate the interference between the two stations. E3. Extraction of Carrier Frequency and Phase from AM-DSB-SC Signal. (Experiment for ECEN 5002, optional for ECEN 4652) (a) Modify your amrcvr11 receiver function so that it extracts the error estimate ψ(t) = 2πfe t + θe between the carrier oscillator at the transmitter (cos 2π(fc + fe )t + θe ) and the local oscillator at the receiver (cos 2πfc t). Use this to demodulate AM-DSB-SC signals with unknown carrier phase and/or unstable carrier. Here is the header of the new function, called amrcvr12. 14 function mthat = amrcvr12(tt,rt,fcparms,fmparms,fBparms,fxparms) %amrcvr11 Amplitude Modulation Receiver, V1.2 with automatic % carrier extraction for AM-DSB-SC % >>>>> mthat = amrcvr12(tt,rt,fcparms,fmparms,fBparms,fxparms)<<<<< % where % mthat: demodulated message signal % tt: time axis for r(t), mhat(t) % rt: received AM signal % fcparms = [fc thetac] % fc: carrier frequency % thetac: carrier phase in deg (0: cos, -90: sin) % fmparms = [fm km alpham] LPF at fm parameters, % no LPF at fm if fmparms = [] % fm: highest message frequency % km: LPF h(t), truncation to -km/2fm <= t <= km/2fm % alpham: LPF at fm frequency rolloff parameter, linear % rolloff over range 2*alpham*fm % fBparms = [fL fB kB alphaB] BPF at fB parameters, % no BPF if fBparms = [] % fL: BW of BPF is 2*fL % fB: center freq of BPF % kB: BPF h(t), truncation to -kB/2fL <= t <= kB/2fL % alphaB: BPF frequency rolloff parameter, linear % rolloff over range 2*alphaB*fL % fxparms = [fx kx alphax] LPF at fx (for fc extract) % no LPF at fx if fxparms = [] % fx: cutoff freq for fc extract LPF % kx: LPF h(t), truncation to -kx/2fx <= t <= kx/2fx % alphax: LPF at fx frequency rolloff parameter, linear % rolloff over range 2*alphax*fx (b) To test the automatic carrier extraction feature of amrcvr12, generate an AM-DSB-SC signal, e.g., using the speech signal in speech701.wav or the music signal in music701.wav. Use fc ≈ 8000 Hz and fm = 4000 Hz. Set the fcparms for the transmitter and receiver so that there is a phase and/or frequency error between them and check for how large errors the demodulator works correctly (listen to the demodulated signal). Start with fxparms = [100 4 0.4] and then modify some of the values if necessary. (c) Use amrcvr12 to try to demodulate those AM signals in amsig701.wav...amsig705.wav that you had difficulty with in E1 and E2. Then analyze the signals in amsig706.wav and amsig707.wav. In particular, determine what kind of frequency/phase errors they have and try to demodulate them as cleanly as possible. c 2000–2015, P. Mathys. Last revised: 3-01-15, PM. 15