besoin d aide en matlab pr la data acquisition toolbox

besoin d aide en matlab pr la data acquisition toolbox - Divers - Programmation

Marsh Posté le 04-06-2007 à 14:05:21    

Bonjour , je suis eleve ingenieur en telecommunications et pour mon projet de fin d annee je dois programmer sur matlab un code permettant d envoyer un signal de type modulation OFDM sur la carte son d un pc et recuperer ce signal sur cette meme carte , pour cela j utilise la data acquisition toolbox , le probleme que j ai est que je suis parvenu a faire un programme qui permet d envoyer un signal quelconque comme un signal sinuosidal et aussi de le recevoir , mais des que je le remplace par mon signal OFDM le signal recu n est plus le signal envoye , je vous joins donc les deux fichiers matlab l un avec le signal sinuosidal et l autre avec le signal ofdm , merci d avance pour votre temps je suis actuellement bloque.
 
%%Open the analog device and channels for sending
AO = analogoutput('winsound',0);
chan = addchannel(AO,1);
%%Open the analog device and channels for recieving
AI = analoginput('winsound',0);
chan = addchannel(AI,1);
%% Set the sample rate and how long we will send data for
%% 44,100 Hz, 1 seconds of data
duration = 1;
SampleRate = 44100;
set([AI AO],'SampleRate',SampleRate)
set([AI AO],'TriggerType','Manual')
AI.ManualTriggerHwOn = 'Trigger';
NumSamples = SampleRate*duration;
%% Create a signal that we would like to send an OFDM signal
x = randsrc(1,10,[-1-j -1+j 1-j 1+j])
A = ifft (x,20)
data = (A)
%%plot(data)
%% Put the data in the buffer, start the device, and trigger
putdata(AO,data')
start(AO)
trigger(AO)
start(AI);
trigger(AI);
datar = getdata(AI);
plot(datar)
 
%%Open the analog device and channels for sending
AO = analogoutput('winsound',0);
chan = addchannel(AO,1);
%%Open the analog device and channels for recieving
AI = analoginput('winsound',0);
chan = addchannel(AI,1);
%% Set the sample rate and how long we will send data for
%% 44,100 Hz, 1 seconds of data
duration = 1;
SampleRate = 44100;
set([AI AO],'SampleRate',SampleRate)
set([AI AO],'TriggerType','Manual')
AI.ManualTriggerHwOn = 'Trigger';
NumSamples = SampleRate*duration;
%% Create a signal that we would like to send an OFDM signal
%% Create a signal that we would like to send, 500 Hz sin wave    
x = linspace(0,2*pi*500,NumSamples);    
data = sin(x)';
%%plot(data)
%% Put the data in the buffer, start the device, and trigger
putdata(AO,data)
start(AO)
trigger(AO)
start(AI);
trigger(AI);
datar = getdata(AI);
plot(datar)
 

Reply

Marsh Posté le 04-06-2007 à 14:05:21   

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed