Home Forums SYSTEM MATLAB component

Viewing 2 reply threads
  • Author
    Posts
    • #79968
      Arjun Anil Kumar
      Participant

      Hi ,
      I tried using the MATLAB component in Optisystem to generate an LFM signal. My code was as follows
      OutputPort1 = InputPort1;
      InputPort1.Sampled.Time;

      % Define parameters
      chirp_period = 6e-6; % in seconds
      bandwidth = 625e6; % in Hz
      center_freq = 6e9; % in Hz

      % Define time vector
      dt = 1e-9; % time step size in seconds
      t = 0:dt:chirp_period-dt;

      % Calculate chirp rate
      chirp_rate = bandwidth / chirp_period;

      % Generate LFM signal
      lfm_signal = exp(1j * 2 * pi * (center_freq * t + 0.5 * chirp_rate * t.^2));
      lfm_signal = OutputPort1.Sampled.Signal;

      Can anyone help me how to define the input and output ports.
      Not getting the output. Hope someone will come forward to help.
      Thank you.

    • #81173
      Ahmad Atieh
      Moderator

      Dear Arjun,
      you need to identify the type of the input and output ports of the Matlab component as desired. This can be set in the component properties window (scroll down on Signal type (output 1). However, you need to set first the number of input and output ports.
      I think you are generating an electrical signal that you need to modulate a laser with it. This means that the output signal should be electrical. You need to identify the type of signal for the input port.
      Regards,
      Ahmad

    • #83777
      Ahmad Atieh
      Moderator

      Dear Arjun,
      you need to identify the type of the input and output ports of the Matlab component as desired. This can be set in the component properties window (scroll down on Signal type (output 1). However, you need to set first the number of input and output ports.
      I think you are generating an electrical signal that you need to modulate a laser with it. This means that the output signal should be electrical. You need to identify the type of signal for the input port.
      Regards,
      Ahmad

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