1-D Signal Processing

Software


MATLAB PROGRAMS

imp_fn.m : Kronecker impulse function.

stp_fn.m : Unit step function.

rmp_fn.m : Ramp function.

tri_fn.m : Triangle function.

shift.m : Shifts signal or image half the width and length of signal.

pulsetrain.m : Impulse train.

irect.m : Integer form of a rectangle function which creates a circular symmetric rectangle for use with a DFT.

rect.m : Rectangle function.

binarize.m : Binarize a signal or image by thresholding it half way between its maximum and minimum value. Those values above this threshold are set to value 1 and those below are set to value 0.

flattop1.m : Inserts flat areas between the values of the input sequence similar to a sample and hold process. For example, if you plot a vector A=[0,1,0,1,0,0,1,1], the plot will look like a triangle wave. To fix this, flattop replicates the original sequence values. Ex: B=flattop1(A,4)=[0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1].

squarewave.m : Generates a square wave pattern which is symmetric for discrete time 0:1:(N-1).

lp_t1_o1_dft.m : Generates a transfer function for a low pass first order passive filter that has circular symmetry for dft usage.

[f,H]=lp_t1_o2_dft(fc,K,fmax,N): Generates a transfer function H and frequency sequence f, for a second order Low Pass Filter. The dc gain is K, fc is the 3db cutoff frequency, N is the number of frequency values and (3-K) =1/Q controls the resonant response of the filter. Letting K=1.5 gives a sharp cutoff while K=1 yields a passive 2nd order response. (lp_t1_o2_dft.m)

[f,H]=lp_butterworth_oN_dft(fc,K,fmax,N,Norder): Generates a complex transfer function H and frequency sequence f, for an Nth order butterworth filter. The dc gain is K, fc is the 3db cutoff frequency, N is the number of frequency values and Norder it the filter order. (lp_butterworth_oN_dft.m)

[f,H]=bp_butterworth_oN_dft(fo,fc,K,fmax,N,Norder): Generates a complex transfer function H and frequency sequence f, for an Nth order butterworth filter, mixed to be a bandpass filter with center frequency fo, and half bandwidth fc. The center frequency gain is K, fc is the 3db half bandwidth, N is the number of frequency values and Norder it the filter order. (bp_butterworth_oN_dft.m)

Demonstration MATLAB programs

lpfiltdemo1.m : This is not a function but a section of code that can be run just like a function with no arguments. It simulates a communication channel starting with a random bit stream, passed through a low pass filter (either ideal or passive 4th order) and reconstructed by simple thresholding back into a bit stream.

lpfiltdemo2.m : Similar to lpfiltdemo1.m but a squarewave can be selected instead of the random bit stream.


WINDOWS PROGRAMS


DOS PROGRAMS

FILTERAL is a DOS program that will allow you to design various first and second order filters based on ideal operational amplifiers

Zipped FILTERAL and RESISTOR Program source and execution: filteral.zip(11-19-97)

FILTERAL Program execution: filteral.exe (11-19-97)


RESISTOR is a DOS program that will allow you to search a data base of resistor values and determine the closest single, series and parallel resistor/s to a "desired" ohmic value. This is very useful when using filteral.exe to design active filters which are sensitive to small variations in resistor values. A common question is "is it better to use two resistors in series, each with 10% tolerance but with ideal difference from the desired by 1% versus a single resistor with a 5% difference from the desired values?" The answer is yes, although not intuitive, we have seen the combinations to be extremely effective in many circuits. You could probably prove this using the central limit theorem combined with the fact that the distribution of actual resistors will not include the "tails" of the Gaussian distributions. There are two ascii data files resistor.d and resistor.all. resistor.d is the active data base which can be edited while resistor.all is a complete data base of resistor values. The program accesses resistor.d but not resistor.all

RESISTOR Program execution: resistor.exe

RESISTOR ACTIVE DATA FILE: resistor.d

RESISTOR REFERENCE DATA FILE: resistor.all


http://www.engr.uky.edu/~lgh/index.htm