Mudanças entre as edições de "CSF29008 2015-2"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
Linha 154: Linha 154:
 
{{collapse bottom}}
 
{{collapse bottom}}
  
* Rayleigh Plano (Clarke-Jakes)
+
{{collapse top | Modelo de Clarke-Jakes (Canal Plano com Desvanecimento Rayleigh)}}
 +
 
 +
<syntaxhighlight lang=matlab>
 +
% Clarke-Jakes Narrowband Model
 +
clear all; close all; clc;
 +
 
 +
N = 4096;                          % frequency points
 +
Nz = 1*2^16;                        % frequency zero-padding
 +
fd = 300;                            % Doppler shift
 +
fc = 900e6;                        % carrier frequency
 +
delta = 0;                          % ignore infinity PSD values
 +
Vz = zeros(1,Nz/2);                % zero-padding vector
 +
f = linspace(fc-fd+delta,fc+fd-delta,N); % frequency vector;
 +
df = 2*fd/N;
 +
B = 2*fd+Nz*df;                    % bandwidth
 +
Ts = 1/B;                          % sample-time
 +
T = (N+Nz)*Ts;                      % total time
 +
 
 +
%% Doppler PSD
 +
Pr = 1/4;
 +
A = Pr;         
 +
D = 1-(abs((f-fc))/fd).^2;
 +
Sf = A./pi/fd./sqrt(D);        % PSD
 +
% Sf(1) = Sf(2); Sf(end) = Sf(end-1); % ignore infinity PSD values
 +
% Sf(1) = 0; Sf(end) = 0; % ignore infinity PSD values
 +
% Sf(1) = 0.5*(max(Sf)); Sf(end) = Sf(1); % ignore infinity PSD values
 +
m1 = (Sf(2)-Sf(3))/(f(2)-f(3));
 +
m2 = (Sf(end-1)-Sf(end-2))/(f(end-1)-f(end-2));
 +
Sf(1) = m1*(f(1)-f(2))+Sf(2);
 +
Sf(end) = m2*(f(end)-f(end-1))+Sf(end-1);
 +
 
 +
 
 +
 
 +
Sfz = [Vz Sf Vz];      % zero-padded PSD
 +
 
 +
%% Frequency Domain
 +
Hp = sqrt(1/2)*(randn(1,N/2) +1i*randn(1,N/2));    % positive components
 +
Hn = conj(Hp(end:-1:1));                % negative components
 +
H = [Vz Hp Hn Vz];                      % zero-padded comp.
 +
Hf = sqrt(Sfz).*H;                      % zero-padded equivalent spectrum
 +
 
 +
%% Time domain
 +
ri = ((N+Nz)/2)*ifft(real(Hf),N+Nz);              % real components
 +
rq = ((N+Nz)/2)*ifft(imag(Hf),N+Nz);              % imaginary components
 +
hr = sqrt(abs(ri).^2+abs(rq).^2);            % rayleigh envelope
 +
hrms = sqrt(var(hr)+mean(hr)^2);                % rms value
 +
hnorm = hr/hrms;                                % normalizing fading
 +
t = linspace(0,T-Ts,N+Nz);                % time vector
 +
 
 +
%% MATLAB Rayleigh Channel
 +
h2 = rayleighchan(Ts,fd);
 +
h2.ResetBeforeFiltering = 0;    % do not reset
 +
h2.StoreHistory = 1;            % save path gains after filter
 +
h2.StorePathGains=1;
 +
h2.NormalizePathGains = 0;      % do not normalize E[norm(h)]
 +
y = filter(h2,[1 ones(1,N+Nz-1)]);
 +
 
 +
 
 +
%% Plot Images
 +
figure;
 +
% plot(t, sqrt(hr),'k','linewidth',2);
 +
plot(t, 20*log10(hnorm),'k','linewidth',2); hold;
 +
plot(t, 20*log10(abs(h2.PathGains)),'--r','linewidth',1.2);
 +
set(gca,'linewidth',3,'fontsize',30);
 +
grid;
 +
% axis([0 5 get(gca,'Ylim')])
 +
 
 +
%_________________________________________________________________________%
 +
%% Histogram 1
 +
figure;
 +
Mh = 50;                                % bin numbers
 +
[fn,bin] = hist(hnorm,Mh);          % get bins and cumulative frequencies
 +
yhist = fn/trapz(bin,fn);              % calculate relative frequencies
 +
xx = linspace(min(bin),max(bin),100);  % x vector in bins
 +
yy = spline(bin,yhist,xx);              % interpolation of histogram envelope
 +
set(gca,'linewidth',3,'fontsize',30); grid;
 +
 
 +
