Consider the following differential equation:
Where is a time-varying dynamic output quantity and is an input signal. The transfer function associated with this input-output relationship is . This differential equation is converted to a discrete-time difference equation using three methods. The sampling time step is seconds.
Method 1:
The transfer function associated with this input-output relationship is .
Method 2:
The transfer function associated with this input-output relationship is .
Method 3:
The transfer function associated with this input-output relationship is . is obtained by replacing the Laplace-domain variable in , by the following:
It is to be noted that and . The frequency is varied from to rad/sec. By making these substitutions, the transfer functions become frequency dependent complex numbers. The phase of these complex numbers can be found using the relationship:
Let the phase associated with , , , be , , , respectively.
Compute the area bounded by the curve , and the lines , and . Let this area be . Here, . Also compute the similar area for the phase function . Let this area be .
Let:
Thus, three values , and are obtained. Enter your answer as the minimum among these three values .
Notes/Hints:
Use the Laplace transform to find the transfer function for the differential equation.
Use the z-transform to obtain the transfer functions for the difference equations
Bonus:
Based on this analysis, which method is most suitable for converting a differential to a difference equation? This question focusses on phase. What comments can be made on magnitude?
Problem based on a suggestion by Steven Chase
Also try:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I will use a slightly different convention for the difference equation, but it is equivalent.
Methods 1 and 2
Methods 1 and 2 have the same form:
x k = a x k − 1 + b u k − 1 a 1 = 1 + h b 1 = h a 2 = e h b 2 = e h − 1
Taking the z-transform of both sides:
X = a z − 1 X + b z − 1 U X ( 1 − a z − 1 ) = b z − 1 U H = U X = 1 − a z − 1 b z − 1 = z − a b z = e j ω h
The transfer function H is a complex number, with a polar representation consisting of a magnitude and a phase angle.
Methods 3 and "c"
Start with the differential equation, and take the Laplace transform
x ˙ = x + u s X = X + U X ( s − 1 ) = U H = U X = s − 1 1
Per the problem statement, there are two candidate values for s : the classic representation j ω and another representation in terms of the complex number z .
s c = j ω s 3 = h 2 ( z + 1 z − 1 )
Code and Plots
The attached code plots the magnitude and phase responses for the different methods against the angular frequency. It also calculates the required areas, as per the problem requirement. Method "c" gives the classic Laplace result, and is taken as a reference quantity.
What stands out to me is that relative to Methods 1 and 2, Method 3 has a slightly inferior magnitude response, and a substantially superior phase response.