Home Forums FIBER optisystem with matlab

Viewing 10 reply threads
  • Author
    Posts
    • #39180
      aya ayaa
      Participant

      hello everey one
      I face aproblem with load matlab in optisystem matlab component
      can any one tell me the basics to write a code

    • #39218

      Hello.
      In order to create an optical component in Matlab for co-simulation with OptiSystem, first we need to understand the optical signal format that OptiSystem can generate and the structure of that signal launched into the Matlab workspace.Using the MATLAB Library, we can add a Matlab component to the layout. By clicking on the component properties, on the Main tab, we can choose the Sampled Signal in the time or frequency
      domain. The number of input and output ports and also the format of these signals (Optical/Electrical) can be defined in the Inputs and Outputs tab. The User Parameter tab is used to define the input parameters of the component.

      You can refer to the pdf the link of which i am attaching. I hope this will help you
      https://dru5cjyjifvrg.cloudfront.net/wp-content/uploads/2015/06/Matlab-Optical-Example.pdf?51da48

      This has been discussed already

      Using Matlab With Optiwave

      Thanks

    • #39219

      Here that u need to right the matlab code and then add a matlab component in the design and double click on the component to import the m.file u can do that by writing the path of that file in the option asking about path and in run command part u have to mention the name of m.file followed by semicolon. then load matlab and run. this is how we interface matlab rest if u r referring to something else please convey. Hope this will be helpful to you.

    • #39284
      Karan Ahuja
      Spectator

      Hi.
      I want to mention that Using the MATLAB Library, we can add a Matlab component to the layout. By clicking on the component properties, on the Main tab, we can choose the Sampled Signal in the time or frequency domain. The number of input and output ports and also the format of these signals (Optical/Electrical) can be defined in the Inputs and Outputs tab. The User Parameter tab is used to define the input parameters
      of the component. The system layout and the Matlab component properties.

      • #39295
        aya ayaa
        Participant

        thanx alot for replying,
        for the unit of input parameter in matlab code how can i select or change it to be dB
        with reagrsd

        • #39299
          Karan Ahuja
          Spectator

          Hi.
          well in my opinion you need to write a code within code for converting units.
          You want to change power levels from milliwatt/watt to db or dBm?
          If so then I suggest you to look at the mathematical expression for converting units from miiliwatts/watts to dB/dBm.
          I am attaching a link where you can find the inter-converting mathematical formulas for the same. You need to use these mathematical formulas in your code for conversion of units.

          http://www.rapidtables.com/convert/power/mW_to_dBm.htm
          http://www.rapidtables.com/convert/power/dBm_to_mW.htm
          http://www.titanwirelessonline.com/category-s/89.htm
          http://coolconversion.com/electronics/W-dBm/

          I hope this is helpful to you.
          Thanks
          Regards

        • #39301

          I completely agree with Karan Ahuja. You need to incooperate these mathematical equations in your code for converting units from watts to dB.
          I will suggest you to compile a code that contains equations for converting one unit to another and vice versa.
          Hope this will help.

          Regards

          Burhan

        • #39317
          aya ayaa
          Participant

          thx for help me, my problem is not in how to converte or calculate from wtts to dB , just when i run the code in matlab component there arn’t any error but still no change on output so i thought that the problem in the unit of parameter.
          i want to design matlab component allow only to high power to pass and neglect the low power
          best regard

        • #39319
          Karan Ahuja
          Spectator

          Hi.
          I got your exact problem. You kind of want to design a power detector based on threshold. right?
          What i think is that you need to design some sort of filter which would allow an optical signal with power beyond some set threshold level and ignore all the optical signals having power level below the set threshold level.
          First try to set a threshold for the power level below which you do not want the signals to pass.
          I hope it will be helpful.

          Thanks
          Regards

        • #39473
          aya ayaa
          Participant

          hi Karan
          exactly this is what i want ,i write a matlab code depends on threshold value ,there no error during simulate in same time no any effect happened on power .
          can u see it to me
          i attache it
          thax a lot and Apologies for any inconvenience.
          Regards

          Attachments:
    • #39285
      Karan Ahuja
      Spectator

      The Matlab file executes the following functions:
      Generates the data (sequences of bits) that are transmitted through OptiSystem;
      Opens OptiSystem;
      Load file OpticalLinkProject.osd that has the optical link designed;
      Setup the global parameters and transfer the binary data to OptiSystem;
      Run the simulation;
      Transfer the received data from OptiSystem to Matlab;
      Calculates the bit error rate (BER).

      Matlab Cosimulation

    • #39287
      Karan Ahuja
      Spectator
    • #39292
      Aabid Baba
      Participant

      Hello Aya,
      As far as your query is concerned, i would like to tell you that this has been already discussed on this forum but still for your convenience i would like to repeat that that you need to right the matlab code and then add a matlab component in the design and double click on the component to import the m.file u can do that by writing the path of that file in the option asking about path and in run command part u have to mention the name of m.file as suggested by Hamza Ali Abbas.
      I will provide some links of some threads about the same topic. Hope these will help.

      interfacing

      Ofdm MATLAB, optical channel OPTISYS

      Matlab

      Using Matlab With Optiwave

      Using Matlab With Optiwave

      Regards

    • #39300

      Hello Aya Aya,

      As mentioned by other forum members that this topic has been already discussed quite a few times now. Still for your convenience i will post a link which may be very helpful to you. Try going through it it will surely help you.

      Matlab Cosimulation

      Hope this is very udeful to you.

      Regards

      Burhan

      • #39318
        aya ayaa
        Participant

        thx alot ,i will see it

    • #39310
      Karan Ahuja
      Spectator

      Hi.
      Yes i too feel the same. He must include the equations of converting units in the matlab code and then only the module will convert the units itself.
      Let us see if this helps Aya.

      Anyway all the best
      Regards

    • #39320
      Aabid Baba
      Participant

      Hello aya,
      As far as your problem is concerned i would suggest you to use a Matlab module embedded a code in such a way that signals with high power are allowed. As mentioned by Karan you need to set the threshold first from where you want to discard the signals.
      Hope you will gain some idea from this.
      Regards

    • #50291
      Dipayan Choudhary
      Participant

      Hello,

      I was wondering if the forum ever got the power detector based on a threshold program to work on Optisystem using MATLAB. Any example code or insight on how to access the InputPort1.Sampled.Signal array to compare the individual amplitudes of Power would be extremely helpful.

      Thank you,

      Dip

    • #39714
      aya ayaa
      Participant

      hi
      Thanks alot, i think these links will be helpful,,
      i will see them.
      with regards

    • #39715
      aya ayaa
      Participant

      hi nuzhat dilawar
      Thanks for your response.
      regards

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