How do we add the affect of the sampling rate to the difference equation?

In summary, the speaker has designed four different transfer functions to differentiate and accumulate a given function, specifically sin() between [0, 6*PI]. These functions are represented by dashed blue, red, green, and magenta lines on a graph. The speaker's algorithm works in computer using z-transform and transforms continuous time transfer functions to discrete time using bilinear transformation. The speaker then discusses the effects of sampling rate on the amplitude of the output signal and asks for advice on how to normalize the output of a discrete time system. They also mention the presence of noise in the green line, which is a common issue when differentiating.
  • #1
hkBattousai
64
0
I designed four different transfer function to differentiate and accumulate a given function. In my example, the given function is sin() between [0, 6*PI].

  1. Dashed blue line: The original input function (i.e.; sin(t))
  2. Red line: Integration of sin(t) with initial value of -1.0. (H(s) = 1/s)
  3. Green line: Differentiation of sin(t). (H(s) = s)
  4. Magenta line: Integration of sin(t) with initial value of -1.0. (H(z) = 1/(1-z^(1)))
  5. Black line: Differentiation of sin(t). (H(z) = 1 - z^(-1))

My algorithm is working in computer, so it uses z-transform. I transformed continuous time transfer functions to discrete time using bilinear transformation.
[tex]s = \frac{2}{T_d}\times\frac{1-z^{-1}}{1+z^{-1}}[/tex]

As you can see from the graph, the continuous time operations have the same amplitude with the input signal, because we add the affect of sampling rate during bilinear transformation. But the discrete time systems have different amplitudes with the input signal. For instance, the amplitude of the output of the integration operation increases with increasing sample rate as expected, because the number of samples accumulated increases. Similarly, the amplitude of the output of the differentiating system decreases with decreasing sampling rate.

My question arises at this point.
How do I normalize the output of a discrete time system? I mean, I want to make the amplitude of the output signal independent of sampling rate.

Sampling rate = 1 samples/second
[PLAIN]http://img267.imageshack.us/img267/3425/t10r.png
Unitary sampling rate, all the signals have the same amplitude.

Sampling rate = 2 samples/second
[PLAIN]http://img403.imageshack.us/img403/2950/t05.png

Sampling rate = 10 samples/second
[PLAIN]http://img155.imageshack.us/img155/2510/t01.png
Notice that, output of discrete time differentiator is almost a horizontal line.
And also notice that, originally continuous systems are well behaving.

Sampling rate = 100 samples/second
[PLAIN]http://img842.imageshack.us/img842/370/t001.png
Output of integrator is so large that it cover all the graph!

And a little side question; why does discrete time differentiated signal (the green one) has noise (another sinusoidal signal with higher frequency) on it?
 
Last edited by a moderator:
Engineering news on Phys.org
  • #2
As you approach the Nyquist sampling rate, results become sensitive to sampling frequency. If you keep the sampling frequency fast enough, the sensitivity should disappear.
hkBattousai said:
nd a little side question; why does discrete time differentiated signal (the green one) has noise (another sinusoidal signal with higher frequency) on it?

That is inherent in all differentiion, analog or digital. Differentiation amplifies high frequency noise. Integration filters out high frequency noise. For that reason, differentiation is more difficult.

The usual remedy is an analog low pass filter before sampling that attenuates high frequencies.
 

Related to How do we add the affect of the sampling rate to the difference equation?

1. What is the sampling rate and how does it affect the difference equation?

The sampling rate refers to the number of samples taken per second in a digital signal. It affects the difference equation by determining the accuracy and resolution of the digital signal. Higher sampling rates result in better representation of the original analog signal, while lower sampling rates can lead to loss of information and distortion.

2. How do we incorporate the sampling rate into the difference equation?

The sampling rate is incorporated into the difference equation by multiplying the time variable by the sampling rate. This allows for the correct time scaling of the digital signal and ensures that the difference equation accurately represents the original analog signal.

3. What happens if the sampling rate is too low in the difference equation?

If the sampling rate is too low, it can lead to aliasing, which is the distortion of the digital signal due to insufficient sampling. This can result in the loss of important information and inaccuracies in the digital signal.

4. How does the sampling rate affect the frequency response of the difference equation?

The sampling rate affects the frequency response of the difference equation by limiting the highest frequency that can be accurately represented in the digital signal. This is known as the Nyquist frequency, which is equal to half the sampling rate. If the sampling rate is too low, it can result in the loss of high frequency components in the digital signal.

5. Can the sampling rate be changed in the difference equation?

Yes, the sampling rate can be changed in the difference equation by adjusting the time variable. However, it is important to note that changing the sampling rate can affect the accuracy and resolution of the digital signal. It is recommended to use the highest possible sampling rate for the desired application to ensure the best representation of the original analog signal.

Similar threads

  • Electrical Engineering
Replies
4
Views
1K
  • Computing and Technology
Replies
3
Views
934
  • Electrical Engineering
Replies
0
Views
714
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
17
Views
713
Replies
26
Views
5K
  • General Engineering
Replies
12
Views
7K
  • Programming and Computer Science
Replies
1
Views
3K
  • Advanced Physics Homework Help
Replies
0
Views
659
  • Biology and Chemistry Homework Help
Replies
3
Views
2K
Back
Top