Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %bonificacion
- %Un cable coaxial tiene una impedancia característica de 75 @ 3GHz.
- %La frecuencia central de operación de el generador es 1.600GHz y,
- %mediante el cable, alimenta una carga desconocida. Mediciones en el
- %sistema dan los siguientes datos: la relación de onda estacionaria es de
- %1.9 y los mínimos de voltage se corren 11cm hacia el generador, respecto
- %de los nulos cuando la línea se carga con un corto circuito. Suponiendo
- %que la permitividad relativa del aislante del coaxial es 1.75. De los dos
- %"stubs" posibles, cuál recomendaría teniendo en cuenta que el enlace se
- %realiza con un pequeño ancho de banda alrededor de la frecuencia de
- %operación. Entregue la profundidad del stub recomendado en centímetros.
- clc
- clear all
- close all
- % calculo de las posibles dimensiones del stub
- %%
- a = 23.586e-3;
- b = 11.792e-3;
- e_r = 1;
- f_g = mean([0.6360e10,1.2719e10])
- BW = [f_g - 0.05*f_g,f_g + 0.05*f_g];
- %Z_l = 120-80i;
- v = 3e8;
- f_g = mean(BW);
- f_c_mn = @(v,m,n,a,b) (v/2).*sqrt((m./a).^2+(n./b).^2);
- Z_TM = @(fcmn,f) 120*pi.*sqrt(1-(fcmn./f).^2);
- Z_TE = @(fcmn,f) 120*pi./sqrt(1-(fcmn./f).^2);
- n_modes = 100;
- f_cut = zeros(n_modes*n_modes,3);
- k = 1;
- f_cut_4_f_g = [0,0,0];
- for m = 0:n_modes
- for n = 0:n_modes
- f_cut(k,1) = f_c_mn(v,m,n,a,b);
- f_cut(k,2) = m;
- f_cut(k,3) = n;
- if(f_cut(k,1) > f_cut_4_f_g(1) && f_cut(k,1) < f_g)
- f_cut_4_f_g = [f_cut(k,1),m,n];
- end
- k = k +1;
- end
- end
- f_cut = f_cut(find(f_cut(:,1) <= f_g),:);
- f_cut = sortrows(f_cut,1);
- %f_cut_4_f_g(1) = 2.08;
- beta_mn = @(v,f,f_c) (2*pi./v)*sqrt(f.^2-f_c.^2);
- beta = beta_mn(v,f_g,f_cut_4_f_g(1));
- Z_0_TE_mn = Z_TE(f_cut_4_f_g(1), f_g);
- Z_0_TM_mn = Z_TM(f_cut_4_f_g(1), f_g);
- Z_0 = Z_0_TE_mn;
- SWR = 7.02;
- e_r = 1;
- v_p = v/sqrt(e_r);
- %lambda = v_p/f_g;
- %dmin = lambda/2;
- lambda = 2*pi/beta;
- dmin = lambda/2;
- mov = 0.97e-2;
- prop = mov/dmin;
- first_min = -(2*dmin-mov);
- %beta = 2*pi/lambda;
- psi = pi - 2*beta*first_min;
- rho_l = ((SWR-1)/(SWR+1))*exp(1i*psi);
- Z_l = Z_0*((1+rho_l)/(1-rho_l));
- %%
- Z_0 = Z_0_TE_mn;
- rho_l = (Z_l-Z_0)/(Z_l-Z_0);
- para_stub = para_coupling(1/Z_0,1/Z_l,beta);
- check1 = 1/(1/(impedancia(Z_0,Z_l,1i*beta,-para_stub(1,1)))...
- +1/(impedancia(Z_0,0,1i*beta,-para_stub(1,2))))
- series_stub = series_coupling(Z_0,Z_l,beta);
- check2 =impedancia(Z_0,Z_l,1i*beta,-series_stub(1,1))...
- +(impedancia(Z_0,0,1i*beta,-series_stub(1,2)))
- check3 = 1/(1/(impedancia(Z_0,Z_l,1i*beta,-para_stub(2,1)))...
- +1/(impedancia(Z_0,0,1i*beta,-para_stub(2 ,2))))
- series_stub = series_coupling(Z_0,Z_l,beta);
- check4 =impedancia(Z_0,Z_l,1i*beta,-series_stub(2,1))....
- +(impedancia(Z_0,0,1i*beta,-series_stub(2,2)))
- %end ----- calculo de las posibles dimensiones del stub
- % calculo del SWR para los otros valores de la banda de trabajo
- freq = BW(1):(BW(2)-BW(1))/100:BW(2);
- beta = beta_mn(v,freq,f_cut_4_f_g(1));
- SWR_f = @(rho_l) (1+abs(rho_l))./(1-abs(rho_l));
- rho_f = @(Z_z,Z_0) ((Z_z-Z_0)./(Z_z+Z_0));
- %analisis paralelo
- Z_0 = Z_TE(f_cut_4_f_g(1), freq);
- rho_l = (Z_l-Z_0)./(Z_l-Z_0);
- Z_coupling_1 = 1./(1./(line_impedance(Z_0,Z_l,1i*beta,-para_stub(1,1)))...
- +1./(line_impedance(Z_0,0,1i*beta,-para_stub(1,2))));
- SWR_1 = SWR_f(rho_f(Z_coupling_1,Z_0));
- Z_coupling_2 = 1./(1./(line_impedance(Z_0,Z_l,1i*beta,-para_stub(2,1)))...
- +1./(line_impedance(Z_0,0,1i*beta,-para_stub(2,2))));
- SWR_2 = SWR_f(rho_f(Z_coupling_2,Z_0));
- %analisis serie
- Z_coupling_3 = line_impedance(Z_0,Z_l,1i*beta,-series_stub(1,1))...
- +(line_impedance(Z_0,0,1i*beta,-series_stub(1,2)));
- SWR_3 = SWR_f(rho_f(Z_coupling_3,Z_0));
- Z_coupling_4 = line_impedance(Z_0,Z_l,1i*beta,-series_stub(2,1))...
- +(line_impedance(Z_0,0,1i*beta,-series_stub(2,2)));
- SWR_4 = SWR_f(rho_f(Z_coupling_4,Z_0));
- sel_mat_1 = [[mean(SWR_1.^2),para_stub(1,1),para_stub(1,2),0];
- [mean(SWR_2.^2),para_stub(2,1),para_stub(2,2),0];
- [mean(SWR_3.^2),series_stub(1,1),series_stub(1,2),1];
- [mean(SWR_4.^2),series_stub(2,1),series_stub(2,2),1];]
- sel_mat_1 = sortrows(sel_mat_1,1);
- sel_mat_2 = [[mean(SWR_1([1,end])),para_stub(1,1),para_stub(1,2),0];
- [mean(SWR_1([1,end])),para_stub(2,1),para_stub(2,2),0];
- [mean(SWR_1([1,end])),series_stub(1,1),series_stub(1,2),1];
- [mean(SWR_1([1,end])),series_stub(2,1),series_stub(2,2),1];]
- sel_mat_2 = sortrows(sel_mat_1,1);
- figure(1)
- plot(freq*1e-9,SWR_1,'r') %paralelo
- hold on
- plot(freq*1e-9,SWR_2,'g') %paralelo
- hold on
- plot(freq*1e-9,SWR_3,'b') %serie
- hold on
- plot(freq*1e-9,SWR_4,'k') %serie
- hold on
- legend(['paralelo l_s = ',num2str(para_stub(1,1)),'[m] p_s = ',...
- num2str(para_stub(1,2)),'[m]'],...
- ['paralelo l_s = ',num2str(para_stub(2,1)),'[m] p_s = ',...
- num2str(para_stub(2,2)),'[m]'],...
- ['serie l_s = ', num2str(series_stub(1,1)),'[m] p_s = ',...
- num2str(series_stub(1,2)),'[m]'],...
- ['serie l_s = ', num2str(series_stub(2,1)),'[m] p_s = ',...
- num2str(series_stub(2,2)),'[m]']);
- title('SWR(f)')
- xlabel('Frecuencia [GHz]');
- rho_l_abs_1 = ((SWR_1-1)./(SWR_1+1));
- rho_l_abs_2 = ((SWR_2-1)./(SWR_2+1));
- rho_l_abs_3 = ((SWR_3-1)./(SWR_3+1));
- rho_l_abs_4 = ((SWR_4-1)./(SWR_4+1));
- CLdB_1 = 10*log10(1-rho_l_abs_1.^2);
- CLdB_2 = 10*log10(1-rho_l_abs_2.^2);
- CLdB_3 = 10*log10(1-rho_l_abs_3.^2);
- CLdB_4 = 10*log10(1-rho_l_abs_4.^2);
- figure(2)
- semilogx(freq*1e-9,CLdB_1,'r') %paralelo
- hold on
- semilogx(freq*1e-9,CLdB_2,'g') %paralelo
- hold on
- semilogx(freq*1e-9,CLdB_3,'b') %serie
- hold on
- semilogx(freq*1e-9,CLdB_4,'k') %serie
- hold on
- legend(['paralelo l_s = ',num2str(para_stub(1,1)),'[m] p_s = ',...
- num2str(para_stub(1,2)),'[m]'],...
- ['paralelo l_s = ',num2str(para_stub(2,1)),'[m] p_s = ',...
- num2str(para_stub(2,2)),'[m]'],...
- ['serie l_s = ', num2str(series_stub(1,1)),'[m] p_s = ',...
- num2str(series_stub(1,2)),'[m]'],...
- ['serie l_s = ', num2str(series_stub(2,1)),'[m] p_s = ',...
- num2str(series_stub(2,2)),'[m]']);
- title('CL[dB](f)')
- xlabel('Frecuencia [GHz]');
- ylabel('CL[dB]')
- RL_dB_1 = 20*log10(rho_l_abs_1);
- RL_dB_2 = 20*log10(rho_l_abs_2);
- RL_dB_3 = 20*log10(rho_l_abs_3);
- RL_dB_4 = 20*log10(rho_l_abs_4);
- figure(3)
- semilogx(freq*1e-9,RL_dB_1,'r') %paralelo
- hold on
- semilogx(freq*1e-9,RL_dB_2,'g') %paralelo
- hold on
- semilogx(freq*1e-9,RL_dB_3,'b') %serie
- hold on
- semilogx(freq*1e-9,RL_dB_4,'k') %serie
- hold on
- legend(['paralelo l_s = ',num2str(para_stub(1,1)),'[m] p_s = ',...
- num2str(para_stub(1,2)),'[m]'],...
- ['paralelo l_s = ',num2str(para_stub(2,1)),'[m] p_s = ',...
- num2str(para_stub(2,2)),'[m]'],...
- ['serie l_s = ', num2str(series_stub(1,1)),'[m] p_s = ',...
- num2str(series_stub(1,2)),'[m]'],...
- ['serie l_s = ', num2str(series_stub(2,1)),'[m] p_s = ',...
- num2str(series_stub(2,2)),'[m]']);
- title('RL[dB](f)')
- xlabel('Frecuencia [GHz]');
- ylabel('CL[dB]')
Add Comment
Please, Sign In to add comment