how to produce sine wave with exactly same values for turning Points (Peaks and Valleys) ?

조회 수: 3 (최근 30일)
Hello everybody ,
i want to produce forces as sine waves with different forms. The problem That when i am producing it not all the peaks, even for sine wave with constant amplitude , are not exactly the same Values
Example
FR = 4000*sin(tt);
The peaks must be all the time = 4000 , but the problem that it is not like that some would be 3999.998 other would be 3999.996 and so on . and the same for Valleys .
This is for simple example of sine wave .
And it is making Problem for Rainflow counting because the counter can't simply realise that both are the same Values and both must be 4000 and both must be counted as Cycles!
for simple sine wave it is easy to realise the Problem but with more complicated waves it is hard. as this function
FR(l) = sum(7000*sin(1*pi*([1:2:71])*tt(l))./([1:2:71]));
Is there any way to fix this Problem ?
Thank you for Helping !

답변 (1개)

Cris LaPierre
Cris LaPierre 2020년 8월 30일
편집: Cris LaPierre 2020년 8월 30일
You need to set your input to sine such that the points of tt land exactly at the peaks and valleys. That means having your spacing such that the points and occur in tt.
tt = 0:pi/2:10*pi;
FR = 4000*sin(tt);
You can adjust the increment. Just make sure is always a multiple of it.
In your second code snippet, you've changed things slightly, and we don't know what tt is.
  댓글 수: 8
khaled elbatawy
khaled elbatawy 2020년 8월 31일
Thank you for advice .
It is really helpful Informations.
I am just new with matlab so i am trying still to find the best way
And how should i now to the actual values in turning Points or Peaks ?the same code above ?
Cris LaPierre
Cris LaPierre 2020년 8월 31일
Yes, see my earlier reply about how get results for the peaks. It's not just the value of tt you have to be worried about. It's tt*pi*[1:2:71].

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Measurements and Spatial Audio에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by