Home Forums SYSTEM Matlab and Optisystem which is wrong?

Matlab and Optisystem which is wrong?

Profile Photo
(joined May 2014)
Participant

I made matlab component to get the optical system in the time domain ,then when I use FFT and divide it by the total no. of input signal samples,then I get the signal to matlab in frequency domain,I found it doesn’t match exactly with FFT .not only the values but also the signs.
What is the difference and what is the right matlab or Optisystem.
this is part of modeling fiber with SSFM which doesn’t give accurate results and I’m trying to find the cause of the problem.
Regards,
Abdallah

Responses (6):

    • #15895
      Profile Photo
      Abdallah Ismail
      Participant

      I made matlab component to get the optical system in the time domain ,then when I use FFT and divide it by the total no. of input signal samples,then I get the signal to matlab in frequency domain,I found it doesn’t match exactly with FFT .not only the values but also the signs.
      What is the difference and what is the right matlab or Optisystem.
      this is part of modeling fiber with SSFM which doesn’t give accurate results and I’m trying to find the cause of the problem.
      Regards,
      Abdallah

    • #15928
      Profile Photo
      Damian Marek
      Participant

      Hi Abdallah,

      There can be some differences in how a Fourier transform is defined. That being said could you please attach your project file, matlab component file and the plots that don’t match?

      Thanks

    • #15933
      Profile Photo
      Abdallah Ismail
      Participant

      Thanks Damian for your response.
      I modified the code to be readable for you.
      You’ll conclude from the code how to run it.
      Run the time domain first then frequncy domain after removing % % from frequency domain part and adding % to time domain part.
      Compare Optisystem_signal with Matlab_signal.
      Although the power results is very close but the samples are not the same.
      I Hope you tell me how the optisystem make fft.
      Regards,

    • #33807
      Profile Photo
      Jamal
      Participant

      If we export the signal in frequency domain then we get the signal in power ?

      Can anyone confirm this ?

    • #33947
      Profile Photo
      Ranjeet Kumar
      Participant

      Hi Abdallah,
      I think you have problem in matlab code because when i simulate the program using optisystem, i got the error as” CIDF scheduler :error occured while calculating , component MATLAB component Error in MAtlab program”.
      So, I think we should correct the Matlab code.
      There is no problem in optisystem.

      Attachments:
    • #33950
      Profile Photo
      SAHIL SINGH
      Participant

      Hi Abdullah,

      As mentioned by Ranjeet, if there occurs an error showing “MATLAB component Error in MAtlab program”, then definitely you should correct the Matlab code… Hope it helps…

      Regards

      Sahil Singh

      +1
    • #34001
      Profile Photo
      Jamal
      Participant

      Ranjeet
      Can you confirm if the signal exported in frequency domain has amplitude in Watts ?

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