Home Forums EXCHANGE Ideal Binary Switch

Viewing 3 reply threads
  • Author
    Posts
    • #26395
      Damian Marek
      Participant

      Attached is an ideal binary switch that works for single sampled optical signals, it uses a very simple comparison calculation to determine whether a signal should be at a top or bottom port. Try out the example OptiSystem project file.

      Part 1: Explanation of Matlab Component

      Part 2: Explanation of Matlab Code

    • #26426
      Damian Marek
      Participant

      Matlab code follows:

      OutputPort1=InputPort1;
      OutputPort2=InputPort1;

      %Find lengths of vectors

      sampledLength = length(InputPort1.Sampled(1).Signal);
      seqLength = length(InputPort2.Sequence);

      %Repeat elements of bit sequence so vectors match

      samplesPerBit = floor(sampledLength/seqLength);
      padding = mod(sampledLength,seqLength);
      seqMatched=repmat(InputPort2.Sequence’,1,samplesPerBit)’;
      seqMatched=seqMatched(:)’;
      seqMatched=[seqMatched zeros(1,padding);];

      %Find complement of sequence
      compseqMatched = ~seqMatched;

      %Multiply vectors to produce the outputs
      OutputPort1.Sampled(1).Signal = InputPort1.Sampled(1).Signal.*seqMatched;
      OutputPort2.Sampled(1).Signal = InputPort1.Sampled(1).Signal.*compseqMatched;

    • #30962

      Hi Damian Marek

      I am currently working on the Software Defined Optical Network and i need to design an OpenFlow switch in matlab which i have to interface with Optisystem later. Since I had a problem of even generating a stream of packets in optisystem so managed to find a model in simulink for packet communication as u can see in the attached file. From here i can get the syntex of packet headers which i have to compare with the flow entries in the OpenFlow switch yet to be designed in Matlab. I wanted u to check upon if the packet generation mentioned in model below is correct and please suggest how would i be able to analyse the packet headers which i need further. And can i add a Matlab component in simulink as well which would do the job OpenFlow switch of comparing packet headers and taking the required action.

    • #30975
      aasif bashir dar
      Participant

      really help ful videos

Viewing 3 reply threads
  • You must be logged in to reply to this topic.