Hi Nick,
Exactly, a trapetzoidal or triangular profile works nicely though an S-shaped profile is even better - but harder to compute.
Regarding multiple motor:
You need one regulator for each motor. The reason is that each regulator has memory of the past AND tries to predict the future. If you "switch" the filter between the two motors the filter will get confused and you're going to get very bad results. However, for obvious reasons it's not possible to include the file more than once but you could create a copy of it and append a _2 or whatever to each variable name thru out the code, that should do it.... Not ALL variables needs to be separate though but lets not get into those details now.
I DID make a special version some time back, for Malcolms terarium controller, it allows you to specify "any" number of regulators. It may lack some of the feature added to latest version of the filter but if you do a bit of searching on the forum you should be able to dig it up. If not let me know and I'll see if I can find it.
/Henrik.




Bookmarks