- #1
roam
- 1,271
- 12
Homework Statement
I'm trying to make a theoretical Bode plot of a High pass filter (made up of a capacitor and a resistor). The transfer function is:
##T=\frac{V_{out}}{V_{in}}= \frac{R}{R+1/(j\omega C)} = \frac{1}{1-j\omega_0 / \omega}##
With a corner frequency of 5 kHz or in radians:
##\omega_0 = \frac{1}{RC} = \frac{1}{(1440.96 \Omega)(22 \ nF)}##
The Attempt at a Solution
I rewrote the transfer function as:
##\frac{s}{s+\omega_0}## where s=jω
And used the following code:
w=1/(1440.96*(22e-9))
N=[1];
D=[1 w];
sys = rss(5);
h = bodeplot(sys);
setoptions(h,'FreqUnits','Hz','PhaseVisible','off');
h=bode(N,D);
And here is what I got:
Clearly this is wrong, it is not the graph of a high-pass filter. Here is my experimental result (how the curve should look like):
So what is wrong with my code?
Any help is greatly appreciated.