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

From FBSwiki
Revision as of 16:36, 1 January 2024 by Murray (talk | contribs) (Created page with "{{Question |Chapter=System Modeling |Author(s)=Lars Cremean |Date=2023/10/08 }} MATLAB has functions built-in to the Control Systems Toolbox that handle conversion between con...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Chapter(s) System Modeling
Author(s) Lars Cremean
Date 2023/10/08

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).

1 Jan 2024 (RMM): The Python Contorol Systems Toolbox has similar functionality via the `sample_system` function.