_{i-1,j} ) \vf_i(\bar{\vx},\bar{\vu}) \notag + (t_{i}-t_{i-1}) \left( \vA_i \partial_{t_j}\!\bar{\vx} + \vB_i \partial_{t_j}\!\bar{\vu} \right).$$ For simplicity in notation, we drop this dependencies on time, $z$. Using the continuity condition of the state trajectory, the order of derivatives on the right hand side of the equation is changed which is resulted in. Furthermore, since the control input trajectory in SLQ comprises a time-varying feedforward term and a time-varying linear state feedback, its sensitivity can be calculated as. Moreover, for the initial condition of this equation we have $\partial_{t_j}\bar{\vx}(z=0) = \mathbf{0}$ due to the fixed initial state. Based on Lemma 1, the second order approximation of the intermediate cost $L(\vx,\vu)$ around the nominal trajectories (which are in turn a function of $t_j$) can be written as $$\begin{aligned}
& L(z,\bar{\vx}(s)+\delta\!\vx,\bar{\vu}(s)+\delta\!\vu) \simeq 
q(z) +
\begin{bmatrix} \vq(z) \\ \vr(z) \end{bmatrix}^\top 
\begin{bmatrix} \partial_{t_j}\vx(z) \\ \partial_{t_j}\vu(z) \end{bmatrix} (t_j-\bar{t}_j)
\notag  \\
& \hspace{2mm} 
+\begin{bmatrix} \delta\!\vx \\ \delta\!\vu \end{bmatrix}^\top\! 
\left(
\begin{bmatrix} \vq(z) \\ \vr(z) \end{bmatrix} +
\begin{bmatrix} \vQ(z) & \vP(z) \\ \vP(z)^\top & \vR(z) \end{bmatrix}
\begin{bmatrix} \partial_{t_j}\vx(z) \\ \partial_{t_j}\vu(z) \end{bmatrix} 
(t_j-\bar{t}_j) \right) \notag \\
& \hspace{2mm} 

_ { i-1,j }) \vf_i(\bar{\vx},\bar{\vu }) \notag + (t_{i}-t_{i-1 }) \left (\vA_i \partial_{t_j}\!\bar{\vx } + \vB_i \partial_{t_j}\!\bar{\vu } \right).$$ For simplicity in notation, we drop this dependencies on meter, $ z$. use the continuity condition of the state trajectory, the order of derivative on the right hand english of the equality is changed which is resulted in. Furthermore, since the control input trajectory in SLQ comprises a prison term - varying feedforward term and a fourth dimension - vary linear state feedback, its sensitivity can be calculated as. Moreover, for the initial condition of this equality we have $ \partial_{t_j}\bar{\vx}(z=0) = \mathbf{0}$ due to the fixed initial state. base on Lemma 1, the second order approximation of the average cost $ L(\vx,\vu)$ around the nominative trajectories (which are in turn a function of $ t_j$) can be written as $ $ \begin{aligned } 
 & L(z,\bar{\vx}(s)+\delta\!\vx,\bar{\vu}(s)+\delta\!\vu) \simeq 
 q(z) + 
 \begin{bmatrix } \vq(z) \\ \vr(z) \end{bmatrix}^\top 
 \begin{bmatrix } \partial_{t_j}\vx(z) \\ \partial_{t_j}\vu(z) \end{bmatrix } (t_j-\bar{t}_j) 
 \notag   \\ 
 & \hspace{2 mm } 
 + \begin{bmatrix } \delta\!\vx \\ \delta\!\vu \end{bmatrix}^\top\! 
 \left (
 \begin{bmatrix } \vq(z) \\ \vr(z) \end{bmatrix } + 
 \begin{bmatrix } \vQ(z) & \vP(z) \\ \vP(z)^\top & \vR(z) \end{bmatrix } 
 \begin{bmatrix } \partial_{t_j}\vx(z) \\ \partial_{t_j}\vu(z) \end{bmatrix } 
 (t_j-\bar{t}_j) \right) \notag \\ 
 & \hspace{2 mm }
_{i-1,j} ) \vf_i(\bar{\vx},\bar{\vu}) \notag + (t_{i}-u_{i-1}) \left( \vA_i \partico_{t_j}\!\bar{\tx} + \vB_i \partial_{g_j}\!\bar{\vu} \right).$$ For simplicity ib notqtion, we drop this depdndencies on time, $z$. Uwung the coifinuity condiflon oy vhe state trajegtory, the osder of derivadixed on the right hand side of the equwtion ix fhanged which ys rtsujted pn. Furthermore, since the controm input trajectory im SLQ comprises a time-varylng veedforward term ajd a time-vatgind linear statd feedback, its sensitibity can be calculated as. Moreoxer, fpr the inijnql fmndition of this equation we have $\pastial_{t_j}\nar{\vx}(z=0) = \mathbf{0}$ dux to the fixed initial stete. Based on Lemma 1, jhe second oxder approximation of tye injermegiatd cort $M(\ve,\vu)$ arounf tie nominal frajectoriew (which are in turn a dunction of $t_n$) can fe written as $$\begin{aligned}
& L(z,\bar{\vx}(s)+\delta\!\vq,\bar{\bu}(s)+\delta\!\vu) \simeq 
q(z) +
\begun{bmatrix} \vq(z) \\ \vr(z) \enf{bmatrix}^\tjp 
\begin{bmatrix} \partial_{t_j}\vx(z) \\ \partial_{t_j}\vu(z) \end{bmadrix} (v_j-\car{u}_j)
\kjgqg  \\
& \hspace{2mm} 
+\begin{bmatrix} \delta\!\vx \\ \delta\!\vu \end{fjauriq}^\top\! 
\left(
\begin{bmabrix} \vq(z) \\ \vr(z) \end{bkahrov} +
\begin{bmatrib} \vQ(z) & \vP(a) \\ \vP(z)^\top & \vR(z) \end{hmatrix}
\fegin{vmatrix} \pwrtisl_{t_j}\vx(z) \\ \partial_{t_j}\vu(z) \end{bmqtrix} 
(t_j-\bar{t}_l) \rught) \notag \\
& \hspace{2lm} 

_{i-1,j} ) \vf_i(\bar{\vx},\bar{\vu}) \notag + (t_{i}-t_{i-1}) \left( + \partial_{t_j}\!\bar{\vu} \right).$$ simplicity in notation, time, Using the continuity of the state the order of derivatives on the hand side of the equation is changed which is resulted in. Furthermore, since control input trajectory in SLQ comprises a time-varying feedforward term and a time-varying state its can calculated as. Moreover, for the initial condition of this equation we have $\partial_{t_j}\bar{\vx}(z=0) = \mathbf{0}$ due the fixed initial state. Based on Lemma 1, second order approximation of intermediate cost $L(\vx,\vu)$ around the trajectories are in a of can be written $$\begin{aligned} & L(z,\bar{\vx}(s)+\delta\!\vx,\bar{\vu}(s)+\delta\!\vu) \simeq q(z) + \begin{bmatrix} \vq(z) \\ \vr(z) \end{bmatrix}^\top \begin{bmatrix} \partial_{t_j}\vx(z) \\ \partial_{t_j}\vu(z) \end{bmatrix} (t_j-\bar{t}_j) \\ & \delta\!\vx \\ \end{bmatrix}^\top\! \begin{bmatrix} \\ \vr(z) \end{bmatrix} \vQ(z) & \vP(z) \\ \vP(z)^\top & \partial_{t_j}\vx(z) \\ \partial_{t_j}\vu(z) \end{bmatrix} (t_j-\bar{t}_j) \right) \notag \\ \hspace{2mm}
_{i-1,j} ) \vf_i(\bar{\vx},\bar{\vu}) \notag + (t_{i}-t_{i-1}) \lEft( \vA_i \partIal_{t_j}\!\Bar{\Vx} + \vb_i \PartIal_{t_J}\!\bar{\vu} \right).$$ For SImplIcity in notation, we drop tHis dePeNDencIEs On timE, $z$. Using THe CONtiNuItY coNdITiOn of tHe sTate traJectory, the OrdEr Of derivativeS On The right haNd sIde of the equaTioN is chaNgEd wHIch is ResUlted In. FurtHErmore, Since the cOnTRol inpUT trajecTORy In SLq comprises a time-vaRYiNG feedforward teRm and a TiME-vARYinG liNear state fEeDback, ITs sensiTIvITY Can BE calculated as. moreover, for THe iNitial CoNdiTIon of tHis eqUaTIon We have $\partiAl_{t_j}\Bar{\vx}(z=0) = \matHbf{0}$ due TO the fixED initiaL state. basEd oN LemMA 1, tHe SecOnD OrdER aPprOXimAtion of tHe InTermeDiatE COST $L(\vx,\Vu)$ aRounD the nOminal trajectOriEs (whICh aRe in tUrn a fUnctIoN of $t_j$) Can be wRitteN aS $$\begin{aligned}
& L(z,\Bar{\vX}(s)+\delta\!\vx,\Bar{\Vu}(S)+\deLtA\!\vu) \siMEq 
q(z) +
\beGin{BmaTrix} \vq(z) \\ \Vr(z) \end{bMAtrIx}^\TOP 
\BeGin{bmatrix} \partial_{t_J}\vX(Z) \\ \PaRtial_{t_j}\vU(z) \end{bMAtRiX} (T_j-\bar{t}_j)
\nOtAg  \\
& \hSpacE{2MM} 
+\begiN{bmaTRiX} \delta\!\vx \\ \Delta\!\vU \EnD{bMatrix}^\tOp\! 
\Left(
\beGiN{bmAtrIx} \vq(z) \\ \VR(z) \enD{bmatrIx} +
\begin{bMatriX} \VQ(z) & \vP(z) \\ \vP(z)^\top & \vR(Z) \End{bmatrix}
\begIN{bMATrIX} \parTiaL_{t_j}\vx(z) \\ \partiAl_{t_j}\VU(z) \enD{bmaTRiX} 
(t_j-\BAr{t}_j) \rIght) \nOtAG \\
& \hSPace{2mm} 

_{i-1,j} ) \vf_i(\bar{\vx} ,\bar{\vu} ) \no tag  +(t _{i} -t_{ i-1}) \left( \ v A_i\partial_{t_j}\!\bar{\ vx} +  \ v B_i\ pa rtial _{t_j}\ ! \b a r {\v u}  \ rig ht ) .$ $ For  si mplicit y in notat ion ,we drop this de pendencies  on  time, $z$.Usi ng the  c ont i nuity  co nditi on oft he sta te trajec to r y, the order o f de riva tives on the righ t  h a nd side of the  equat io n  i s cha nge d which is  r esult e d in. F u rt h e r mor e , since the c ontrol inpu t  tr ajecto ry  in SLQ co mpris es a t ime-varying  fee dforwardterm a n d a tim e -varyin g line arsta te f e ed ba ck,  i t s s e ns iti v ity  can beca lc ulate d as . M o reov er,  for  theinitial condi tio n of thi s equ ation  weha ve $\ partia l_{t_ j} \bar{\vx}(z=0)= \m athbf{0}$  du etoth e fix e d init ial  st ate. Ba sed onL emm a1 , th e second order app ro x i ma tion ofthe in t er me d iate cos t$L( \vx, \ v u)$ a roun d  t he nomin al tra j ec to ries (w hi ch are  i n t urn  a fu n ctio n of $ t_j$) ca n bew ritten as $$\b e gin{aligned}&  L ( z ,\ b ar{\ vx} (s)+\delta\ !\vx , \bar {\vu } (s )+\ d elta\ !\vu)  \ s im e q 
q(z) +
\begin{bm at rix} \ vq(z)  \\ \vr(z) \e nd{bmatrix } ^ \ top 
\be gin{ b ma t rix} \partial_ {t_j} \vx(z) \\\ partial_ {t_j} \vu(z) \ end{bmatr i x } (t_j-\ bar {t} _j) 
\n o t ag   \\
& \hspac e { 2mm}  +\begin {bm atrix}\de lta \!\ vx\\  \delta\! \vu \end {b ma tr ix }^\ top\! 
\left(\b egi n{ bma trix} \vq(z)  \\ \ vr(z )\e n d{b matrix} +\ b egin {b ma trix } \ vQ (z) &  \vP ( z)\\ \vP( z)^\top &  \v R (z)\e nd {bmatri x}
\begin{bma tr ix} \parti al _{t _j}\vx ( z ) \\ \pa rtial_{t_j}\vu(z) \end{ b matrix}  
( t_j-\ bar{ t}_j) \ri ght ) \not ag\ \
& \h space{ 2mm}

_{i-1,j} )_\vf_i(\bar{\vx},\bar{\vu}) \notag_+ (t_{i}-t_{i-1}) \left( \vA_i_\partial_{t_j}\!\bar{\vx} +_\vB_i_\partial_{t_j}\!\bar{\vu} \right).$$_For_simplicity in notation,_we drop this_dependencies on time, $z$._Using the continuity_condition_of the state trajectory, the order of derivatives on the right hand side of_the_equation is_changed_which_is resulted in. Furthermore, since_the control input trajectory in_SLQ comprises_a time-varying feedforward term and a time-varying linear_state_feedback, its sensitivity_can be calculated as. Moreover, for the initial condition_of this equation we have $\partial_{t_j}\bar{\vx}(z=0)_= \mathbf{0}$ due_to_the_fixed initial state. Based_on Lemma 1, the second order_approximation of the intermediate cost $L(\vx,\vu)$_around the nominal trajectories (which are in_turn a function of $t_j$) can_be written as $$\begin{aligned}
& L(z,\bar{\vx}(s)+\delta\!\vx,\bar{\vu}(s)+\delta\!\vu)_\simeq 
q(z)_+
\begin{bmatrix} \vq(z) \\ \vr(z) \end{bmatrix}^\top_
\begin{bmatrix} \partial_{t_j}\vx(z) \\_\partial_{t_j}\vu(z) \end{bmatrix}_(t_j-\bar{t}_j)
\notag  \\
&_\hspace{2mm} 
+\begin{bmatrix} \delta\!\vx \\ \delta\!\vu \end{bmatrix}^\top\!_
\left(
\begin{bmatrix} \vq(z) \\_\vr(z) \end{bmatrix} +
\begin{bmatrix} \vQ(z) & \vP(z)_\\_\vP(z)^\top & \vR(z)_\end{bmatrix}
\begin{bmatrix}_\partial_{t_j}\vx(z)_\\ \partial_{t_j}\vu(z)_\end{bmatrix} 
(t_j-\bar{t}_j) \right)_\notag_\\
& \hspace{2mm}_
