dual antenna magnitude and phase detection for vital sign...
TRANSCRIPT
Dual Antenna Magnitude and Phase Detection for Vital SignDiagnosis with Removed Common Mode Interference
Alexander Sludds
Spring 2018
Contents
1 Abstract 2
2 Project Requirements Breakdown 32.1 The Commitment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 The Goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.3 The Stretch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Need for better vital sign diagnostics 43.1 Cardiovascular Disease Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.2 Pulmonary Disease Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2.1 Impulse Oscillometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4 Systems 64.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64.2 Doppler Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.2.1 Doppler Radar Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64.2.2 Ultrasonic Doppler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.3 λ4
shifter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.3.1 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.3.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.4 Magnitude Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.4.1 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.4.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.5 Phase Detector and Compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.5.1 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.5.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.5.3 Notes on square wave generation . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.6 Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.6.1 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.6.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5 Integrated Schematic 165.1 Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.2 Printed Circuit Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6 Conclusion 186.1 Final Project Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7 Future Improvements 23
8 Acknowledgements 25
References 26
1
1 Abstract
One problem with using an antenna to detect respiratory or mechanical cardiac function of a person
is that the signal received from the antenna often encodes additional information such as movement,
speech, and noise. A proposed solution to removing these sources of noise and distortion from the
antenna signal is by using two antennas, one aimed at the chest and one at the abdomen. The
difference of these two signals is a clean respiratory signal. A magnitude detector circuit will be used
to find the magnitude of the chest signal. In addition, before taking the difference of these signals
we must make sure that the phase of the two signals is identical. Thus, a phase detector circuit is
used to find the phase difference between the two received signals, and then the abdomen signal is
compensated accordingly. The two antennas that will be used are pre-existing Doppler radars. The
end result of this work was that respiration can be detected by the dual antenna system, with the
surpression of common mode interference present from movement.
2
2 Project Requirements Breakdown
This project was created as part of the course 6.101 at MIT. As such, there were goals associated
with this project. These goals are broken down as follows:
2.1 The Commitment
The commitment for this project is the creation of a magnitude detection system and phase detection
system which when hooked up to two Doppler radars will give the magnitude signals of both radars
as well as the phase difference between the radars.
2.2 The Goal
The goal for this project is to be able to take two 40khz ultrasonic Doppler signals, one from the
stomach and one from the abdomen and take the difference of these two signals so that the returned
signal contains respiratory information. This signal is passed into the independent component analysis
algorithm for blind source separation. This circuit will then be fabricated on a printed circuit board.
The printed circuit board will also preform phase compensation.
2.3 The Stretch
The stretch goal for this project is to create a model of a lung and create an impulse oscillometry
breakout for one of the Doppler radars.
3
3 Need for better vital sign diagnostics
3.1 Cardiovascular Disease Background
Cardiovascular disease is the leading killer of people within the developed world. Many times, people
who have cardiovascular disease don’t get adequate treatment until their cardiovascular system is
incredibly damaged. The aim of some of my work is to create diagnostic tools for pulmonary and
cardiovascular diseases that allow diagnosis to be done more remotely, either outside of a clinical
setting or by someone who does not need incredibly large amounts of training. A lot of current
diagnostic techniques rely on electrical measurements of the heart (ECG) in order to make a diagnosis.
However, this can only diagnose the electrical function of the heart and not the vascular system. In
edition, the heart can sometimes have a perfectly normal electrical signal, but experience mechanical
problems. For example, stiffening of the ventricles will produce a normal electrical signal but results
in the heart mechanically not performing properly. So, to properly diagnose the problems of the
cardiovascular system we need to be able to measure the function of the electrical system, mechanical
system, and vascular system. The below diagram demonstrates some tools that can be used for a
complete cardiovascular system diagnosis.
Figure 1: Mechanical Diagnostics with Cardiovascular System (1)
4
It is this lack of tools to do accurate and non-invasive mechanical cardiac sensing which leads me
to want to create RF tools that can sense cardiac function.
3.2 Pulmonary Disease Background
In areas of the world without great air quality many patients suffer from pulmonary disease such as
COPD. The hope of this project is that with the creation of more precise tools to measure the health
of the lungs at affordable prices that better diagnostic will become more prevalent in the developing
world. As part of this, I would like to explore the use of ultrasonic Doppler systems for impulse
oscillometry.
3.2.1 Impulse Oscillometry
Impulse Oscillometry is a form of pulmonary diagnostic that sends a pulse of air into the lungs and
measures the returned signal in order to make diagnosis about the lungs. This works well since the
pulse of air encodes many frequencies, so in the response the amplitude of low frequencies encodes
the bulk volume of the lung, and high frequencies encodes the response of the capillaries, which is
important for understanding lung oxygenation efficiency. This method is also an improvement over
older qualitative methods such as asking the patient to hum and listening to their lungs using a
stethoscope. The use of a fixed frequency Doppler radar for oscillometry gives another benefit in that
it offers more control of the measured signal when coupled with an actuator for ”vibrate” the lungs
as a fixed frequency, thus giving a frequency response of the lungs.
5
4 Systems
4.1 Block Diagram
Below is a block diagram for the system:
Figure 2: Vector Magnitude Summing Circuit
To clarify some parts of this block diagram, the part labelled λ4
is a quarter-wave delay, which,
along with a demodulation step, allows us to extract the in-phase (I), and quadrature (Q) components
of a received signal.
4.2 Doppler Specifications
4.2.1 Doppler Radar Description
A Doppler radar works by making use of the Doppler effect to encode information such as a Frequency
Modulated Continued Wave (FMCW). The Doppler effect says that if we are propagating in a medium
with speed of propagation ν that a shifted frequency results because of movement of an object. We
6
refer to this shifted frequency as the Doppler frequency. Namely according to the formula:
freceived = ftransmitted
(1 +
vobjectν
1− vobjectν
)(1)
We define the Doppler frequency to be fDoppler = freceived − ftransmitted. We see from this equation
that if ν >> vobject that it reduces to
fDoppler = 2vobjectν
ftransmitted (2)
This means that that movement of an object encodes a frequency shift.
4.2.2 Ultrasonic Doppler
The Antenna that was used for testing was the output of a 40khz ultrasonic Doppler system. The
ultrasonic Doppler system was designed for and used as a lab in 6.002 at MIT. A schematic of the
Doppler system that is used is below, I will be taking the signal from the output of the receiver, as it
encodes the velocity of the signal received.
7
Figure 3: Ultrasonic Doppler Schematic
This schematic is broken into several sections
Oscillator
The circuit uses a relaxation oscillator to generate a 40khz signal which is passed to the first low pass
filter. This circuit uses positive feedback to generate the 40khz square wave. In reality, for reasons
described later during the second low pass filter section, I choose to set these two oscillators at 39khz
and 41khz respectively.
Low Pass Filter 1
This 40khz square wave is then passed through a low pass filter to generate a 40khz sine wave. This
sine wave then drives the ultrasonic transducer. It is also sent to the multiplier.
Gain Stage
The gain stage is for amplifying the received signal. The total stage provides a gain of 100, with the
8
gain being split between two gain stages of 10 to minimize noise. To reduce high DC offsets a DC
blocking capacitor (C4) is used.
Multiplier
This multiplier stage uses an AD633 IC to take two input signals and multiply them together. The
reason why we want to do this is for demodulation. The two input signals are the transmitted signal,
xt(t) = v0 cos(ω0t), and the received signal, xr(t) = vr0 cos(ω0t+ δω(t)t+φ). When we multiply these
signals together we find that it returns v0vr2
(cos(2ω0t+ δωt+ φ) + cos(δωt+ φ)). This means that we
have an 80khz signal and a close to DC signal.
Low Pass Filter 2
This low pass filter removes the 80khz signal from the demodulated signal. In addition, since we
have both of the transmitters on slightly difference frequencies (approximately 39khz and 41khz) this
removes the ≈ 2khz signal that is caused in demodulation from the receivers picking up the signal of
the other board.
4.3 λ4 shifter
4.3.1 Objective
This block diagram described above requires a quarter wave shifter at 40khz so that we can extract
an in-phase and quadrature component of the carrier signal. The benefits of this are described in the
object section of the magnitude detector.
4.3.2 Implementation
This circuit is doing using an all-pass filter such as the one described below. The circuit was simulated
in LTSpice such that at 40khz it gives the λ2. It is assumed that the fact that the carrier frequencies
are relatively close to 40khz (39khz and 41khz) that there will be a 90 degree phase shift.
9
Figure 4: All-pass Filter (2)
4.4 Magnitude Detector
4.4.1 Objective
An important question to ask about Doppler systems is why we need to take the L2 norm to find
amplitude. That is to say, which do I need to find√I2 +Q2 where I is the in-phase and Q is the
quadrature component of a signal. To see why, let’s consider a received signal which is a pure cosine,
cos(ωt + φ). When we demodulate this signal and low pass it we find that we obtain a signal which
is 12
cos(φ). Thus, we see that the output signal is dependent upon the phase of the received signal.
Now let’s consider the case where we have two signals a quarter wave out of phase with each
other: cos(ωt + φ) and cos(ωt + φ + π2). When we demodulate, low pass, and take the L2 norm
of these signals we find that we obtain 12
√cos(φ)2 + cos(φ+ π
2)2 = 1
2, which is a phase independent
measurement. Thus, the L2 norm allows us to look at pure magnitude, which is phase independent.
As a result, we need the below described vector-magnitude summing circuit.
4.4.2 Implementation
The magnitude detection circuit will be based upon the vector magnitude summing circuit specified
in US Patent 3,870,871. A picture of the schematic specified in the patent can be seen below. The
purpose of this circuit is that it takes two voltages, x,y and produces√x2 + y2.
10
Figure 5: Vector Magnitude Summing Circuit (3)
This circuit is made using diodes which are 1N914, resistors are 10k, op-amps are LT1632.
4.5 Phase Detector and Compensation
4.5.1 Objective
As the wavelength that is used for a Doppler radar decreases the received signal becomes more and
more sensitive to the phase of an object. For example, if the wavelength changes from a meter to 10
cm then the Doppler radar experiences ten times the change in phase for an equal change in position.
The objective for a phase detector circuit is to see the difference in phase between two Doppler signals
and then adjust them accordingly.
4.5.2 Implementation
For phase detection I will be using an xor phase detection circuit.
11
Figure 6: XOR Phase Circuit (4)
The idea is that if we have two square wave signals coming into a circuit then the xor of these two
signals shows what they don’t have in common.
Figure 7: XOR Phase Waveform (4)
Integrating this new signal over time produces a voltage which is proportional to the phase differ-
ence in this two square waves.
Figure 8: XOR Circuit Phase Response (4)
An arduino microcontroller then takes this voltage and the two original signals (not the square
waves) and uses it to shift one signal in time relative to the other. This circuit has several benefits over
other phase detection circuits such as the diode ring resonator in that it has a linear voltage output
for a given phase difference. It is also reasonably easy to understand the theory and implementation
of. It also suffers from a digital deadzone where very small differences in phase are not registered
because of the xor circuits inability to respond fast enough.
12
4.5.3 Notes on square wave generation
For two input signals I convert them into square waves by using a comparator (LM311) and an
inverter (single MOSFET) to compare the signal to some DC value, generating a square wave from
0V to 5V. However, this does require priors such as knowledge of the magnitude of the incoming
signals amplitude for biasing.
13
4.6 Signal Processing
4.6.1 Objective
Obtaining the cardiac or respiratory signal from the received signal can be relatively difficult. The
frequency content of the respiratory signal and cardiac signal are relatively scattered among other
signal sources in the frequency domain. For this reason I choose to use a time-domain approach.
Currently I have a working python algorithm which implements blind source separation (BSS) on
several time domain signals. An example of BSS is displayed below, where you have several sensors
and their signals are mixed by some unknown mixing matrix. A BSS algorithm will attempt to obtain
the original sensor inputs without priors.
Figure 9: Blind Source Separation Algorithm (5)
14
4.6.2 Implementation
The way my python algorithm works is the following: It breaks each of the signals into N hops of
length signallengthN
. A sliding window considers these hops two at a time and performs an independent
component analysis on them, seeking to return the K most independent signals where K is the known
number of signal sources. The window slides along the sensor inputs and the separated signals are
extracted. Afterwards they are re-normalized in amplitude.
Figure 10: Blind Source Separation Algorithm
15
5 Integrated Schematic
5.1 Schematic
We will now integrate the block diagram into a single circuit:
16
5.2 Printed Circuit Board
This schematic was turned into the following printed circuit board:
17
6 Conclusion
6.1 Final Project Results
The first part of my project to get built and tested was the magnitude detection circuit. In simulation
on LTSpice the circuit behaved as expected yielding the following result:
Figure 11: LTSpice Magnitude Circuit Simulation
This is the same plot, but with a lower peak to peak voltage on the sine-wave:
18
Figure 12: Measured Magnitude Circuit Performance
The phase detection circuit, which should behave as follows:
Figure 13: Ideal XOR Phase Circuit Waveform
Behaved in the following manner on my bench setup:
19
Figure 14: Measured Phase Circuit Performance
After assembly of all of the blocks for the final circuit my final bench setup was the following:
20
Figure 15: Bench Setup of Final Project
I tested this setup by using the following ”lung”.
21
Figure 16: The ”lung”
This is a PVC pipe that has a circular piece of acrylic inside that I can move using a metallic rod.
In this way, there is a volume that I can manipulate.
22
7 Future Improvements
I have a few technical comments I can make about improving the circuit below, but initially I would
like to focus on the limits of this technology. Ultrasonic transducers are effectively speakers that move
air. Since air is a fluid this means that at high enough frequency the non-linearity of Navier-Stokes
can start to greatly effect how a system performs. It is because the ultrasonic transducer is moving
a fluid around that we can not penetrate the chest cavity well at these frequencies, meaning that the
only good signal that can be detected is pulmonary. Because of these limitations I decided to shift my
project towards impulse oscillometry, the practice of measuring the response of the lungs by pushing
air into them and measuring the response. This worked proved promising and a more invasive study
using better equipment will hopefully be conducted at a later date. With this information in mind, I
list here some specific technical improvements that I would make to the system.
One side effect of using ultrasonic transducers is that they are at a low enough frequency that they
can’t penetrate the chest well. This means that measuring heart rate is quite difficult. One future
improvement that I would like to make going forward is using a much higher frequency for cardiac
detection.
A problem that I encountered when trying to cancel interference and movement of the body was that
there can be quite substantial differential interference between the chest and abdomen. A solution
that I propose to this is to have one of the Doppler boards have a very wide beam, effectively covering
the entire body. Then the first board can have a narrow beam focused on the chest. In this way the
signal that is finally created will have better movement rejection.
A small improvement to make to the phase detection circuit is to use a faster xor gate circuit. The
reason for this is the idea of a dead-zone in xor phase detection circuits. If the phase different
between two square waves is very small then the output voltage of the xor will not be able to change
fast enough. Currently a 74 series xor gate is used, but better xor chips exist. In addition, the signal
that is passed into this chip must be scaled down to 0V - 5V from it’s original 0V-15V, it would be
better to use a chip which can allow for 15V logic.
The model of the lung (the PVC pipe) can be improved by adding something like a putty to the
inside. This has the benefit of having an object that the ultrasonic waves can move as they pass by
23
it, better modeling the real lungs.
Currently the PCB has through-hole components, SMD components would be better.
Taking the difference of the two signals is current difficult as they can end up being at different
amplitudes. An automatic gain control circuit would make taking the difference much easier.
I had trouble with Blind Source Separation using a raspberry pi. The reason was that the pyaudio
library currently does not have precompiled binaries for the raspberry pi. At some point in the future
they will likely be available.
Improvements can be made to phase compensation such as using a phase locked loop to generate a
fixed phase offset.
24
8 Acknowledgements
I would like to acknowledge my PI Richard Fletcher for his technical guidance on this project as well
as his continued support in my interests.
I would like to thank Gim Hom for teaching the course (6.101). It was a lot of fun to take, and I
feel covered a few gaps in my analog understanding.
I would like to thank Dave Custer for his help in the communication portion of the class. It greatly
improved the quality of the presentation and this report.
Finally, I would like to thank Henry Love, Mark Yang, and Jimmy Mawdsley for their continued
support throughout the course. They were always able to give great insightful advise about analog
circuit design.
25
References
[1] B. Ma, “Tools for cardiovascular screening,” Tata Foundation, March 2018.
[2] “All-pass filters.” [Online]. Available: https://en.wikipedia.org/wiki/All-pass-filter
[3] T. Nead, “Vector magnitude summing circuit,” patent US 3 870 871, November, 1973.
[4] I. Poole, “Pll phase detector / comparator.” [Online]. Available: http://www.radio-
electronics.com/info/rf-technology-design/pll-synthesizers/phase-locked-loop-detector.php
[5] “Blind source seperation.” [Online]. Available: https://en.wikipedia.org/wiki/Blind-signal-
separation
26