10.6. REFERENCES 149
Figure 10.6: C source integration iOS.
10.6 REFERENCES
[1] R. Pourreza-Shahri, S. Parris, F. Saki, I. Panahi, and N. Kehtarnavaz, From simulink to
smartphone: Signal processing application examples, Proc. of IEEE ICASSP Conference,
Australia, April 2015. 143
[2] https://www.mathworks.com/products/matlab-coder.html 144
L10 LAB 10:
MATLAB CODER IMPLEMENTATION
e purpose of this lab is to transition a signal processing algorithm written in MATLAB to
smartphones by generating a C source code using the MATLAB Coder and then running the
C code on a smartphone ARM processor. e application shells provided in the previous labs
are used here for collecting audio signal samples, passing frames of signal samples to the C code
for processing, and saving the output to a file for analysis.
150 10. IMPLEMENTATION VIA MATLAB CODER
L10.1 LAB EXERCISES
1. Use MATLAB to design an FIR filter based on the specifications noted below using the
fir2 function.
f = [0 300 600 1400 2000 4000]; %frequencies (0 to nyquist)
a = [0 .33 .89 .25 .60 0]; %desired amplitude response
order = 31; %filter order N
Follow the process outlined in the chapter and integrate these filter coefficients into the
MATLAB function. Use the MATLAB Coder to generate a C code; then deploy it onto
a smartphone target and verify its correct functionality.
2. Write a MATLAB function to implement an adaptive FIR filter to match an IIR filter
using the yulewalk function and the following specifications. Go through the steps dis-
cussed in the chapter to run this function on a smartphone target and verify its correct
functionality.
Nc=8; %8th order IIR
f=[0 .25 .33 .66 .67 1]; %frequency band definition
m=[0 .50 .20 1 0 0]; %gain definition
3. Write a MATLAB function to perform frequency-domain filtering and signal reconstruc-
tion. Go through the steps discussed in the chapter to run this function on a smartphone
target and verify its correct functionality. Use the same specifications as Lab L8 and com-
pare the processing time and the result with that of the implementation done in Lab L8.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.66.13