Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Phase shift in Simulink

Subject: Phase shift in Simulink

From: Speed axs

Date: 21 Sep, 2009 18:58:05

Message: 1 of 8

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

Subject: Phase shift in Simulink

From: Phil Goddard

Date: 21 Sep, 2009 21:54:04

Message: 2 of 8


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.

Subject: Phase shift in Simulink

From: Speed axs

Date: 21 Sep, 2009 23:15:04

Message: 3 of 8

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" <philNOSPAM@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.

Subject: Phase shift in Simulink

From: TEY KOK SOON

Date: 26 Mar, 2010 00:33:08

Message: 4 of 8

"Speed axs" <speedrama@gmail.com> wrote in message <h991do$mj6$1@fred.mathworks.com>...
> 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" <philNOSPAM@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.


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

Subject: Phase shift in Simulink

From: kishore NAIK

Date: 27 Jun, 2013 08:09:08

Message: 5 of 8

"Phil Goddard" <philNOSPAM@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

> 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.

Subject: Phase shift in Simulink

From: seme

Date: 2 Oct, 2013 15:30:10

Message: 6 of 8

"Phil Goddard" <philNOSPAM@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

Subject: Phase shift in Simulink

From: seme

Date: 25 Nov, 2013 15:06:15

Message: 7 of 8



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

Subject: Phase shift in Simulink

From: Vasily

Date: 4 Dec, 2013 12:10:21

Message: 8 of 8

"seme " <wondlijkorete@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.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us