Home Forums SYSTEM matlab component

matlab component

Profile Photo
(joined May 2015)
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:

Responses (20):

    • #22303
      Profile Photo
      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
      Profile Photo
      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
      Profile Photo
      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
        Profile Photo
        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
      Profile Photo
      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
        Profile Photo
        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
          Profile Photo
          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
          Profile Photo
          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
      Profile Photo
      shamsudheen p
      Participant

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

      • #22425
        Profile Photo
        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
      Profile Photo
      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
        Profile Photo
        Damian Marek
        Participant

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

    • #22463
      Profile Photo
      shamsudheen p
      Participant

      h

      Attachments:
    • #22465
      Profile Photo
      shamsudheen p
      Participant

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

      Attachments:
    • #22472
      Profile Photo
      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
      Profile Photo
      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
        Profile Photo
        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
      Profile Photo
      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
        Profile Photo
        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
      Profile Photo
      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
        Profile Photo
        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.

Login You must be logged in to reply to this topic.