% sigr = 1/sqrt(2);
 +
sigr = mean(hnorm)*sqrt(2/pi);
 +
PDF_theor = bin.*exp(-bin.^2/(2*sigr^2))/(sigr^2);
 +
 
 +
bcor = [0.5 0.5 1];                                                       
 +
bar(bin,yhist,'FaceColor',bcor,'edgecolor',bcor); hold on;                  % histogram bar plot
 +
plot(xx,yy,':','color',[0 0 1],'linewidth',3);                              % envelope plot   
 +
plot(bin,PDF_theor,'-ok','linewidth',3); grid on;                          % theoretical PDF
 +
title('RMS-Normalized Rayleigh Amplitude Fading Histogram','fontsize',30);
 +
ylabel('Estimated PDF','fontsize',30); xlabel('Amplitude Levels','fontsize',30);
 +
legend('Normalized Histogram','Histogram Envelop','Theoretical Rayleigh PDF');
 +
set(gca,'fontsize',30,'linestyleorder','-','linewidth',3);
 +
 
 +
%% Histogram 2 (MATLAB channel)
 +
figure;
 +
Mh = 50;                                % bin numbers
 +
[fn,bin] = hist(abs(h2.PathGains),Mh);          % get bins and cumulative frequencies
 +
yhist = fn/trapz(bin,fn);              % calculate relative frequencies
 +
xx = linspace(min(bin),max(bin),100);  % x vector in bins
 +
yy = spline(bin,yhist,xx);              % interpolation of histogram envelope
 +
set(gca,'linewidth',3,'fontsize',30); grid;
 +
 
 +
% sigr = 1/sqrt(2);
 +
sigr = mean(abs(h2.PathGains))*sqrt(2/pi);
 +
PDF_theor = bin.*exp(-bin.^2/(2*sigr^2))/(sigr^2);
 +
 
 +
bcor = [0.5 0.5 1];                                                       
 +
bar(bin,yhist,'FaceColor',bcor,'edgecolor',bcor); hold on;                  % histogram bar plot
 +
plot(xx,yy,':','color',[0 0 1],'linewidth',3);                              % envelope plot   
 +
plot(bin,PDF_theor,'-ok','linewidth',3); grid on;                          % theoretical PDF
 +
title('MATLAB RMS-Normalized Rayleigh Amplitude Fading Histogram','fontsize',30);
 +
ylabel('Estimated PDF','fontsize',30); xlabel('Amplitude Levels','fontsize',30);
 +
legend('Normalized Histogram','Histogram Envelop','Theoretical Rayleigh PDF');
 +
set(gca,'fontsize',30,'linestyleorder','-','linewidth',3);
 +
</syntaxhighlight}
 +
 
 +
{{collapse bottom}}
 
* Rayleigh Plano (BPSK e AWGN)
 
* Rayleigh Plano (BPSK e AWGN)
  

Edição das 08h28min de 29 de outubro de 2015

Plano de Ensino e Cronograma

Desenvolvimento Pedagógico - Andamento do Cronograma 2015/2

Suspensão do calendário acadêmico pela direção do Campus de 30 de Julho a 1 de Outubro;
Semestre 2015-2 - Prof. Bruno Fontana da Silva / ???
Aula Data Horas Conteúdo Recursos
1 5/10 2 Introdução às comunicações móveis: apresentação e motivação da componente curricular
2 8/10 2 Propagação em Larga Escala (Modelos Analíticos): Introdução, Espaço Livre, Dois Raios
3 15/10 2 Propagação em Larga Escala (Modelos Analíticos): 10 Raios, Múltiplos Raios Generalizado, Difração e Dispersão, Okumura
4 17/10 2 Dúvidas sobre exercícios com MATLAB (apenas um aluno compareceu)
5 19/10 2 Propagação em Larga Escala (Modelos Empíricos): Okumura, Hata, Cost231, Dual Slope, Atenuação Indoor, Modelo Simplificado (+30min.) MATLAB para simulação das curvas do modelo Hata e Cost231
6 22/10 2 Propagação em Pequena Escala: Introdução, Doppler e Canal Multipercurso MATLAB: superposição de fasores de campo elétrico
7 26/10 2 Propagação em Pequena Escala: Modelo de Banda Estreita, Autocorrelações, Clarke-Jakes e PSD (+30min.) MATLAB: simulação do canal rayleigh plano através do modelo Clarke-Jakes
8 29/10 2 Propagação em Pequena Escala: Simulação Rayleigh (Plano) – Método Rappaport x MATLAB rayleighchan(Ts,fd) + BPSK
TOTAL 80

Voltar para CSF-2015-2

