laserregenerator.asv

来自「Matlab实现SONET/SDH光通信系统simulink仿真程序源代码」· ASV 代码 · 共 640 行 · 第 1/2 页

ASV
640
字号
case 'STS-12/STM-4'  %622 Mbps
    switch (frecuencia55)
        case '1310'
            Nd55=0.5;
            Ith55= 0.01;
        case '1550'
            Nd55=0.25;
            Ith55= 0.01;
    end
    
case 'STS-48/STM-16'   %2.5 Gbps
    switch (frecuencia55)
        case '1310'
            Nd55=0.25;
            Ith55= 0.01;
        case '1550'
            Nd55=0.22;
            Ith55= 0.01;
    end
    
 case 'STS-192/STM-64'   %10 Gbps
     switch (frecuencia55)
        case '1310'
            Nd55=0.25;
            Ith55= 0.009;
        case '1550'
            %Datasheet LUCENT
            Nd55=0.2;
            Ith55= 0.015;
    end

 case 'STS-768/STM-256'   %40 Gbps
    switch (frecuencia55)
        case '1310'
            Nd55=0.25;
            Ith55= 0.009;
        case '1550'
            Nd55=0.2;
            Ith55= 0.015;
    end
    
end
set_param(BloqueLaser55,'Nd',num2str(Nd55));
set_param(BloqueLaser55,'Ith',num2str(Ith55));
end


if isempty(find_system(gcs,'Name','Regenerator6'))~=1
   BloqueLaser66=([gcs,'/','Regenerator6']);
   tiposenal66=get_param(BloqueLaser66,'sel');
   frecuencia66=get_param(BloqueLaser66,'frec');         

switch (tiposenal66)
    
case 'STS-12/STM-4'  %622 Mbps
    switch (frecuencia66)
        case '1310'
            Nd66=0.5;
            Ith66= 0.01;
        case '1550'
            Nd66=0.25;
            Ith66= 0.01;
    end
    
case 'STS-48/STM-16'   %2.5 Gbps
    switch (frecuencia66)
        case '1310'
            Nd66=0.25;
            Ith66= 0.01;
        case '1550'
            Nd66=0.22;
            Ith66= 0.01;
    end
    
 case 'STS-192/STM-64'   %10 Gbps
     switch (frecuencia66)
        case '1310'
            Nd66=0.25;
            Ith66= 0.009;
        case '1550'
            %Datasheet LUCENT
            Nd66=0.2;
            Ith66= 0.015;
    end

 case 'STS-768/STM-256'   %40 Gbps
    switch (frecuencia66)
        case '1310'
            Nd66=0.25;
            Ith66= 0.009;
        case '1550'
            Nd66=0.2;
            Ith66= 0.015;
    end
    
end
set_param(BloqueLaser66,'Nd',num2str(Nd66));
set_param(BloqueLaser66,'Ith',num2str(Ith66));
end


if isempty(find_system(gcs,'Name','Regenerator7'))~=1
   BloqueLaser77=([gcs,'/','Regenerator7']);
   tiposenal77=get_param(BloqueLaser77,'sel');
   frecuencia77=get_param(BloqueLaser77,'frec');         

switch (tiposenal77)
    
case 'STS-12/STM-4'  %622 Mbps
    switch (frecuencia77)
        case '1310'
            Nd77=0.5;
            Ith77= 0.01;
        case '1550'
            Nd77=0.25;
            Ith77= 0.01;
    end
    
case 'STS-48/STM-16'   %2.5 Gbps
    switch (frecuencia77)
        case '1310'
            Nd77=0.25;
            Ith77= 0.01;
        case '1550'
            Nd77=0.22;
            Ith77= 0.01;
    end
    
 case 'STS-192/STM-64'   %10 Gbps
     switch (frecuencia77)
        case '1310'
            Nd77=0.25;
            Ith77= 0.009;
        case '1550'
            %Datasheet LUCENT
            Nd77=0.2;
            Ith77= 0.015;
    end

 case 'STS-768/STM-256'   %40 Gbps
    switch (frecuencia77)
        case '1310'
            Nd77=0.25;
            Ith77= 0.009;
        case '1550'
            Nd77=0.2;
            Ith77= 0.015;
    end
    
end
set_param(BloqueLaser77,'Nd',num2str(Nd77));
set_param(BloqueLaser77,'Ith',num2str(Ith77));
end


