# How to shift signal phase in matlab from this circuit?

The circuit shown is in matlab. Sinus signal is provided by vpin by connecting from PCI. The sinus signal is looks like on the scope. The problem is i want to shift signal phase, from the picture below is circuit needed to shift the sinus signal phase, but there's a red dot that i can't connect the shift circuit (R-C) with my sinus to shift signal phase... How to solve this? Is there any way to shift the signal phase?

• Is there an EE question lurking here or is it just about how to use MATLAB? – Andy aka Jul 26 '16 at 13:03
• Add a transfer function block for the RC network. Or, a pure time delay block with delay, $\small T$, will give a phase lag of $\small \omega T$ rad without affecting the gain. – Chu Jul 26 '16 at 13:18

The reason there are "red dot's" is because you are attempting to cross domains.

Simulink contains multiple physical domains which prior to Simscape was not that obvious (in simscape electrial, mechanical, magnetic, hydraulic, etc.. all have unique trace colours).

In the example shot above you are attempting to connect BASE Simulink to SimPowerSystems (Specialist Technology, not Simscape electrical). These are completely incompatible and you would need to use "Controlled Voltage Source" to produce a time varying SimPowerSystem voltage that could be fed into a passive array to create a phase shift and an attenuation.

If you are just after a phaseshift may I recommend using a Transport Delay block (Simulink -> Continuous)

If however you are after a more electrical affect then a suitable transfer function $\frac{1}{1+\tau s}$ would produce an equivalent electrical response while residing within the S-domain/Simulink

Or convert the model to SimScape/SimPowerSystem and model based upon "real" R's and C's