Is anyone interested in how to compute the velocity and acceleration from an encoder?

Peter, I think the math is clear but I'm wondering where I can actually use this?
You have the option do use these algorithms in every motion application. You can roll your own or buy them off the shelf. I think the benefit for the algorithms is clear.

I guess I have never tried to create my own motion loops or Control Loops in a PLC.
I think you are wise because you get the application done quickly and time is money.

The point I am trying to make in the last video is that one can control pneumatics in a precise and stable way but one needs to implement the derivative gains because the actuator has two poles. Integrating velocity to position adds another pole. This means a pneumatic system has 270 degrees of phase lag. The derivative gains add phase lead to compensate for the phase lag.
 
Integrating velocity to position adds another pole. This means a pneumatic system has 270 degrees of phase lag. The derivative gains add phase lead to compensate for the phase lag.

Great! Now I'm going to have to break out my control theory book when I get back to work tomorrow and remember all this stuff ;-)

I remember when you first did the closed loop air system the thought was, yes we can do it but it isn't really a good idea. The demo in your video looks more refined than the first one. Does this mean you are actively going for closed loop pneumatic systems? I have always tried to steer people away from these.
 
Great! Now I'm going to have to break out my control theory book when I get back to work tomorrow and remember all this stuff ;-)
Check out this PDF file.
http://deltamotion.com/peter/Mathcad/Mathcad - T1C1 PID2 simple ODE.pdf

It shows how the transfer function for the PID with an additional second order derivative gain, K2, is combined with the transfer function of the actuator.

The denominator is called the Characteristic Equation, CE. There are four poles, two for the actuator, one to integrate velocity to position and the integrator of the PID adds a pole. It takes four gains to place all the poles. Without the K2 gain there would be no gain for the s³ term in the CE. The idea is that all the poles should be negative and real to avoid oscillation. In my example the poles are placed at -λ. When you move the slider in the gain calculator for are moving λ along the negative real axis. You can see how λ affects the gains. With these formulas you can calculate gains that change on-the-fly and adar. The real trick is calculating the actuator gain, damping factor and natural frequency.

The simulate modeling errors part is something that I do. Since the mechanical engineers never provide a system transfer function, we must compute one in the system identification phase of the auto tuning procedure. I know the estimated model is close but not perfect. The rnorm function simulates the real transfer function being different from my estimated values.

I originally made this pdf to show the difference between two methods to solve differential equations.

Now you have one example that pretty much works through the problem from beginning to end. You can now look up what I did in your text book step by step. Have fun!

I remember when you first did the closed loop air system the thought was, yes we can do it but it isn't really a good idea.
It is hard for pneumatic systems to compete with small servo motors like this
http://www.mtssensors.com/news/index.html
but sometimes electricity can't be used close to the actuator.

The demo in your video looks more refined than the first one.
That first video a second generator controller. It didn't have the second order models or observers. It didn't support jerk feed forward or the second derivative gain. The second generation controller could go from point to point but it couldn't follow a motion profile accurately. It was doing well to move from point to point without oscillating. The 80186 that it used was pushed to the limit.

The third generation controller can use much more sophisticated algorithms because it had much more processing power. We have concentrated more on algorithms rather than brute force processing speed. Simply closing the loop faster and faster is easy in that it only takes processing power but there is a point of diminishing returns. I didn't want the 3rd generation to simply be a faster version of the 2nd generation controller. I wanted to make a controller that could control difficult applications that couldn't be done before with off the shelf products with as little effort as possible. If if we closed the loop infinitely fast it wouldn't do any good in these difficult applications if the second order control with jerk feed forward and second derivative gain were not used.

Does this mean you are actively going for closed loop pneumatic systems?
No, more often than not it is easier to control small motors in these applications. Small motors tune up easily. However, there are applications where motors or oil can't be used. In these few cases we have a solution.

The main reason for doing this is for the experience of controlling a less than perfect system. The MTS small motor system is an almost perfect system. It looks good at trade shows. However, reality is often not so kind. If we can control pneumatic systems well then it is even easier to control hydraulic systems and motors are easier yet. We do it for the experience and to know that we can do it.

If you have time, about 30mins, there is a video of our part of advanced training class where we show how to tune a difficult system that requires gain scheduling and the model based control. We spend the money to make these systems so we know how to control even the most difficult systems. Notice the effect of the model based control to keep the output to the valve smooth.
http://deltamotion.com/peter/Videos/Delta Computer Systems Advanced Training.mp4
We put the system together just a few days before.
Dennis, one of our engineers is giving the class. I am taking the video. I hope to make a more polished and shorter version.

I have always tried to steer people away from these.
Good, use pneumatic motion control as a last resort but just know that it is possible IF the right parts are used. The system must still be designed correctly. That is where the real problem lies.
 

Similar Topics

I keep moving this thing around my garage thinking I will do somehting with it. I did power it up a few weeks ago, and it seems to work fine...
Replies
7
Views
2,186
I have been looking at this program for awhile now: http://www.cie-wc.edu/Electronic-Engineering-Technology.asp It works for me and my time...
Replies
3
Views
1,851
I received an email from a student with the following code attached. This is supposed to control a floodgate system, and supposed to be written...
Replies
23
Views
632
does anyone have an install or know if/where i can download it for the following "ABB PS501 Control Builder Plus V2.3 " the software was a free...
Replies
2
Views
65
They are installed in a control panel that was made in France and are intended for the termination of analog inputs. Each of the red capped...
Replies
3
Views
298
Back
Top Bottom