Hi,
I understand that you want to phase shift a signal by 90 degrees using Simulink.
I assume you have an existing signal in a Simulink model, and you want to apply a 90-degree phase shift to it.
In order to phase shift a signal by 90 degrees in Simulink, you can follow the below steps:
Create a Simulink Model:
Open your Simulink model and identify the signal block you wish to phase shift. For demonstration, let’s assume it’s a “Sine Wave” block.
open_system('your_model'); % Open your existing Simulink model
Add a Phase Shift:
Use a “Transport Delay” block to introduce a delay equivalent to a 90-degree phase shift. Calculate the delay using the formula: Delay = (1/(4*Frequency)).
add_block('simulink/Continuous/Transport Delay', 'your_model/PhaseShift');
set_param('your_model/PhaseShift', 'DelayTime', '1/(4*frequency)'); % Set frequency accordingly
Connect the Blocks:
Connect the output of the signal block to the input of the “Transport Delay” block to apply the phase shift.
add_line('your_model', 'Sine Wave/1', 'PhaseShift/1');
Output the Shifted Signal:
Connect the output of the “Transport Delay” block to any downstream processing or visualization block, such as “Scope” or “To Workspace”.
add_block('simulink/Sinks/Scope', 'your_model/Scope');
add_line('your_model', 'PhaseShift/1', 'Scope/1');
Simulate and Verify:
Run the simulation to verify the phase-shifted signal output.
sim('your_model');
Refer to the documentation of “Transport Delay” block to know more about its usage:
Hope this helps!