- This topic has 1 reply, 2 voices, and was last updated 2 years, 7 months ago by 
Sawyer Ge. 
- 
		AuthorPosts
 - 
		
			
- 
March 1, 2023 at 5:23 pm #79968
Arjun Anil Kumar
ParticipantHi ,
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. - 
March 13, 2023 at 3:33 pm #81173
Ahmad AtiehModeratorDear 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 - 
March 13, 2023 at 3:33 pm #83777
Ahmad AtiehModeratorDear 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 
 - 
 - 
		AuthorPosts
 
- You must be logged in to reply to this topic.