IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MATLAB Discussion :

Simulation fibre optique


Sujet :

MATLAB

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Octobre 2013
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Sénégal

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1
    Points : 1
    Points
    1
    Par défaut Simulation fibre optique
    bonjour,

    je voudrais simuler un programme MATLAB mais je n'arrive pas à trouver les bons paramètres pour faire fonctionner le programme.

    j'ai besoin de votre aide svp.
    merci

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
     %Code Matlab
     
    clc;
    q=1;
    Pi=input('Enter the value of input power in mW  ')
    alpha=input('Enter the value of fiber loss in db/km  ')
    t=input('Enter the value of input pulse width in seconds  ') 
    tau=input('Enter time period with upper(U), lower(L) and interval between upper and  lower interval(I) in this format L:I:U')
    dt=input('enter intervel of period')
    Area=input('Enter the area of effective core in m^2  ')
    C=input('Enter the value of chirp factor   ')
    Lamda=input('Enter the wavelength in meters   ')
    D=input(' Enter the value of dispersion coefficient ps/nm/km   ')
    s=input('Enter the length of fiber in Km   ')
    disp('Fiber losses in /km   ')
    A=alpha/(4.343) 
    c=3*1e8;
    n1=1.48;
    pi=3.1415926535;
    %delta=0.01
    delta=(n1*2*pi*s)/Lamda
    n2=7e-10
    n2=n1*(1-delta)
    f=c/Lamda;
    omega=2*pi*f;
    a=n2*omega;
    b=c*Area;
    gamma=a/b %calculation of nonlinear coefficient
    %gamma=0.003;
    B2=-(Lamda^2*D)/(2*pi*c) % calculation of group velocity dispersion coefficient
    L=(t^2)/(abs(B2)) %dispersion length
     
    Ao=sqrt(Pi) % amplitude of an input gaussian pulse
     
     h=2000  % small step as defined by  split step algorithm
     
    for ii=0.1:0.1:(s/10) %different fiber lengths
        X=ii*L;
        At=Ao*exp(-((1+i*(C))/2)*(tau/t).^2); % generation of an gaussian input pulse
        figure(1)
        plot(abs(At)); % graph of input pulse
        title('Input Pulse'); xlabel('Time in ps'); ylabel('Amplitude');
        grid on;
        hold off;
        l=max(size(At));  
     
        fwhmi=find(abs(At)>abs(max(At)/2));
        fwhmi=length(fwhmi);
        dw=1/l/dt*2*pi;
        w=(-1*l/2:1:l/2-1)*dw;
        At=fftshift(At);
        w=fftshift(w);
        spec=fft(fftshift(At)); %generating a pulse spectrum
        for j=h:h:X
            spec=spec.*exp(-A*(h/2)+i*B2/2*w.^2*(h)) ; % calculation of linear part of NLSE 
            f=ifft(spec);
            f=f.*exp(i*gamma*((abs(f)).^2)*(h)); %calculating nonlinear part of NLSE
            spec=fft(f);
            spec=spec.*exp(-A*(h/2)+i*B2/2*w.^2*(h)) ; % NLSE calculation
        end
        f=ifft(spec); % pulse propagation
        output_pulse(q,:)=abs(f); %preserving output pulse
        fwhmo=find(abs(f)>abs(max(f)/2));
        fwhmo=length(fwhmo);% finding the Full width half maximumof output signal
        pbratio(q)=fwhmo/fwhmi; %finding pulse brodening ratio
        q=q+1;
    end
    figure(2);
    mesh(output_pulse(1:1:q-1,:)); %output spectrum
    title('Pulse Evolution');
    xlabel('Time'); ylabel('distance in km'); zlabel('amplitude');
    figure(3)
    plot(pbratio(1:1:q-1)); %pulse broadening plot
    xlabel('distance in km');
    ylabel('Pulse broadening ratio');
    grid on;
    hold on;
     
     
     
     
    %Calcul du BER.
     
     
    Q=input('enter the value of Q factor in db');
    Pi=3.14
    A=(1/2*Pi)
    B=exp(-Q^2/2)
    disp('The BER for value of Q is')
    BER=A*(B/Q)
    Fichiers attachés Fichiers attachés

Discussions similaires

  1. La fibre optique: une aubaine selon vous
    Par randriano dans le forum La taverne du Club : Humour et divers
    Réponses: 11
    Dernier message: 10/11/2009, 09h44
  2. [Débutant] simulation d'atténuation des fibres optiques
    Par manana8 dans le forum MATLAB
    Réponses: 2
    Dernier message: 15/06/2009, 15h30
  3. Offre free fibre optique
    Par jbarreau-mainson dans le forum Dépannage et Assistance
    Réponses: 5
    Dernier message: 28/04/2008, 09h14
  4. Fibre optique cachée dans la sortie audio ?
    Par ToTo13 dans le forum Apple
    Réponses: 4
    Dernier message: 06/12/2007, 22h08

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo