Singer模型與CT模型狀態轉移矩陣的求解

Singer模型與CT模型狀態轉移矩陣的求解

文章目錄

  • Singer模型與CT模型狀態轉移矩陣的求解
    • 前言
    • 狀態方程
    • 矩陣指數函數
      • 泰勒展開
      • 拉普拉斯變換
    • Singer模型
    • CT模型

前言

回想起來,第一次接觸Singer模型與CT模型時的狀態轉移矩陣時,對求解過程一知半解。現在,將推導過程記錄下來,溫故知新。若有紕漏,歡迎討論。

狀態方程

當我們對一個線性時不變系統的輸入輸出與狀態變量感興趣時,狀態空間方程是一種常用的手段。狀態空間方程由狀態方程輸出方程構成,可以表述為
{ x ˙ = A x + B u 狀態方程 y = C x + D u 輸出方程 \left\{\begin{matrix} \dot{ \mathbf{x}} = \mathbf{Ax}+\mathbf{Bu}& 狀態方程\\ \mathbf{y} = \mathbf{Cx} + \mathbf{Du} & 輸出方程\\ \end{matrix}\right. {x˙=Ax+Buy=Cx+Du?狀態方程輸出方程?
其中,狀態方程是一個一階微分方程 x \mathbf{x} x x ˙ \dot{\mathbf{x}} x˙表示狀態向量及其一階導數。 u \mathbf{u} u為系統的外部輸入。 A \mathbf{A} A表示系統矩陣。 B \mathbf{B} B表示輸入矩陣。 y \mathbf{y} y為系統輸出。 C \mathbf{C} C為輸出矩陣。 D \mathbf{D} D為直接輸出矩陣。

我們只對狀態方程感興趣。現在為了簡化問題,我們并不考慮外部輸入對系統的影響,因此,狀態方程簡化為
x ˙ = A x \dot{\mathbf{x}} = \mathbf{A}\mathbf{x} x˙=Ax

使用拉普拉斯變換對上述一階微分方程進行求解。這里補充幾個常用的拉普拉斯變換對
L ( x ( t ) ) = X ( s ) L ( x ˙ ( t ) ) = s X ( s ) ? x ( 0 ) L ( e a t ) = 1 s ? a L ( 1 ) = 1 s L ( t ) = 1 s 2 L ( c o s ω t ) = s s 2 + ω 2 L ( s i n ω t ) = ω s 2 + ω 2 L ( e ? α t s i n ( ω t ) ) = ω ( s + α ) 2 + ω 2 \begin{aligned} \mathcal{L}(x(t)) &= X(s) \\ \mathcal{L}(\dot{x}(t)) &= sX(s) - x(0) \\ \mathcal{L}(e^{at}) &= \frac{1}{s-a} \\ \mathcal{L}(1) &= \frac{1}{s} \\ \mathcal{L}(t) &= \frac{1}{s^2} \\ \mathcal{L}(cos\omega t) &= \frac{s}{s^2 + \omega ^2} \\ \mathcal{L}(sin\omega t) &= \frac{\omega}{s^2 + \omega ^2} \\ \mathcal{L}(e^{-\alpha t}sin(\omega t)) &= \frac{\omega}{(s + \alpha)^2 + \omega ^2} \end{aligned} L(x(t))L(x˙(t))L(eat)L(1)L(t)L(cosωt)L(sinωt)L(e?αtsin(ωt))?=X(s)=sX(s)?x(0)=s?a1?=s1?=s21?=s2+ω2s?=s2+ω2ω?=(s+α)2+ω2ω??

現在對簡化的狀態方程的等式兩端進行拉普拉斯變換并進行變換,可得狀態方程的解
L ( x ˙ ( t ) ) = L ( A x ( t ) ) s X ( s ) ? x ( 0 ) = A X ( s ) ( s ? A ) X ( s ) = x ( 0 ) X ( s ) = x ( 0 ) s ? A L ? 1 ( X ( s ) ) = L ? 1 ( x ( 0 ) s ? A ) x ( t ) = e A t x ( 0 ) \begin{aligned} \mathcal{L}\left (\dot{\mathbf{x}}(t) \right )&= \mathcal{L}\left (\mathbf{A}\mathbf{x}(t) \right )\\ s\mathbf{X}(s) - \mathbf{x}(0) &= \mathbf{A}\mathbf{X}(s) \\ (s - \mathbf{A})\mathbf{X}(s) &=\mathbf{x}(0) \\ \mathbf{X}(s) &=\frac{\mathbf{x}(0)}{s - \mathbf{A}} \\ \mathcal{L}^{-1}\left (\mathbf{X}\left (s\right ) \right ) &=\mathcal{L}^{-1}\left (\frac{\mathbf{x}(0)}{s - \mathbf{A}}\right ) \\ \mathbf{x}(t) &= e^{\mathbf{A}t}\mathbf{x}(0) \end{aligned} L(x˙(t))sX(s)?x(0)(s?A)X(s)X(s)L?1(X(s))x(t)?=L(Ax(t))=AX(s)=x(0)=s?Ax(0)?=L?1(s?Ax(0)?)=eAtx(0)?

現在我們得到了線性時不變系統的狀態方程的解
x ( t ) = e A t x ( 0 ) \mathbf{x}(t) = e^{\mathbf{A}t}\mathbf{x}(0) x(t)=eAtx(0)
該解表述了 t t t時刻的狀態向量 x ( t ) \mathbf{x}(t) x(t)與初始狀態向量 x ( 0 ) \mathbf{x}(0) x(0)的關系。 e A t e^{\mathbf{A}t} eAt矩陣指數函數。該解是在連續時間系統下的解。通常,我們更關心在離散時間系統下的解。假設離散時間系統的時間維度采樣率為 Δ T \Delta T ΔT,則 T T T時刻與 T + Δ T T+\Delta T T+ΔT時刻的狀態向量分別為

x ( T ) = e A T x ( 0 ) x ( T + Δ T ) = e A ( T + Δ T ) x ( 0 ) \begin{aligned} \mathbf{x}(T) &= e^{\mathbf{A}T}\mathbf{x}(0) \\ \mathbf{x}(T+\Delta T) &= e^{\mathbf{A}(T+\Delta T)}\mathbf{x}(0) \end{aligned} x(T)x(T+ΔT)?=eATx(0)=eA(T+ΔT)x(0)?

對上述兩式求比值可得 x ( T ) {x}(T) x(T) x ( T + Δ T ) {x}(T+\Delta T) x(T+ΔT)的關系
x ( T + Δ T ) = e A Δ T x ( T ) \mathbf{x}(T + \Delta T) = e^{\mathbf{A}{\Delta T}}\mathbf{x}(T) x(T+ΔT)=eAΔTx(T)
這就是我們熟知的狀態轉移方程,其中 e A Δ T e^{\mathbf{A}{\Delta T}} eAΔT狀態轉移矩陣

矩陣指數函數

現在我們已經推導出了離散時間系統下的狀態轉移方程,但是矩陣指數函數的存在妨礙我們在實際應用中的使用。矩陣指數函數的解法有許多種,這里簡單介紹其中的兩種。

泰勒展開

實數的泰勒展開我們已經十分熟悉,
e a t = 1 + ( a t ) + 1 2 ! ( a t ) 2 + 1 3 ! ( a t ) 3 + 1 4 ! ( a t ) 4 + . . . . . . e^{at} = 1 + (at) + \frac{1}{2!}(at)^2+ \frac{1}{3!}(at)^3+ \frac{1}{4!}(at)^4 + ...... eat=1+(at)+2!1?(at)2+3!1?(at)3+4!1?(at)4+......
矩陣指數函數的泰勒展開的形式類似
e A t = 1 + ( A t ) + 1 2 ! ( A t ) 2 + 1 3 ! ( A t ) 3 + 1 4 ! ( A t ) 4 + . . . . . . e^{\mathbf{A}t} = 1 + (\mathbf{A}t) + \frac{1}{2!}(\mathbf{A}t)^2+ \frac{1}{3!}(\mathbf{A}t)^3+ \frac{1}{4!}(\mathbf{A}t)^4 + ...... eAt=1+(At)+2!1?(At)2+3!1?(At)3+4!1?(At)4+......

注意,如果用有限項求和的方式代替矩陣指數函數的解,則只能得到近似解

拉普拉斯變換

使用拉普拉斯變換的形式,同樣可以得到矩陣指數函數的解。

e A t = L ? 1 ( 1 s I ? A ) e^{\mathbf{A}t} = \mathcal{L}^{-1}(\frac{1}{s\mathbf{I}-\mathbf{A}}) eAt=L?1(sI?A1?)

Singer模型

Singer模型的狀態方程可以表述為
X ˙ = A X + V ~ \dot{\mathbf{X}} = \mathbf{A}\mathbf{X}+\tilde{\mathbf{V}} X˙=AX+V~
其中,狀態向量 X = [ x , x ˙ , x ¨ ] ′ \mathbf{X} = [x,\dot{x},\ddot{x}]^{'} X=[x,x˙,x¨] x x x表示位置信息。系統矩陣為
A = [ 0 1 0 0 0 1 0 0 ? α ] \mathbf{A} = \begin{bmatrix} 0 & 1& 0\\ 0 & 0& 1\\ 0 & 0& -\alpha\\ \end{bmatrix} A= ?000?100?01?α? ?
其中, α \alpha α為機動頻率。過程噪聲矩陣為
V ~ = [ 0 0 v ~ ] \tilde{\mathbf{V}} = \begin{bmatrix} 0\\ 0\\ \tilde{v}\\ \end{bmatrix} V~= ?00v~? ?
因此,狀態方程可以重寫為
[ x ˙ x ¨ a ˙ ] = [ 0 1 0 0 0 1 0 0 ? α ] [ x x ˙ x ¨ ] + [ 0 0 v ~ ] \begin{bmatrix} \dot{x}\\ \ddot{x}\\ \dot{a}\\ \end{bmatrix} = \begin{bmatrix} 0 & 1& 0\\ 0 & 0& 1\\ 0 & 0& -\alpha\\ \end{bmatrix} \begin{bmatrix} x\\ \dot{x}\\ \ddot{x}\\ \end{bmatrix} + \begin{bmatrix} 0\\ 0\\ \tilde{v}\\ \end{bmatrix} ?x˙x¨a˙? ?= ?000?100?01?α? ? ?xx˙x¨? ?+ ?00v~? ?
其中, x ¨ = a \ddot{x} = a x¨=a。使用拉普拉斯變換求解狀態方程的解,可得
e A t = L ? 1 ( 1 s I ? A ) = L ? 1 ( [ s ? 1 0 0 s ? 1 0 0 s + α ] ? 1 ) = L ? 1 ( [ 1 s 1 s 2 1 s 2 ( s + α ) 0 1 s 1 s ( s + α ) 0 0 1 s + α ] ) = [ 1 1 s 2 α t ? 1 + e ? α t α 2 0 1 1 ? e ? α t α 0 0 e ? α t ] \begin{aligned} e^{\mathbf{A}t} &= \mathcal{L}^{-1}(\frac{1}{s\mathbf{I}-\mathbf{A}}) \\ &=\mathcal{L}^{-1}(\begin{bmatrix} s & -1& 0\\ 0 & s& -1\\ 0 & 0& s+\alpha\\ \end{bmatrix}^{-1}) \\ &=\mathcal{L}^{-1}( \begin{bmatrix} \frac{1}{s} & \frac{1}{s^2}& \frac{1}{s^2(s+\alpha)}\\ 0 & \frac{1}{s}& \frac{1}{s(s+\alpha)}\\ 0 & 0& \frac{1}{s+\alpha}\\ \end{bmatrix}) \\ &=\begin{bmatrix} 1 & \frac{1}{s^2}& \frac{\alpha t - 1 + e^{-\alpha t}}{\alpha ^ 2}\\ 0 & 1& \frac{1-e^{-\alpha t}}{\alpha}\\ 0 & 0& e^{-\alpha t}\\ \end{bmatrix} \end{aligned} eAt?=L?1(sI?A1?)=L?1( ?s00??1s0?0?1s+α? ??1)=L?1( ?s1?00?s21?s1?0?s2(s+α)1?s(s+α)1?s+α1?? ?)= ?100?s21?10?α2αt?1+e?αt?α1?e?αt?e?αt? ??

在離散時間系統下,假設采樣間隔為 T T T,則狀態轉移矩陣為
F = [ 1 1 s 2 α T ? 1 + e ? α T α 2 0 1 1 ? e ? α T α 0 0 e ? α T ] \mathbf{F} = \begin{bmatrix} 1 & \frac{1}{s^2}& \frac{\alpha T - 1 + e^{-\alpha T}}{\alpha ^ 2}\\ 0 & 1& \frac{1-e^{-\alpha T}}{\alpha}\\ 0 & 0& e^{-\alpha T}\\ \end{bmatrix} F= ?100?s21?10?α2αT?1+e?αT?α1?e?αT?e?αT? ?

CT模型

二維目標運動學方程為
{ x ˙ ( t ) = v ( t ) c o s ? ( t ) y ˙ ( t ) = v ( t ) s i n ? ( t ) v ˙ ( t ) = a t ( t ) ? ˙ ( t ) = a n ( t ) v ( t ) \left\{\begin{matrix} \dot{x}(t) = v(t)cos\phi(t)\\ \dot{y}(t) = v(t)sin\phi(t)\\ \dot{v}(t) = a_{t}(t)\\ \dot{\phi}(t) = \frac{a_{n}(t)}{v(t)}\\ \end{matrix}\right. ? ? ??x˙(t)=v(t)cos?(t)y˙?(t)=v(t)sin?(t)v˙(t)=at?(t)?˙?(t)=v(t)an?(t)??
其中, x , y x,y x,y為笛卡爾坐標系下的坐標, v v v為空間速度, a t ( t ) a_{t}(t) at?(t)為切向加速度(沿著速度方向), a n ( t ) a_{n}(t) an?(t)為法相加速度, ? \phi ?為航向角。若令 a n ( t ) ≠ 0 , a t ( t ) = 0 a_{n}(t)\neq 0,a_{t}(t) = 0 an?(t)=0,at?(t)=0,則此時目標進行勻速曲線運動。若此時 a n ( t ) a_{n}(t) an?(t)為一常數,則此時目標進行勻速轉彎運動。令狀態向量 X = [ x , x ˙ , y , y ˙ ] ′ \mathbf{X} = [x,\dot{x},y,\dot{y}]^{'} X=[x,x˙,y,y˙?],且角速度 ω = ? ˙ \omega = \dot{\phi} ω=?˙? x x x維度的加速度可以表示為
x ¨ ( t ) = a t ( t ) c o s ? ( t ) ? ω v ( t ) s i n ? ( t ) = ? ω y ˙ ( t ) \begin{aligned} \ddot{x}(t) &= a_{t}(t)cos\phi(t) - \omega v(t)sin\phi(t) \\ &=-\omega\dot{y}(t) \end{aligned} x¨(t)?=at?(t)cos?(t)?ωv(t)sin?(t)=?ωy˙?(t)?
同理 y ¨ ( t ) = ω x ˙ ( t ) \ddot{y}(t) = \omega \dot{x}(t) y¨?(t)=ωx˙(t)
因此系統矩陣可以寫為
A = [ 0 1 0 0 0 0 0 ? ω 0 0 0 1 0 ω 0 1 ] \mathbf{A} = \begin{bmatrix} 0 & 1& 0& 0\\ 0 & 0& 0& -\omega\\ 0 & 0& 0& 1\\ 0 & \omega& 0& 1\\ \end{bmatrix} A= ?0000?100ω?0000?0?ω11? ?
使用拉普拉斯變換求解狀態方程的解,可得
e A t = L ? 1 ( 1 s I ? A ) = L ? 1 ( [ s ? 1 0 0 0 s 0 ω 0 0 s ? 1 0 ? ω 0 s ] ? 1 ) = L ? 1 ( [ 1 s 1 s 2 + ω 2 0 ? ω s 3 + s ω 2 0 s s 2 + ω 2 0 ? ω s 2 + ω 2 0 ω s 3 + s ω 2 1 s 1 s 2 + ω 2 0 ω s 2 + ω 2 0 s s 2 + ω 2 ] ) = [ 1 s i n ω t ω 0 ? 1 ? c o s ω t ω 2 0 c o s ω t 0 ? s i n ω t 0 1 ? c o s ω t ω 1 s i n ω t ω 0 s i n ω t 0 c o s ω t ] \begin{aligned} e^{\mathbf{A}t} &= \mathcal{L}^{-1}(\frac{1}{s\mathbf{I}-\mathbf{A}}) \\ &=\mathcal{L}^{-1}(\begin{bmatrix} s & -1& 0& 0\\ 0 & s& 0& \omega\\ 0 & 0& s& -1\\ 0 & -\omega& 0& s\\ \end{bmatrix}^{-1}) \\ &= \mathcal{L}^{-1}(\begin{bmatrix} \frac{1}{s} & \frac{1}{s^2+\omega^2}& 0& \frac{-\omega}{s^3+s\omega^2}\\ 0 & \frac{s}{s^2+\omega^2}& 0& \frac{-\omega}{s^2+\omega^2}\\ 0 & \frac{\omega}{s^3+s\omega^2}& \frac{1}{s}& \frac{1}{s^2+\omega^2}\\ 0 & \frac{\omega}{s^2+\omega^2}& 0& \frac{s}{s^2+\omega^2}\\ \end{bmatrix}) \\ &= \begin{bmatrix} 1 & \frac{sin\omega t}{\omega}& 0& -\frac{1-cos\omega t}{\omega^2}\\ 0 & cos\omega t& 0& -sin\omega t\\ 0 & \frac{1-cos\omega t}{\omega}& 1&\frac{sin\omega t}{\omega}\\ 0 & sin\omega t& 0& cos\omega t\\ \end{bmatrix} \end{aligned} eAt?=L?1(sI?A1?)=L?1( ?s000??1s0?ω?00s0?0ω?1s? ??1)=L?1( ?s1?000?s2+ω21?s2+ω2s?s3+sω2ω?s2+ω2ω??00s1?0?s3+sω2?ω?s2+ω2?ω?s2+ω21?s2+ω2s?? ?)= ?1000?ωsinωt?cosωtω1?cosωt?sinωt?0010??ω21?cosωt??sinωtωsinωt?cosωt? ??

在離散時間系統下,假設采樣間隔為 T T T,則狀態轉移矩陣為
F = [ 1 s i n ω T ω 0 ? 1 ? c o s ω T ω 2 0 c o s ω T 0 ? s i n ω T 0 1 ? c o s ω T ω 1 s i n ω T ω 0 s i n ω T 0 c o s ω T ] \mathbf{F} = \begin{bmatrix} 1 & \frac{sin\omega T}{\omega}& 0& -\frac{1-cos\omega T}{\omega^2}\\ 0 & cos\omega T& 0& -sin\omega T\\ 0 & \frac{1-cos\omega T}{\omega}& 1&\frac{sin\omega T}{\omega}\\ 0 & sin\omega T& 0& cos\omega T\\ \end{bmatrix} F= ?1000?ωsinωT?cosωTω1?cosωT?sinωT?0010??ω21?cosωT??sinωTωsinωT?cosωT? ?

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/14733.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/14733.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/14733.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

linux 上除了shell、python腳本以外,還有什么腳本語言用得比較多?

在開始前我有一些資料,是我根據網友給的問題精心整理了一份「 Linux的資料從專業入門到高級教程」, 點個關注在評論區回復“888”之后私信回復“888”,全部無償共享給大家!!!說到在 Linux下的編程&#xf…

柯橋成人商務英語“?cold”是“冷”,“shoulder”是“肩膀”,?cold shoulder可不是冷肩膀!

英文中有很多俚語(idioms)都與身體部位有關,非常有趣。 今天,英語君就為大家介紹一些和身體部位有關的俚語,一起來看看吧! cold shoulder “cold shoulder”不能用字面意思理解為“冷肩膀”,我們…

學習毛概思想(自用)

一、單項選擇題 毛澤東思想的主要創立者是( A ) A、毛澤東 B、劉少奇 C、周恩來 D、朱德中國共產黨內第一個提出“毛澤東思想”科學概念的是( D  )    A、周恩來   B、劉少奇   C、朱德…

CommonJS 和 ESM 在模塊加載和處理依賴關系的方式上的不同點理解

模塊加載: CommonJS:當執行到 require() 函數時,Node.js 會同步地加載模塊文件,即立即讀取模塊文件并執行其中的代碼,然后返回模塊的導出值。這就意味著,直到運行時我們才知道具體導入了哪些模塊&#xff0…

智慧校園學工管理系統的部署

學工體系思政服務該怎么規劃建造?思政作為高校育人的中心使命,在做到讓學生健康高興生長的一起,也應滿意學生生長成才的各類需求。使用技術為學生供給優質的信息化服務,是其間的有效途徑。大數據讓個性化教育成為可能,…

【題解】AB33 相差不超過k的最多數(排序 + 滑動窗口)

https://www.nowcoder.com/practice/562630ca90ac40ce89443c91060574c6?tpId308&tqId40490&ru/exam/oj 排序 滑動窗口 #include <iostream> #include <vector> #include <algorithm> using namespace std;int main() {int n, k;cin >> n &…

css中彈性布局使用方法

最近寫企業家用到許多彈性&#xff0c;感覺到彈性的重要性&#xff0c;今天給大家總結一下 彈性布局&#xff08;Flexbox&#xff09;是一種在 CSS 中用來實現靈活的布局方式&#xff0c;它能夠方便地調整容器中子元素的尺寸、順序和對齊方式。以下是一些常見的彈性布局屬性及…

【探索數據結構】線性表之順序表

&#x1f389;&#x1f389;&#x1f389;歡迎蒞臨我的博客空間&#xff0c;我是池央&#xff0c;一個對C和數據結構懷有無限熱忱的探索者。&#x1f64c; &#x1f338;&#x1f338;&#x1f338;這里是我分享C/C編程、數據結構應用的樂園? &#x1f388;&#x1f388;&…

Vue3按順序調用新增和查詢接口

Vue3按順序調用新增和查詢接口 一、前言1、代碼 一、前言 如果你想將兩個調用接口的操作封裝在不同的方法中&#xff0c;你可以考慮將這兩個方法分別定義為異步函數&#xff0c;并在需要時依次調用它們。以下是一個示例代碼&#xff1a; 1、代碼 <template><div>…

豐田精益生產的模板

豐田精益生產&#xff0c;也被稱為豐田生產方式&#xff08;Toyota Production System, TPS&#xff09;&#xff0c;是一套完整的生產和管理系統&#xff0c;其核心目標是最大化效率、消除浪費&#xff0c;并通過持續改進來提升產品質量。 學習優秀企業 學習福特 豐田精益生產…

C語言之函數指針(持續更新)

C語言精髓是指針&#xff0c;指針知識深似海&#xff0c;遇到一些學習一些~ 文章目錄 1. typedef 定義函數指針類型2. void* 空指針的解引用 1. typedef 定義函數指針類型 函數參數化是指通過函數指針將函數的某些行為參數化。這樣&#xff0c;我們可以在調用函數時動態地指定…

【每日刷題】Day48

【每日刷題】Day48 &#x1f955;個人主頁&#xff1a;開敲&#x1f349; &#x1f525;所屬專欄&#xff1a;每日刷題&#x1f34d; &#x1f33c;文章目錄&#x1f33c; 1. 872. 葉子相似的樹 - 力扣&#xff08;LeetCode&#xff09; 2. 114. 二叉樹展開為鏈表 - 力扣&…

react中怎么為props設置默認值

在React中&#xff0c;你可以使用ES6的類屬性&#xff08;class properties&#xff09;或者函數組件中的默認參數&#xff08;default parameters&#xff09;來定義props的默認值。 1.類組件中定義默認props 對于類組件&#xff0c;你可以在組件內部使用defaultProps屬性來…

如何撰寫EI會議的投稿信?

撰寫EI會議的投稿信&#xff08;Cover Letter&#xff09;是向會議組織者介紹你的論文和研究工作的一個重要環節。以下是撰寫投稿信的一些關鍵步驟和建議&#xff1a; 投稿信的結構 信頭 你的信息&#xff1a;包括姓名、職位、單位名稱、通訊地址、電子郵件和電話號碼。日期&am…

力扣652. 尋找重復的子樹

Problem: 652. 尋找重復的子樹 文章目錄 題目描述思路復雜度Code 題目描述 思路 1.利用二叉樹的后序遍歷將原始的二叉樹序列化&#xff08;之所以利用后序遍歷是因為其在歸的過程中是會攜帶左右子樹的節點信息,而這些節點信息正是該解法要利用的東西&#xff09;&#xff1b; 2…

js積累二(web頁面實現 時間走秒)

<tr><td class"ys04"><span class"ys02">當前時間&#xff1a;</span></td><td colspan"2"><span class"showTime"></span><script>var t null;t setTimeout(time, 1000); /…

【ai】chatgpt的plugin已經廢棄

發現找不到按鈕,原來是要申請: https://openai.com/index/chatgpt-plugins/ 發現申請已經跳轉了,好像是廢棄了? 不接受新插件了,但是openai的api 是可以繼續用的。 https://openai.com/waitlist/plugins/We are no longer accepting new Plugins, builders can now create…

Windows11的這個地方暴露著你的隱私,把它關掉避免尷尬

前言 現在的電腦真的是越來越智能化&#xff01;現在有很多小伙伴都是用著Windows11的吧&#xff01;用習慣了Windows11之后&#xff0c;突然發現它還是挺順手的。 但不知道你有沒有發現&#xff0c;Windows11上面有個地方暴露著你的隱私。這個隱私可能是某個小姐姐的圖片&am…

XSS---DOM破壞

文章目錄 前言一、pandas是什么&#xff1f;二、使用步驟 1.引入庫2.讀入數據總結 一.什么是DOM破壞 在HTML中&#xff0c;如果使用一些特定的屬性名&#xff08;如id或name&#xff09;給DOM元素命名&#xff0c;這些屬性會在全局作用域中創建同名的全局變量&#xff0c;指向對…

算法:最大連續子序列和

53. 最大子數組和 給你一個整數數組 nums &#xff0c;請你找出一個具有最大和的連續子數組&#xff08;子數組最少包含一個元素&#xff09;&#xff0c;返回其最大和。 子數組是數組中的一個連續部分。 class Solution:def maxSubArray(self, nums: List[int]) -> int:a…