Challenge for best Feedforward/Feedback control

On the basis of Peter's data set I tried to find the best control.

Data set:

Time, Position, Control Output

0,0,1 0.1,0.0280961296169728,1 0.2,0.105480069053459,1 0.3,0.22321745414104,1 0.4,0.373993446175833,1 0.5,0.551819161757164,1 0.6,0.751791317868303,1 0.7,0.96989544591241,1 0.8,1.20284477699198,1 0.9,1.44794833233238,1 1,1.70300292485492,1 1.1,1.9662047375435,1 1.2,2.23607692993412,1 1.3,2.5114103673215,1 1.4,2.79121509393783,1 1.5,3.0746806025518,1 1.6,3.36114330596755,1 1.7,3.65005990494049,1 1.8,3.94098558367094,1 1.9,4.23355615778425,1 2,4.5274734583331,1 2.1,4.82249336523072,1 2.2,5.1184160098546,1 2.3,5.41507775361695,1 2.4,5.71234462057353,1 2.5,6.01010692049863,1

I found the ODE for process transfer function: y=v1

0.1666699 y'' + 0.3333319 y' - 2.096008E-07 y = 1

Filter used: y=u

1.090314 y'' + 2.013555 y' + y = 0.4

Benchmark scheme as shown on Pages 2/3/4

Definitions: Page 1

Solutions With disturbances but without disturbance compensation: Page 2 Without disturbances, just feedforward (PID Feedback) : Page 3 With disturbances and with disturbance compensation : Page 4

formatting link
Note: Peter, your solution can be compared with Page 3. You have not used disturbances but have some erroneous behaviour.

Reply to
JCH
Loading thread data ...

Look at your equation. When the forcing function is 1 the steady state position is very large. When the forcing function is 0 the steady state position is 0. How do you expect a position to change so much when not being driven. I told you this is wrong. You must change this to

0.1666699 velocity' + 0.3333319 velocity = 1

Now I can see that the steady state velocity is 3 positions units / time unit when the forcing function is 1. This means the gain is 3. When the forcing function is 0 the velocity goes to 0 too and the position will just stop where it is. The position will not go back to 0 as you think it should. Think about how a real motor works.

Who cares? Until you can figure out the difference between a type 0 and type 1 system it is wrong.

That isn't my solution. In figure 2 you have the process value ( position ) being proportional to the control. That is not right. The velocity should be proportional to the control. Some how you think that if you turn off power to a motor it will return to the zero location. That is non-sense.

Motion controllers rarely use a filter as a target generator. Motion controllers use polynomials. Customers enter the way the ramp from on velocity to the next by specifying a speed, acceleration and sometimes a jerk. They do not use funny coefficients in a differential equation to specify ramps.

Feed forwards are gains that are multiplied by the current state to predict the required control output. In this case a velocity and acceleration feed forward are all that are required. So what is Kv and Ka the velocity and acceleration feed forward?

UNTIL YOU FIGURE OUT THE DIFFERENCE BETWEEN TYPE 0 AND TYPE 1 SYSTEMS YOUR ANALYSIS OF TYPE 1 SYSTEMS IS WRONG.

Why do you even bother with this? It is obvious that you can't identify anything unless you know the answer in advance, the forcing function is 1 and not changing, and it is a type 0 system with no offset.

You cannot find the system identification for

  1. systems with offsets
  2. data sets with more than 30 points. That is only about 6 points per time constant.
  3. systems changing control signals.
  4. systems with dead time.
  5. type 1 or type 2 systems.

You are being weird.

Peter Nachtwey

Reply to
pnachtwey

[...]

Citation:

2.096008E-07 ~ 0

Rewriting the process transfer function: T(s) = 1/(0.1666699 s^2 + 0.3333319 s + 0)

That's figured out and should be clear. It's a non-self-regulating process.

Calculations

formatting link

Reply to
JCH

This is wrong. For low frequencies the -2.096008E-07 term in your frequency response function is dominant. Setting it equal to zero is not allowed.

Reply to
nattejas

