0
$\begingroup$

I was hoping someone could help me with conducting my discretization in MATLAB. I have a linear system with known data: sampling interval $T$, system matrix $\mathbf{A}$, input matrix $\mathbf{B}$, output matrix $\mathbf{C}$ and direct feed-through $\mathbf{D}$.

Now I need to manually compute the discrete system in MATLAB, I know that: $x[k+1] = \phi x[k]+\gamma u[k]$

Now the question is how to compute $\phi$ and $\gamma$ in MATLAB, I hope someone can help me there, I know that $\phi = e^{\mathbf{A}T}$ and $\gamma = \int_0^T e^{\mathbf{A}x}\mathbf{B}dx$. I am not very familiar anymore with MATLAB syntax, it would be huge help if someone could show me how to type this in MATLAB, then I can start analyzing the system for myself. Thanks in advance :)

$\endgroup$
3
  • $\begingroup$ I don't understand what your modeling of course, but is your question really just how to do the integral in MATLAB? $\endgroup$ – Engineer Mar 28 '20 at 20:49
  • $\begingroup$ Matlab has a function that does that, but I think it's in the Control Systems Toolbox (I don't use Matlab, so -- I dunno). Have you done a websearch? In Scilab the function is called dscr; some of those function names are the same between Matlab and Scilab. $\endgroup$ – TimWescott Mar 28 '20 at 21:42
  • $\begingroup$ @Engineer I have found it out now, I forgot that there was such an easy function for the matrix exponential. It was my problem getting that one in the integral without using Cayley-Hamilton manually, but now I have found it thanks :) $\endgroup$ – Tumke Mar 29 '20 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.