Home Forums SYSTEM MATLAB OptiSystem Co-Simulation

Viewing 2 reply threads
  • Author
    Posts
    • #25551
      Gokul Boro .
      Participant

      Hi everybody,
      While trying to Simulate a system with a MATLAB block, I saw some reply in this forum that we have to formulate the code based on the input from Optisystem block. Suppose I want to modulate a PRBS using QAM modulation, then how should I write the .m code? Can anyone suggest me with the co-simulation as well as the .m file that is simulated in MATLAB without optisystem for the same system? Thanks

    • #25608
      alistu
      Participant

      Hi Gokul,

      QAM modulation using Matlab and without OptiSystem (what you have asked for above) is pretty simple. You would just have to use “qammod” function for modulation and “qamdemod” for the demodulation of the signal for a given binary vector (which is supposed to be you data vector).

      Regards

    • #25612
      Gokul Boro .
      Participant

      Thank you for the reply. I am aware of qammod and qamdemod function. Now calling it in optisystem is the problem for me. Suppose I have the matlab code given below. Please help me with the code to be called in optisystem.
      The code is attached below.
      Thanks.

      Attachments:
      • #25626
        alistu
        Participant

        Since the Matlab code you have attached is written for Optisystem format (it actually belongs to binary optical switch), you would just have to type in the corresponding Matlab component run command “QAM_for_optisys;”, which is the name of the M-file, and put the M-file in the same folder as the Optisystem osd file. Then you can run the simulation and Matlab will be called by Optisystem without doing any other action (all provided that your Matlab codes don’t have any technical Matlab problem).

        Regards

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