Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a c code program/function to compute the reflection coefficients (k) based off of filter weights. I am trying to design a FIR lattice filter

Write a c code program/function to compute the reflection coefficients (k) based off of filter weights.

I am trying to design a FIR lattice filter in c and I have no idea how to compute the reflection coefficients for it simply based off the filter weights. Basically I need the matlab function k = tf2latc(b) which finds the lattice parameters k for an FIR (MA) lattice filter, normalized by b(1). Accept in c code.

I am allowed to add a 1.0 to the beginning of the filter coefficients because it is assumed that the first filter coefficient alpha_0 is 1.

Not sure if it's necessary for this part but the sample frequency is 48 kHz.

Filter weights (there are 32 of them):

1.0 0.007779941996078346827525606954623071942 -0.007167820260809222403242113585974948364 0.05849050670872912860431824810802936554 0.015890457827997438167155763721893890761 -0.040278775567043803573774596316070528701 -0.080001520291992367361899596289731562138 -0.069264256432627346882213714707177132368 0.000140785658104214395081044131075032055 0.081712703720322715783552780521858949214 0.104124826767230477253534104420396033674 0.03592182519859755257529698724283662159 -0.076898344359357911903529725350381340832 -0.141830547483461077984401299545424990356 -0.097985424657847625118378687147924210876 0.026200417581532631228213858776143752038 0.131749649651919709114622492052149027586 0.131749649651919709114622492052149027586 0.026200417581532631228213858776143752038 -0.097985424657847625118378687147924210876 -0.141830547483461077984401299545424990356 -0.076898344359357911903529725350381340832 0.03592182519859755257529698724283662159 0.104124826767230477253534104420396033674 0.081712703720322715783552780521858949214 0.000140785658104214395081044131075032055 -0.069264256432627346882213714707177132368 -0.080001520291992367361899596289731562138 -0.040278775567043803573774596316070528701 0.015890457827997438167155763721893890761 0.05849050670872912860431824810802936554 -0.007167820260809222403242113585974948364 0.007779941996078346827525606954623071942 

I computed them in matlab using the k = tf2latc(b) functon and this is what they should be:

k =

0.2042

-0.0921

-0.3151

-0.4025

-0.1486

0.4780

1.2243

-2.7793

-1.4030

1.7025

0.3948

-0.3709

-0.4915

-0.3051

0.0230

0.2434

0.2369

0.0637

-0.1247

-0.1857

-0.1044

0.0351

0.1173

0.0937

0.0041

-0.0714

-0.0830

-0.0398

0.0149

0.0586

-0.0072

0.0078

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

Explain the client-server architecture.

Answered: 1 week ago