Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Every Engineer should be familiar with the moving average filter that was discussed in lecture. In this problem write the code for the recursive implementation

image text in transcribed

image text in transcribed

Every Engineer should be familiar with the moving average filter that was discussed in lecture. In this problem write the code for the recursive implementation of t moving average filter using a FIFO and the provided FIFO functions. This code will be part of the TIMERO routir at the sampling rate of the filter. An example of an eight tap moving average filter is given below. Caution this example shows what the filter does. It is not the recursive implementation. The recursive implementation can easily be derived from the example. Do not use arrays. Hint this only takes a few lines of code. (25 points) 7. ER0 interrupt service routine. TIMERO is set for periodic interrupts Available FIFO functions FIFO push(value) pushes an new value into the FIFO. FIFO firstO FIFO last(O FIFO clearO FIFO popC If the FIFO is full the first value is popped off gets the first value put into the FIFO gets the last value put into the FIFO clears the FIFO pops the first value put into the FIFO yintermediate[11] = x[11] + x[10] + x[9] + x[8] + x[7] + x[6] + x[5] + x[4] yFilterValuel11] yintermediate 8 yintermediate [12] [12] +x[11] [10 9]+x[8] x17]+ x16]+[5] yFilterValue[12] yintermediate 8 The x values are inputs. The y value is the calculated value from the filter uint32 t yFilter Value; void TimerOA_Handler(void) uint32_t currentInput; currentInput - readCurrXValue): yFilter Value - Every Engineer should be familiar with the moving average filter that was discussed in lecture. In this problem write the code for the recursive implementation of t moving average filter using a FIFO and the provided FIFO functions. This code will be part of the TIMERO routir at the sampling rate of the filter. An example of an eight tap moving average filter is given below. Caution this example shows what the filter does. It is not the recursive implementation. The recursive implementation can easily be derived from the example. Do not use arrays. Hint this only takes a few lines of code. (25 points) 7. ER0 interrupt service routine. TIMERO is set for periodic interrupts Available FIFO functions FIFO push(value) pushes an new value into the FIFO. FIFO firstO FIFO last(O FIFO clearO FIFO popC If the FIFO is full the first value is popped off gets the first value put into the FIFO gets the last value put into the FIFO clears the FIFO pops the first value put into the FIFO yintermediate[11] = x[11] + x[10] + x[9] + x[8] + x[7] + x[6] + x[5] + x[4] yFilterValuel11] yintermediate 8 yintermediate [12] [12] +x[11] [10 9]+x[8] x17]+ x16]+[5] yFilterValue[12] yintermediate 8 The x values are inputs. The y value is the calculated value from the filter uint32 t yFilter Value; void TimerOA_Handler(void) uint32_t currentInput; currentInput - readCurrXValue): yFilter Value

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago