Got a DSP problem. I think this is a bit complicated, and may need some DSP gurus to answer it. I've been banging my head on this literally for months now. Thought I had it figured out, but today find I'm still not done.(adsbygoogle = window.adsbygoogle || []).push({});

I have some Impedance spectroscopy data from electrodes, sampled at discrete frequencies. I want to model the transfer function that these electrodes form when connected in series to an amplifier (a simple R||C cct).

The goal is to multiply that discrete transfer function with the FFT(signal), then take IFFT(Product) to show what the amplifier actually sees.

My first inclination was to do the following:

(note: this is a voltage divider across one impedance [ R_amp||C_amp ] that is in series with Z_electrode)

Z_amp= R/sC / (R + 1/sC)

Z_amp= R / (sRC + 1)

Z_divider=Z_amp/(Z_amp + Z_electrode)

Z_divider = R./(R + (Z_electrode .* (1+sRC)))

so now I took the leap of faith...

w=1:1:100000; % the frequencies at which Z_electrode was sampled

Z_divider = R./ (R + (Z_electrode(w) .* (1 + iwRC)));

Then

Y=fft(signal).*Z_divider

filtered_signal=real(ifft(Y));

This gives a reasonable answer....but I'm worried it's false. The reason why is because when I do the same process with just an RC circuit (in this case a generic low-pass RC config), the answer is not right...

RC=1e-5;

Z_lowpass = 1./ (1 + iwRC);

The resulting "filter" was junk, not holding a DC voltage and "anticipating" voltage changes.

signal= ones(1,100000);

signal(50000:70000)=100;

Y=fft(signal);

ZY=Z_lowpass.*Y;

plot(real(ifft(ZY)))

hold

plot(signal,'r')

So I have two questions.

1. I have figured out the coefficients for that lowpass filter

k=deltaT/ (RC + deltaT)

filter([0 k], [1 -(1-k)], signal)

That was NOT EASY to figure out, though wikipedia gave guidance for this particular cct.

So is there an easier way to do that with other circuits in Matlab?

2. So how do I implement this filtering function in the Z_divider example above? How can I "discretize" my RC cct to be able to voltage divide with my electrode Impedance Spectroscopy? ( I do have an equivalent cct for the electrode, but it's a Constant Phase Element, and essentially impossible to figure out analytically.)

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Filtering with Discrete transfer functions in matlab

**Physics Forums | Science Articles, Homework Help, Discussion**