PCT v MCP

[From Rupert Young (2014.08.16 15.30)]

I have been looking around to find a MPC (model-based prediction
control) system with a view to showing how it could be reworked in the
(simpler) PCT paradigm. I think the following is suitable, "Vehicle
adaptive cruise control design with optimal switching between throttle
and brake", http://link.springer.com/article/10.1007/s11768-012-0319-0.
I only have a hard copy but can scan and send if required.

It describes an MPC approach to a car cruise control system. But rather
than just controlling velocity it also controls the distance to
preceding cars and driving "comfort" (which is related to acceleration).
They have some very convoluted maths (I can't say I followed it all)
which results in a set of equations which determines the "commands" for
throttle and brake. The equations are attached and include, and require,
parameters such as vehicle mass, gear ratio, engine torque, wheel radius
and gravity (none of which would be available to a human cruise
controller, or necessary for a PCT model).

Before looking at the PCT version I am curious as to why anyone would
take the MPC approach, it seems unnecessarily complex as well as being
unrealistic, as above parameters, and physics knowledge, would not be
available to a natural controller. Am I missing something?

Attached is my draft of the PCT model of this cruise controller. There
are two main goals, the separation to the car in front and the "comfort"
of driving. The velocity is a function of the separation error, the
acceleration is function of the velocity error and the comfort reference
and the foot angle is a function of the acceleration error.

Does this seem valid? Would anyone like to provide a different or
improved version? Or provide more detail?

···

--

Regards,
Rupert

Hi Rupert, it does seem very common despite the complexity, in psychology too. I think that most scientists think that only complex explanations of behaviour do apparent justice to the apparent complexity of the brain. Also, if the goal of the model is to exactly predict behaviour in advance then I can see why they would think they would need this number of variables. Finally, these models often don't distinguish between the equations for the physics and the equations for the brain's model of the physics.
The plan to actually reproduce using PCT one of these published systems, and then make a direct comparison is the way to go isn't it!
We could do with finding a published model that traces shapes on a computer screen using a force feedback joystick to compare with our PCT system. But the best way is to try to build a PCT system of something out there.
Good luck and keep us posted!
Warren

···

On 16 Aug 2014, at 15:29, Rupert Young <rupert@moonsit.co.uk> wrote:

[From Rupert Young (2014.08.16 15.30)]

I have been looking around to find a MPC (model-based prediction control) system with a view to showing how it could be reworked in the (simpler) PCT paradigm. I think the following is suitable, "Vehicle adaptive cruise control design with optimal switching between throttle and brake", Vehicle adaptive cruise control design with optimal switching between throttle and brake | Control Theory and Technology. I only have a hard copy but can scan and send if required.

It describes an MPC approach to a car cruise control system. But rather than just controlling velocity it also controls the distance to preceding cars and driving "comfort" (which is related to acceleration). They have some very convoluted maths (I can't say I followed it all) which results in a set of equations which determines the "commands" for throttle and brake. The equations are attached and include, and require, parameters such as vehicle mass, gear ratio, engine torque, wheel radius and gravity (none of which would be available to a human cruise controller, or necessary for a PCT model).

Before looking at the PCT version I am curious as to why anyone would take the MPC approach, it seems unnecessarily complex as well as being unrealistic, as above parameters, and physics knowledge, would not be available to a natural controller. Am I missing something?

Attached is my draft of the PCT model of this cruise controller. There are two main goals, the separation to the car in front and the "comfort" of driving. The velocity is a function of the separation error, the acceleration is function of the velocity error and the comfort reference and the foot angle is a function of the acceleration error.

Does this seem valid? Would anyone like to provide a different or improved version? Or provide more detail?

--

Regards,
Rupert

<2014-08-16 14.17.49-small.jpg>
<2014-08-16 14.17.39-small.jpg>
<pct-cruise-control.jpg>

[From Rick Marken (2014.08.17.1030)]

image17.png

···

Rupert Young (2014.08.16 15.30)–

RY: I have been looking around to find a MPC (model-based prediction control) system with a view to showing how it could be reworked in the (simpler) PCT paradigm. I think the following is suitable, “Vehicle adaptive cruise control design with optimal switching between throttle and brake”, http://link.springer.com/article/10.1007/s11768-012-0319-0. I only have a hard copy but can scan and send if required.

RY: It describes an MPC approach to a car cruise control system. But rather than just controlling velocity it also controls the distance to preceding cars and driving “comfort” (which is related to acceleration). They have some very convoluted maths (I can’t say I followed it all) which results in a set of equations which determines the “commands” for throttle and brake. The equations are attached and include, and require, parameters such as vehicle mass, gear ratio, engine torque, wheel radius and gravity (none of which would be available to a human cruise controller, or necessary for a PCT model).

RM: Yes, this might be a good one to implement using a PCT architecture. But they only implemented it in a computer simulation. I suggest that you implement it as an actual physical device (like a Lego vehicle).

RY: Before looking at the PCT version I am curious as to why anyone would take the MPC approach, it seems unnecessarily complex as well as being unrealistic, as above parameters, and physics knowledge, would not be available to a natural controller. Am I missing something?

RM: It’s the Zeitgeist.

RY: Attached is my draft of the PCT model of this cruise controller. There are two main goals, the separation to the car in front and the “comfort” of driving. The velocity is a function of the separation error, the acceleration is function of the velocity error and the comfort reference and the foot angle is a function of the acceleration error.

RM: I think the main thing the authors of the target paper did was develop an algorithm that would make the switching between accelerator and brake (which is used to control separation) smoother. So all your model would have to do is control for separation smoothly by appropriately varying the activation of accelerator and brake. I believe their algorithm achieves this smoothing by filtering the binary “command signal” (the PCT reference signal) that is sent to either accelerator or brake as appropriate. I can’t tell whether or not this is done in a closed loop. Is their a diagram of their model in the paper? If so, could you post it? If not, never mind; it would take too much time for me to try to figure out their math, if I ever could.

RY: Does this seem valid? Would anyone like to provide a different or improved version? Or provide more detail?

RM: I think your model sketch does need some more detail, and maybe some architectural changes. I understand your diagram (reading left to right) until I get to comfort control. In the diagram comfort seems to be a perception that is a combination of velocity error and velocity. I don’t understand what the combination is – weighted sum? – or why this is a measure of comfort. I think the comfort they are talking about is more like what is called “jerk”, which is a change in (or the derivative of) acceleration. So I would eliminate the “comfort” control system and add a system that perceives and controls “jerk” at 0.

The trick would be to figure out how to switch between brake and accelerator (you can’t vary them simultaneously) appropriately to accelerate (or decelerate) as necessary to maintain separation and doing it so that the perception of jerk is maintained at zero. I think that’s what the Li et al article was about; developing a switching algorithm that provides alternation between brake and accelerator that results in a smooth (no jerk) ride. The trick will be to do this without using the complex computational algorithms described in the Li paper but, rather, to do it the way people do; by controlling perceptions.

I really have no idea how to actually implement this; I’ll try to work something out in a spreadsheet if I get a chance. But it might just take 99% perspiration and 1% inspiration to get this to work in an actual little Lego car. I envision the output of this car model to be a pivoting arm (analogous to the foot) that can be moved to either hit the accelerator or the brake, as in this little figure:

So the reference for foot position would be a continuous variable that has kind of a binary result, either pressing the brake (with varying pressure) or accelerator (also with varying pressure).

So the problem is to design a perceptual control model that varies foot position between brake and accelerator so that separation distance is maintained “smoothly” (with no “jerk”).

Keep us appraised of your progress on this; the more I think about this the more interesting it becomes.

Best regards

Rick

Regards,

Rupert


Richard S. Marken, Ph.D.
Author of Doing Research on Purpose.
Now available from Amazon or Barnes & Noble

[Martin Taylor 2014.08.17.13.36]

I agree with Rick about jerk. The switch between accelerator and

brake reminds me of the fact that we usually merge two one-way
control systems when we model a control system that controls all the
way from positive to negative errors. Since neurons can’t pulse at a
negative frequency, a real control systems that we model as one unit
is really a mixture of a brake and an accelerator for whatever
perception is being controlled.
When you have two control systems working together, one producing
zero for error less than threshold-1, and the other producing zero
for error greater than threshold-2, there will be a tolerance zone
unless threshold-1 equals threshold-2. If the difference between
them means there is a region of error in which neither produces
output, that’s one form of tolerance zone. If it means there’s a
region of overlap in which both brake and accelerator are operating,
there’s still no control in the overlap region, as Kent has modelled
for other conflicts. So unless the equality of threshold is
exquistitely set, there will be a region over which there is no
control. For the car, it means freewheeling, which is actually what
you do when you are driving smoothly at a speed that continues to
satisfy you that you need neither accelerator nor brake (e.g.
downhill).
Yes, indeed.
Martin

···

[From Rick Marken (2014.08.17.1030)]

          Rupert

Young (2014.08.16 15.30)–

          RY: I have been looking around to find a MPC (model-based

prediction control) system with a view to showing how it
could be reworked in the (simpler) PCT paradigm. I think
the following is suitable, “Vehicle adaptive cruise
control design with optimal switching between throttle and
brake”, http://link.springer.com/article/10.1007/s11768-012-0319-0 .
I only have a hard copy but can scan and send if required.

          RY: It describes an MPC approach to a car cruise control

system. But rather than just controlling velocity it also
controls the distance to preceding cars and driving
“comfort” (which is related to acceleration). They have
some very convoluted maths (I can’t say I followed it all)
which results in a set of equations which determines the
“commands” for throttle and brake. The equations are
attached and include, and require, parameters such as
vehicle mass, gear ratio, engine torque, wheel radius and
gravity (none of which would be available to a human
cruise controller, or necessary for a PCT model).

          RM: Yes, this might be a good one to implement using a

PCT architecture. But they only implemented it in a
computer simulation. I suggest that you implement it as an
actual physical device (like a Lego vehicle).

          RY: Before looking at the PCT version I am curious as to

why anyone would take the MPC approach, it seems
unnecessarily complex as well as being unrealistic, as
above parameters, and physics knowledge, would not be
available to a natural controller. Am I missing something?

RM: It’s the Zeitgeist.

          RY:

Attached is my draft of the PCT model of this cruise
controller. There are two main goals, the separation to
the car in front and the “comfort” of driving. The
velocity is a function of the separation error, the
acceleration is function of the velocity error and the
comfort reference and the foot angle is a function of the
acceleration error.

          RM: I think the main thing the authors of the target

paper did was develop an algorithm that would make the
switching between accelerator and brake (which is used to
control separation) smoother. So all your model would have
to do is control for separation smoothly by appropriately
varying the activation of accelerator and brake. I believe
their algorithm achieves this smoothing by filtering the
binary “command signal” (the PCT reference signal) that is
sent to either accelerator or brake as appropriate. I
can’t tell whether or not this is done in a closed loop.
Is their a diagram of their model in the paper? If so,
could you post it? If not, never mind; it would take too
much time for me to try to figure out their math, if I
ever could.

          RY:

Does this seem valid? Would anyone like to provide a
different or improved version? Or provide more detail?

          RM: I think your model sketch does need some more

detail, and maybe some architectural changes. I understand
your diagram (reading left to right) until I get to
comfort control. In the diagram comfort seems to be a
perception that is a combination of velocity error and
velocity. I don’t understand what the combination is –
weighted sum? – or why this is a measure of comfort. I
think the comfort they are talking about is more like what
is called “jerk”, which is a change in (or the derivative
of) acceleration. So I would eliminate the “comfort”
control system and add a system that perceives and
controls “jerk” at 0.

          The trick would be to figure out how to switch between

brake and accelerator (you can’t vary them simultaneously)
appropriately to accelerate (or decelerate) as necessary
to maintain separation and doing it so that the perception
of jerk is maintained at zero.

          So the problem is to design a perceptual control model

that varies foot position between brake and accelerator so
that separation distance is maintained “smoothly” (with no
“jerk”).

          Keep us appraised of your progress on this; the more I

think about this the more interesting it becomes.

Yes, that would be good to do, but I’ll have to wait for someone to
fund it before I could physically model it (or in simulation). In
the meantime the theoretical model is useful as starting point to
contrast the methods.
There isn’t a diagram, but I’ll scan and send the paper as a matter
of interest, when I get home later.
I had the “comfort” system reference as a function of the velocity
error (which would be an acceleration reference) and a “comfort”
value. The input is the derivative of the velocity. I was thinking
of comfort as limiting the acceleration (high being uncomfortable),
but I think you (and Martin) are right that it should be the jerky
change in acceleration. I think in reality it would be perceived
through the effects of the body, but could be modelled as the moving
average of a weighted product of both positive and negative changes
in acceleration? So maybe something more like the attached. The foot reference is a
function of the velocity error and the comfort error. If the comfort
error high (jerky) the foot pressure is reduced so there will be
less change between brake and throttle (lower acceleration and
deceleration).
Regards,
Rupert

···

[Rupert Young (2014.08.18 15.00)]

  On 17/08/2014 18:25, Richard Marken wrote:
    RM: Yes, this might be a good one to implement

using a PCT architecture. But they only implemented it in a
computer simulation. I suggest that you implement it as an
actual physical device (like a Lego vehicle).

          RY:

Before looking at the PCT version I am curious as to why
anyone would take the MPC approach, it seems unnecessarily
complex as well as being unrealistic, as above parameters,
and physics knowledge, would not be available to a natural
controller. Am I missing something?

RM: It’s the Zeitgeist.

          RY:

Attached is my draft of the PCT model of this cruise
controller. There are two main goals, the separation to
the car in front and the “comfort” of driving. The
velocity is a function of the separation error, the
acceleration is function of the velocity error and the
comfort reference and the foot angle is a function of the
acceleration error.

          RM: I think the main thing the authors of the target

paper did was develop an algorithm that would make the
switching between accelerator and brake (which is used to
control separation) smoother. So all your model would have
to do is control for separation smoothly by appropriately
varying the activation of accelerator and brake. I believe
their algorithm achieves this smoothing by filtering the
binary “command signal” (the PCT reference signal) that is
sent to either accelerator or brake as appropriate. I
can’t tell whether or not this is done in a closed loop.
Is their a diagram of their model in the paper? If so,
could you post it? If not, never mind; it would take too
much time for me to try to figure out their math, if I
ever could.

          RY:

Does this seem valid? Would anyone like to provide a
different or improved version? Or provide more detail?

          RM: I think your model sketch does need some more

detail, and maybe some architectural changes. I understand
your diagram (reading left to right) until I get to
comfort control. In the diagram comfort seems to be a
perception that is a combination of velocity error and
velocity. I don’t understand what the combination is –
weighted sum? – or why this is a measure of comfort. I
think the comfort they are talking about is more like what
is called “jerk”, which is a change in (or the derivative
of) acceleration. So I would eliminate the “comfort”
control system and add a system that perceives and
controls “jerk” at 0.

[From Rick Marken (2014.08.19.1140)]

···

Rupert Young (2014.08.18 15.00)

RY: I had the "comfort" system reference as a function of the velocity

error (which would be an acceleration reference) and a “comfort”
value. The input is the derivative of the velocity. I was thinking
of comfort as limiting the acceleration (high being uncomfortable),
but I think you (and Martin) are right that it should be the jerky
change in acceleration. I think in reality it would be perceived
through the effects of the body, but could be modelled as the moving
average of a weighted product of both positive and negative changes
in acceleration?

RY: So maybe something more like the attached. The foot reference is a

function of the velocity error and the comfort error. If the comfort
error high (jerky) the foot pressure is reduced so there will be
less change between brake and throttle (lower acceleration and
deceleration).

RM: It’s worth a try. Just model it and see what happens. But it would be really nice if you could get a grant to build a prototype of a “smooth control” system implemented in an actual device, like a lego car.

Best

Rick


Richard S. Marken, Ph.D.
Author of Doing Research on Purpose.
Now available from Amazon or Barnes & Noble

          RM: I think your model sketch does need some more

detail, and maybe some architectural changes. I understand
your diagram (reading left to right) until I get to
comfort control. In the diagram comfort seems to be a
perception that is a combination of velocity error and
velocity. I don’t understand what the combination is –
weighted sum? – or why this is a measure of comfort. I
think the comfort they are talking about is more like what
is called “jerk”, which is a change in (or the derivative
of) acceleration. So I would eliminate the “comfort”
control system and add a system that perceives and
controls “jerk” at 0.

[From Rupert Young (2014.08.21 12.30)]

I had this response from the paper author when I asked the reason for using MPC.

"The reason that I choose MPC controller is that it is an online receding horizon control strategy that can handle model mismatch, uncertainty, disturbance, and multi-objectives."

Can anyone tell me what it all means?

Regards,
Rupert

[Philip (2014.08.21 11:22)]

···

Theory behind MPC


A discrete MPC scheme.

MPC is based on iterative, finite horizon optimization of a plant model. At time t
the current plant state is sampled and a cost minimizing control strategy is computed (via a numerical minimization algorithm) for a relatively short time horizon in the future: [t,t+T] .
Specifically, an online or on-the-fly calculation is used to explore state trajectories that emanate from the current state and find (via the
solution of Euler–Lagrangenge equations) a cost-minimizing control strategy until time t+T .
Only the first step of the control strategy is implemented, then the plant state is sampled again and the calculations are repeated starting from the new current state, yielding a new control and new predicted state path. The prediction horizon keeps being shifted forward and for this reason MPC is also called receding horizon control . Although
this approach is not optimal, in practice it has given very good results. Much academic research has been done to find fast methods of solution of Euler–Lagrange type equations, to understand the globall stability properties of MPC’s local optimization, and in general to improve the MPC method. To some extent the theoreticians have been trying to catch up with the control engineers when it comes to MPC.[2]

On Thu, Aug 21, 2014 at 4:24 AM, Rupert Young rupert@moonsit.co.uk wrote:

[From Rupert Young (2014.08.21 12.30)]

I had this response from the paper author when I asked the reason for using MPC.

“The reason that I choose MPC controller is that it is an online receding horizon control strategy that can handle model mismatch, uncertainty, disturbance, and multi-objectives.”

Can anyone tell me what it all means?

Regards,

Rupert

acc-mpc.pdf (2.41 MB)

···

[From Rupert Young (2014.08.21 22.30)]

  Here's the paper for anyone interested.

  On 19/08/2014 19:39, Richard Marken wrote:
Regards,
Rupert

[From Rick Marken (2014.08.19.1140)]

Rupert Young (2014.08.18 15.00)

                        RM: I think your model sketch does need

some more detail, and maybe some
architectural changes. I understand your
diagram (reading left to right) until I get
to comfort control. In the diagram comfort
seems to be a perception that is a
combination of velocity error and velocity.
I don’t understand what the combination is
– weighted sum? – or why this is a measure
of comfort. I think the comfort they are
talking about is more like what is called
“jerk”, which is a change in (or the
derivative of) acceleration. So I would
eliminate the “comfort” control system and
add a system that perceives and controls
“jerk” at 0.

            RY: I had the "comfort" system reference as a function

of the velocity error (which would be an acceleration
reference) and a “comfort” value. The input is the
derivative of the velocity. I was thinking of comfort as
limiting the acceleration (high being uncomfortable),
but I think you (and Martin) are right that it should be
the jerky change in acceleration. I think in reality it
would be perceived through the effects of the body, but
could be modelled as the moving average of a weighted
product of both positive and negative changes in
acceleration?

            RY: So maybe something more like the attached. The foot

reference is a function of the velocity error and the
comfort error. If the comfort error high (jerky) the
foot pressure is reduced so there will be less change
between brake and throttle (lower acceleration and
deceleration).

          RM: It's worth a try. Just model it and see what

happens. But it would be really nice if you could get a
grant to build a prototype of a “smooth control” system
implemented in an actual device, like a lego car.

Best

Rick


Richard S. Marken, Ph.D.

        Author of  [Doing Research on Purpose](http://www.amazon.com/Doing-Research-Purpose-Experimental-Psychology/dp/0944337554/ref=sr_1_1?ie=UTF8&qid=1407342866&sr=8-1&keywords=doing+research+on+purpose). 

Now available from Amazon or Barnes & Noble

[From Rupert Young (2014.08.23 10.15)]

"Only the first step of the control strategy is implemented, then the plant state is sampled again and the calculations are repeated starting from the new current state, yielding a new control and new predicted state path. The prediction horizon keeps being shifted forward and for this reason MPC is also called receding horizon control."

Interesting. How would PCT be described in these terms? Advancing horizon control? In that a system acts to bring the horizon towards it?
Regards,
Rupert

[Philip (2014.08.21 11:22)]
Theory behind MPC

<http://en.wikipedia.org/wiki/File:MPC_scheme_basic.svg&gt;&lt;http://upload.wikimedia.org/wikipedia/commons/thumb/1/11/MPC_scheme_basic.svg/440px-MPC_scheme_basic.svg.png&gt;
<http://en.wikipedia.org/wiki/File:MPC_scheme_basic.svg&gt;&lt;http://bits.wikimedia.org/static-1.24wmf13/skins/common/images/magnify-clip.png&gt;
A discrete MPC scheme.
MPC is based on iterative, finite horizon optimization of a plant model. At time t the current plant state is sampled and a cost minimizing control strategy is computed (via a numerical minimization algorithm) for a relatively short time horizon in the future: <http://upload.wikimedia.org/math/6/4/8/648573482abe10af9ae83915e5751af8.png&gt;\. Specifically, an online or on-the-fly calculation is used to explore state trajectories that emanate from the current state and find (via the solution of <http://en.wikipedia.org/wiki/Euler–Lagrange_equation&gt;Euler–Lagrange equations) ) a cost-minimizing control strategy until time <http://upload.wikimedia.org/math/f/0/2/f026c246d28208c62c045e2e9b207144.png&gt;\. Only the first step of the control strategy is implemented, then the plant state is sampled again and the calculations are repeated starting from the new current state, yielding a new control and new predicted state path. The prediction horizon keeps being shifted forward and for this reason MPC is also called receding horizon control. Although this approach is not optimal, in practice it has given very good results. Much academic research has been done to find fast methods of solution of Euler–Lagrange type equations, to understand the global stability properties of MPC's local optimization, and in general to improve the MPC method. To some extent the theoreticians have been trying to catch up with the control engineers when it comes to MPC.<Model predictive control - Wikipedia

···

On 21/08/2014 19:23, PHILIP JERAIR YERANOSIAN wrote:

On Thu, Aug 21, 2014 at 4:24 AM, Rupert Young <<mailto:rupert@moonsit.co.uk>rupert@moonsit.co.uk> wrote:

[From Rupert Young (2014.08.21 12.30)]

I had this response from the paper author when I asked the reason for using MPC.

"The reason that I choose MPC controller is that it is an online receding horizon control strategy that can handle model mismatch, uncertainty, disturbance, and multi-objectives."

Can anyone tell me what it all means?

Regards,
Rupert

[From Rick Marken (2014.08.23.0900)]

···

Rupert Young (2014.08.23 10.15)

  "Only the first step of the control strategy is implemented, then

the plant state is sampled again and the calculations are repeated
starting from the new current state, yielding a new control and
new predicted state path. The prediction horizon keeps being
shifted forward and for this reason MPC is also called ** receding
horizon control**."

  RY: Interesting. How would PCT be described in these terms? Advancing

horizon control? In that a system acts to bring the horizon
towards it?

RM: How about “live in the present control” or "ignore the horizon control because “it’s just a shadow you’re seein’ that he’s chasin’”

Best

Rick


Richard S. Marken, Ph.D.
Author of Doing Research on Purpose.
Now available from Amazon or Barnes & Noble