Don't want an "S" curve..need a cosine curve

Lamboom

Lifetime Supporting Member
Join Date
Mar 2014
Location
Fallbrook, Ca
Posts
350
I see there are some nice math instructions in the Omron NJ's menu. I can't use a MC_MoveAbsolute. It must be a Cosine position curve running from zero to a positive max end position.
I imagine I can use an offset to start the curve at zero, as the COS instructions produce a wave from -1 to +1 and back again. The trick is to start the curve at -1 and end it at +1 ...(like an "S" curve ..zero to +2)

If you know an easy way to do that, please share..
default_smile.png
Regards, Michael
 
Last edited:
How are things in water tank world?
Is this for wave simulation again?
Does it need to be a cosine curve exactly? Could you do the math on Excel and copy into a cam table?
Is this one cosine function with no constant velocity section?
Our old RMC100 used cosine ramps. The problem was that changing the ramps on-the-fly took too much math for an old 80186 to do nicely.
The good thing about cosine ramps is that minimizes adding high frequency harmonics to the motion profile.
The trick is to start the curve at -1 and end it at +1 ...(like an "S" curve ..zero to +2)
No, the trick is to re-learn your calculus. The derivative of the sine is the cosine*frequency the derivative of the cosine is the negative sine*frequency^2 etc.
 
Bosch-Rexroth has Flex-Profiles where you can string together different motion actions into a motion profile, like a cam table but the controller figures out the intermediate points after being given the end points and acceleration profile. You can select from many motion profiles including cosine (IIRC) in flex profiles. Much easier than cam tables. You can then drive the motion from either a real or virtual master axis.

See if Omron offers something similar.

Ken

See if Omron
 
Bosch-Rexroth has Flex-Profiles where you can string together different motion actions into a motion profile,
But does it use sines and cosines to do that. Most controllers use a 3rd order polynomial. A third order polynomial does a poor job of approximating a cosine or sine unless the points are very close. That is because a cosine or sine is calculated using a Ttaylor series cos(x)=1-x^2/2!+x^4/4!........
a third order polynomial can only approximate the 1-x^2/2! so x, the increments between points, must be small. If x is big it won't approximate a sine or cosine well.
if x=1 then cos(x)=0.540302 but 1-x^2/2!=0.5. That is a big error. A fifth order motion profile would use 1-x^2/2!+x^4/4!=.541667 a 7th order ramp would generate 0.540278
 
Gadzooks! some great replies... but, didn't get any email notifications... sigh.. I always screw that up.

PETER! you are still here after all these years! Yes.. I eventually did take your sage advise and used a RMC75E-QA1 and the Red Lion G315 to do everything anyone could ever want with the Micro Ocean. I even tried the RMC75S-QA1, which worked OK, but the 75E is awesome.

Your RMC controllers are incredibly easy to program... nothing like the Omron NJ.

A friend gave me an NJ to see if I could get it to do what your motion controller did for my model ocean project.. Omron was a nightmare of a challenge... but, it looks like it can do what I need...sort of; However, looks are deceiving, the final word isn't in yet.

I had a client lined up to purchase a Micro Ocean ... but, in the age of Trump... educational institutions don't have the support they once did (when i was a kid).

This thread is only about Omron NJ (I was able to do the cosine curve in only a few minutes, using your RMC75E) I should have only contacted Omron .. but their support is often limited .. perhaps because I'm not a big manufacturer ...

By the way, did you ever find out that I arranged for pizzas for your support crew at the local pizza joint ... hee hee
 
I believe you can change the email option by the following.
Click on "Thread Tools" tab at the top of the thread and select "Subscribe to a Thread", using the "drop down" arrow for "Notification", change to instant email notification. If this doesn't work, I don't have any other ideas.
 
Last edited:
But does it use sines and cosines to do that. Most controllers use a 3rd order polynomial. A third order polynomial does a poor job of approximating a cosine or sine unless the points are very close. That is because a cosine or sine is calculated using a Ttaylor series cos(x)=1-x^2/2!+x^4/4!........
a third order polynomial can only approximate the 1-x^2/2! so x, the increments between points, must be small. If x is big it won't approximate a sine or cosine well.
if x=1 then cos(x)=0.540302 but 1-x^2/2!=0.5. That is a big error. A fifth order motion profile would use 1-x^2/2!+x^4/4!=.541667 a 7th order ramp would generate 0.540278



From their manual the function for sine curve (simple sinoid) is determined by the function f(z)=1/2[1-cos(pi*z)]
There are also several other modified sinoids. I'll let you tell us if that is a poor approximation or will suffice.
 
PETER! you are still here after all these years!
I have been told I am too ornery to die.

I even tried the RMC75S-QA1, which worked OK, but the 75E is awesome.
Yes, the difference is the Ethernet. Once you use the Ethernet version you will frown on the serial port version. The serial port interface is too slow to transfer all the data you would really like to see.

but their support is often limited .. perhaps because I'm not a big manufacturer ...
I bet they simply don't know or have the functions built in. We do lots of testing so sine waves and all the things that go with them is a must.

By the way, did you ever find out that I arranged for pizzas for your support crew at the local pizza joint ... hee hee
Yes, our tech support guys had pizza. They deserved it. I think I was gone.
 
