Upsampling data


Upsampling is the process of increasing the sampling rate of a signal. Upsample increases the sampling rate of the input AOs by an integer factor. LTPDA upsample overloads upsample function from Matlab Signal Processing Toolbox. This function increases the sampling rate of a signal by inserting (n-1) zeros between samples. The upsampled output has (n*input) samples. In addition, an initial phase can be specified and, thus, a delayed output of the input can be obtained by using this option.

Syntaxis

	b = upsample(a, pl)
  

With the following parameters:

Examples

1. Upsampling a sequence of random data at original sampling rate of 1 Hz by a factor of 10 with no initial phase.

		x=ao(tsdata(randn(100,1),1)); % create an AO of random data sampled at 1 Hz.
		pl = plist(); % create an empty parameters list 
		pl = append(pl, param('N', 10)); % increase the sampling frequency by a factor of 10
		y = upsample(x, pl); % resample the input AO (x) to obtain the upsampled AO (y)
		iplot(x, y) % plot original and upsampled data
  

Upsample

2. Upsampling a sequence of random data at original sampling rate of 1 Hz by a factor of 21 with a phase of 20 samples.

		x=ao(tsdata(randn(100,1),1)); % create an AO of random data sampled at 1 Hz.
		pl = plist(); % create an empty parameters list 
		pl = append(pl, param('N', 21)); % increase the sampling frequency by a factor of 21
		pl = append(pl, param('phase', 20)); % add phase of 20 samples to the upsampled data
		y = upsample(x, pl); % resample the input AO (x) to obtain the upsampled and delayed AO (y)
		iplot(x, y) % plot original and upsampled data
  

Upsample




©LTP Team