2
\$\begingroup\$

I have calculated a transfer function for a specific system (a low pass filter):

$$H(j\omega)=\frac{1}{RCj\omega +1}$$

It seems to me that the standard way of plotting the frequency response of the filter is to use a Bode plot. Therefore I want to know how to do that in Matlab.

There is a function bodeplot in Matlab which for instance takes an argument calculated with tf, which in turn takes a numerator and denominator.

I don't actually understand how I should use those functions with my already calculated formula above. Have I already calculated some part which could be done with the above mentioned Matlab functions?

So, how do I make a Bode plot from my transfer function, in Matlab?

Here is my current Matlab plot, which plots the frequency response (but not with dB on the y-scale):

f = 0:100000;
R = 33e3;
C = 220e-12;
w = 2*pi*f;
H_w = 1./(R.*C.*j.*w+1);
xaxis = 0:100000;
figure;
semilogx(xaxis,abs(H_w));
Null
7,81618 gold badges38 silver badges49 bronze badges
asked Nov 26, 2014 at 20:52
\$\endgroup\$
1
  • \$\begingroup\$ I don't know matlab, but a bode plot is on a log - log scale. Log of the amplitude response vs log of the frequency. \$\endgroup\$ Commented Nov 26, 2014 at 20:55

1 Answer 1

3
\$\begingroup\$

Call tf with vectors of the coefficients for the numerator and denominator (ordered from highest power to lowest):

H = tf([1],[RC 1]);

where RC is your \$RC\$ time constant.

Then call bode(H).

See the Matlab documentation (especially the examples).

answered Nov 26, 2014 at 21:05
\$\endgroup\$
1
  • \$\begingroup\$ This works if you have the signals toolbox. It's more of a todo if you dont. \$\endgroup\$ Commented Nov 26, 2014 at 22:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.