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

MRRACLinearFullOrder

Guides

  • Guide to ZigangPan`MRRACLinearFullOrder`

Symbols

  • costtocomefunctionLTIMIMO1
  • robustMRACdesignMIMOFullOrder0
  • robustMRACdesignMIMOFullOrder1
ZigangPan`MRRACLinearFullOrder`
robustMRACdesignMIMOFullOrder0
​
{controller,controllerIS,af}=robustMRACdesignMIMOFullOrder0[m,r,a,b,dchk,d,a2111,a2113,a212,e,c,b0,c13,c12,q,θ,pθ,γ,referencemodel,θchk0,xchk0,q0,Φ0,ρo,Δ1i,βΔ,kccoeff,xd0]
m
: is output dimension.
r
: is the uniform vector relative degree of the design model, must equal to 0.
a
: is the
nn
-dimensional system matrix.
b
: is the
nm
-dimensional matrix.
dchk
: is the
nqchk
-dimensional matrix.
d
: is the
nqb
-dimensional matrix.
a2111
: is the
nσm
-dimensional tensor.
a2113
: is the
nσqchk
-dimensional tensor.
a212
: is the
nσm
-dimensional tensor.
e
: is the
mqb
-dimensional matrix.
c
: is the
mn
-dimensional matrix.
b0
: is the
mm
-dimensional matrix.
c13
: is the
mσqchk
-dimensional tensor.
c12
: is the
mσm
-dimensional tensor.
q
: is the positive definite weighting matrix for the tracking error.
θ
: is the
σ
-dimensional vector of unknown parameters.
pθ
: is a pure function such that
Apply
[
pθ
,θ]≤1
for true values
θ
.
γ
: is the desired disturbance attenuation level.
referencemodel
: is a NLsystem model describing the reference model of the system.
θchk0
: is the initial estimate for
θ
.
xchk0
: is the initial estimate for the system states (in the design model).
q0
: is the positive definite weighting matrix for the initial parameter estimation error:
θ-θchk0
.
Φ0
: is the initial value for the matrix
Φ
.
ρo
: is a real value that is greater than 1.
Δ1i
: is the initial value for
Δ1
. (The program will yield all rational number coefficients in the controller, there is no approximation in the controller.)
βΔ
: is a nonnegative real value.
kccoeff
: is a real value that is greater than or equal to 1, and sets
Kc=kccoeff*γ^2*
Tr
[q0]
. When
kccoeff=1
, then Σ and sΣ are constant matrix and constant scalar, respectively.
xd0
: is the initial state for the reference model. Returned variables:
controller
: is the NLsystem model for the robust adaptive controller.
controllerIS
: is the initial condition for the robust adaptive controller.
af
: is the numeric Hurwitz matrix
af
. If the inputs are of rational coefficients, then the returned variables are of rational coefficients. Design is guaranteed to work for minimum phase MIMO systems with additioanl measured disturbance as additional measurement outputs and with uniform vector relative degree zero and the system must be in strict observer canonical form.
​
Examples  
(1)
Basic Examples  
(1)
In[1]:=
system1={{x1,x2,x3},{u1,u2,w1,w2,wchk},{y1,y2,z1,z2,wchk},{{0,1,0,2θ1,2θ2,0,0,1},{0,0,1,0,0,0,0,0},{0,-θ3,0,0,0,0,0,0},{1,0,0,θ1,θ2,1,0,0},{0,0,0,-θ2,θ1,0,1,0},{1,0,0,θ1,θ2,0,0,0},{0,0,0,-θ2,θ1,0,0,0},{0,0,0,0,0,0,0,1}},{1,2},{1,2},{1,2},{3,4,5},{1,2,5},{3,4}};systemcheck[system1]
Out[1]=
True
In[2]:=
θbar={θ1,θ2,θ3};
In[3]:=
$Assumptions=$Assumptions&&assumeReal[Join[system1〚1〛,system1〚2〛,system1〚3〛]]&&assumePositive[θbar]
Out[3]=
x1∈&&x2∈&&x3∈&&u1∈&&u2∈&&w1∈&&w2∈&&wchk∈&&y1∈&&y2∈&&z1∈&&z2∈&&wchk∈&&θ1>0&&θ2>0&&θ3>0
In[4]:=
EZDCFAD[system1,θbar]
Out[4]=
0,{{θ1,θ2},{-θ2,θ1}},default,default,{{1,0,0},{0,1,0},{0,0,1}},{x1,x2,x3},{u1,u2,w1,w2,wchk,y1,y2},{y1,y2,z1,z2,wchk},-
2
2
θ1
2
θ1
+
2
θ2
-
2
2
θ2
2
θ1
+
2
θ2
,1,0,0,0,-
2
2
θ1
2
θ1
+
2
θ2
-
2
2
θ2
2
θ1
+
2
θ2
,0,1,
2
2
θ1
2
θ1
+
2
θ2
+
2
2
θ2
2
θ1
+
2
θ2
,0,{0,0,1,0,0,0,0,0,0,0},{0,-θ3,0,0,0,0,0,0,0,0},{1,0,0,θ1,θ2,1,0,0,0,0},{0,0,0,-θ2,θ1,0,1,0,0,0},{1,0,0,θ1,θ2,0,0,0,0,0},{0,0,0,-θ2,θ1,0,0,0,0,0},{0,0,0,0,0,0,0,1,0,0},{1,2,6,7},{1,2},{1,2},{3,4,5},{1,2,5},{3,4}
In[5]:=
strictOCFAD[system1]
State transformation is xold = transformation.xnew
State transformation is xold = transformation.xnew
Out[5]=
{True,True,3,{3,0},{{1,0,0},{0,1,0},{-θ3,0,1}},{{x11,x21,x31},{u1,u2,w1,w2,wchk},{y1,y2,z1,z2,wchk},{{0,1,0,2θ1,2θ2,0,0,1},{-θ3,0,1,0,0,0,0,0},{0,0,0,2θ1θ3,2θ2θ3,0,0,θ3},{1,0,0,θ1,θ2,1,0,0},{0,0,0,-θ2,θ1,0,1,0},{1,0,0,θ1,θ2,0,0,0},{0,0,0,-θ2,θ1,0,0,0},{0,0,0,0,0,0,0,1}},{1,2},{1,2},{1,2},{3,4,5},{1,2,5},{3,4}}}
In[6]:=
{strictform,systemobservable,nO,observabilityindices,transformation,systeminobservercanonicalform}=%
Out[6]=
{True,True,3,{3,0},{{1,0,0},{0,1,0},{-θ3,0,1}},{{x11,x21,x31},{u1,u2,w1,w2,wchk},{y1,y2,z1,z2,wchk},{{0,1,0,2θ1,2θ2,0,0,1},{-θ3,0,1,0,0,0,0,0},{0,0,0,2θ1θ3,2θ2θ3,0,0,θ3},{1,0,0,θ1,θ2,1,0,0},{0,0,0,-θ2,θ1,0,1,0},{1,0,0,θ1,θ2,0,0,0},{0,0,0,-θ2,θ1,0,0,0},{0,0,0,0,0,0,0,1}},{1,2},{1,2},{1,2},{3,4,5},{1,2,5},{3,4}}}
In[7]:=
designmodelr=rd0DMcompute[systeminobservercanonicalform,θbar]
State transformation is xold = transformation.xnew
Out[7]=
{{x11,x21,x31},{u1,u2,w1,w2,wchk,y1},{y1,y2,z1,z2,wchk},{{0,1,0,2θ1,2θ2,0,0,1,0},{0,0,1,θ1θ3,θ2θ3,θ3,0,0,-θ3},{0,0,0,2θ1θ3,2θ2θ3,0,0,θ3,0},{1,0,0,θ1,θ2,1,0,0,0},{0,0,0,-θ2,θ1,0,1,0,0},{1,0,0,θ1,θ2,0,0,0,0},{0,0,0,-θ2,θ1,0,0,0,0},{0,0,0,0,0,0,0,1,0}},{1,2},{1,2},{1,2},{3,4,5,6},{1,2,5},{3,4}}
In[8]:=
θ=Table[ToExpression[StringJoin["θ",ToString[i]]],{i,5}]
Out[8]=
{θ1,θ2,θ3,θ4,θ5}
In[9]:=
θrules={θ4θ1θ3,θ5θ2θ3}
Out[9]=
{θ4θ1θ3,θ5θ2θ3}
In[10]:=
designmodelr〚4〛〚All,4;;5〛={{2θ1,2θ2},{θ4,θ5},{2θ4,2θ5},{θ1,θ2},{-θ2,θ1},{θ1,θ2},{-θ2,θ1},{0,0}}
Out[10]=
{{2θ1,2θ2},{θ4,θ5},{2θ4,2θ5},{θ1,θ2},{-θ2,θ1},{θ1,θ2},{-θ2,θ1},{0,0}}
In[11]:=
systemoperation[designmodelr,{"View"}];
Active
a1
a2
Type
s1
s2
s3
c1
c2
d1
d2
d3
d4
names
x11
x21
x31
u1
u2
w1
w2
wchk
y1
s1
x11
0
1
0
2θ1
2θ2
0
0
1
0
s2
x21
0
0
1
θ4
θ5
θ3
0
0
-θ3
s3
x31
0
0
0
2θ4
2θ5
0
0
θ3
0
a1
m1
y1
1
0
0
θ1
θ2
1
0
0
0
a2
m2
y2
0
0
0
-θ2
θ1
0
1
0
0
c1
z1
1
0
0
θ1
θ2
0
0
0
0
c2
z2
0
0
0
-θ2
θ1
0
0
0
0
m3
wchk
0
0
0
0
0
0
0
1
0
In[12]:=
Mgrave={{1,0},{0,1},{θ3,0}};
In[13]:=
a={{0,1,0},{0,0,1},{0,0,0}};b={{0,0},{0,0},{0,0}};dchk={{1},{0},{0}};c={{1,0,0},{0,0,0}};b0={{0,0},{0,0}};
In[14]:=
d={{0,0,0},{0,0,1},{0,0,0}};
In[15]:=
mm={2θ1u1+2θ2u2,θ4u1+θ5u2-θ3y1,2θ4u1+2θ5u2+θ3*wchk}
Out[15]=
{2u1θ1+2u2θ2,-y1θ3+u1θ4+u2θ5,wchkθ3+2u1θ4+2u2θ5}
In[16]:=
a2111=D[D[mm,{θ}],{{y1,y2}}]
Out[16]=
{{{0,0},{0,0},{0,0},{0,0},{0,0}},{{0,0},{0,0},{-1,0},{0,0},{0,0}},{{0,0},{0,0},{0,0},{0,0},{0,0}}}
In[17]:=
a2113=D[D[mm,{θ}],{{wchk}}]
Out[17]=
{{{0},{0},{0},{0},{0}},{{0},{0},{0},{0},{0}},{{0},{0},{1},{0},{0}}}
In[18]:=
a212=D[D[mm,{θ}],{{u1,u2}}]
Out[18]=
{{{2,0},{0,2},{0,0},{0,0},{0,0}},{{0,0},{0,0},{0,0},{1,0},{0,1}},{{0,0},{0,0},{0,0},{2,0},{0,2}}}
In[19]:=
mc={θ1u1+θ2u2,-θ2u1+θ1u2}
Out[19]=
{u1θ1+u2θ2,u2θ1-u1θ2}
In[20]:=
c13=D[D[mc,{θ}],{{wchk}}]
Out[20]=
{{{0},{0},{0},{0},{0}},{{0},{0},{0},{0},{0}}}
In[21]:=
c12=D[D[mc,{θ}],{{u1,u2}}]
Out[21]=
{{{1,0},{0,1},{0,0},{0,0},{0,0}},{{0,1},{-1,0},{0,0},{0,0},{0,0}}}
In[22]:=
e={{1,0,0},{0,1,0}}
Out[22]=
{{1,0,0},{0,1,0}}
In[23]:=
q={{2,-1},{-1,1}};
In[24]:=
θbarrule={θ11,θ21,θ34};
In[25]:=
θtrue=θ/.θrules/.θbarrule
Out[25]=
{1,1,4,4,4}
In[26]:=
pθ=FormulaToFunction[θ,256/275*(4(θ1-1)^6+4(θ2-1)^6+(θ3/4-1)^4+(θ4/4-1)^4+(θ5/4-1)^4)]
Out[26]=
Function{θ1,θ2,θ3,θ4,θ5},
256
275
4
6
(-1+θ1)
+4
6
(-1+θ2)
+
4
-1+
θ3
4
+
4
-1+
θ4
4
+
4
-1+
θ5
4

In[27]:=
ρo=5;Δ1i=IdentityMatrix[3];βΔ=0;kccoeff=1;xd0={1,0};

© 2025 Wolfram. All rights reserved.

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