Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Phase shift in Simulink

3,324 views
Skip to first unread message

Speed axs

unread,
Sep 21, 2009, 2:58:05 PM9/21/09
to
Hello All,

I am using simulink to generate phase noise. Basically I have a since wave generator and want to introduce phase noise to this. Surprisingly I haven't found a phase shifter block in simulink. I even didnt find an Allpass filter.
One other related issue I have is to generate a constant 90 degree phase shift (generate a cos signal). I do not want to introduce a new sine generator with a phase shift. I want to be able to use a single sine generator, then phase shift it by 90 degrees to get separate sine and cos signals.
I am working with continuous time signals. I a constant phase shift (to generate cos signals), I even tried taking derivative (I get the 90 degrees shift but a weird gain ...which is not omega times the signal like what we expect - d(sinwt)/dt = wcoswt). I even tried to create a basic all pass filter using the transfer function block with the fn as (s-1)/(s+1), still I dont get a 90 degree phase shift.

Please help me with these to concerns.
1. To introduce a constant phase shift of 90 degrees
2. To be able to generate a random pahse shift.

I can play around and get the solutions even if I get to know the solution for one of the above points. Only point to be noted is that it has to be in Simulink and not using matlab code.

This is my first post in this forum. Hope to get some positive responses.

Thanks s lot for your time and support,

With best regards,
Speed

Phil Goddard

unread,
Sep 21, 2009, 5:54:04 PM9/21/09
to

Us the Variable Time Delay block (from the Continuous library).
Feed your sine wave into the first input and a th amount of delay you want into the second.

Phil.

Speed axs

unread,
Sep 21, 2009, 7:15:04 PM9/21/09
to
Thanks a lot Phil for the quick and apt response. It works perfectly fine. I am now surprised why the other methods didnt work.

Anyways, once again thanks a lot.

Woth best regards,
Speed

"Phil Goddard" <philN...@goddardconsulting.ca> wrote in message <h98sls$irl$1...@fred.mathworks.com>...

TEY KOK SOON

unread,
Mar 25, 2010, 8:33:08 PM3/25/10
to
"Speed axs" <spee...@gmail.com> wrote in message <h991do$mj6$1...@fred.mathworks.com>...


may i know how to input the second signal ? using wat kind of block?

kishore NAIK

unread,
Jun 27, 2013, 4:09:08 AM6/27/13
to
"Phil Goddard" <philN...@goddardconsulting.ca> wrote in message <h98sls$irl$1...@fred.mathworks.com>...
> Which delay i can take in second as i am doing for generating PWM

seme

unread,
Oct 2, 2013, 11:30:10 AM10/2/13
to
"Phil Goddard" <philN...@goddardconsulting.ca> wrote in message <h98sls$irl$1...@fred.mathworks.com>...
>
> Us the Variable Time Delay block (from the Continuous library).
> Feed your sine wave into the first input and a th amount of delay you want into the second.
>
> Phil.

Hi Phil

I wanted to do a delay of a sine wave and i found your comment as shown above I have used the time delay block and give the sine wave for the first input and I don't understand by what u mean "a th amount of delay you want on the second input". What should I give to the second input,what input does "a th" means. All i need is a 90 degree phase shifted of a sine wave signal. Thank you for your support

seme

unread,
Nov 25, 2013, 10:06:15 AM11/25/13
to


Hi Speed axs

Could you please let me know how much time delay you have used with contnous time delay block to get the 90 degree phase shift . Or let me know if there is other way of doing 90 degree phase shift for continous signal in simulink


Thank you

Vasily

unread,
Dec 4, 2013, 7:10:21 AM12/4/13
to
"seme " <wondli...@yahoo.com> wrote in message <l6vp17$72p$1...@newscl01ah.mathworks.com>...
>
>
> Hi Speed axs
>
> Could you please let me know how much time delay you have used with contnous time delay block to get the 90 degree phase shift . Or let me know if there is other way of doing 90 degree phase shift for continous signal in simulink
>
>
> Thank you
>
>Hi! I had the same situation. Variable time delay block uses Inp2 for delay value. So phase shift of the signal connected to Inp1 depends on appropriate time delay in Inp2. You may use Constant block to define time delay. In my case i had sine signal with frecuency=2*pi*10, simulation time=1. One period of the wave = 0.1 (10Hz). So time delay in Constant block must be 0.1/4=0.025 (360°/4=pi/2).
But problem is that shifted signal has zero value from start to time delay and i haven't yet figured this.

L K

unread,
Aug 31, 2016, 2:16:08 AM8/31/16
to
"Speed axs" wrote in message <h98ibt$lq$1...@fred.mathworks.com>...
Hi, I have a similar problem, i want to use a single sine gen and then phase shift it by 90.
Did u get how to do it? please help in this...

And also i wanted to know how to design all pass filter

Jad Budiri

unread,
Oct 13, 2016, 4:01:08 AM10/13/16
to

> Hi, I have a similar problem, i want to use a single sine gen and then phase shift it by 90.
> Did u get how to do it? please help in this...
>

Use a "Variable Time Delay" block. It's equivalent to F(s)=e^(-Ts)---> f(t-T)

Connect T into the second input which is the delay in seconds:
T= (Phase shift angle)/(360*freq) seconds, if the angle is in degrees, or
T= (Phase shift angle)/(2*pi*freq) seconds, if the angle is in rads,

Note: the signal will be zero for the first T delay period because Simulink cannot predict the future.. yet! :)

modules...@gmail.com

unread,
Oct 3, 2017, 4:54:25 AM10/3/17
to
the answers were helpful
but what can I do if I want to get negative phase shift
because I neet to make phase shift from -90 to +90

winwin...@gmail.com

unread,
Oct 5, 2017, 10:23:18 PM10/5/17
to
Speed axs於 2009年9月22日星期二 UTC+8上午2時58分05秒寫道:
.【数亿娱乐】【Q1192431153】
“寻人!!!寻志同道合之人、寻竭忠尽智之人、寻深思远虑之人、寻勤恳至诚之人”

pablo.oliv...@gmail.com

unread,
Feb 17, 2018, 8:37:50 PM2/17/18
to
Man, THANK YOU!!!! You have saved me hours of life!!
0 new messages