Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

NonlinearCholeskyFactorization

Guides

  • Guide to ZigangPan`NonlinearCholeskyFactorization`

Symbols

  • approximateHJIequation
  • approximatenonlinearCholeskyfactorization
  • backsteppinglocaloptimalmatchingglobalinverseoptimal
  • backsteppinglocaloptimalmatchingglobalinverseoptimalNew
  • backsteppinglocaloptimalmatchingglobalinverseoptimalN
  • backsteppinglocaloptimalmatchingglobalinverseoptimalNNew
  • expandseriesntruncate
  • monomialsofgivenorder
ZigangPan`NonlinearCholeskyFactorization`
backsteppinglocaloptimalmatchingglobalinverseoptimalNew
​
{V,α,qcheck,rcheck}=backsteppinglocaloptimalmatchingglobalinverseoptimalNew[f,g,h,q,r,γ,xc,m]
calculates the locally optimal matching up to order
m
and globally inverse optimal control law for the system
xc'[t]=f[xc]+g[xc]u+h[xc]w
with cost function J =
t
∫
0
(q[xc[τ]]+u[τ].r[xc[τ]].u[τ]-γ^2w[τ].w[τ])τ
​
f[xc]={a1[x1]x2+f1[x1],a2[x1,x2]x3+f2[x1,x2],...fn[x1,...,xn]}
g[xc]={{0},{0},...,{b[xc]}}
h[xc]={h1[x1],h2[x1,x2],...hn[x1,...,xn]}
f[0]=0
;
a1[x1]≠0
;
a2[x1,x2]≠0
; ...;
b[xc]≠0
;
q[xc]
is positive definite with leading positive definite quadratic approximants
r[xc]
is positive definite, ∀xc
γ
> 0 ϵ = m
xc={x1,x2,...,xn},
where each component are assumed to be scalars. All functions are assumed to be formulas rather than pure functions The returned variables:
V
= the formula of the resulting value function.
α
= the formula of the resulting control law.
qcheck
= the formula of the resulting weighting function on state variables.
rcheck
= the formula of the resulting weighting function on the control variables. Compared to backsteppinglocaloptimalmatchingglobalinverseoptimal function, this design results in smaller controller magnitude.
​
Examples  
(1)
Basic Examples  
(1)
In[1]:=
Needs["ZigangPan`DifferentialEquationSolver`"]
In[2]:=
xc={x1,x2};
In[3]:=
$Assumptions=((x1|x2)∈Reals);
In[4]:=
fe[x1_,x2_]:={x2+x1^2,0}
In[5]:=
ge[x1_,x2_]:={{0},{1}}
In[6]:=
he[x1_,x2_]:={{1},{0}}
In[7]:=
qe[x1_,x2_]:=x1^2+x2^2
In[8]:=
γ=4;
In[9]:=
f=Apply[fe,xc];
In[10]:=
g=Apply[ge,xc];
In[11]:=
h=Apply[he,xc];
In[12]:=
r={{1}};
In[13]:=
q=Apply[qe,xc];
In[14]:=
s=(g.Inverse[r].Transpose[g]-h.Transpose[h]/γ^2)/4;
In[15]:=
Va4=
approximateHJIequation
[f,s,q,xc,4]
Out[15]=
1.8717007154895465283161760209428058465234317466386
2
x1
+2.9823690239504571962366257455014334394864580442933
3
x1
+4.08982743286153112780779453412529514286240722893
4
x1
+2.2081249720274031853679747747788583689816484446750x1x2+4.338563859297960000755192639715877875550556325191
2
x1
x2+6.70781670953482859920650861369622686381082249586
3
x1
x2+1.8122664250438800684138278298792941843986802781164
2
x2
+2.2304196799928599937349927998131939360983499770050x1
2
x2
+4.12671002113425095994678930713021194621344329080
2
x1
2
x2
+0.4385534995646503487291876620616039596984551071135
3
x2
+1.12367449788032018651636673106187966005697916364x1
3
x2
+0.116732643398511024381327866423151127928885468947
4
x2
In[16]:=
ans=
backsteppinglocaloptimalmatchingglobalinverseoptimalNew
[f,g,h,q,r,γ,xc,3];
In[17]:=
Vx=D[ans〚1〛,{xc}];
In[18]:=
Plot3D[ans〚1〛,{x1,-2,2},{x2,-5,5},PlotRange{0,3}]
Out[18]=
In[19]:=
Plot3D[ans〚4〛,{x1,-2,2},{x2,-5,5},PlotRange{0,2}]
Out[19]=
In[20]:=
Plot3D[ans〚3〛,{x1,-2,2},{x2,-5,5},PlotRange{0,20}]
Out[20]=
In[21]:=
Plot3D[ans〚2〛,{x1,-2,2},{x2,-5,5},PlotRange{-60,10}]
Out[21]=
In[22]:=
Plot3D[Vx.f-Vx.(g.Inverse[ans〚4〛].Transpose[g]-1/γ^2h.Transpose[h]).Vx/4+ans〚3〛,{x1,-2,2},{x2,-5,5},PlotRangeAll]
Out[22]=
In[23]:=
closedloopdynamics=FormulaToFunction[xc,f+g.ans〚2〛+h.{0}];
In[24]:=
sol=RungeKutta45[closedloopdynamics,0,{0.4,0.5},20,1/100];
10% completed.
20% completed.
30% completed.
40% completed.
50% completed.
60% completed.
70% completed.

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com