(Solved):
2. Conventional Amplitude Modulation (AM) Communication System As shown below, the AM signal AM(t) ...
2. Conventional Amplitude Modulation (AM) Communication System As shown below, the AM signal AM(t) is generated by simply multiplying the message signal plus a constant A + m(t) by the carrier signal cos(2? fet) where fe is the carrier frequency. At the coherent receiver, the received signal AM (t) is multiplied by a locally generated carrier signal cos(2? fet) and then passed through a low pass filter to recover the information signal m(t). m(t) CAM (t) A cos(2? fet) 2 cos(2? fet) m(t) = A (² +.00¹) - ^ (²000¹) t-0.01 LPF 2.1. Task 2 In this task, we will generate an AM signal and implement the coherent demodulator. The message (modulating) signal is as follows: Write a MATLAB/Octave code to do the following: A+ m(t) (a) generate baseband signal m(t) over the time period -0.025 to 0.025 seconds in 10-4 incre- ments. (b) generate the modulated signal AM(t) = (1+m(t)) cos(2 fet) where the carrier frequency is 500 Hz. (c) plot the baseband signal and modulated signal in both time and frequency domains. (d) demodulate CAM (t) using a coherent detector, i.e., multiply the signal by the carrier signal and then pass it through a low-pass filter (LPF) with the appropriate bandwidth. (e) plot the demodulated signal in both time and frequency domains. Edit the following code by replacing ? with the appropriate code. generate signal Ts 1e-4; t -0.03: Ts: 0.03; triang(t) (1-2+abs (t)).* (abs (t) <-0.5); mt triang ((t+0.01)/0.01)-triang ((t-0.01)/0.01); ? & generate AM signal. ? ? use FFT to represent the message signal in the frequency domain demodulate the signal by multiplying by the carrier, then pass it through a LPF mt_demod ?; ? use FFT to represent the AM signal in the frequency domain Bm 150; Bandwidth of the signal in Hz hfirl (40, [Bm*Ts*2]); $FIR filter of order 40. Run 'pkg load signal" mt_rec filter (h, 1, mt_demod); filters input signal mt_demod ? use FFT to represent the recovered signal in the frequency domain plot the signals in time and frequency domains Trange [-0.025 0.025 -2 2]; - ? Frange-[-700 700 0 400];
the code: % generate signal close all clear all Ts = 1e-4; t =-0.025:Ts:0.025; triang =@(t) (1-2*abs (t)).*(abs(t)<=0.5) mt = triang((t+0.01)/0.01)- triang((t-0.01)/0.01) ; N = length(t); frequency = (-(N-1)/2:N/2)*1/Ts/N; % plotting various s