Discussion:
Phase shift in Simulink
(too old to reply)
Speed axs
2009-09-21 18:58:05 UTC
Permalink
Raw Message
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
2009-09-21 21:54:04 UTC
Permalink
Raw Message
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
2009-09-21 23:15:04 UTC
Permalink
Raw Message
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
Post by Phil Goddard
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.
TEY KOK SOON
2010-03-26 00:33:08 UTC
Permalink
Raw Message
Post by Speed axs
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
Post by Phil Goddard
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.
may i know how to input the second signal ? using wat kind of block?
seme
2013-11-25 15:06:15 UTC
Permalink
Raw Message
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
2013-12-04 12:10:21 UTC
Permalink
Raw Message
Post by seme
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.
p***@gmail.com
2018-02-18 01:37:37 UTC
Permalink
Raw Message
Post by Vasily
Post by seme
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.
Man, THANK YOU!!!! You have saved me hours of life!!

kishore NAIK
2013-06-27 08:09:08 UTC
Permalink
Raw Message
Which delay i can take in second as i am doing for generating PWM
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.
seme
2013-10-02 15:30:10 UTC
Permalink
Raw Message
Post by Phil Goddard
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
L K
2016-08-31 06:16:03 UTC
Permalink
Raw Message
Post by Speed axs
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
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
2016-10-13 08:01:03 UTC
Permalink
Raw Message
Post by L K
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! :)
m***@gmail.com
2017-10-03 08:54:19 UTC
Permalink
Raw Message
Post by Speed axs
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
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
w***@gmail.com
2017-10-06 02:23:11 UTC
Permalink
Raw Message
Speed axs於 2009年9月22日星期二 UTC+8上午2時58分05秒寫道:
Post by Speed axs
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
.【数亿娱乐】【Q1192431153】
“寻人!!!寻志同道合之人、寻竭忠尽智之人、寻深思远虑之人、寻勤恳至诚之人”
Loading...