FAQ: How can I go from a continuous linear ODE to a discrete representation?

From FBSwiki
Jump to: navigation, search

Submitted by: Lars Cremean
Submitted on: October 8, 2003

MATLAB has functions built-in to the Control Systems Toolbox that handle conversion between continuous and discrete time using various methods. You can represent your continuous time system (written in standard first order form) with the "sys" command

sysc = sys(A,B,C,D)

and convert it to discrete-time with the function "c2d":

sysd = c2d(sysc,Ts); % Ts = sampling period in seconds

There are a couple of good references for the mathematics behind these conversions. Franklin, Powell and Enami-Naeni has a section on this, and Mathworks has some excellent background on manipulating linear time-invariant (LTI) systems in their help files. They can be accessed at http://www.mathworks.com/access/helpdesk/help/toolbox/control/manipmod/manipmod.shtml (look for "Continuous/Discrete Conversions of LTI Models" in the menu on the left).