how to produce sine wave with exactly same values for turning Points (Peaks and Valleys) ?
2 views (last 30 days)
Show older comments
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 !
0 Comments
Answers (1)
Cris LaPierre
on 30 Aug 2020
Edited: Cris LaPierre
on 30 Aug 2020
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 Comments
Cris LaPierre
on 31 Aug 2020
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].
See Also
Categories
Find more on Measurements and Spatial Audio in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!