Notas de Aula

Modelos do Canal de Comunicação sem Fio

Teoria sobre desvanecimento de larga escala

Teoria sobre desvanecimento de pequena escala


Simulações

  • Dois raios
  • Hata e Cost231
Campo eletromagnético
% 5.4.1 A Computer Experiment (Andreas Molisch, Wireless Communications)

clear all; close all; clc;

% Consider the following simple computer experiment. The signals from several IOs are incident
% onto an RX that moves over a small area. The IOs are distributed approximately uniformly around
% the receiving area. They are also assumed to be sufficiently far away so that all received waves
% are homogeneous plane waves, and that movements of the RX within the considered area do not
% change the amplitudes of these waves. The different distances and strength of the interactions are
% taken into account by assigning a random phase and a random amplitude to each wave. We are
% then creating eight constituting waves Ei with absolute amplitudes |a_i|, angle of incidence (with
% respect to the x-axis) φ_i and phase ϕ_i.

fc = 900e6; Tc = 1/fc;                      % frequência da portadora;
c = 3e8;                                    % speed of light
wl = c*Tc;                                  % comprimento de onda
k = 2*pi/wl;                                % número de onda

% Fasores
% a = [169 213 87 256 17 126 343 297 0];        % φ, azimuti
% e = [311 32 161 356 191 56  268 131 0];       % ϕ_i, elevação
% Ep = [1 .8 1.1 1.3 .9 .5 .7 .9 1000];            % |a_i|, amplitudes

a=0;
e=180;
Ep = 1;

L = 100;
x = linspace(0,5*wl,L);                     % Eixo 0 < x < 5*wl  (L pontos)
y = linspace(0,5*wl,L);                     % Eixo 0 < y < 5*wl  (L pontos)
    

En = zeros(L,L);                            % buffer
for xx=1:length(x)                          % índices de x
    for yy = 1:length(y)                    % índices de y
        for n = 1:length(a)                 % índices de componentes
            % E(x,y) = sum Ep*exp{-jk[x*cos(a) + y*sin(a)]}*exp{je}
            % fasores do campo elétrico(x,y) em t=0;
            % Ep*exp(-j [k d + d0/k])
            En(xx,yy) = En(xx,yy) + Ep(n)*exp(-1i*k*(x(xx)*cosd(a(n))+y(yy)*sind(a(n))))*exp(1i*e(n)*pi/180);
        end
    end
end



figure;
subplot(2,2,1);
 surf(x,y,real(En)); zlabel('Real');
 
 subplot(2,2,2);
 surf(x,y,imag(En)); zlabel('Imaginário');
 
  subplot(2,1,2);
 surf(x,y,abs(En)); zlabel('|E|');
 
 figure;
 hist(abs(En(:)),100)


Modelo de Clarke-Jakes (Canal Plano com Desvanecimento Rayleigh)

<syntaxhighlight lang=matlab> % Clarke-Jakes Narrowband Model clear all; close all; clc;

N = 4096; % frequency points Nz = 1*2^16; % frequency zero-padding fd = 300; % Doppler shift fc = 900e6; % carrier frequency delta = 0; % ignore infinity PSD values Vz = zeros(1,Nz/2); % zero-padding vector f = linspace(fc-fd+delta,fc+fd-delta,N); % frequency vector; df = 2*fd/N; B = 2*fd+Nz*df; % bandwidth Ts = 1/B; % sample-time T = (N+Nz)*Ts; % total time

%% Doppler PSD Pr = 1/4; A = Pr; D = 1-(abs((f-fc))/fd).^2; Sf = A./pi/fd./sqrt(D); % PSD % Sf(1) = Sf(2); Sf(end) = Sf(end-1); % ignore infinity PSD values % Sf(1) = 0; Sf(end) = 0; % ignore infinity PSD values % Sf(1) = 0.5*(max(Sf)); Sf(end) = Sf(1); % ignore infinity PSD values m1 = (Sf(2)-Sf(3))/(f(2)-f(3)); m2 = (Sf(end-1)-Sf(end-2))/(f(end-1)-f(end-2)); Sf(1) = m1*(f(1)-f(2))+Sf(2); Sf(end) = m2*(f(end)-f(end-1))+Sf(end-1);


Sfz = [Vz Sf Vz]; % zero-padded PSD

%% Frequency Domain Hp = sqrt(1/2)*(randn(1,N/2) +1i*randn(1,N/2)); % positive components Hn = conj(Hp(end:-1:1)); % negative components H = [Vz Hp Hn Vz]; % zero-padded comp. Hf = sqrt(Sfz).*H; % zero-padded equivalent spectrum

