Optimizing a Difference Quotient

Calculus Level 3

Let x x be a discrete signal consisting of samples of a continuous time signal x ( t ) x(t) . The samples are separated in time by a time interval T T . Define a discrete signal y y as follows:

y k = 1 T ( α x k + β x k 1 ) y_k = \frac{1}{T} (\alpha \, x_k + \beta \, x_{k-1})

In the equation above, the " k k " subscript indicates the present processing interval, and the " k 1 k-1 " subscript denotes the previous processing interval (from time T T ago). Suppose we want y y to be the time derivative of x x . In order to derive coefficients α \alpha and β \beta , let us assume a discrete sinusoidal input signal x x , with angular frequency ω \omega .

With a sinusoidal input signal, the ideal transfer function for a differentiator is j ω j \omega (where j j is the imaginary unit). This transfer function reflects the fact that the derivative of a sinusoid is scaled by ω \omega and advanced by 90 90 degrees in time, relative to the input signal.

For the limiting case in which ω T \omega T is very small, the coefficients ( α , β ) ( 1 , 1 ) (\alpha, \beta) \approx (1, -1) yield the ideal sinusoidal transfer function j ω j \omega . These coefficients correspond to the classic difference quotient. Since α + β = 0 \alpha + \beta = 0 in this case, the discrete differentiator also completely rejects a constant signal in steady state.

Determine the coefficients α \alpha' and β \beta' which yield the ideal sinusoidal transfer function for ω = 200 π \omega = 200 \pi and T = 1 0 3 T = 10^{-3} . Enter your answer as α + β \alpha' + \beta' .

Hint: Use the z z transform and its time-shift property. Then write z z in terms of ω \omega and T T , and solve for the coefficients.

Bonus: For the differentiator with coefficients α \alpha' and β \beta' , what is the response to a constant signal in steady state?


The answer is -0.20415.

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.

1 solution

Hosam Hajjir
Aug 21, 2020

The ideal response is

y ( k T ) = ω cos ( ω k T ) y(kT) = \omega \cos( \omega k T)

Now, the response y ( k T ) = 1 T ( a x ( k T ) + b x ( ( k 1 ) T ) y(kT) = \dfrac{1}{T} (a' x(kT) + b' x((k-1)T ) , therefore,

1 T ( a sin ( ω k T ) + b sin ( ω ( k 1 ) T ) ) = ω cos ( ω k T ) \dfrac{1}{T} (a' \sin(\omega kT) + b' \sin(\omega (k-1) T) ) = \omega \cos (\omega k T)

a sin ( ω k T ) + b sin ( ω k T ) cos ( ω T ) b cos ( ω k T ) sin ( ω T ) = ω cos ( ω k T ) \Rightarrow a' \sin(\omega kT) + b' \sin(\omega k T) \cos( \omega T) - b' \cos(\omega k T) \sin(\omega T) = \omega \cos (\omega kT)

It follows that,

a + b cos ( ω T ) = 0 a' + b' \cos(\omega T) = 0

and

b sin ( ω T ) = ω -b' \sin(\omega T)= \omega

Plugging the given values of ω \omega and T T , we get

b = 1.06896 b' = -1.06896 and a = 0.8648 a' = 0.8648 . Therefore, the answer is a + b = 0.2042 a' + b'= \boxed{-0.2042} .

Attempted the bonus question. Plot attached to the comment. I see that as I lower the time step (the Difference equation is a function of the time step), the steady-state response of the differentiator for a constant input increases in magnitude. I do not know if this is expected, but it is certainly not ideal. Would be interested in knowing your thoughts.

Karan Chatrath - 9 months, 3 weeks ago

Log in to reply

Assume the processing rate is fixed. As it turns out, you need three terms ( x k , x k 1 , x k 2 ) (x_k, x_{k-1}, x_{k-2} ) and three coefficients to optimize the sinusoidal response (for one frequency) AND completely remove a constant signal. With only two coefficients (and two x terms), one can optimize the sinusoidal response (for one frequency) OR the DC rejection, but not both.

Steven Chase - 9 months, 3 weeks ago

The filter that the problem asked for is ideal only for the given sinusoid with the given frequency and the given sampling rate. It is not ideal for any other input.

Hosam Hajjir - 9 months, 3 weeks ago

Thanks for sharing the insights

Karan Chatrath - 9 months, 3 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...