What is a sawtooth algorithm?

I think that a simple answer is a ramping up/down waveform that looks like the teeth of a saw side on


sawtooth1.JPG


easy enough to code
Saw = saw + ramp
if Saw >= max then ramp = -RampRate
if saw <= min then ramp = RampRate
Where RampRate is a +ve number that determines the slope based on the execution repeat rate


This is the basic version if the rate must be very accurate then ask for more info
 
MichaelG: That is an image of a triangle pattern. The classic Sawtooth pattern has one long slope, and on short or vertical slope.

While sawtooths can be triangles, they are nomally non-symmetrical.
 
I stand corrected
How about this?
sawtooth2.JPG


coding is even easier

Saw = (Saw + Ramp) Mod Max

If as rdrast said you want a different slope for return then use the code above with different rates for up /down

rdrast
While sawtooths can be triangles, they are nomally non-symmetrical
is this the same as the difference between a square and a rectangle - a square is just a special type of rectangle.
 
That's more like it MichaelG :)

Yes, it is a special case, but the most common example of where a sawtooth is used would be in the scanning of the electron beam in a CRT... You want it to move smoothly across from left to right, then return as rapidly as possible to get ready for the next scan.
 
That is a good link

I like the part that shows how the harmonics are summed to form the saw tooth.

So why did the OP bother to ask?
Are saw tooth wave form achieveable in real systems?
What does this mean for real systems?
If not then why are they so important?

This is the first question I have seen about saw tooth wave forms on this forum yet I get a question about saw tooth motion proviles about once every 2 months.
 

Similar Topics

Hello Everyone: I have a machine in the field with a twin diaphragm pump driven by a VFD. It Produces a "sinusoidal sort of" process pressure...
Replies
6
Views
2,013
Hello all, We have a log oven with aluminium logs of 6m . I am trying to understand the program . THe log oven cuts the log according to the set...
Replies
4
Views
1,943
Hello, I need to implement sorting algorithm in STL. I was thinking about using Shell sort, but I don't know how to do this with such a low...
Replies
10
Views
2,462
Hi just wondering if anyone can help me out with the type of algorithm Omron PLCs use? Ideal, Series, or Parallel? I'm running through a tuning...
Replies
4
Views
1,907
Have a new project and I'd like to get my simulation logic a bit more realistic, as such I'd like to add noise to the simulated analog feedback...
Replies
6
Views
2,203
Back
Top Bottom