Convert model from continuous to discrete time
Version 1.0.2 (1.59 KB) by
Slawomir Grys
Simple discretization method requiring only basic Matlab syntax and matrix algebra. Easy to understand and apply.
It is a proposal for a new discretization method of a continuous-time linear model of sensor dynamics. It is assumed that sensor dynamics can be approximated by linear differential equation or transfer function. The searched coefficients of equivalent difference equation or discrete transfer function are obtained from the Taylor expansion of a sensor output signal and then on the solution of the linear set of equations. The method does not require the decomposition of the sensor transfer function for zeros and poles and also can be applied to the case of transfer function with zeros equal to zero. The inputs of the method are the coefficients of the differential equation and the coefficients of the difference equation are the outputs. The sample time is also required.
Its usefulness and properties can be compared with methods provided by 'c2d()' function. It is aimed at creating discrete models used in DSP, modeling, automation, and control. In the presented method it is limited to single input-singled output dynamics systems.
The theoretical derivations with an example of using it are available in an open-access research paper entitled:
or
Any feedback kindly welcome!
Cite As
Slawomir Grys (2025). Convert model from continuous to discrete time (https://www.mathworks.com/matlabcentral/fileexchange/135832-convert-model-from-continuous-to-discrete-time), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2023b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.