Photonics

Photonics

Topics related to Lumerical and more.

How to calculate input and output power of signal?

TAGGED: ,

    • suruchi.bala
      Subscriber

      Hi, 

      Is there a way to check the power of an input source or can I add a desired power in plane source? 

      Is it related to amplitude?

    • Amrita Pati
      Ansys Employee

      Hi Suruchi,

      You may find the power injected by the source using the sourcepower script command. You are correct, the amplitude of the source is linked to the power and you can set the desired power by changing the amplitude of the source. You can find out the source power (P1) for an amplitude of 1 (let's call it A1) using the sourcepower command. As the power of the source is directly proportional to the square of its amplitude, you can calculate the new amplitude (A2) for the desired (P2) power as: A2 = A1*sqrt(P2)/sqrt(P1). You can then set this amplitude to have the required amount power injected into the simulation.

      Regards,
      Amrita

    • suruchi.bala
      Subscriber

      Hi Amrita,

      Thank you so much for your help and prompt reply. I still have some doubts if you can clarify.

      • If by default value of amplitude is 1, and suppose, power I want to input is P1 = 0.05W and P2 = 0.05W, then according to A2 = A1*sqrt(P2)/sqrt(P1), A2 will always be 1, no matter what is the power. Right? 
      • If I input value of amplitude as 1 for two different sources, then is there a way to check its power value other than script command? as I am not sure how to use this script command.
      • In one of the examples, the amplitude entered is 1e+09, could you be able to explain why the amplitude value is this and how to check the power behind this amplitude?
      • I have got this script online that gives intensity in dB, could you please help me to modify this script that can give output in either dBm or watts.

        closeall;

         retrieve Hz(t) from the simulation and use czt to get Hz vs f.

        Hz = getdata("monitor2","Hz");

        t = getdata("monitor2","t");

        f = linspace(c/3e-6,c/0.5e-6,1000); # frequency vector

        Hzf = czt(pinch(Hz),t,2*pi*f);

        Hzf2 = abs(Hzf)^2;

        Hzf2=Hzf2/max(Hzf2);

        plot(c/f*1e6,10*log10(Hzf2),"Wavelength (microns)","Intensity (dB)");

         

      Regards

      Suruchi

    • Amrita Pati
      Ansys Employee

      Hi Suruchi,

      I apologize for the late reply, I missed the alert somehow.

      • That is correct, since the default is 1, A1 will be 1 here. But it also applies to other values. For example, if you run a simulation with an initial amplitde of A1=0.5, you can also use this value in the same equation to find out the required amplitude for another value of power.
      • Other than the script command, you can also integrate the Poynting vector over a monitor surface to calculate the power. But I believe it is straightforward to use the script command as well. I would ask you to look at this example: Integrating the Poynting vector. The examples provided on this link use both the methods.
      • Can you tell me which example? It is possible that it is related to nonlinear applications. In linear simulations an amplitude of 1 should suffice for most cases. As the final results are normalized to the source power anyway. You can check the power behind the monitor by placing a DFT monitor there, collecting the Poynting vector and integrating it over a monitor surface.
      • Please have a look at the script files in the above article. The code is directly provided here, and let me know if you have any issues. 

      Regards,
      Amrita

    • suruchi.bala
      Subscriber

      Hi Amrita,

      Thank you for your reply. You are a great help!

      • Yes, this is related to nonlinear simulations. In example  - Four wave mixing with Kerr nonlinear material – Ansys Optics, the amplitude is 1e+09 and in example - Four wave mixing (varFDTD) – Ansys Optics, the amplitude is 1, could you please help me understand, the reason behind the difference in these amplitudes, because on changing the amplitude from 1 to 1e+09, there is no output spectrum obtained; that means the amplitude has to be 1 to get FWM spectrum. Similarly for the other example the amplitude has to be 1e+09 to get the spectrum.
      • In example,  Four wave mixing (varFDTD) – Ansys Optics, the chi3 value used is 0.01 for silicon, but the chi3 value for silicon is in the range from 2 to 3 e-19m2/V2, then what is the significance of 0.01? If its just for the demonstration purpose, then it makes no sense to categorize the example as nonlinear example just by putting some random numbers, isn't it?
      • ring_resonator_FWM.lsf, this script gives intensity in dB, is it possible for you to help me in modifying it to dBm or watts?

      Regards

      Suruchi

       

    • suruchi.bala
      Subscriber

      Hi Amrita,

      I am looking forward to your reply.

       

      Regards

      Suruchi

    • Amrita Pati
      Ansys Employee

      Hi Suruchi,

      Sorry, I missed the update again. I will look into the details of these examples and get back to you very soon.

      Regards,
      Amrita

    • Amrita Pati
      Ansys Employee

      Hi Suruchi,

      We have been busy due to the last weekend so my responses are delayed. 

      1. To simulate nonlinear effects accurately the precise shape of the pulse and the amplitude are important: Nonlinear and gain methodology. So, I would suggest you to use the exact amplitude as opposed to 1. I am not sure why an amplitude of 1 has been used in one of the cases as I do not see any papers being cited. It could be just for demonstration purpose only. But if require the exact reason I can possibly speak to the people who worked on this example. It might take a while though.
      2. Like you said, the article clearly mentions that the values of chi are for demonstration purposes only. It implies that the true non-linear effects in Si are not being simulated. But that does not make it a linear simulation. You can update the model parameters including the material properties based on your requirements for more accurate simulation.
      3. Instead of doing a dB to dBm coversion, I would ask you to use the following script to calulate the power (in watts) for nonlinear simulation. This would be the simplest approach in my opinion:
      nonorm;
      #rest of the code......
      T=transmission("monitor"); # this function always gives normalized result.
      f=getdata("monitor","f");
      p_watt_Hz=T*sourcepower(f); #power spectrum
      P_watt=integrate(p_watt_Hz,1,f); # in Watt

      Regards,
      Amrita

    • suruchi.bala
      Subscriber

      Hi Amrita,

      Thank you so much for your response and for sharing the code. 

       

      Regards

      Suruchi

       

Viewing 8 reply threads
  • The topic ‘How to calculate input and output power of signal?’ is closed to new replies.