schrieb im Newsbeitrag news: snipped-for-privacy@v4g2000hsf.googlegroups.com...

Let's simplify: without or very small 2nd order term

T(s) = 1/(a*s) -> Integrator

a*y' - 0 = u

y' = 1/a * u y = 1/a Integration u * dt + C

e.g.

u = 1 C = 0 a = 2

y = 1/a * t

y(0) = 0 y(1) = 1/a = 1/2 y(2) = 1 ... ...

It's also a non-self-regulating process like tank level transfer function.

Tell me an error if any.

Reply to
JCH

This doesn't look familiar

y'+a*y=K*a*u(t)+C*a or tau*y'+y=K*u(t)+C is better.

Peter Nachtwey

Reply to
Peter Nachtwey

Do you agree that there is a fundamental difference between the following two transfer functions?

T(s) = 1/(0.1666699 s^2 + 0.3333319 s -2.096008E-07) and T(s) = 1/(0.1666699 s^2 + 0.3333319 s + 0)

In your second post you suggest that the -2.096008E-07 term is discarded as it is almost equal to zero. I'm just saying that this changes the dynamics of your system.

Reply to
nattejas

schrieb im Newsbeitrag news: snipped-for-privacy@d4g2000prg.googlegroups.com...

Again simplified to 1st order system:

Self-regulating process in general tau*y'(t) + y(t) = K*u(t)

but

no-self-regulating process if

-2.096008E-07*y(t) (e.g. y(t)max for real system = 10 m level)

-2.096008E-07*y(t)max = -2.096008E-06 ~ 0

y'(t) = (K*u(t) + 2.096008E-07*y(t))/tau y(t) = Integral[(K*u(t) + 2.096008E-07*y(t))/tau] * dt + C

Accuracies for real systems K ~ 1% u(t) ~ 1% tau ~ 1%

Much higher than 2.096008E-06

2.096008E-07*y(t) is not relevant!

Solve the ODE without the -2.096008E-07*y(t) term and show us your result. It will be almost the same result as for 0.1666699 y''(t) + 0.3333319*y'(t)

  • -2.096008E-07*y(t) = 1 that you can see in

formatting link

Reply to
JCH

"Peter Nachtwey" schrieb im Newsbeitrag news:IO-dnYJV6LUNT9XanZ2dnUVZ snipped-for-privacy@comcast.com...

Non-self-regulating process tau*y'(t)+0=K*u(t)+C

Self-regulating process tau*y'(t)+w*y(t)=K*u(t)+C

w*y(t)=0 in any ODE causes no-self-regulation.

The data set in Page 2

formatting link
a 'real' no-self-regulating process.

I think it is clear that in a context of ODEs in control theory time t is the independant variable. That's why I left t out.

Reply to
JCH

Newsbeitragnews:IO-dnYJV6LUNT9XanZ2dnUVZ snipped-for-privacy@comcast.com...

2
formatting link
is a 'real' no-self-regulating process.

Page 1 still looks the same to me. What is all this PD2(PID) stuff? Only a simple PID is required. Page 2 and 3, Figure 2 is still wrong because the control output v2 is proportional to the process value v1 or position. Page 4. You are not representing the disturbance response accurately. You tuning values make the closed loop transfer function under damped so the process value should over shoot the target value but your graphs don't show this.

You can't leave out time in a general case. If you want to ID temperature systems with dead time then you need to write the differential equation like this: tau*y'(t)+w*y(t)=K*u(t-deadtime)+C One must find the best combination of tau, K, deadtime, and C that will minimize the error between the actual and estimated data. All this first just a simple FOPDT estimation. The good news is that once this is done, one can go to

formatting link
to find the equations that calculate the PI controller gains.