%% Time domain ri = ((N+Nz)/2)*ifft(real(Hf),N+Nz); % real components rq = ((N+Nz)/2)*ifft(imag(Hf),N+Nz); % imaginary components hr = sqrt(abs(ri).^2+abs(rq).^2); % rayleigh envelope hrms = sqrt(var(hr)+mean(hr)^2); % rms value hnorm = hr/hrms; % normalizing fading t = linspace(0,T-Ts,N+Nz); % time vector

%% MATLAB Rayleigh Channel h2 = rayleighchan(Ts,fd); h2.ResetBeforeFiltering = 0; % do not reset h2.StoreHistory = 1; % save path gains after filter h2.StorePathGains=1; h2.NormalizePathGains = 0; % do not normalize E[norm(h)] y = filter(h2,[1 ones(1,N+Nz-1)]);


%% Plot Images figure; % plot(t, sqrt(hr),'k','linewidth',2); plot(t, 20*log10(hnorm),'k','linewidth',2); hold; plot(t, 20*log10(abs(h2.PathGains)),'--r','linewidth',1.2); set(gca,'linewidth',3,'fontsize',30); grid; % axis([0 5 get(gca,'Ylim')])

%_________________________________________________________________________% %% Histogram 1 figure; Mh = 50; % bin numbers [fn,bin] = hist(hnorm,Mh); % get bins and cumulative frequencies yhist = fn/trapz(bin,fn); % calculate relative frequencies xx = linspace(min(bin),max(bin),100); % x vector in bins yy = spline(bin,yhist,xx); % interpolation of histogram envelope set(gca,'linewidth',3,'fontsize',30); grid;

% sigr = 1/sqrt(2); sigr = mean(hnorm)*sqrt(2/pi); PDF_theor = bin.*exp(-bin.^2/(2*sigr^2))/(sigr^2);

bcor = [0.5 0.5 1]; bar(bin,yhist,'FaceColor',bcor,'edgecolor',bcor); hold on; % histogram bar plot plot(xx,yy,':','color',[0 0 1],'linewidth',3); % envelope plot plot(bin,PDF_theor,'-ok','linewidth',3); grid on; % theoretical PDF title('RMS-Normalized Rayleigh Amplitude Fading Histogram','fontsize',30); ylabel('Estimated PDF','fontsize',30); xlabel('Amplitude Levels','fontsize',30); legend('Normalized Histogram','Histogram Envelop','Theoretical Rayleigh PDF'); set(gca,'fontsize',30,'linestyleorder','-','linewidth',3);

%% Histogram 2 (MATLAB channel) figure; Mh = 50; % bin numbers [fn,bin] = hist(abs(h2.PathGains),Mh); % get bins and cumulative frequencies yhist = fn/trapz(bin,fn); % calculate relative frequencies xx = linspace(min(bin),max(bin),100); % x vector in bins yy = spline(bin,yhist,xx); % interpolation of histogram envelope set(gca,'linewidth',3,'fontsize',30); grid;

% sigr = 1/sqrt(2); sigr = mean(abs(h2.PathGains))*sqrt(2/pi); PDF_theor = bin.*exp(-bin.^2/(2*sigr^2))/(sigr^2);

bcor = [0.5 0.5 1]; bar(bin,yhist,'FaceColor',bcor,'edgecolor',bcor); hold on; % histogram bar plot plot(xx,yy,':','color',[0 0 1],'linewidth',3); % envelope plot plot(bin,PDF_theor,'-ok','linewidth',3); grid on; % theoretical PDF title('MATLAB RMS-Normalized Rayleigh Amplitude Fading Histogram','fontsize',30); ylabel('Estimated PDF','fontsize',30); xlabel('Amplitude Levels','fontsize',30); legend('Normalized Histogram','Histogram Envelop','Theoretical Rayleigh PDF'); set(gca,'fontsize',30,'linestyleorder','-','linewidth',3); </syntaxhighlight}

  • Rayleigh Plano (BPSK e AWGN)

Exercícios

Lista 01 - Telefonia Celular

Material Complementar On-line

Palestra da ANATEL "Sistema Móvel Pessoal no Brasil", 02/06/2015

GSMA - Estatísticas e análise de dados da indústria de comunicações móveis

TELECO - Portal sobre Telecomunicações criado por grupo de profissionais brasileiros

Vídeo sobre perspectivas do 5G para Internet tátil

Princípios de reuso de frequência em sistemas celulares de telefonia

Práticas de planejamento de sistemas celulares de telefonia

Calculadora Erlang B

Calculadora Erlang C

Simulador de Configuração do AP TP-Link TL-WDR4300


Voltar para CSF-EngTel_(página)