這里簡單說一下連續狀態方程離散化的matlab實現。
課本上我們學到的很多知識是連續的,但是,在實際工程中的應用中,我們常常需要使用到離散化的狀態方程去實現我們的控制算法,這個問題其實也經常困惑我們如何去做,感覺學到的東西不能夠實踐,始終覺得不得勁,這里我們簡單說一下狀態空間的離散化方法。
Assume that our continuous state-space equation is
\[\dot(x)=Ax+Bu \]
here we ignore the output equation, since it is the same after discretizing.
In Matlab, just type $$[G,H]=c2d(A,B,Ts)$$ where Ts is the sampling period. Then you can obtain your discretized state-space equation, which is given by
\[x(k+1) = Gx(k)+Hu(k) \]