The control function, u(t),must change during system identification. A simple step will not do for five reasons.

  1. To get the best estimates for K and C u(t) must change between two levels so there is plenty of time where the system reaches or almost reaches a steady state. With only a single step it is impossible to calcuate K and C which is kind of like an offset and scale.
  2. To get the best estimates for tau and dead time one needs plent of rise and fall time. It is hard to detect the correct dead time unless there are plenty of places where one can see the phase relationship between the signal and the response. Horizontal flat lines will not do.
  3. On a position system with limits the motor or actuator will eventually hit something.
  4. When tuning a motor in torque mode the motor will accelerate proportionaly to the control signal. The motor will spin up to very high speed and if there is a physical stop then there will be an accident. Even setting the control output to 0 is not enough because the motor will coast until it hits something. One must output a short pulse in the positive direction and then an equal pulse in the negative direction to stop the motor. If done right the motor will not move very far.
  5. u(t) can be a very complicated function. It can be a motion profile with polynomial ramps where t is required to index into the polynomial to calculate position, velociy and acceleration and these are then mulitplied by feed forwards gains and summed to generate the control signal.

You can see that the control function, u(t), is very important. Don't ignore this.

Peter Nachtwey

Reply to
pnachtwey

Agreed. I misunderstood the explanation in your second post to mean something else.

Another question. Where did this term come from? Is it due to a specific choice in model order during fitting to the data? Is it due to noise?

Again, I agree. The result is almost identical.

Reply to
nattejas

schrieb im Newsbeitrag news: snipped-for-privacy@d4g2000prg.googlegroups.com...

See comparison

formatting link

Reply to
JCH

  1. There is no time scale on JCH's plot. It agrees for how long? You should plot this yourself. You will notice there is no similarity after 4 seconds.
  2. Where are the poles or eigen values? This will tell you there is something wrong right away.
  3. JCH's velocity profile doesn't look right either. He shows an exponential rise to a steady state velocity but my calculations show the velocity looks more like a sinusoidal motion with an average velocity of 3 position units per second. How can JCH's velocity look almost like it is critically damped when the ratio of the coefficients for y' and y is so extreme. The ratio is very small which indicates the damping factor is close to 0 which matches what I see with the sinusoidal velocity wave form.

Peter Nachtwey

Reply to
pnachtwey

snipped-for-privacy@d4g2000prg.googlegroups.com...

Yes, I already agreed that the results would be (numerically) identical. However, if you plot both transferfunctions from a sufficiently low frequency (i.e. 1e-8 or 1e-9 Hz) the differences show up. In a real frequency response function measurement any differences between both systems would be masked by the low frequency noise. This is why I asked where the additional -2.096008E-07*y(t) term in your model came from. If you cannot see any difference how or why would you model it?

Reply to
nattejas

I only gave this a quick try using the transferfunctions and Matlab's ltiview. This does show small differences in both the impulse and the step response. However, I'm not sure if these plots are correct. The large magnitude difference in the coefficients of the transferfunction could/will lead to numerical errors. I have no idea how well ltiview is able to deal with this.

I assume you are talking about the positive real pole of order 1-e7? The system is unstable. Am I missing something here?

I cannot really comment on this as I have not actually solved the system or fitted the data. If I look at JCH's page:

formatting link
Assuming that the red dots are the measurement data and the black line is the fitted equation. The provided velocity and acceleration profiles look ok to me.

I'm not sure I understand.

Reply to
nattejas

See error considerations

formatting link
You can check it. At any t the ODE should be equal to 1. The error is the difference to 1.

Test it.

Reply to
JCH

schrieb im Newsbeitrag news: snipped-for-privacy@d4g2000prg.googlegroups.com...

Yes, fitting is mandatory. This can be done via least square polynomial approximation methods.

Reply to
JCH

ON/OFF controllers can also do the job.

On Topic: "Challenge for best Feedforward/Feedback control"

Reply to
JCH

Newsbeitragnews: snipped-for-privacy@d4g2000prg.googlegroups.com...

Yes, I already agreed that the results would be (numerically) identical. However, if you plot both transferfunctions from a sufficiently low frequency (i.e. 1e-8 or 1e-9 Hz) the differences show up.

Reply to
JCH

snipped-for-privacy@e10g2000prf.googlegroups.com...

oups.com...

Then why did you include in your model?

Reply to
nattejas

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.