¿ªÔÆÌåÓý

Help needed on simple examples to build an digital filter in LTspice with Vlad's filter models from the filters manual


 

Hi folks,
I am new in the forum and I think I have done already some real big magic in LTspice but now I struggle how I can add a chip internal digital filters after an ADC to my huge analog model of an automotive battery pack.
I am not interested in the involved 2MHz delta-sigma ADC function at all, there is an analog 100kHz AAF in front and the digital output is downsampled to 128us = ~8kHz, so this part is just working fine and flat in my frequency range, I just want to rebuild the two frequency lowpass filterings which are done digital inside an IC afterwards the ADC.
We are running them in matlab but I like to keep the huge analog model before that filters in LTSPICE.
I found Vlad's filter stuff but I am missing a simple example how to use it with my transfer function as I am beginner for digital filters and the complex examples on the filters manual seem to complex for my simple needs.

My needs are to rebuild two chip internal digital filters
?
1. digital PT1 Filter with 128us samples for LOWPASS 20Hz
K=2^(-N) ; N=6 -> K=1/64
?
Transferfunktion digital k / (1 ?- (1-k)*Z^(-1) ?)
?
AND
2. for a SINC FILTER with OSR=16 and 128us per sample
?
Transferfunktion digital 1/16 * (1-z^(-16)) / (1 - Z^(-1))

Can someone experienced add a model from the filter subs provided to my example simulation so that I can see how this is done and how it works and plot the output over frequency?
I started with an example I found via google from Helmut how to create the 128us delayed versions of my input sample (simple AC sinus)....it shows function on his OUT example but it does not execute my wanted transfer function on OUT2.
So either someone can fix my trial with the delayed voltages or show me how to use an already designed existing filter just with my simple coefficients?

I will uploaded .ASC and .PLT file zipped: "SINC Filter basic example needed.zip" to temp. (The provided filters.sub is not included, everyone should have it, same as for all the nice math.sub stuff I already use and love)

Join [email protected] to automatically receive all group messages.