Docsity

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

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