Brachistochrone Optimal Control

Apps.BrachistochroneProblem History

Hide minor edits - Show changes to output

June 21, 2020, at 05:04 AM by 136.36.211.159 -
Deleted lines 46-63:
----

(:html:)
 <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    <a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
(:htmlend:)
Changed lines 19-23 from:
{$\quad \frac{dx(t)}{dt} = v sin(u)$}

{$\quad \frac{dy(t)}{dt} = v cos(u)$}

{$\quad \frac{dv(t)}{dt} = g cos(u)$}
to:
{$\quad \frac{dx(t)}{dt} = v \; \sin(u)$}

{$\quad \frac{dy(t)}{dt} = v \; \cos(u)$}

{$\quad \frac{dv(t)}{dt} = g \; \cos(u)$}
Changed line 17 from:
{$\mathrm{subject/;to}$}
to:
{$\mathrm{subject\;to}$}
Changed line 17 from:
{$\mathrm{subject to}$}
to:
{$\mathrm{subject/;to}$}
Changed line 17 from:
{$subject to$}
to:
{$\mathrm{subject to}$}
Changed lines 17-18 from:
{$"subject to"$}
to:
{$subject to$}
Changed line 27 from:
{$\quad x(t_f)=2, \quad y(t_f)=2, \quad v(t_f)="Free"$}
to:
{$\quad x(t_f)=2, \quad y(t_f)=2, \quad v(t_f)=Free$}
Added lines 30-33:

