Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
DC removal flter

Subject: DC removal flter

From: david

Date: 4 Jul, 2010 19:54:05

Message: 1 of 5

Hello, i am not very good at matlab but i need to implement this in matlab,


Y(z) = 1 - z exp -1
X(z) = 1 - 0.95*z exp -1

H(z) = Y/Z

This is a DC removal filter.

Subject: DC removal flter

From: Faraz Afzal

Date: 4 Jul, 2010 21:40:22

Message: 2 of 5

"david " <int78005@stud.uni-stuttgart.de> wrote in message <i0qost$fvu$1@fred.mathworks.com>...
> Hello, i am not very good at matlab but i need to implement this in matlab,
>
>
> Y(z) = 1 - z exp -1
> X(z) = 1 - 0.95*z exp -1
>
> H(z) = Y/Z
>
> This is a DC removal filter.

Hi David,

Use either of the given two in simulink to serve the purpose of DC removal

Discrete FIR filter, or Discrete filter...
Regards,
Faraz

Subject: DC removal flter

From: david

Date: 4 Jul, 2010 22:08:05

Message: 3 of 5

hi, i need to programm it not to use simulink

Subject: DC removal flter

From: Faraz Afzal

Date: 4 Jul, 2010 22:53:06

Message: 4 of 5

"david " <int78005@stud.uni-stuttgart.de> wrote in message <i0qost$fvu$1@fred.mathworks.com>...
> Hello, i am not very good at matlab but i need to implement this in matlab,
>
>
> Y(z) = 1 - z exp -1
> X(z) = 1 - 0.95*z exp -1
>
> H(z) = Y/Z
>
> This is a DC removal filter.

y = [1 -1]
x = [1 -0.95]
[z ,p ,k] = tf2zp(y,x)

Regards,
Muhammad Faraz

Subject: DC removal flter

From: Wayne King

Date: 4 Jul, 2010 23:46:05

Message: 5 of 5

"david " <int78005@stud.uni-stuttgart.de> wrote in message <i0qost$fvu$1@fred.mathworks.com>...
> Hello, i am not very good at matlab but i need to implement this in matlab,
>
>
> Y(z) = 1 - z exp -1
> X(z) = 1 - 0.95*z exp -1
>
> H(z) = Y/Z
>
> This is a DC removal filter.

If this is the filter you want to implement, I think you want the pole just inside the unit circle at z=1 and the zero on the unit circle at z=1 so,

A = [1 -0.95]; % this gives you a pole at z=0.95+j0
B = [1 -1]; % this gives you a zero at z=1+j0

zplane(B,A); % see the pole-zero plot
fvtool(B,A); % see the magnitude response


I think the constant-coefficient difference equation you are going for is:

y(n)-0.95*y(n-1)=x(n)-x(n-1)

Wayne

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us