Descarga la aplicación para disfrutar aún más
Vista previa del material en texto
INSTITUTO POLITÉCNICO NACIONAL ESCUELA SUPERIOR DE INGENIERÍA MECÁNICA Y ELÉCTRICA UNIDAD ZACATENCO INGENIERÍA EN COMUNICACIONES Y ELECTRÓNICA 5CM2. PRÁCTICAS DE SIMULACIÓN EN MATLAB. PROFESOR. Sánchez Gallegos Jorge. MATERIA. Comunicaciones Analógicas. ALUMNO Amigón Ramírez Kevin Ariel …………………………………… 2020302006 PRÁCTICA 1. Aplicando MATLAB, graficar las siguientes señales. a) 𝑉(𝑡) = { 4; 0 < 𝑡 < 𝑇 2 −4; 𝑇 2 < 𝑡 < 𝑇 b) 16 𝜋 sin 20𝜋𝑡 c) 16 𝜋 sin 20𝜋𝑡 + 16 3𝜋 sin 60𝜋𝑡 d) 16 𝜋 sin 20𝜋𝑡 + 16 3𝜋 sin 60𝜋𝑡 + 16 5𝜋 sin 100𝜋𝑡 e) 16 𝜋 sin 20𝜋𝑡 + 16 3𝜋 sin 60𝜋𝑡 + 16 5𝜋 sin 100𝜋𝑡 + ⋯ clc, clear; T=0.1; x=[-T -T -T -T/2 -T/2 -T/2 0 0 0 T/2 T/2 T/2 T T T]; y=[-4 0 4 4 0 -4 -4 0 4 4 0 -4 -4 0 4]; t=-T:0.0001:T; Amp=-4:0.01:4; Amp2=-6:1:6; y2=16/pi*sin(20*pi*t); y3=16/pi*sin(20*pi*t)+16/(3*pi)*sin(60*pi*t); y4=16/pi*sin(20*pi*t)+16/(3*pi)*sin(60*pi*t)+16/(5*pi)*sin(100*pi*t); ONCEAVA APROXIMACIÓN EN SERIE DE FOURIER y5=16/pi*sin(20*pi*t)+16/(3*pi)*sin(60*pi*t)+16/(5*pi)*sin(100*pi*t)... +16/(7*pi)*sin(140*pi*t)+16/(9*pi)*sin(180*pi*t)... +16/(11*pi)*sin(220*pi*t)+16/(13*pi)*sin(260*pi*t)... +16/(15*pi)*sin(300*pi*t)+16/(17*pi)*sin(340*pi*t)... +16/(19*pi)*sin(380*pi*t)+16/(21*pi)*sin(420*pi*t); plot (t, zeros(size(t)), 'r') grid on, hold on plot (zeros(size(Amp2)), Amp2, 'r') xlabel('T--->') ylabel('Amp--->') title('Señal V(t) con tres primeras aproximaciones en series de Fourier') plot(x,y,'k','LineWidth',5) plot(t,y2,'r','LineWidth',3) plot(t,y3,'y','LineWidth',3) plot(t,y4,'b','LineWidth',3) plot(t,y5,'g','LineWidth',3) PRÁCTICA 2. Representación de una señal periódica triangular mediante un numero finito de armónicas. Utilizando MATLAB, graficar las siguientes señales: 1. Señal triangular. 2. Primera componente de frecuencia. 3. Primeras dos componentes de frecuencia. 4. Primeras tres componentes de frecuencia. Señal propuesta: 𝑉(𝑡) = { 20 𝑇 + 5; − 𝑇 2 < 𝑡 < 0 − 20 𝑇 + 5; 0 < 𝑡 < 𝑇 2 𝑐𝑜𝑛 𝑇 = 0.1 𝑠𝑒𝑔; 𝑓 = 10𝐾𝐻𝑧; 𝜔0 = 20𝜋 𝑟𝑎𝑑 𝑠𝑒𝑔 clc,clear T=0.1; w=2*pi*(1/T); x=[-T -T/2 0 T/2 T]; Y=[5 -5 5 -5 5]; t=-T:0.0001:T; A=40/(pi*pi); F=(w*t); P0=A*cos(F); P1=A*cos(F)+((1/9)*A*cos(F*3)); P2=A*cos(F)+((1/9)*A*cos(F*3))+((1/25)*A*cos(F*5)); subplot(2,2,1),plot(x,Y,'r','linewidth',3),xlabel('Tiempo -->')... ,ylabel('Amplitud -->'),title('1era componente frecuencia'),grid on,hold on; subplot(2,2,2),plot(t,P0,'b','linewidth',3),xlabel('Tiempo -->')... ,ylabel('Amplitud -->'),title('1era componente frecuencia'),grid on,hold on; subplot(2,2,3),plot(t,P1,'m','linewidth',3),xlabel('Tiempo -->')... ,ylabel('Amplitud -->'),title('2da componente frecuencia'),grid on ,hold on; subplot(2,2,4),plot(t,P2,'k','linewidth',3),xlabel('Tiempo -->')... ,ylabel('Amplitud -->'),title('3era componente frecuencia'),grid on, hold on; PRÁCTICA 3. Modulación. Utilizando MATLAB, graficar las siguientes señales: a) 𝒗(𝒕) = 𝟐 𝐜𝐨𝐬 𝟒𝟎𝝅𝒕 b) 𝒑(𝒕) = 𝐜𝐨𝐬 𝟏𝟎𝟎𝟎𝝅𝒕 c) 𝒗(𝒕) ∗ 𝒑(𝒕) = 𝟐 𝐜𝐨𝐬 𝟒𝟎𝝅𝒕 ∗ 𝐜𝐨𝐬 𝟏𝟎𝟎𝟎𝝅𝒕 𝒇𝒎 = 𝟐𝟎 𝑯𝒛 𝑻 = 𝟏 𝟐𝟎 = 𝟎. 𝟎𝟓 𝒔 𝒇𝒄 = 𝟓𝟎𝟎 𝑯𝒛 𝑻 = 𝟏 𝟓𝟎𝟎 = 𝟐 𝒎𝒔 a) Mensaje clc, clear; T=0.05; t=-T:0.000001:T; v=2*cos(40*pi*t); plot(t,v,'b','LineWidth',3) xlabel('T--->') ylabel('Amp--->') title('Gráfica del mensaje v(t).') grid on; b) Portadora clc, clear; T=0.002; t=-T:0.000001:T; p=cos(1000*pi*t); plot(t,p,'r','LineWidth',3) xlabel('T--->') ylabel('Amp--->') title('Gráfica de la prtadora p(t).') grid on; c) Producto clc, clear; T=0.025; t=-T:0.000001:T; vp=2*cos(1000*pi*t).*cos(40*pi*t); plot(t,vp,'y','LineWidth',3) xlabel('T--->') ylabel('Amp--->') title('Gráfica del producto v(t)*p(t).') grid on; Y, superponiendo el mensaje… clc, clear; T=0.025; t=-T:0.000001:T; vp=2*cos(1000*pi*t).*cos(40*pi*t); v=2*cos(40*pi*t); plot(t,vp,'y','LineWidth',3) hold on; plot(t,v,'k','LineWidth',3) xlabel('T--->') ylabel('Amp--->') title('Gráfica del producto v(t)*p(t).') grid on; PRÁCTICA 4. Modulación en AM de gran portadora. Utilizando MATLAB, graficar las siguientes señales: a) 𝑣(𝑡) = 5 cos 50𝜋𝑡 + 7 b) 𝑝(𝑡) = cos 1000𝜋𝑡 c) 𝑣(𝑡) ∗ 𝑝(𝑡) = (5 cos 50𝜋𝑡 + 7) ∗ cos 1000𝜋𝑡 𝑓𝑚 = 25 𝐻𝑧 𝑇𝑚 = 0.04 𝑠 𝑓𝑐 = 500 𝐻𝑧 𝑇𝑐 = 2 𝑚𝑠 a) Mensaje clc, clear; T=0.04; t=-T:0.000001:T; clc, clear; T=0.04; t=-T:0.000001:T; vp=(5*cos(50*pi*t)+7).*cos(1000*pi*t); plot(t,vp,'g','linewidth',2.5) hold on; v=5*cos(50*pi*t)+7; plot(t,v,'k','linewidth',2.5) xlabel('T--->') ylabel('Amp--->') title('Producto V(t)*P(t).') grid on; xlabel('T- -->') ylabel('Amp--->') title('Mensaje V(t).') grid on; b) Portadora clc, clear; T=0.002; t=-T:0.000001:T; p=cos(1000*pi*t); plot(t,p,'r','LineWidth',3) xlabel('T--->') ylabel('Amp--->') title('Gráfica de la prtadora p(t).') grid on; c) Producto clc, clear; T=0.04; t=-T/2:0.000001:T/2; vp=(5*cos(50*pi*t)+7).*cos(1000*pi*t); plot(t,vp,'g','linewidth',2.5) xlabel('T--->') ylabel('Amp--->') title('Producto V(t)*P(t).') grid on; Superponiendo la gráfica del mensaje en el producto podremos observar que el mensaje se mantiene en los bordes de la multiplicación ocasionada entre portadora y mensaje. clc, clear; T=0.04; t=-T:0.000001:T; vp=(5*cos(50*pi*t)+7).*cos(1000*pi*t); plot(t,vp,'g','linewidth',2.5) hold on; v=5*cos(50*pi*t)+7; plot(t,v,'k','linewidth',2.5) xlabel('T--->') ylabel('Amp--->') title('Producto V(t)*P(t).') grid on; PRÁCTICA 5. Modulación en amplitud con una señal compuesta. Utilizando MATLAB, graficar las siguientes señales: a) 𝑣(𝑡) = 9 𝜋 cos 50𝜋𝑡 − 9 3𝜋 cos 150𝜋𝑡 + 9 5𝜋 cos 250𝜋𝑡 − 9 7𝜋 cos 350𝜋𝑡 b) 𝑝(𝑡) = cos 1000𝜋𝑡 c) 𝑣(𝑡) ∗ 𝑝(𝑡) = [ 9 𝜋 cos 50𝜋𝑡 − 9 3𝜋 cos 150𝜋𝑡 + 9 5𝜋 cos 250𝜋𝑡 − 9 7𝜋 cos 350𝜋𝑡] ∗ cos 1000𝜋𝑡 𝑓𝑚 = 25 𝐻𝑧 𝑇𝑚 = 0.04 𝑠 a) Mensaje clc, clear; T=0.04; t=-T:0.000001:T; v=((9/pi)*cos(50*pi*t))- ((9/(3*pi))*cos(150*pi*t))... +(9/(5*pi)*cos(250*pi*t))- ((9/(7*pi))*cos(350*pi*t)); plot(t,v,'y','linewidth',2.5) xlabel('T--->') ylabel('Amp--->') title('Mensaje V(t).') grid on; b) Portadora clc, clear; T=0.002; t=-T:0.000001:T; p=cos(1000*pi*t); plot(t,p,'r','LineWidth',3) xlabel('T--->') ylabel('Amp--->') title('Gráfica de la prtadora p(t).') grid on; c) Producto con un periodo y superposición de ondas Para un periodo… clc, clear; T=0.04; t=-T/2:0.000001:T/2; vp=(((9/pi)*cos(50*pi*t))- ((9/(3*pi))*cos(150*pi*t))... +(9/(5*pi)*cos(250*pi*t))- ((9/(7*pi))*cos(350*pi*t)))... .*cos(1000*pi*t); plot(t,vp,'y','linewidth',2.5) xlabel('T--->') ylabel('Amp--->') title('Producto V(t)*p(t).') grid on; Superponiendo quedará… clc, clear; T=0.04; t=-T:0.000001:T; vp=(((9/pi)*cos(50*pi*t))- ((9/(3*pi))*cos(150*pi*t))... +(9/(5*pi)*cos(250*pi*t))- ((9/(7*pi))*cos(350*pi*t)))... .*cos(1000*pi*t); plot(t,vp,'y','linewidth',2.5) hold on; v=(((9/pi)*cos(50*pi*t))- ((9/(3*pi))*cos(150*pi*t))... +(9/(5*pi)*cos(250*pi*t))- ((9/(7*pi))*cos(350*pi*t))); plot(t,v,'k','linewidth',2.5) xlabel('T--->') ylabel('Amp--->') title('Producto V(t)*p(t).') grid on; PRÁCTICA 6. Modulación PAM (por amplitud de pulsos). Utilizando MATLAB, graficar las siguientes señales: a) 𝑣(𝑡) = 7 cos 50𝜋𝑡 b) 𝑝(𝑡)= 𝑆𝑒ñ𝑎𝑙 𝑝𝑒𝑟ó𝑑𝑖𝑐𝑎 𝑡𝑟𝑒𝑛 𝑝𝑢𝑙𝑠𝑜𝑠 𝑟𝑒𝑐𝑡𝑎𝑛𝑔𝑢𝑙𝑎𝑟𝑒𝑠 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑜𝑠 c) 𝑣(𝑡) ∗ 𝑝(𝑡) = 7 cos 5𝜋𝑡 ∗ 𝑆𝑒ñ𝑎𝑙 𝑝𝑒𝑟ó𝑑𝑖𝑐𝑎 𝑡𝑟𝑒𝑛 𝑝𝑢𝑙𝑠𝑜𝑠 𝑟𝑒𝑐𝑡𝑎𝑛𝑔𝑢𝑙𝑎𝑟𝑒𝑠 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑜𝑠 𝑓𝑚 = 25 𝐻𝑧 𝑇𝑚 = 0.04 𝑠 Como 𝑓𝑚 < 𝑓𝑐 𝑓𝑐 = 800 𝐻𝑧 𝑇𝑐 = 1.25 𝑚𝑠 clc, clear; T=0.04; t=-T:0.000001:T; vt=7*cos(50*pi*t); w=0.000625; p=0.00125; d=-1:p:1; n= @rectpuls; por= pulstran(t,d,n,w); x=vt.*por; subplot(3,1,1),plot(t,vt,'r','linewidth',1); grid on; title('Mensaje v(t)'); xlabel('T--->'),ylabel('Amp--->'); subplot(3,1,2),plot(t,por,'g','linewidth',1); axis([0 .04 -7 7]), grid on; xlabel('T--->'),ylabel('Amp--->'); title('Portadora p(t)'); subplot(3,1,3),plot(t,x,'b','linewidth',1),grid on; xlabel('T--->'),ylabel('Amp--->'); title('Señal modulada v(t)*p(t)'); grid on;
Compartir