(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/pgJ0jbfFBUE" frameborder="0" allowfullscreen></iframe>
(:htmlend:)
Added lines 37-38:
Attach:download.png [[Attach:brachistochrone_xend_study.zip|Download Brachistochrone Parametric Solution in Python]]
Deleted lines 39-40:

Attach:download.png [[Attach:brachistochrone_xend_study.zip|Download Brachistochrone Parametric Solution in Python]]
Changed line 33 from:
%width=300px%Attach:brachistochrone_solution.png
to:
%width=350px%Attach:brachistochrone_solution.png
Changed line 13 from:
The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''t'_f_'''. The variable ''x'' is the horizontal position and ''y'' is the vertical position while ''v'' is the velocity. The parameter ''g'' is the gravitational constant (assume 9.81 m/s'^2^').
to:
The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''t'_f_'''. The variable ''x'' is the horizontal position and ''y'' is the vertical position in the down direction while ''v'' is the velocity. The parameter ''g'' is the gravitational constant (assume 9.81 m/s'^2^').
Changed line 37 from:
Attach:brachistochrone_parameteric_study.png
to:
%width=500px%Attach:brachistochrone_parameteric_study.png
Changed lines 35-37 from:
Thanks to Trent Okeson for providing a solution to this problem.

to:
An interesting extension to this problem is to compare the solutions to when the value of x is varied from 1.0 to 10.0. The final value of y is fixed at 2.0 below the starting point.

Attach:brachistochrone_parameteric_study.png

Attach:download.png [[Attach:brachistochrone_xend_study.zip|Download Brachistochrone Parametric Solution in Python]]

Thanks to Trent Okeson for providing a solution to this problem.
Changed line 33 from:
Attach:brachistochrone_solution.png
to:
%width=300px%Attach:brachistochrone_solution.png
Added lines 28-37:

!!!! Solution

Attach:download.png [[Attach:brachistochrone_solution.zip|Download Brachistochrone Solution in Python]]

Attach:brachistochrone_solution.png

Thanks to Trent Okeson for providing a solution to this problem.

Changed lines 9-10 from:
This is a classic problem that has been solved with calculus of variations but this particular task is to use a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction. The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''t'_f_'''. The variable ''x'' is the horizontal position and ''y'' is the vertical position while ''v'' is the velocity. The parameter ''g'' is the gravitational constant (assume 9.81 m/s'^2^').
to:
This is a classic problem that has been solved with calculus of variations but this particular task is to use a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction.
Added lines 12-13:

The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''t'_f_'''. The variable ''x'' is the horizontal position and ''y'' is the vertical position while ''v'' is the velocity. The parameter ''g'' is the gravitational constant (assume 9.81 m/s'^2^').
Changed lines 23-25 from:
{$\quad x(0)=0, y(0)=0, v(0)=0$}

{$\quad x(t_f)=2, y(t_f)=2, v(t_f)="Free"$}
to:
{$\quad x(0)=0, \quad y(0)=0, \quad v(0)=0$}

{$\quad x(t_f)=2, \quad y(t_f)=2, \quad v(t_f)="Free"$}
Changed line 25 from:
{$\quad x(t_f)=2, y(t_f)=2, v(t_f)=Free$}
to:
{$\quad x(t_f)=2, y(t_f)=2, v(t_f)="Free"$}
Changed line 15 from:
{$\mathtt subject to$}
to:
{$"subject to"$}
Changed line 15 from:
{$\mathrm{subject to}$}
to:
{$\mathtt subject to$}
Changed line 15 from:
subject to
to:
{$\mathrm{subject to}$}
Changed line 15 from:
{$\tt{subject to}$}
to:
subject to
Changed lines 15-16 from:
{$subject to$}
to:
{$\tt{subject to}$}
Changed lines 23-25 from:
{$ x(0)=0, y(0)=0, v(0)=0$}

{$ x(t_f)=2, y(t_f)=2, v(t_f)=Free$}
to:
{$\quad x(0)=0, y(0)=0, v(0)=0$}

{$\quad x(t_f)=2, y(t_f)=2, v(t_f)=Free$}
Changed lines 13-28 from:
 minimize tf

 subject
to
   dx/dt = v * sin(u)
   dy/dt = v * cos(u)
   dv/dt = g * cos(u)

 initial boundary conditions
    x
(0) = 0
   x(0) = 0
    v
(0) = 0

 final boundary conditions
    x
(tf) = 2
    y(tf) = 2
    v(tf) = Free
to:
{$\min t_f$}

{$subject
to$}

{$\quad \frac{
dx(t)}{dt} = v sin(u)$}

{$\quad \frac{
dy(t)}{dt} = v cos(u)$}

{$\quad \frac{
dv(t)}{dt} = g cos(u)$}

{$ x(0)=0, y(0)=0, v
(0)=0$}

{$
x(t_f)=2, y(t_f)=2, v(t_f)=Free$}
August 26, 2016, at 05:56 PM by 10.5.113.104 -
Changed line 9 from:
This is a classic problem that has been solved with calculus of variations but this particular task is to use a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction. The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''t'_f_'''. The variable ''x'' is the horizontal position and ''y'' is the vertical position. The parameter ''g'' is the gravitational constant (assume 9.81 m/s'^2^').
to:
This is a classic problem that has been solved with calculus of variations but this particular task is to use a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction. The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''t'_f_'''. The variable ''x'' is the horizontal position and ''y'' is the vertical position while ''v'' is the velocity. The parameter ''g'' is the gravitational constant (assume 9.81 m/s'^2^').
August 26, 2016, at 05:55 PM by 10.5.113.104 -
Changed line 9 from:
This is a classic problem that has been solved with calculus of variations but this particular task is to use a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction. The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''tf''. The variable ''x'' is the horizontal position and ''y'' is the vertical position. The parameter ''g'' is the gravitational constant (assume 9.81 m/s'^2^').
to:
This is a classic problem that has been solved with calculus of variations but this particular task is to use a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction. The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''t'_f_'''. The variable ''x'' is the horizontal position and ''y'' is the vertical position. The parameter ''g'' is the gravitational constant (assume 9.81 m/s'^2^').
August 26, 2016, at 05:33 PM by 10.5.113.104 -
Deleted lines 28-29:

!!!! Solution
August 26, 2016, at 05:24 PM by 10.5.113.104 -
Changed line 9 from:
This is a classic problem that has been solved with calculus of variations but this particular task is to use a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction. The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''tf''. The variable ''x'' is the horizontal position and ''y'' is the vertical position. The parameter ''g'' is the gravitational constant (assume 9.81 m/s^2).
to:
This is a classic problem that has been solved with calculus of variations but this particular task is to use a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction. The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''tf''. The variable ''x'' is the horizontal position and ''y'' is the vertical position. The parameter ''g'' is the gravitational constant (assume 9.81 m/s'^2^').
August 26, 2016, at 05:24 PM by 10.5.113.104 -
Changed line 9 from:
This is a classic problem that has been solved with calculus of variations. This particular demonstration is a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction.
to:
This is a classic problem that has been solved with calculus of variations but this particular task is to use a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction. The adjustable parameter ''u'' is the slope and can be adjusted over the minimized time horizon ''tf''. The variable ''x'' is the horizontal position and ''y'' is the vertical position. The parameter ''g'' is the gravitational constant (assume 9.81 m/s^2).
August 26, 2016, at 05:20 PM by 10.5.113.104 -
Changed line 7 from:
%height=70px%Attach:brachistochrone.gif
to:
%height=100px%Attach:brachistochrone.gif
August 26, 2016, at 05:20 PM by 10.5.113.104 -
Changed lines 5-7 from:
A classic optimal control problem is to compute the [[https://en.wikipedia.org/wiki/Brachistochrone_curve|brachistochrone curve]] of fastest descent. A point mass must slide without friction and with constant gravitational force to an fixed end point in the shortest time.

Attach
:brachistochrone.gif
to:
A classic optimal control problem is to compute the [[https://en.wikipedia.org/wiki/Brachistochrone_curve|brachistochrone curve]] of fastest descent. A point mass must slide without friction and with constant gravitational force to an fixed end point in the shortest time. The following animation (source: Wikipedia) shows different trial solutions (blue) and the optimal solution (red) for a particular starting and end point.

%height=70px%
Attach:brachistochrone.gif
August 26, 2016, at 05:17 PM by 10.5.113.104 -
Changed lines 5-9 from:
A classic optimal control problem is to compute the [[https://en.wikipedia.org/wiki/Brachistochrone_curve|brachistochrone curve]] of fastest descent. A point mass must slide without friction and with constant gravitational force to an fixed end point in the shortest time. This is a classic problem that has been solved with calculus of variations. This particular demonstration is a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction.
to:
A classic optimal control problem is to compute the [[https://en.wikipedia.org/wiki/Brachistochrone_curve|brachistochrone curve]] of fastest descent. A point mass must slide without friction and with constant gravitational force to an fixed end point in the shortest time.

Attach:brachistochrone.gif

This is a classic problem that has been solved with calculus of variations. This particular demonstration is a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction.
August 26, 2016, at 05:15 PM by 10.5.113.104 -
Changed line 5 from:
A classic optimal control problem is to compute the brachistochrone curve of fastest descent. A point mass must slide without friction and with constant gravitational force to an fixed end point in the shortest time. This is a classic problem that has been solved with calculus of variations. This particular demonstration is a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction.
to:
A classic optimal control problem is to compute the [[https://en.wikipedia.org/wiki/Brachistochrone_curve|brachistochrone curve]] of fastest descent. A point mass must slide without friction and with constant gravitational force to an fixed end point in the shortest time. This is a classic problem that has been solved with calculus of variations. This particular demonstration is a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction.
August 26, 2016, at 05:09 PM by 10.5.113.104 -
Changed line 1 from:
(:title Brachistochrone Solution with MATLAB and Python:)
to:
(:title Brachistochrone Optimal Control:)
August 26, 2016, at 05:08 PM by 10.5.113.104 -
Changed line 5 from:
A classic optimal control problem is to compute the brachistochrone curve of fastest descent. A point mass must slide without friction and with constant gravitational force to an fixed end point in the shortest time. The problem has been solved with calculus of variations. This is a demonstration of a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction.
to:
A classic optimal control problem is to compute the brachistochrone curve of fastest descent. A point mass must slide without friction and with constant gravitational force to an fixed end point in the shortest time. This is a classic problem that has been solved with calculus of variations. This particular demonstration is a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction.
August 26, 2016, at 05:07 PM by 10.5.113.104 -
Added lines 1-45:
(:title Brachistochrone Solution with MATLAB and Python:)
(:keywords Python, MATLAB, nonlinear control, Brachistochrone, dynamic programming, optimal control:)
(:description Minimize final time on which a bead slides without friction under the influence of a uniform gravitational field to a given end point in the shortest time.:)

A classic optimal control problem is to compute the brachistochrone curve of fastest descent. A point mass must slide without friction and with constant gravitational force to an fixed end point in the shortest time. The problem has been solved with calculus of variations. This is a demonstration of a numerical method to solve this same problem. The solution curve is independent of both gravitational force and the mass of the object. The solution is different if there is an initial velocity or if there is friction.

!!!! Problem Statement

 minimize tf

 subject to
    dx/dt = v * sin(u)
    dy/dt = v * cos(u)
    dv/dt = g * cos(u)

 initial boundary conditions
    x(0) = 0
    x(0) = 0
    v(0) = 0

 final boundary conditions
    x(tf) = 2
    y(tf) = 2
    v(tf) = Free

!!!! Solution

----

(:html:)
 <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    <a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
(:htmlend:)