# Matlab - Frequency Response

#### cloud

Joined Dec 15, 2006
11
I write [num,den]=invfreqz(tf(1:50001),f,3,3) to compute my num and den of my transfer function(tf). Then, from the num and den that I obtained, I compute my approximated frequency response using fvtool(num,den). But this computed frequency response does not match my measured response. I do not know what goes wrong. Can someone help me?

Thank you.

#### Dave

Joined Nov 17, 2003
6,970
What is num and den as calculated by the function invfreq?

Also can you post up your mesured response as a JPEG so that we can compare the two plots?

Dave

#### Papabravo

Joined Feb 24, 2006
13,454
For all practical purposes your measued response at 6e-3 is equal to the approximated response of 1.5e-3.

Once again you are talking transfer function when you have nothing of the sort. Sampled data does not produce a transfer function. Poles and zeros produce transfer functions and you have neither in your plotted data. The analysis you are doing is completely bogus. Take a step back and try to educate yourself on what you are doing and why. Then explain it to us. We can't help you if you continue on this path which is not grounded in reality.

A true magnitude plot would show 20*log(Vout/Vin) versus log frequency over several decades. Along with the magnitude plot would be a phase plot.

#### cloud

Joined Dec 15, 2006
11
What is num and den as calculated by the function invfreq?

Also can you post up your mesured response as a JPEG so that we can compare the two plots?

Dave
Num is the numerator of the magnitude response of the digital filter and den is the denominator of the magnitude response of the digital filter.

The approximated plot is the magnitude plot I obtained from fvtool(num,den) while the measured plot is the magnitude plot that I measured.

#### Dave

Joined Nov 17, 2003
6,970
Num is the numerator of the magnitude response of the digital filter and den is the denominator of the magnitude response of the digital filter.
I am aware what the denominator and numerator are, but you should have them expressed in polynomial form for the fvtool function. What is the polynomial transfer function?

I also cannot find the function invfreqz - is this a function you have written?

The approximated plot is the magnitude plot I obtained from fvtool(num,den) while the measured plot is the magnitude plot that I measured.
Apologies I didn't look at the graph properly.

Dave

#### sytem_recon

Joined Apr 21, 2009
52