Home Forums SYSTEM matlab component

Viewing 11 reply threads
  • Author
    Posts
    • #22303
      shamsudheen p
      Participant

      Hi all,
      I have been trying to study the matlab component in optisystem to transmit the user defined bit sequence. I have watched the demo on the same. But while simulating I am not getting the modulated output. Attaching the project file here. please help me to solve the issue

      Attachments:
    • #22323
      Ashu verma
      Participant

      Hello, Shamsudheen p
      The problem is in the signal that you are getting on the visualizer? or you are not able to co-simulate the matlab component with your user defined sequence data? Rest i will try to see your system. Are you working on OCDMA ? Can you explain the objectives ? .

      +2
    • #22387
      shamsudheen p
      Participant

      Hai sam sung,
      I am able to co-simulate the matlab with optisystem. I was just trying out a simple programe code from the demo video. I want to modulate the laser according to the data which can be inputted as .dat file in the user defined sequence. The data is a binary valued(streams of 1’s and 0’s)

      • #22392
        Damian Marek
        Participant

        You were missing a semicolon on one of the lines:

        compseqMatched = ~seqMatched;

        And also I think you might have changed some option in the CW Laser because it was not outputting anything. I replaced it with a default CW Laser and it works fine.

    • #22393
      shamsudheen p
      Participant

      Thank you Damian, It is working now. However the output frequency is very high.
      I wanted to load .dat file for the same type of output. Any other things to taken care for this?

      • #22395
        Damian Marek
        Participant

        You can change the Bit rate from the layout parameters, and do you mean you want to import a binary sequence to control the switch?

        • #22486
          Joseph Jiang
          Participant

          Hi,dear Damian.In a long time i want to know why we can not use bit sequences rather than a bit(0 or 1) to control the optical switch.we must use matlab to co-simulate if we want to use bit sequences to real-time control the optical switch state.thank you!

        • #22501
          Damian Marek
          Participant

          You don’t necessarily need to use Matlab, this example is more to show how to use the Matlab component. Here is another implementation with only OptiSystem components for making an Optical Switch.

    • #22402
      shamsudheen p
      Participant

      yes i wish to modulate the laser in accordance with the input binary sequence

      • #22425
        Damian Marek
        Participant

        You can change the global bit rate to a slower frequency and the User defined bit sequence generator has the option to read a sequence from a text file. The Help button will tell you exactly what the text file should look like.

    • #22427
      shamsudheen p
      Participant

      Hi Damien, I have made some changes in my project file according to your suggestions. I am unable to view the output waveform. please help me to solve the issues.
      Attaching the .osd file, input file to the user defined sequence generator, matlab code and output waveform

      • #22452
        Damian Marek
        Participant

        Try attaching them again, I can’t see them.

    • #22463
      shamsudheen p
      Participant

      h

      Attachments:
    • #22465
      shamsudheen p
      Participant

      here is the matlab code,input to the user defined sequence and output obtained

      Attachments:
    • #22472
      Damian Marek
      Participant

      There was an error in you matlab file. A missing apostrophe for a transpose. Also you switched the type of signal to frequency in the Matlab component which also is not how the component was set up. Just change the directories, so that OptiSystem can find the m file and the text file and you are golden!

      Attachments:
      +1
    • #22620
      shamsudheen p
      Participant

      Dear Damien, Thanks.it is working.
      I just replaced the cw laser with a white light source and checked the result. but error occurs. will it be due to sampling problems??

      Attachments:
      • #22669
        Damian Marek
        Participant

        This error is probably coming from the fact that you did not convert the noise bins. Make sure the Layout parameter is true or checked and also that in the White Light Source component the noise bins are converted.

    • #22698
      shamsudheen p
      Participant

      Hi Damien ,
      I have checked the noise bins make it true. now matrix dimension mismatch error occurs for seqmatched,
      should i match the dimension of seqmatched and InputPort1.Sampled.Signal ? I have checked in workspace and not able to correct this. please help.
      I have changed the frequency of white light source to 500 nm

      Attachments:
      • #22743
        Damian Marek
        Participant

        The White Light source introduces another polarization so the vector seqmatched vector just needs to be duplicated in the m file.

        Try this one.

        Attachments:
    • #22797
      shamsudheen p
      Participant

      Hi Damien,
      Thank you. there is no errors now. I have modified the project for communication using white led and received the output.
      However, why i can”t reduce the frequency of output? or the output which i got is noise? I have changed the bit rate in layout parameter.
      Also, the data input to the user defined sequence generator is a binary converted image. I have tried to plot the same in optisystem but not succeeded. But it worked in matlab.
      I am attaching the output waveform here
      also the .txt file,receiver output and the matlab codes

      • #22809
        Damian Marek
        Participant

        You are taking a bit sequence from a file with over 1024 bits and the layout parameter is only 16. Since the first 16 bits in your file are all 1 changing the bit rate will have no effect. Changing the layout parameter Sequence length to 1024 and you will see an effect of the bit rate on the output.

        I’m not really sure about the last part of your question. This seems more like a Matlab programming challenge. It also seems like you want to use the Binary Switch component as a simple modulator. You can use anyone of our other components to do the same thing. It might be simpler.

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