How Do You Calculate Day-Specific Phase Shifts in Excel for Sine Waves?

In summary, the conversation discusses creating a sine wave with various options, including changing the period, calculating the start value, and calculating the phase shift. The formula for the sine wave is also provided. The main question is how to calculate the phase shift value entered in a cell to make the sine wave move a specific amount of days forward or backward. The solution involves using a different form of the sine wave and grouping the phase shift with the day number. Screenshots and an Excel file are provided for reference.
  • #1
steven757
7
1
TL;DR Summary
Phase Shift
Hi,

I have created a sine wave with the following options:

1.) - changing the period/length in days of the sine wave (Cycle Length in Days)

2.) - calculating the start value of the "dummy" so that the sine wave always starts with -1 (Dummy Start at Cycle Trough) when the phase shift is set to "0".

3.) - calculating the phase shift, so that the sine wave moves a specific amount of time/days forward when I enter a positive value greater "0" in the "Phase Shift" input cell ("N2") or backward when I enter a negative value smaller "0" in the "Phase Shift" input cell ("N2").

Here is my Excel formula:

=+SIN((2*PI()*$H$2*B4)-$N$2)

I have attached my Excel file so you can easily see how my calculations work.

Now my problem/question:
I want make a phase shift of the sine wave with a specific amount of days e.g. 20 days forward or backward.

How can I calculate the phase shift value I enter in the cell "N2" with a formula so that the sine wave moves exactly e.g. 20 days forward or backward?

This formula should of course also work when I change the period/length in days of the sine wave (Cycle Length in Days) I enter in cell "F2".

Many thanks for your help.

Steven
 

Attachments

  • Sine Wave Phase Shift.xlsx
    56.5 KB · Views: 196
Mathematics news on Phys.org
  • #2
A sine wave has the expression ##y(t)=A\cdot \sin(ct+p)##. ##A## is the amplitude, ##1/c## the period, and ##p## the phase shift.
 
  • Like
Likes dextercioby
  • #3
steven757 said:
Summary:: Phase Shift

Now my problem/question:
I want make a phase shift of the sine wave with a specific amount of days e.g. 20 days forward or backward.

How can I calculate the phase shift value I enter in the cell "N2" with a formula so that the sine wave moves exactly e.g. 20 days forward or backward?

1626354531430.png

https://www.electronics-tutorials.ws/wp-content/uploads/2018/05/accircuits-acp27.gif
 
  • #4
Hi fresh_42 and berkeman,

Thank you for your answers.

I have understood the sine wave functionality and the issue with the positive and negative phase.

What I want is a formula to calculate the phase shift exactly as described in my post above. I have also attached an Excel file so you can see what I want.

Thanks
 
  • #5
steven757 said:
Summary:: Phase Shift

Now my problem/question:
I want make a phase shift of the sine wave with a specific amount of days e.g. 20 days forward or backward.
How many days is a full cycle of the sine wave? That corresponds to a full ##2\pi## cycle of the sine wave.
steven757 said:
I have also attached an Excel file so you can see what I want.
We generally don't open Excel file attachments around here. It's too easy for there to be problems embedded in them. Instead, just attach a screenshot PDF or JPEG that shows the cells and formulas that you are asking about. Thanks.
 
  • #6
Hi berkeman,

I have attached three screenshots:

1.) - with NO phase shift (in cell P2 the value 0.00 is entered)
2.) - with POSITIVE phase shift (in cell P2 the value 1.00 is entered)
3.) - with NEGATIVE phase shift (in cell P2 the value -1.00 is entered)

All screenshots uses 80 days for a full cycle of the sine wave. BUT the cycle length changes, it is NOT always 80 days it could be also 125 days, 95 days, 168 days, and so forth.

I hope this helps.
 

Attachments

  • Sine Waves with NEGATIVE Phase Shifts.png
    Sine Waves with NEGATIVE Phase Shifts.png
    36.4 KB · Views: 119
  • Sine Waves with NO Phase Shifts.png
    Sine Waves with NO Phase Shifts.png
    34.2 KB · Views: 143
  • Sine Waves with POSSIRIVE Phase Shifts.png
    Sine Waves with POSSIRIVE Phase Shifts.png
    34.7 KB · Views: 153
  • Like
Likes jim mcnamara
  • #7
I have noticed that the screenshots are not very sharp and also can't easily be read so I have attached a PDF file.
 

Attachments

  • Sine Waves with Phase Shifts.pdf
    279.6 KB · Views: 165
Last edited:
  • #8
steven757 said:
3.) - calculating the phase shift, so that the sine wave moves a specific amount of time/days forward when I enter a positive value greater "0" in the "Phase Shift" input cell ("N2") or backward when I enter a negative value smaller "0" in the "Phase Shift" input cell ("N2").

Here is my Excel formula:

=+SIN((2*PI()*$H$2*B4)-$N$2)

You want a different form of the sine wave, sin(k(d - d0))

A positive value of d0 will shift the sine wave left by d0 days, a negative value will shift it right.

I'm not sure which of those cell references corresponds to the day number d. But basically you want the shift to be grouped with the day, (d - d0).
 

FAQ: How Do You Calculate Day-Specific Phase Shifts in Excel for Sine Waves?

What is the phase shift of a sine wave?

The phase shift of a sine wave is the amount by which the wave is shifted horizontally from its original position. It is measured in degrees or radians and can be positive or negative.

How is the phase shift of a sine wave calculated?

The phase shift of a sine wave can be calculated by determining the horizontal displacement between the original and shifted wave. This displacement is then divided by the wavelength of the wave and multiplied by 360 degrees (or 2π radians).

What causes a phase shift in a sine wave?

A phase shift in a sine wave can be caused by a change in frequency or a change in the starting point of the wave. It can also be caused by reflections or refractions of the wave, or by interference with other waves.

How does phase shift affect the shape of a sine wave?

The phase shift of a sine wave can change the position of the wave, causing it to appear shifted to the left or right. It does not affect the amplitude or frequency of the wave, only its position.

What are some real-world applications of understanding phase shift in sine waves?

Understanding phase shift in sine waves is important in fields such as physics, engineering, and telecommunications. It is used in signal processing, radio and television broadcasting, and in the analysis of sound and light waves.

Similar threads

Replies
8
Views
1K
Replies
5
Views
3K
Replies
1
Views
918
Replies
6
Views
5K
Replies
1
Views
1K
Replies
6
Views
2K
Back
Top