audio-controlled levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...audio sampler & fft...

12
Audio-Controlled Levitator David Mejorado and Raul Largaespada

Upload: others

Post on 07-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

Audio-Controlled LevitatorDavid Mejorado and Raul Largaespada

Page 2: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

High Level Block Diagram

r[n] (6 bits) e[n] (5 bits)

PSD Controller

PWMGen.

Plant

A2D

u[n] (8 bits)

v[n] (7 bits)

h[n] (6 bits)

h(t)Audio Sampler

Ambient Sound FFT

x[n](12 bits)

Processing

Graphics

X[n](12 bits)

Page 3: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

Audio Sampler & FFT

ADMP421 Decimator Low Pass

Data

L_R_sel2.4Mhz_clk

s[15:0]

This module will undersample the 2.4 Mhz PDM signal and convert it to a PCM signal that will then be low-pass filtered to only keep relevant audio.

Time BRAM16x2048

FSM Control

FFT(ip core &

cordic)

Frequency BRAM16x2048

T_we

F_we

freq[15:0]

Data[15:0] index [11:0] valid

Page 4: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

Processing & Graphics

Thresholdingfreq[15:0]

Order

max_bin[11:0]OnMax_search

Relevant[15:0]

Reference Generator

SpecBRAM1024x16

Histogram

Spectrogram

Textual Translation

VGA Output

r[n]

Page 5: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

More DetailsBase Goals

● Extract pitch ● Visualize Histogram & text

description

Stretch Goals

● Visualize spectrogram ● Animate search● Animate expected system

behavior

● System status● Detected Pitch● Debugging tool

Page 6: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

Possible Complications

● Audio signal is still too noisy to distinguish dominant frequency

● Throughput of reference signal is too slow

● Amount of memory available

Page 7: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

System Dynamics

● PWM voltage from FPGA accelerates a motorized fan● Air from fan balances ball at a specific height● IR sensor detects height of ball for feedback control

Page 8: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

Proportional Sum Delta Controller

r[n] e[n] Sum

Delta

Proportional

Manual Tuning Signal

Manual Tuning Signal

Manual Tuning Signal

u[n] (8 bits)

h[n]

● Finite state machine based PSD controller

● Gain values are hard-coded into Verilog, additional tuning supported through potentiometers

● After receiving new sensor input, will run through all computational steps before sending out new control output

● Many clock cycles to work with because sensors are slow compared to FPGA; efficiency not key

Page 9: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

PWM Generator, A2D● Using an MCP3008 for A2D

hardware, will only consider the 6 MSB

● Communicate using SPI, scale value to height of ball/potentiometer angle

● PWM generator will convert control signal u[n] into a 7 bit 0-100 duty cycle value

MotorsPWM Generator

PSD Controller

u[n] control signal

0-100 duty cycle PWM

MCP3008 Analog-to-Digital Converter

Height SensorPot. 0Pot. 1Pot. 2

MOSIMISOSCK

CS

Page 10: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

Further Possibilities: Eigenvalue Placement/LQR● If the PSD control architecture is successful,

we would like to try additional control techniques

● Convert system dynamics to state-space form

● Attempt eigenvalue placement, linear quadratic regulator controllers calculated in MATLAB

● Will require new Verilog modules, can retain most previous hardware

Page 11: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

Further Possibilities: The Two Towers

● Goal: Balancing a ball between two towers

● Restructure system to make use of three separate controllers, additional hardware

PSD Controller

PSD Controller

Tower A

Tower B

StickP Controller-1

h4-h3[n]

Page 12: Audio-Controlled Levitatorweb.mit.edu/6.111/volume2/www/f2018/projects/...Audio Sampler & FFT ADMP421 Decimator Low Pass Data L_R_sel 2.4Mhz_clk s[15:0] This module will undersample

TimelineDate Raul David

11/04 - 11/10 System Modeling, Circuitry Design

FFT module and Histogram

11/11 - 11/17 PSD Implementation Thresholding and Max Search

11/18 - 11/24 Single Tower Hardware Implementation

Integration and Text graphics

11/25 - 12/01 Stretch Goals: State-Space Stretch Goals: More Graphics & debug

12/02 - 12/09 Stretch Goals: Two-Towers Stretch Goals: More Graphics & debug