EE16B Designing Information Devices and Systems IIee16b/fa18/lectures/LastLecture.pdf · EE16B M....
Transcript of EE16B Designing Information Devices and Systems IIee16b/fa18/lectures/LastLecture.pdf · EE16B M....
EE16B M. Lustig, EECS UC Berkeley
EE16BDesigning Information
Devices and Systems IILecture 15A (!)
DFTThe end
MRI
EE16B M. Lustig, EECS UC Berkeley
Properties of the DFT
• Scaling and superposition:
EE16B M. Lustig, EECS UC Berkeley
Properties of the DFT
• Parseval’s relation (Energy conservation)
EE16B M. Lustig, EECS UC Berkeley
Conjugate Symmetry
• When the DFT coefficients satisfy:
0 1 2 3 40 1 2 3
Proof concept: Use properties of: WN(N-k) = (WN
k)*, DFT and the realness of x
EE16B M. Lustig, EECS UC Berkeley
Example
EE16B M. Lustig, EECS UC Berkeley
Example
• FFTSHIFT
EE16B M. Lustig, EECS UC Berkeley
Example
• Often, display only half (if signal is real)• If the spectrum (DFT) is not conjugate symmetric, then the signal is complex!
EE16B M. Lustig, EECS UC Berkeley
Example
0 500 1000 1500 2000 2500 3000 3500 40000
20
40
60
80
100
120
0 500 1000 1500 2000 2500 3000 3500 4000 45000
10
20
30
40
50
60
70
80
0 1000 2000 3000 4000 5000 6000 7000 80000
50
100
150
200
250
EE16B M. Lustig, EECS UC Berkeley
Modulation and Circular shift
Similarly, circular shift - modulation
Modulation – Circular shift
EE16B M. Lustig, EECS UC Berkeley
DFT Matrix and Circulant Matrices
• DFT diagonalizes Circulant matrices:
EE16B M. Lustig, EECS UC Berkeley
DFT Matrix and Circulant Matrices
EE16B M. Lustig, EECS UC Berkeley
• If, then,
Fast Circulant Matrix Vector Multiplication
• Given :
EE16B M. Lustig, EECS UC Berkeley
Fast Circulant Matrix Vector Multiplication
• Why bother?• Option I, compute:
• Option II, compute:
Using the fast Fourier Transform (FFT) calculation of the DFT (and inverse) is O(N log N)
For N = 1024: N2 = 1,048,576 whereas, N log N = 10240
EE16B M. Lustig, EECS UC Berkeley
Fast Convolution Sum using the DFT
• We can write linear operators on finite sequences as matrix vector multiplication
• Recall… convolution sum.....
EE16B M. Lustig, EECS UC Berkeley
Graphical Example of Convolution
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
EE16B M. Lustig, EECS UC Berkeley
Graphical Example of Convolution
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
EE16B M. Lustig, EECS UC Berkeley
Graphical Example of Convolution
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
EE16B M. Lustig, EECS UC Berkeley
Graphical Example of Convolution
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
EE16B M. Lustig, EECS UC Berkeley
Graphical Example of Convolution
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
1 2 3 4 5 6 70 8 9 10-1
EE16B M. Lustig, EECS UC Berkeley
Example:If h[n] is length 2 and x[n] is length 5, what is thelength of their convolution sum?
1 2 3 401 2 3 40 1 2 3 4 50
EE16B M. Lustig, EECS UC Berkeley
Example
1 2 3 40
1 2 3 40
EE16B M. Lustig, EECS UC Berkeley
1 2 3 40
1 2 3 40
Example
EE16B M. Lustig, EECS UC Berkeley
1 2 3 40
1 2 3 40
Example
EE16B M. Lustig, EECS UC Berkeley
Example
• This matrix is called a Toeplitz matrix– But.. Not square… not circulant....
EE16B M. Lustig, EECS UC Berkeley
Example• Convert system to be square circulant by zero-padding
• Now can compute using the DFT!
EE16B M. Lustig, EECS UC Berkeley
General Case for Convolution Sum
• Given:
• Zeropad both to M+N-1
• Compute:
• Finally:
EE16B M. Lustig, EECS UC Berkeley
Spectrum of filtering?
• Example:
0 5 10 15 20 25 30 35-0.05
0
0.05
0.1
0.15
0.2
EE16B M. Lustig, EECS UC Berkeley
Where from here….
EE16B M. Lustig, EECS UC Berkeley
Readers: Sherwin Afshar, Ryan Tjitro, Sicen Luan, Mohammed Shaikh, Khanh Dang Lab Assistants: Tiffany Cappellari, Jenna Wen, Alyssa Huang, Bikramjit Kukreja, Justin Lu, Nirmaan Shanker, Nathan Mar, Rahul Tewari, Daniel Zu, Raymond Gu, Ilya Chugunov, Chufan Liang, Dre Mahaarachchi, Benjamin Carlson, Victor Lee, Rafael Calleja, Jackson Paddock, David Allan Vakshlyak, Christian Castaneda, Ashley Lin, Jason Wang, Jove Yuan, Ryan Purpura, Merryle Wang, Avanthika Ramesh, Adilet Pazylkarim, Mariyam Jivani, Angela WangAcademic Interns: David Dongwon Kim, Vin Ramamurti, Tanner Yamada, Carolyn Schwendeman, Akash Velu, Mikaela Frichtel, Steven Lu, Grace Park Sun
M. Lustig, EECS UC Berkeley
MRI vs CT• MRI is VERY VERY different from CT
MRICTBased on MagnetismNo moving partsNo ionizing radiationSensitive to soft tissueComplicated to operate
Based on X-rayRapidly moving partsUses ionizing radiationLess sensitive to soft tissueEasy to operate
M. Lustig, EECS UC Berkeley
How Does MRI Work?
•Magnetic Polarization-- Very strong uniform magnet• Excitation
-- Very powerful RF transmitter• Acquisition
-- Location is encoded by gradient magnetic fields-- Very powerful audio amps
M. Lustig, EECS UC Berkeley
Polarization
•Protons have a magnetic moment•Protons have spins•Like rotating magnets
1H
M. Lustig, EECS UC Berkeley
Polarization
• Body has a lot of protons• In a strong magnetic field B0, spins align with B0 giving a net
magnetization
B0
*Graphic rendering Bill Overall
• 0.1 to 12 Tesla• 0.5 to 3 T common• 1 T is 10,000 Gauss• Earth’s field is 0.5G• Typically a superconducting
magnet
M. Lustig, EECS UC Berkeley
Polarizing Magnet
B0
Typical MRI Scanner
M. Lustig, EECS UC Berkeley
Polarizaion
M. Lustig, EECS UC Berkeley
Free Precession•Much like a spinning top•Frequency proportional to the field• f = 127MhZ @ 3T
MIT physics demos
M. Lustig, EECS UC Berkeley
Free Precession•Precession induces magnetic flux•Flux induces voltage in a coil
Signal
M. Lustig, EECS UC Berkeley
Frequency Demo
M. Lustig, EECS UC Berkeley
Intro to MRI - The NMR signalB0
γB0
time frequency
• Signal from 1H (mostly water)
• Magnetic field ⇒ Magnetization
• Radio frequency ⇒ Excitation
• Frequency ∝ Magnetic field
M. Lustig, EECS UC Berkeley
Intro to MRI - The NMR signal• Signal from 1H (mostly water)
• Magnetic field ⇒ Magnetization
• Radio frequency ⇒ Excitation
• Frequency ∝ Magnetic field
γB0
B0
time frequency
γB0
M. Lustig, EECS UC Berkeley
Intro to MRI - Imaging
γB0
center
B0
time frequency
• B0 Missing spatial information
M. Lustig, EECS UC Berkeley
Phone Imaging I
M. Lustig, EECS UC Berkeley
Intro to MRI - ImagingB0
center
γB0
G
Stronger field
Weaker field
unchanged
time frequency
• B0 Missing spatial information
• Add gradient field, G
M. Lustig, EECS UC Berkeley
Intro to MRI - ImagingB0
Reference (γB0)
center
time
• B0 Missing spatial information
• Add gradient field, G • Mapping:
spatial position ⇒ frequency
G
0
frequency
M. Lustig, EECS UC Berkeley
Phone Imaging II
M. Lustig, EECS UC Berkeley
MR Imagingmagnitude k-space (Raw Data) Image
Fourier transform
Video courtesy Brian Hargreaves
Fourier