No BSD License  

Highlights from
BPSK Simulator for Low Rate Transmisions

image thumbnail

BPSK Simulator for Low Rate Transmisions

by

 

01 Jun 2004 (Updated )

BPSK Simulator for didactical purposes. Systemic coding style.

pruebaPLL.m
clear all, clc, close all

%fi = 1e3;

ruta = 'D:\Estudios\UPM Superior\4Teleco\2Cuatrimestre\Lab. Trat. Dig. Seal\BPSK\Cdigo\Ficheros\';
fileTX1 = 'in.tx';
fileTX2 = 'tramas.tx';
fileTX3 = 'Linea.rx';
fileTX4 = 'LineaI.tx';
fileTX5 = 'OutI.rx';
fileTX6 = 'OutQ.tx';
fileTX7 = 'out.tx';

fileRX1  = 'out.tx';
fileRX2  = 'outPLL.rx';
fileRX3  = 'errorPLL.rx';
fileRX5  = 'desfasePLL.rx';
fileRX4  = 'Linea.rx';
fileRX6  = 'decisor.rx';
fileRX7  = 'out.rx';
fileRX8  = 'carrier.rx';


retardo = Transmisor(ruta, fileTX1);

%fs = 2^16;
%posicion=1;
%N= 20;
%pll = [50e3,38.4e3,1/sqrt(2)];
%memoria = zeros(8,34);
%bandaFI,posicion] = cargar(ruta,fichero2, posicion, (140+100)*32, 2);
%trama, memoria] = demoduladorBPSK (bandaFI, fs, memoria, N, pll);

%[trama, memoria] = demoduladorBPSK (bandaFI, parametros(pGENERAL,pFS), memoria, N, pll);


Receptor(ruta)

[lineaTX] = cargar(ruta,fileTX4,1, 32*140, 2, 3);
[lineaRX2] = cargar(ruta,fileRX4,1, 32*140, 2, 3);
[lineaRX] = cargar(ruta,fileRX6,1, 32*140, 2, 3);
[carrier] = cargar(ruta,fileRX8,1, 32*140, 2, 3);



%[binario] = cargar(ruta,fichero1,100, 140, 1);
%[binario2] = cargar(ruta,fichero6,1, 140, 1);

%plot(binario-binario2);
plot(lineaTX,'r'); hold on;
plot(lineaRX2,'b'); hold off;
%plot(signal,binario,'o'); 


%bar(binario); colormap(cool);
%hold on;
%bar(binario2); colormap(hsv);
%hold off;


%file2 = 'out.tx';
%t = 0: 1/fs: (2^15 -1)*(1/fs);
%signal = sin(2*pi*fi*t);
%L = fix(length(signal)/2^4);
%signal(length(signal)-24 : length(signal))=[];
%x = signal;
%binario = signal>0;
%b = binario;
%ficheros = [0 0];
%length(binario)


%k = 0;
% GUARDAMOS EN FICHEROS
%while ~isempty(signal),
%   
%   if L>length(signal), aux = signal(1:L); signal(1:L) = []; 
%   else aux = signal; signal = []; end;      
%   guardar(ruta,file1,aux, 2,k==0);      
%   aux = [];
   %aux = binario(1:L);
   %guardar(ruta,file2,aux, 1,k==0);
   %binario(1:L) = [];
   %ux = [];   
%   k=k+1;
%   end;
  %guardar(ruta,file2,[1 0], 1,k==0);
% CARGAMOS FICHERO
%N = L;
%posicion = 1 ;
%binario = [];
%k ==0;
%signal= [];
%aux = [];


%[aux, posicion(2)] = cargar(ruta, file1, posicion(2),N, 0);
%   binario = [binario aux];
%   aux = [];

Contact us