if isempty(find_system(gcs,'Name','Regenerator8'))~=1
   BloqueLaser88=([gcs,'/','Regenerator8']);
   tiposenal88=get_param(BloqueLaser88,'sel');
   frecuencia88=get_param(BloqueLaser88,'frec');         

switch (tiposenal88)
    
case 'STS-12/STM-4'  %622 Mbps
    switch (frecuencia88)
        case '1310'
            Nd88=0.5;
            Ith88= 0.01;
        case '1550'
            Nd88=0.25;
            Ith88= 0.01;
    end
    
case 'STS-48/STM-16'   %2.5 Gbps
    switch (frecuencia88)
        case '1310'
            Nd88=0.25;
            Ith88= 0.01;
        case '1550'
            Nd88=0.22;
            Ith88= 0.01;
    end
    
 case 'STS-192/STM-64'   %10 Gbps
     switch (frecuencia88)
        case '1310'
            Nd88=0.25;
            Ith88= 0.009;
        case '1550'
            %Datasheet LUCENT
            Nd88=0.2;
            Ith88= 0.015;
    end

 case 'STS-768/STM-256'   %40 Gbps
    switch (frecuencia88)
        case '1310'
            Nd88=0.25;
            Ith88= 0.009;
        case '1550'
            Nd88=0.2;
            Ith88= 0.015;
    end
    
end
set_param(BloqueLaser88,'Nd',num2str(Nd88));
set_param(BloqueLaser88,'Ith',num2str(Ith88));
end


if isempty(find_system(gcs,'Name','Regenerator9'))~=1
   BloqueLaser99=([gcs,'/','Regenerator9']);
   tiposenal99=get_param(BloqueLaser99,'sel');
   frecuencia99=get_param(BloqueLaser99,'frec');         

switch (tiposenal99)
    
case 'STS-12/STM-4'  %622 Mbps
    switch (frecuencia99)
        case '1310'
            Nd99=0.5;
            Ith99= 0.01;
        case '1550'
            Nd99=0.25;
            Ith99= 0.01;
    end
    
case 'STS-48/STM-16'   %2.5 Gbps
    switch (frecuencia99)
        case '1310'
            Nd99=0.25;
            Ith99= 0.01;
        case '1550'
            Nd99=0.22;
            Ith99= 0.01;
    end
    
 case 'STS-192/STM-64'   %10 Gbps
     switch (frecuencia99)
        case '1310'
            Nd99=0.25;
            Ith99= 0.009;
        case '1550'
            %Datasheet LUCENT
            Nd99=0.2;
            Ith99= 0.015;
    end

 case 'STS-768/STM-256'   %40 Gbps
    switch (frecuencia99)
        case '1310'
            Nd99=0.25;
            Ith99= 0.009;
        case '1550'
            Nd99=0.2;
            Ith99= 0.015;
    end
    
end
set_param(BloqueLaser99,'Nd',num2str(Nd99));
set_param(BloqueLaser99,'Ith',num2str(Ith99));
end


if isempty(find_system(gcs,'Name','Regenerator10'))~=1
   BloqueLaser100=([gcs,'/','Regenerator10']);
   tiposenal100=get_param(BloqueLaser100,'sel');
   frecuencia100=get_param(BloqueLaser100,'frec');         

switch (tiposenal100)
    
case 'STS-12/STM-4'  %622 Mbps
    switch (frecuencia100)
        case '1310'
            Nd100=0.5;
            Ith100= 0.01;
        case '1550'
            Nd100=0.25;
            Ith100= 0.01;
    end
    
case 'STS-48/STM-16'   %2.5 Gbps
    switch (frecuencia100)
        case '1310'
            Nd100=0.25;
            Ith100= 0.01;
        case '1550'
            Nd100=0.22;
            Ith100= 0.01;
    end
    
 case 'STS-192/STM-64'   %10 Gbps
     switch (frecuencia100)
        case '1310'
            Nd100=0.25;
            Ith100= 0.009;
        case '1550'
            %Datasheet LUCENT
            Nd100=0.2;
            Ith100= 0.015;
    end

 case 'STS-768/STM-256'   %40 Gbps
    switch (frecuencia100)
        case '1310'
            Nd100=0.25;
            Ith100= 0.009;
        case '1550'
            Nd100=0.2;
            Ith100= 0.015;
    end
    
end
set_param(BloqueLaser100,'Nd',num2str(Nd100));
set_param(BloqueLaser100,'Ith',num2str(Ith100));
end

luz=u;
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?