Sampling Effects: The Zero-Order Hold Algorithm - Prof. Frank L. Severance, Study notes of Electrical and Electronics Engineering

The implementation of the zero-order hold algorithm in the context of digital signal processing. The algorithm processes a continuous-time signal by approximating it with a series of discrete-time samples. The initial values, number of samples, sampling frequency, and granularity, and then calculates the time and value of each sample using a for loop. The document also includes the print statements for displaying the time, sample value, accumulated output, and accumulated error at each step.

Typology: Study notes

Pre 2010

Uploaded on 07/28/2009

koofers-user-mo6-1
koofers-user-mo6-1 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 580
Sampling Effects - The Zero-Order Hold
t0 = 5 ‘Initial time
n = 3 ‘Number of samples
f = 2 ‘Sampling frequency
h = 1/6 ‘Granularity
d = 1/f‘Sampling interval
m = d / h‘Granules per sample
‘Final time
_________________________
k = 0
for i = 0 to n
for j = 0 to m - 1
t(k)= t0 + i d + j h
x(k) = x1
k = k + 1
next j
next i
__________________________
y = 0
v = 0
print t(0) , x(0) , y , v
for k = 1 to mn
y = y + v h
v = v + [x(k) - 4 v] h
print t(k) , x(k) , y , v
next k

Partial preview of the text

Download Sampling Effects: The Zero-Order Hold Algorithm - Prof. Frank L. Severance and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ECE 580

Sampling Effects - The Zero-Order Hold

t 0 = 5 ‘Initial time n = 3 ‘Number of samples f = 2 ‘Sampling frequency h = 1/6 ‘Granularity

d = 1/ f ‘Sampling interval m = d / h ‘Granules per sample ‘Final time

_________________________

k = 0 for i = 0 to n

for j = 0 to m - 1 t ( k )= t 0 + i d + j h x ( k ) = x 1 k = k + 1 next j next i

__________________________

y = 0 v = 0 print t (0) , x (0) , y , v for k = 1 to mn y = y + v h v = v + [ x ( k ) - 4 v ] h print t ( k ) , x ( k ) , y , v next k