MATLAB: How to create a phase-controlled sine wave output in Simulink 7.6 (R2010b)

simulink

I want to control the phase of the sine wave block. In other words, I want to simulate the output of sine wave input connected to a switching device such as SCR. The output in this case will be a sine wave whose starting angle can be controlled.

Best Answer

You can achieve this by various methods like using a Stateflow chart etc. One of the way to do this by using 'Enabled Subsystem'. I have attached a simple example that shows how to create a phase angle controlled sine wave. Please note that you need to set the 'Output' port inside the 'Enabled subsystem' to 'reset' it's output when it is disabled to set the output to zero. You can do this by executing the following steps:
1. Open the block parameter dialog box and change the value of the option 'Output when disabled' to reset.
2. Change the value of 'Initial Output' to zero.
By modifying the input to the 'Enable' signal, you can achieve the phase control of the sine wave
Related Question