Off late I have been posting a lot of problems based on the general dynamic system of the form:
Here, represents a time-dependent quantity of the system whereas is a time-varying input meant to excite the system. The behaviour of this system is captured using the differential equation described above. This note describes how to convert a differential equation to a discrete-time difference equation.
Consider the differential equation:
Multiplying both sides by gives:
This can be simplified to:
Given that the initial condition of the system is , integrating both sides:
Consider a general time and another time instant , where represents a small time step.
Which can be written as:
Recognising that the term in the bracket multiplied by is gives:
Addressing the remaining integral: Taking , plugging into the integral, manipulating and simplifying gives:
The only assumption made in this entire analysis is that and are held constant in the interval . In other words, as varies from to . This leads to:
In other words:
So, in summary, this analysis shows the conversion of a differential equation to a discrete-time difference equation.
Is equivalent to, in discrete time:
Now, an example is presented to illustrate this process:
Consider the equation:
Here, and is a constant input. This differential equation is converted to a discrete difference equation and both systems are simulated. The plots show the response of this system for various time steps . In the first plot, s. In the second plot, s. In the third plot, s. In the fourth plot, s.
So one can see that reduces, the discrete-time response comes closer to that of the continuous-time response.
The results derived for a specific dynamic system in this note can be generalized for any linear dynamic system in any number of dimensions. An interested reader may attempt to do so and post his/her comments on this subject.