You are on page 1of 20

Week 3 Report

June 30, 2023

Week 3 Report June 30, 2023 1 / 20


Outline

3 Analyzing reference implementation


1 MAXREFDES70 reference kit
Hardware
Introduction
Kalman filter modeling
Comparison with Ti’s offering
Alternatives
MAX35101 Analog frontend
MAX35101 SPI Command Interface
Calculate absToF
4 Kalman filters diffculties and some
2 MAX35101 Measurement cycle alternatives

Week 3 Report June 30, 2023 2 / 20


MAXREFDES70 reference kit

MAXREFDES70 reference kit

Week 3 Report June 30, 2023 3 / 20


MAXREFDES70 reference kit Introduction

Introduction to MAXREFDES70 refrence kit

High-Precision, Long-Battery Life


Heat/Flow Meter refrence design
Using ultrasonic technology
Include a MAX35101 analog frontend,
MAX4701 analog switch, a Silicon Labs
EFM32ZG110F32-QFN24 Host
microcontroller and a 16x3 LED LCD
Include a refrence firmware for the host
microcontroller.

Week 3 Report June 30, 2023 4 / 20


MAXREFDES70 reference kit Comparison with Ti’s offering

Comparison with Ti’s offering

EVM430-FR6047 MAXREFDES70
Manufacture Ti Maxim Intergrated
Host MCU MSP430FR6xxx Silicon Labs EFM32ZG110F32
Analog frontend Built in MAX35101
Design All in one SOC Separated component connected via SPI
Expansion Easily accessible header Header protected in case, fewer pins
Noise reduction No Yes
Specialies real time clock Tamper resistance, RTC, scheduling
Toolchain support Ti-CGT and GCC GCC
Documents Available Available

Week 3 Report June 30, 2023 5 / 20


MAXREFDES70 reference kit MAX35101 Analog frontend

MAX35101 Analog frontend

Analog frontend used to interface with


transducer and process measured data
Have built in flash, register,RTC and
tamper resistance
Can be setup to measure with predefined
cycle an signal MCU when done
Connected to host micro controller via SPI
Controlled by sending specialized
command

Week 3 Report June 30, 2023 6 / 20


MAXREFDES70 reference kit MAX35101 Analog frontend

MAX35101 SPI Command Interface

Have 2 field, Opcode and Address


Depending on the command, each field will hold different command
Command type Opcode field Address field Effects
Execution Command’s opcode None Command executed
Register read 0xB0 to 0xFF None Value of register sent
Register write 0x30 to 0x43 None Write to register
Flash memory read 0x90 0x0000 to 0xFFFF Read from flash memory
Flash memory write 0x10 0x0000 to 0xFFFF Write to flash memory
Block Erase 0x13 0x0000 to 0xFFFF Erase region of flash

Week 3 Report June 30, 2023 7 / 20


MAX35101 Measurement cycle

MAX35101 Measurement cycle

Week 3 Report June 30, 2023 8 / 20


Analyzing reference implementation

Analyzing reference implementation

Week 3 Report June 30, 2023 9 / 20


Analyzing reference implementation Hardware

Hardware

Separated chip connected together via SPI chip


Most of the heavy measurement and calculation works is done by MAX35101 chip
Beside standard SPI connection, the MAX35101 also connect with host microcontroller
with INT pin in order to signal event completion to MCU
Allow MCU to enter low power mode unless an event is triggerd

Week 3 Report June 30, 2023 10 / 20


Analyzing reference implementation Hardware

Hardware connection diagram between chips

Week 3 Report June 30, 2023 11 / 20


Kalman filters diffculties and some alternatives

Kalman filter model

Week 3 Report June 30, 2023 12 / 20


Kalman filters diffculties and some alternatives Kalman filter modeling

Problem with modeling the initial state

Due to lack of data, the model for the initial state have few problems as stated below:
We only have the velocity of the water flow. This is a difficult to model only the velocity
of the flow as a 1x1 matrix for the filter.
Attempts were made to make the model has the inital state as a 2x1 matrix. But not yet
known what is the derivative of velocity.
Most of the papers we encountered were mostly using a matrix 2x1 to represent the initial
state. And very little information about the model we are working with, which is
ultrasonic water flow.

Week 3 Report June 30, 2023 13 / 20


Kalman filters diffculties and some alternatives Alternatives

Some possible alternatives

MAX35101
Hardware digital filter
Software digital filter

Week 3 Report June 30, 2023 14 / 20


Kalman filters diffculties and some alternatives Alternatives

MAX35101

As stated in the docmu


provides noise suppression to prevent
erroneous edge detection

Week 3 Report June 30, 2023 15 / 20


Kalman filters diffculties and some alternatives Calculate absToF

Calculate absToF

Include 2 stages
Acquisition: only run where there’s no previous absToF or some error in 2 consecutive
absToF measurements.
Tracking: run with each measurement.

Week 3 Report June 30, 2023 16 / 20


Kalman filters diffculties and some alternatives Calculate absToF

Acquisition algorithm

Only run when there’s no memory of previous


absToF, example at first run, or when the
system detects an anomaly between 2
consecutive measurements.
Assume we have the ADC capture

Week 3 Report June 30, 2023 17 / 20


Kalman filters diffculties and some alternatives Calculate absToF

Acquisition algorithm

1 Loop from index 2 to N to find the


maximum value where r1i−1 <= r1i and
r1i+1 <= r1i . Interpolation around
r1i−1 , r1i , r1i+1 r1i+1 for all i. They are now
the maximum of lobe for each wave
captured
2 Compute the maximum over those values.
image/Interpolation zoom.png We then find the maximum signal r1max
3 Generate a threshold n for the algorithm,
default is 0.1, could be modified
USS userConfig.h. Then let
nthresh = n ∗ r1max
4 find i = ik where the value at ik closest to
nthresh that abs(nthresh − r1ik ) is min
Week 3 Report June 30, 2023 18 / 20
Kalman filters diffculties and some alternatives Calculate absToF

Acquisition algorithm
This is the detailed data Points for Acquisition
Algorithm for AbsTOF

image/Step by step.png

Week 3 Report June 30, 2023 19 / 20


Kalman filters diffculties and some alternatives Calculate absToF

Tracking algorithm

We have ik from the acquisition algorithm from previous j-1 capture, j as current capture.
1 Checks if r1i−1 <= r1i and r1i+1 <= r1i . If not do step 2 and 3, else 4
2 If r1i−1 > r1i then ik = ik−1 . And vice versa.
3 Repeat step 1 for new ik . In USS, we can modified number of update for such ik . If it still
does not satisfy the inequality, the acquisition algorithm shall run again.
4 The offset delay of the maximum from index ik is then calculated from the parabolic
interpolation equation. Then we have:
abs = T upscoor
Tups proop + Tik − Toffset (Tproop as the effective time)
Tproop : modified in USS ACOUSTIC LENGTH in USS userConfig.h (Usually 35-40 us)
Toffset : modified in USS ALG ADC ADDITIONAL CAP DLY in USS userConfig.h (set to 5ps
default)

Week 3 Report June 30, 2023 20 / 20

You might also like