Keeping the employee satisfied II
Case study: Measuring the weight of coffee beans
The first step involved detailed signal analysing using the ASN filter Designer’s signal analyser. After loading a captured waveform into the signal analyser, we were able to perform a detailed analysis of the phenomena, by zooming into the region of oscillation.
Finding phenomena: ASNFD high resolution spectral analysis
As seen, the source of the oscillation comes from two frequencies at 52 and 61Hz respectively. Armed with this information we were able to design a suitable loadcell filter.
[arve mp4=”https://www.advsolned.com/wp-content/uploads/2018/06/pz_zoom.mp4″ align=”right” loop=”true” autoplay=”true” maxwidth=”300″ nodownload nofullscreen noremoteplayback… /]
Traditionally, many designers use a Butterworth IIR (infinite impulse response) lowpass filter for measurement applications, but the relatively slow attenuation characteristics and high filter order make it undesirable for many practical situations. Thus, a Chebyshev Type II IIR filter was chosen as the main filter building block as it has a faster roll-off characteristics than an equivalent order Butterworth filter. Although the Butterworth has the advantage of a smooth monotonic response, the Chebyshev Type II has a maximally flat passband, which is ideal for DC measurement applications, such as the application considered herein.
Fine tuning of the poles and zeros positions was easily undertaken with the ASN Filter Designer’s interactive P-Z plot editor.
The tool’s interactivity allowed us to zoom into a region of interest and nudge the pole-zero positions and tweak the filter performance while assessing the filtering results in real-time – all of which was done with the mouse!
The post filter serves to further smooth out the DC amplitude estimation from the main filter by lowpass filtering the data a second time. The post filter is based on a 2nd order IIR alpha-filter, i.e.,
\(H_{pf}(z)=\Large{\frac{1 + 2z^{−1} + z^{−2}}{1 + 2\alpha z^{−1} + \alpha^2z^{−2}}}\) ; Gain at DC: \(\Large{\frac{1 + 2\alpha + \alpha^2}{4}}\)
Mapping this filter into ASN FilterScript (shown below), and experimenting with various values, a value of \(\alpha=-0.94\) was choosen as the most optimal.
[code language=”java”]
Main()
alpha=-0.94;
Num = {1,2,1}; // define numerator coefficients
Den = {1,2*alpha,alpha^2}; // define denominator coefficients
Gain = (1+2*alpha+alpha^2)/4; // define gain[/code]