- This topic has 19 replies, 6 voices, and was last updated 5 years, 11 months ago by Dipayan Choudhary.
-
AuthorPosts
-
-
May 17, 2016 at 6:55 am #39180aya ayaaParticipant
hello everey one
I face aproblem with load matlab in optisystem matlab component
can any one tell me the basics to write a code -
May 19, 2016 at 1:20 am #39218Hamza Ali Abbas KhanParticipant
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?51da48This has been discussed already
Thanks
-
May 19, 2016 at 1:21 am #39219Hamza Ali Abbas KhanParticipant
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.
-
May 21, 2016 at 6:26 am #39284Karan AhujaSpectator
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.-
May 21, 2016 at 4:56 pm #39295aya ayaaParticipant
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-
May 22, 2016 at 5:58 am #39299Karan AhujaSpectator
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 -
May 22, 2016 at 6:09 am #39301burhan num mina llahParticipant
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
-
May 22, 2016 at 4:14 pm #39317aya ayaaParticipant
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 -
May 22, 2016 at 10:21 pm #39319Karan AhujaSpectator
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 -
June 2, 2016 at 1:31 pm #39473aya ayaaParticipant
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
-
-
-
May 21, 2016 at 6:28 am #39285Karan AhujaSpectator
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). -
May 21, 2016 at 6:29 am #39287Karan AhujaSpectator
-
May 21, 2016 at 1:00 pm #39292Aabid BabaParticipant
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.Regards
-
May 22, 2016 at 6:07 am #39300burhan num mina llahParticipant
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.
Hope this is very udeful to you.
Regards
Burhan
-
May 22, 2016 at 7:46 am #39310Karan AhujaSpectator
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 -
May 22, 2016 at 10:25 pm #39320Aabid BabaParticipant
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 -
January 17, 2019 at 10:32 am #50291Dipayan ChoudharyParticipant
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
-
June 7, 2016 at 5:45 pm #39714aya ayaaParticipant
hi
Thanks alot, i think these links will be helpful,,
i will see them.
with regards -
June 7, 2016 at 6:05 pm #39715aya ayaaParticipant
hi nuzhat dilawar
Thanks for your response.
regards
-
-
AuthorPosts
- You must be logged in to reply to this topic.