0% found this document useful (0 votes)
86 views4 pages

Practica 3

This document provides instructions for a lab experiment on frequency modulation (FM) using MATLAB. Students will model an FM signal by modulating a carrier signal with a message signal. The modulated signal and its frequency spectrum will be plotted and analyzed. Code is provided to perform the FM modulation, demodulation, and Fourier transforms needed to analyze the signals in both the time and frequency domains.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views4 pages

Practica 3

This document provides instructions for a lab experiment on frequency modulation (FM) using MATLAB. Students will model an FM signal by modulating a carrier signal with a message signal. The modulated signal and its frequency spectrum will be plotted and analyzed. Code is provided to perform the FM modulation, demodulation, and Fourier transforms needed to analyze the signals in both the time and frequency domains.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

UNIVERSIDAD NACIONAL DE CHIMBORAZO

Facultad de Ingeniería
Carrera de Ingeniería Electrónica y Telecomunicaciones

COMUNICACIONES ANALÓGICAS Y LAB

Unidad III
1. Tema:
Modulación de Frecuencia
2. Objetivos
- Modelar las señales FM en el tiempo y frecuencia para observar sus espectros

3. Conocimientos Previos
- Señales en tiempo y frecuencia

4. Instrucciones
- Instalar el programa Matlab
- Realizar las instrucciones que se encuentran en el paso de procedimiento

5. Equipos y Materiales
Equipos Materiales
Matlab

6. Fundamento Teórico:
Revisión teórica de los espectros de las señales.

7. Procedimiento y Actividades
Dada la señal

Se procede a escribir el código siguiente en Mfile.

Figura 1. Señal de Información

Figura 2. Señal Modulada FM

Elaborado por: Deysi Inca Balseca


UNIVERSIDAD NACIONAL DE CHIMBORAZO
Facultad de Ingeniería
Carrera de Ingeniería Electrónica y Telecomunicaciones

% MATLAB script for Illustrative Problem 3.11.


% Demonstration script for frequency modulation. The message
signal
% is m(t)=sinc(100t).
clear
echo on
t0=.2; % signal duration
ts=0.001; % sampling interval
fc=250; % carrier frequency
snr=20; % SNR in dB
(logarithmic)
fs=1/ts; % sampling frequency
df=0.3; % required freq.
resolution
t=[-t0/2:ts:t0/2]; % time vector
kf=100; % deviation constant
df=0.25; % required frequency
resolution
m=sinc(100*t); % the message signal
int_m(1)=0;
for i=1:length(t)-1 % integral of m
int_m(i+1)=int_m(i)+m(i)*ts;
echo off ;
end
echo on ;
[M,m,df1]=fftseq(m,ts,df); % Fourier transform
M=M/fs; % scaling
f=[0:df1:df1*(length(m)-1)]-fs/2; % frequency vector
u=cos(2*pi*fc*t+2*pi*kf*int_m); % modulated signal
[U,u,df1]=fftseq(u,ts,df); % Fourier transform
U=U/fs; % scaling
[v,phase]=env_phas(u,ts,250); % demodulation, find
phase of u
phi=unwrap(phase); % Restore original
phase.
dem=(1/(2*pi*kf))*(diff(phi)/ts); % demodulator output,
differentiate and scale phase
pause % Press any key to see a plot of the message and the
modulated signal.
subplot(2,1,1)
plot(t,m(1:length(t)))
xlabel('Time')
title('The message signal')
subplot(2,1,2)
plot(t,u(1:length(t)))
xlabel('Time')
title('The modulated signal')
pause % Press any key to see plots of the magnitude of the
message and the
% modulated signal in the frequency domain.
subplot(2,1,1)
plot(f,abs(fftshift(M)))
xlabel('Frequency')
title('Magnitude spectrum of the message signal')
subplot(2,1,2)
plot(f,abs(fftshift(U)))
title('Magnitude-spectrum of the modulated signal')
xlabel('Frequency')
pause % Press any key to see plots of the message and the
demodulator output with no
Elaborado por: Deysi Inca Balseca
UNIVERSIDAD NACIONAL DE CHIMBORAZO
Facultad de Ingeniería
Carrera de Ingeniería Electrónica y Telecomunicaciones

% noise.
subplot(2,1,1)
plot(t,m(1:length(t)))
xlabel('Time')
title('The message signal')
subplot(2,1,2)
plot(t,dem(1:length(t)))
xlabel('Time')
title('The demodulated signal')

Función fftseq
function [M,m,df]=fftseq(m,ts,df)
% [M,m,df]=fftseq(m,ts,df)
% [M,m,df]=fftseq(m,ts)
%FFTSEQ generates M, the FFT of the sequence m.
% The sequence is zero padded to meet the required frequency
resolution df.
% ts is the sampling interval. The output df is the final
frequency resolution.
% Output m is the zero padded version of input m. M is the
FFT.
fs=1/ts;
if nargin == 2
n1=0;
else
n1=fs/df;
end
n2=length(m);
n=2^(max(nextpow2(n1),nextpow2(n2)));
M=fft(m,n);
m=[m,zeros(1,n-n2)];
df=fs/n;

end

función env_pahs
function [v,phi]=env_phas(x,ts,f0)
% [v,phi]=env_phas(x,ts,f0)
% v=env_phas(x,ts,f0)
%ENV_PHAS Returns the envelope and the phase of the bandpass
signal x.
% f0 is the center frequency.
% ts is the sampling interval.
%
if nargout == 2
z=loweq(x,ts,f0);
phi=angle(z);
end
v=abs(hilbert(x));

end
función loweq
function xl=loweq(x,ts,f0)
% xl=loweq(x,ts,f0)
%LOWEQ returns the lowpass equivalent of the signal x
% f0 is the center frequency.
% ts is the sampling interval.
%
Elaborado por: Deysi Inca Balseca
UNIVERSIDAD NACIONAL DE CHIMBORAZO
Facultad de Ingeniería
Carrera de Ingeniería Electrónica y Telecomunicaciones

t=[0:ts:ts*(length(x)-1)];
z=hilbert(x);
xl=z.*exp(-j*2*pi*f0*t);
end

En la figura 3 se observa la señal en frecuencia.

Figura 3. Espectro de la señal modulada

8. Cálculos / Algoritmos
Realizar el proceso de la modulación dada las señales.

9. Resultados
Comparar las gráficas calculadas con as simuladas.

10. Conclusiones y Recomendaciones


___________________________________________________________________________________________
___________________________________________________________________________________________
___________________________________________________________________________________________
___________________________________________________________________________________________
___________________________________________________________________________________________
___________________________________________________________________________________________

Ing. Deysi Inca Balseca


Docente Facultad de Ingeniería

Elaborado por: Deysi Inca Balseca

You might also like