Search code examples
matlabsignal-processingsymbolic-mathdifference-equations

Difference equations in Symbolic Toolbox Matlab


Can someone please tell me is there a way to solve difference equation e.g:

y(k) = a1 * y(k-1) + a2 * y(k-2) + b0*u(k)

in Matlab using Symbolic Toolbox? I want to find explicit solution of this equation.


Solution

  • From this source, there are 2 methods:

    • Apply Z transform, solve for X(z), then find inverse Z transform look up tables if needed.

    • Write y(n)=r^n, to get the auxiliary equation, solve for homogeneous part first.

      r^n = a1*r(n-1) + a2*r^(n-2) 
      

    Bottom line is, there isn't a good method to solve difference equations in Matlab now.