![]() ![]() The following shows the message signal, the transmitted AM modulated standard AM signal waveform, the noisy received AM signal and the recovered AM signal. Overall, this code demonstrates how to generate, modulate, add noise to, and demodulate an AM signal using a square law detector and low-pass filter. The resulting message signal is plotted, along with the original message signal, the carrier signal, and the noisy AM signal.The cutoff frequency of the filter is set to 2 times the message frequency, and a Butterworth filter with a order of 4 is used. A low-pass filter is applied to the resulting baseband signal to recover the original message signal.The AM signal is demodulated using a square law detector, which involves multiplying the AM signal by a cosine wave at the carrier frequency.Noise is added to the AM signal using the awgn function, which adds white Gaussian noise to the signal at the specified signal-to-noise ratio (SNR).The AM signal is then generated by multiplying the carrier signal by (1 ka * m), where m is the message signal and ka is the amplitude sensitivity. The message signal is generated as a cosine wave with a frequency of fm, and the carrier signal is generated as a cosine wave with a frequency of fc.The sampling frequency is set to 10 times the carrier frequency, and the sampling time is calculated based on the sampling frequency.The user is prompted to input various parameters for the AM signal, such as the carrier signal amplitude, message signal amplitude, carrier frequency, message frequency, and amplitude sensitivity.This code generates an AM (amplitude modulation) signal and then applies noise and demodulation techniques to recover the original message signal. ![]() Subplot(4,1,4) plot(t,m_demod) title('Demodulated Standard AM signal') Subplot(4,1,3) plot(t,stx_noisy) title('Noisy Standard AM signal') Subplot(4,1,2) plot(t,stx) title('Carrier signal') Subplot(4,1,1) plot(t,m) title('Message signal') = butter(4, fcutoff/(fs/2)) % design low-pass Butterworth filter % Apply low-pass filter to recover message signalįcutoff = 2*fm % cutoff frequency of filter Ka=input('enter amplitude sensitivity: ') Ac=input('enter carrier signal amplitude: ') Īm=input('enter message signal amplitude(Am ![]() ![]() The following is matlab code doe demodulation of standard AM signal with square law detector method. \(percentage \space modulation = k_a m(t) \times 100\) Matlab Code The following is equation of percentage modulation, The a(t) given below is called envelope of the standard AM. subplot (2,1,2) plot (x,y2) a axes t1 title ('Global Title') a.Visible 'off' set (a,'Visible','off') t1.Visible 'on' set (t1,'Visible','on') Note: In prior versions you may need to use the set command as done in the comments You may need to tweak the Position property of the axes, a, so the titles do not overlap. Where \(k_a\) is amplitude sensitivity of the AM modulator. Where \(A_c\) is the amplitude of the carrier signal, and \(f_c\) is the frequency of the carrier signal. The carrier signal, \(c(t)\), is given by: Where \(A_m\) is the amplitude of the message signal, and \(f_m\) is the frequency of the message signal. The message signal, \(m(t)\), is given by: It would not be possible to scroll or pan or zoom the images individually, and you would need extra work to data cursor them individually.The message and carrier signal are defined as follows. Use montage or similar to create a 4 x 2 image array and display it in an axes that you put appropriate text labels on.Each axes could been panned, scrolled, zoomed, or data cursored individiually. Using subplot() for this might not be bad, but you will need to move the axes carefully. Then carefully "tuck" the axes in so only the wanted parts show. create a 4 x 2 array of axes the same size, all large enough to accomodate title and ylabel.Using subplot() for this purpose is not great, as you do not want the axes to all be the same size. Create three axes below that with room for an image. Create top right axes with room for title and image. Create 3 axes below that with room for ylabel and an image. create the top left axes with room for title and ylabel and an image.create an axes for each of the images, and an axes for each of the titles above and each of the titles to the side.The ones I can think of off-hand include: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |