Difference between revisions of "Question: How can I go from a continuous time linear ODE to a discrete time representation?"

From FBSwiki
Jump to navigation Jump to search
(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...")
 
Line 5: Line 5:
 
}}
 
}}
 
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
 
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)
+
  sysc = sys(A,B,C,D)
```
+
 
 
and convert it to discrete-time with the function "c2d":
 
and convert it to discrete-time with the function "c2d":
```
+
 
sysd = c2d(sysc,Ts); % Ts = sampling period in seconds
+
  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).
 
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 [https://python-control.org Python Contorol Systems Toolbox] has similar functionality via the `sample_system` function.
+
1 Jan 2024 (RMM): The [https://python-control.org Python Contorol Systems Toolbox] has similar functionality via the sample_system() function.

Revision as of 16:37, 1 January 2024

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.