Thanks Kvogel ... That is the trick.. Asking Omron. Fortunately there are a few Omron automation engineers out there willing to talk to newbies about spurious projects that nave nothing to do with big bucks manufacturing. Especially in the age of Trump (sorry about the politics)

I'm wondering if there is an "Omron dept." on this forum? If not ... I understand. They mostly check in now an' then on MrPLC.com ... I do have similar threads there (often with no replies.. :)

I owe almost everything I've learned to people on this forum .. I don't know if I'll ever be able to help someone here... perhaps if they are trying to use LinMot linear motors .. I do have a fair amount of experience there ... as, I do appear to be the only person that purchases them on eBay.. :)
 
Same here, There are a lot of more knowledgeable people here but I try to add what I can. After reviewing the brands technically capable of doing what I need I chose Rexroth mostly because of the amount of support I get from my local vendor.

Rexroth and Omron are both IEC61131 plcs, I don't know if the flex profile is specific to Rexroth. Go through the Omron capabilities looking for "electronic cam" you may find something.

Funny, we use Linmot motors too.
 
From their manual the function for sine curve (simple sinoid) is determined by the function f(z)=1/2[1-cos(pi*z)]
That looks right for velocity ramping from 0 to 1 as z goes from 0 to 1. Scale the amplitude and period to your needs. Then integrate to get position and differentiate to get acceleration.

The question I have is do you need cosine ramps or continuous sine or cosine waves

About tech support. You really can't blame Omron or Trump as long as the controllers work as documented. I am sure the Omron sine and cosine functions work as documented. It is unreasonable to expect tech support guys to be able to do the required math for all their customers. Especially when it requires trig and calculus. The integrator needs to be able to do that. In our case we had previous experience from the big Ohmsett project
http://www.ohmsett.com/
and even then we got the formulas from an expert in the field of wave generation and we had to sign a non-disclosure agreement. There was a lot more to generating waves than I could imagine at first but after following the math it made sense. This projected was done years ago. It required hyperbolic functions which was a shocker to me so we added them to our controller.
This is not a simple application to do right.
 
Hay Kvogel Thanks for the feedback.. Omron has ways of doing cam curves; however, I will need to modify the characteristics of the curves frequently .. especially in a museum, where kids are designing, and launching the waves, based on the physics of gravity waves, and their environment which effects propagation. You have to do this very fast and efficiently .. because the "ocean" is only 15-20 feet long! Good thing we now have instant high speed video playback.

Check out this sea made by Peter's motion controller:

https://www.youtube.com/embed/oaNPiB_BE3M?rel=0&controls=0&showinfo=


The trace is from a wave probe ..measuring wave height for FFT analysis of the energy distribution

Here's the test rig for the Omron NJ experiment:

https://www.youtube.com/embed/gGzp7HURBJE?rel=0&controls=0&showinfo=0

PIETER: I forgot how to do quotes on this forum (DUH!)
I could use Kvogel's f(z)=1/2[1-cos(pi*z) as I only need a "Cosine Ramp" to make the Tsunami (no problem using your controller)

The Rogue wave is continuous.. but, complicated. It was the basis of a patent for surfing parks by my boss at an ocean lab where i worked in 1971 .. we used cams to feed hydraulic servos the analog signal, where a 100hp moving wall generated a "rogue wave" in deep water (25ft) about 700 feet from the wave generator .. an' that's where you put the shoal and the beach, so you could ride the resulting wave.. just like the real ocean waves.. :)

As for Trump (sorry I mentioned that) I don't blame Trump for anything. I'm just talking about the "Age of Trump" .. which has nothing to do with Trump .. It's just a time in our history where the middle class has declined, education is drastically defunded, and there is a general disregard for the wisdom of science. Again, I apologize... that 300 x 50 x 15 ft wave tank , built in 1969 was re-designated as a warehouse, and filled in, (2010) killed by the great recession.. The huge building now stores avocados.

Oh the Irony .. You are talking about Neal A. Brown, a former Professor at MIT. I worked with him for many years at the wave tank, often assisted him in many of his personal engineering projects. He was also a consultant to DARPA, and the last time we talked, he was designing self cleaning reverse osmotic filters of industrial size, for sea water conversion to fresh water. Haven't talked to him in over a year .. must give him a call.

By the way... a Micro Ocean doesn't need to be as precise as Ohmsett ... it is only an educational tool ... but, a very accurate one.

to be continued ...

Random wave trace.jpg
 
Last edited:

Similar Topics

I have been reading everything I can find on the P_LLS the last 2 days but I am still having trouble understanding how the P_LLS swaps beyond 2...
Replies
9
Views
538
In OB1, I'm monitoring some values (first pic). The values are what I expect. At the same time, I'm monitoring the same values in the DB where...
Replies
1
Views
598
Maybe I am the last to know but Rockwell has put an EOL date on the 3 motion modules at the end of 2024 but maybe sooner. I know this will affect...
Replies
1
Views
951
On the laser displacement sensor now connected to my PLC, the manual says 4mA=643 and 20mA=64,877. However, I checked with a Fluke, injecting...
Replies
5
Views
861
I'm from a Mitsubishi Q-series background so excuse my ignorance. In Mitsubishi world, in my experience your Mbits (booleans) are just M1, M2...
Replies
20
Views
2,668
Back
Top Bottom