Amplitude Modulation

			
				% am signal and fft
				clc; clear;

				N = 4096; 
				Fs = 1.024e6; 
				t = f_timevec(Fs, N);

				m_M = 53;
				c_M = 461;

				m_Fi = f_Fi(Fs, N, m_M);
				fprintf('modulating freq = %1.1e Hz\n', m_Fi);     

				m_x = sin(2*pi*m_Fi*t);

				c_Fi = f_Fi(Fs, N, c_M);
				fprintf('carrier freq = %1.1e Hz\n', c_Fi);     

				c_x = sin(2*pi*c_Fi*t);

				x = (1 + 0.5*m_x) .* c_x; % AM wave, 50% modulation

				[f, xf] = f_fft(N, Fs, x); % return frequency vector and fft
				xf = mag2db(xf);
				xf = xf - max(xf);

				% time domain plots
				subplot(4,1,1);
				plot(t,m_x);
				axis([0, 0.5e-3, -1, 1]);
				title('modulating wave');

				subplot(4,1,2);
				plot(t,c_x);
				axis([0, 0.5e-3, -1, 1]);
				title('carrier wave');

				subplot(4,1,3);
				plot(t, x);
				axis([0, 1e-3, -2, 2]);
				title('signal');
				xlabel('time');
				ylabel('amplitude');

				% freq domain plot
				subplot(4,1,4);
				stairs(f, xf);
				title('fft');
				xlabel('freq');
				ylabel('dB');
			
		
			
				>>
				modulating freq = 1.3e+04 Hz
				carrier freq = 1.2e+05 Hz
			
		

Experiment: Connect a signal generator to a spectrum analyzer and observe a 1MHz signal. Introduce 20% AM modulation with a (built-in) 1KHz signal.

© 2018 Copyright. For individual use only. No liability is accepted for any consequences of using information on Testips.com.