Deacceleation - Mental block :(

nettogrisen

Lifetime Supporting Member
Join Date
Mar 2007
Location
Here
Posts
383
Hola

I have a door that's bottomhinged (airplane door) which I open and close with a servo motor on an ultra 3000 controlled by a compactlogix L43 via sercos.

When the door opens, it falls by its own weight and I "catch" it near the bottom and put it gently on the ground.

I'm doing this in "torque servo" loop configuration, so I can't use MAM, MAJ or MAS which have built in deacceleration properties, and am trying to roll my own, in which I can ajust where the torque "catches" the door (DeaccelStartPos), where the door stops (DeaccelStopPos) and the time it has to deaccelerate within (DeaccelTime).

This is where I come to a mental block for some reason.

Say the door is falling with 30degrees/s (it's scaled in degrees) and I want to catch at 90 degrees and stop it at 115 degrees in 3 seconds.

How would I go about this. It doesn't seem like it should be that big an equation. I can't seem to wrap my head around it though :(

Thanks
 
Is this an emergency escape door?

Otherwise if plane is on ground what is the rush? Lower it slowly and easily with a winch or gear train. Also what if the door hits someone standing below the airplane?

Sometimes the challenge is not getting things started it is getting them stopped - safely.



Dan Bentler
 
Is this an emergency escape door?

Otherwise if plane is on ground what is the rush? Lower it slowly and easily with a winch or gear train. Also what if the door hits someone standing below the airplane?

Sometimes the challenge is not getting things started it is getting them stopped - safely.



Dan Bentler

This is a replica of a real airplane in 1:1 to educate cabin personel.

The safety issues have been taken care of.
What I have to do is make the door function like the real door.

This time the challange is not getting things started or stopped. It's making them function like i desribed.
 
just like in hydraulics where you cannot control pressure and flow at the same time, with your electric servo, you cannot control torque and position at the same time. This is the laws of physics here, not anything imposed by the hardware.

What you have described is position control. You want to move from one position to the other position in a controlled way.

I'm not familiar with the hardware you are using but I would look for some sort of "bumpless" transfer function from torque mode to velocity or position mode.
 
I can do it easily but it requires more than one motion segment.

Norm is right IF you use only ONE motion segment, but if you use three motion segments then you can do what you want.

It is possible to calculate a series of 3 2nd order motion segments that can be spliced together that would do this. The first one accelerates or decelerates, the second one travels at a constant velocity and a third one decelerates down to 0 acceleration and velocity at 115 degrees.

This involves solving a system of equations. I think you need 5 of them,since you know 5 things, Position and velocity at 90 and 115 degrees and the time between the two points.

What you know.
x0=90
v0=Current speed
t01+t12+t23=3 seconds
X3=115
v3=0

x0+v0*t01+(a0/2)*t01^2=x1 // SEG 01
v0+A*t01=V1
x1+v1*t12=x2 // SEG 12
x2+v2*t23+(A2/2)*t23^2=x3 // SEG 23
v2+A2*t23=0
t01+t12+t23=3

Need to calculate a0, t01, x1, v1, t12, a2, t23
You have 7 equations and 6 unknowns which is not enough so assume that t01=t23. Now you have 6 equations and 6 unknowns.

Can you solve this? I would use Mathcad or wxMaxima and solve it in a few minutes. wxMaxima is free.

Here is a much more complicated example I have done already using 3rd order motion segments.
http://www.deltamotion.com/peter/Maxima/Seg1234567.html

BTW, our controller uses 5th order motion segments.
 
Just so I can say I brought it up, why don't you use what they do in real aircraft? That would seem to be the most realistic mock-up since you are using the real components.

I'm guessing what they use is a rotary hydraulic damper that mechanically engages at some point in the door travel. I would just emulate that. Set the servo up in velocity mode with a speed command of 0. Use only proportional gain in the velocity loop. Adjusting the velocity loop proportional gain will adjust the torque produced per unit speed of door motion. Actively modify your torque limit to engage this 'damper' at any point in the door travel you want.

Keith
 
Peter, I think that door moght just scare the feces out of me, especially if I was just coming off a rough approach. But a nice solution if you were doing it on a machine.

Keith
 
just like in hydraulics where you cannot control pressure and flow at the same time, with your electric servo, you cannot control torque and position at the same time. This is the laws of physics here, not anything imposed by the hardware.

What you have described is position control. You want to move from one position to the other position in a controlled way.

I'm not familiar with the hardware you are using but I would look for some sort of "bumpless" transfer function from torque mode to velocity or position mode.

I get what you're saying. When I first started this project I was using pure position mode and just cut away the torque to let the door fall free, but as you mentioned I needed some sort of bumpless transfer when I switched on the torque again.

I called Rockwell and got a service engineer to look at it, and together we wrote a simple velocity loop ontop of the torque loop.

Because the weight isn't constant as the door moves in a curve we wrote a "teaching" program that starts from the bottom measuring the standstill torque each degree all the way to 0.

Then by minusing or adding torque to the measured torque the door moves up and down. The more torque the faster it goes.
When freefalling I just apply very little torque, but enough to keep the wire stretched if I was to catch the door on its way down and manually move it upwards.


I hope this makes sense.

Norm is right IF you use only ONE motion segment, but if you use three motion segments then you can do what you want.

It is possible to calculate a series of 3 2nd order motion segments that can be spliced together that would do this. The first one accelerates or decelerates, the second one travels at a constant velocity and a third one decelerates down to 0 acceleration and velocity at 115 degrees.

This involves solving a system of equations. I think you need 5 of them,since you know 5 things, Position and velocity at 90 and 115 degrees and the time between the two points.

What you know.
x0=90
v0=Current speed
t01+t12+t23=3 seconds
X3=115
v3=0

x0+v0*t01+(a0/2)*t01^2=x1 // SEG 01
v0+A*t01=V1
x1+v1*t12=x2 // SEG 12
x2+v2*t23+(A2/2)*t23^2=x3 // SEG 23
v2+A2*t23=0
t01+t12+t23=3

Need to calculate a0, t01, x1, v1, t12, a2, t23
You have 7 equations and 6 unknowns which is not enough so assume that t01=t23. Now you have 6 equations and 6 unknowns.

Can you solve this? I would use Mathcad or wxMaxima and solve it in a few minutes. wxMaxima is free.

Here is a much more complicated example I have done already using 3rd order motion segments.
http://www.deltamotion.com/peter/Maxima/Seg1234567.html

BTW, our controller uses 5th order motion segments.

Very impressive Peter! (as always)
Unfortunately I'm not quite able to follow you (yet). It's been a while since I have used this many 2nd order equations. I'll keep trying though! I should take a mathrefresh course.

I don't understand why (in your exmple below) when v0 = 5 you have to ramp up to ramp down?

Just so I can say I brought it up, why don't you use what they do in real aircraft? That would seem to be the most realistic mock-up since you are using the real components.

I'm guessing what they use is a rotary hydraulic damper that mechanically engages at some point in the door travel. I would just emulate that. Set the servo up in velocity mode with a speed command of 0. Use only proportional gain in the velocity loop. Adjusting the velocity loop proportional gain will adjust the torque produced per unit speed of door motion. Actively modify your torque limit to engage this 'damper' at any point in the door travel you want.

Keith

I'm not using the real components. The actual airplanes use some special kind of very expensive motor, that apparently does all this by itself.

You're right. There are hydraulic dapmers on the door aswell. I have been informed that the weight left for the motor to handle is approximately 20kg.

The 'damper' part that you are talking about is what I'm trying to accomplish. Only I wan't to be able to control it with the variables described above. Although I'm starting to think about using 1 variable that's minused from the speed every second/100 and then just finetuning it by hand.
That is if I don't figure out Peters equations

 
Peter, I think that door moght just scare the feces out of me, especially if I was just coming off a rough approach. But a nice solution if you were doing it on a machine.

Keith

hehe yeah, I wasn't expecting it to be quite so complicated
 
Duh - I understand now why you ramp up before you ramp down...

If you were to deaccelerate from 5deg./s you would obviously never hit 115deg. As the average speed for this distance over 3 seconds is 8.3~ deg./s
 
Good

Now you can see that my solution will get you from 90 to 115 degrees over 3 seconds as long as the initial velocity is reasonable in the range of 0-16.666 degrees per second. Since the initial conditions is the current state the motion will be smooth.

Another advantage of using my symbolic solution is that if you want to changes something you can. One can see from the equations that as long as initial speed is in the range of 0 to 2 times the desired average speed this solution will work without having to move backwards.

If you had the right motion controller this would all be built in. :)

Also, the idea of having a torque mode bias as a function of angle is a good idea since it is easy to to do but that doesn't provide a good motion profile by itself.

It is also possible to use higher order polynomials but you are doing this in a PLC so I thought I would keep it 'simple'.

Keith, the math shouldn't scare you. You can do the same calculations from now to eternity and the numbers will be the same. It is the mechanics, electronics and feed back devices that wear out. I don't understand the reluctance. How else would you do this? I haven't seen any other solution that does what nettogrisen said he needed to do.

Another way to approach the problem is to model it and then tune it so the response is critically damped but this would be tricky because
1. The gains change as function of the angle of the door.
2. The motion controller needs to have the right kind of PID.
3. The time would not be consistent as it would depend allot on the
initial velocity

Is the 3 seconds cast in stone or does the motion just need to look smooth?
 
Now you can see that my solution will get you from 90 to 115 degrees over 3 seconds as long as the initial velocity is reasonable in the range of 0-16.666 degrees per second. Since the initial conditions is the current state the motion will be smooth.

Another advantage of using my symbolic solution is that if you want to changes something you can. One can see from the equations that as long as initial speed is in the range of 0 to 2 times the desired average speed this solution will work without having to move backwards.

If you had the right motion controller this would all be built in. :)

Also, the idea of having a torque mode bias as a function of angle is a good idea since it is easy to to do but that doesn't provide a good motion profile by itself.

It is also possible to use higher order polynomials but you are doing this in a PLC so I thought I would keep it 'simple'.

Keith, the math shouldn't scare you. You can do the same calculations from now to eternity and the numbers will be the same. It is the mechanics, electronics and feed back devices that wear out. I don't understand the reluctance. How else would you do this? I haven't seen any other solution that does what nettogrisen said he needed to do.

Another way to approach the problem is to model it and then tune it so the response is critically damped but this would be tricky because
1. The gains change as function of the angle of the door.
2. The motion controller needs to have the right kind of PID.
3. The time would not be consistent as it would depend allot on the
initial velocity

Is the 3 seconds cast in stone or does the motion just need to look smooth?

Yeah, I think I'll go with the tuning method for now as it will be quicker for me to fix if something goes wrong. This is just the first throw out for the customer to see, so I'll most likely use your method later (when I figure it out). It's clearly the right way to do it.

The 3 seconds were just an example. It just has to look smooth.
 
Yeah, I think I'll go with the tuning method for now as it will be quicker for me to fix if something goes wrong.
You must use the right kind of PID for this. If you set the set point to 115 degrees the door will slam down to reach 115 degree from 90 degrees UNLESS the proportional and derivative terms are in the feed back path only. That is that they only work on the changes in the actual position and not the error between the actual position/angle and 115 degrees. I call a PID where the proportional and derivative gain are in the feed back path only a I-PD.
 
Origiannly posted by Peter Nachtwey:

Keith, the math shouldn't scare you.

It's not the math that scares me. It's what you propose doing to the door, or more correctly the passenger's perception of that action.

Part of what you do for a living is divining the actual requirements of a project from the customer's specs. In answer to your previous post I don't think the 3 seconds is cast in stone. I don't think the 30 degrees/sec from the initial post is either. Picture the door being in free-fall. At some point you need to catch this thing and lower it gently to the end of travel.

I think the way to think about this is a double limit structure. Don't allow the door to go above a certain speed, period. In addition, set a desired decel rate and back-calculate the position this decel needs to start given the instantaneos speed so the door is at zero speed at 115 degrees. And make it unipolar. If I want to lower the door more slowll don't pull it out of my hand.

At least that's the way the small aircraft doors I have seen seem to work. All the large aircraft doors I have seen move horizontally so none of this would matter.

Keith
 

Similar Topics

Dear team, We are constantly facing M07 incremental loss on one of our kinetix 6500 safe torque. We have changed Servo motor (MPL-B4530K-MJ72AA)...
Replies
1
Views
110
I have an application using an incremental encoder and then I convert it to degree (0-360) using calculation program. For a while, the calculation...
Replies
7
Views
240
Hi all, I am using a B&R X20 unit and want to integrate an incremental encoder (OUT A, B, & Z). I have three BOOL digital input pins for my A,B...
Replies
3
Views
448
I have a question regarding the features of the so called incremental (velocity) form of the PID controller. As far as I understand this form in...
Replies
14
Views
2,521
I posted how computers work at the fundamental level on Reddit if you want to check it out. Pretty fun stuff and thought I would share it here as...
Replies
8
Views
3,167
Back
Top Bottom