Sie sind auf Seite 1von 1

Q3

The integral of m(t) can be implemented as


int_m(1)=0;
for i=1:length(t)1 % integral of message signal m(i)
int_m(i+1)=int_m(i)+m(i)*ts; % ts=1/fs is sampling interval, fs is sampling frequency.
end
*****
The procedure to demodulate the FM signal is,
1. Use hilbert function to make carrier to be a sin function. (Originally, the carrier is cos
function).
2. Multiply with exp(-j*2*pi*fc*t) to get rid of the influence of carrier frequency.
3. Use angle function to detect the phase.
4. Use unwrap function to unwrap the detected phase.
5. Use differentiate function to obtain the message signal.
The differentiate function in Matlab is diff
1) In computing the spectrum of signals, you may need the procedure as follows,
n2=length(m); % m is the time-domain sequence
n=2^(nextpow2(n2)); % determine the length of fft
M=fft(m,n);
M=M/fs; % scaling, fs is the sampling frequency
M=fftshift(M) % put the low frequency in the middle
df=fs/n;
f=[0:df:df*(length(M)-1)]-fs/2; % frequency vector
plot(f,abs(M)); % plot the amplitude of M

Das könnte Ihnen auch gefallen