Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Low pass filtering an upsampled Ramp signal

Status
Not open for further replies.

Arturi

Member level 2
Joined
Sep 13, 2006
Messages
52
Helped
7
Reputation
14
Reaction score
3
Trophy points
1,288
Activity points
1,617
low pass filter response for ramp signal

Hello,

could you guys please give me an explanation why if I low pass filter an upsampled (zero stuffed) ramp signal I get some oscillation which increases in amplitude with time?

The time frame that I am looking is very big in comparison to the response length of the filter, in other words, I am NOT seeing just the normal transient response.

Below the experiment (see matlab code):

I first down sample and then upsample a ramp signal (zero stuffing). Then I LPF the signal, perform gain and group delay compensation and calculate the Error between the reference signal and the sampled and filtered one.

As you can see, the Peak error is unbounded (keeps increasing). It was quite surprising for me. Could anyone explain me this phenomena?

close all
order = 50
fc = 0.0125
REF = 1 : 1 : 8000;
N = 5;

%sampling
SIGd = downsample(REF, N);
SIGu = upsample(SIGd, N);
%LPFing
KERN = fir1(order,fc);
SIGF = conv(KERN,SIGu);

%gain compensation
SIGFC = N*SIGF;
%group delay compensation
SIGFC = SIGFC (order/2+1:end);


%Calculating the error:
ERR = REF(order : length(SIGFC)-order) - SIGFC(order:end-order);
Erms = sqrt(sum((ERR).^2)/length(ERR))

%Plotting
%BLUE reference
plot(REF)
hold on
plot(SIGu, 'r')
plot(SIGF, 'm')
% GREEN : Compensated signal
plot(SIGFC, 'g')

figure(2)
hold on
%plot(REF(order : length(SIGFC)-order))
%plot(SIGFC(order:end-order),'g')
%Plotting the ERROR
plot(ERR)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top