- #1
GreenPrint
- 1,196
- 0
Homework Statement
[itex]\dot{}[/itex]
I'm given the following circuit
http://imagizer.imageshack.us/v2/800x600q90/43/bwka.png
Homework Equations
The Attempt at a Solution
I come up with the transfer function to be [itex]G(s) = \frac{s}{2+\frac{1}{s}}[/itex]. The question asks me to
Plot step response using MATLAB step command and frequency response using bode command. Can you interpret the frequency response in terms of low pass, band pass or high pass filters for the two circuits?
It's been a while since I have messed around with MATLAB and I seem to be struggling with finding the state space representation of this circuit. I solved a similar problem with a voltage source, two resistors, one capacitor, and one inductor using state representation without issue. The problem is that I'm not exactly sure how to apply this technique to this circuit because there is only one capacitor. I know that for state space representation with two variables
[itex]\stackrel{.}{x} = Ax + Bu[/itex]
[itex]y = Cx + Bv[/itex]
For the circuit I set the current through the inductor [itex]i_{L}[/itex] to be [itex]x_{1}[/itex]. Because [itex]V_{L} = L \frac{d I_{L}}{dt} = L \stackrel{.}{x_{1}}[/itex]. Since [itex]L = 1 H[/itex] I can state that [itex]V_{L} = \dot{x_1}[/itex], which is also equal to [itex]v_{O}(t)[/itex].
I use nodal analysis and assume that the current through the inductor is going towards ground (which I took to be the bottom of the circuit near the negative lead of the voltage source), the current through the capacitor with the output voltage [itex]v_{o}(t)[/itex] across to be going from the top node to ground, and finally the current from the voltage source across the [itex]1 Ω[/itex] resistor to be going into the node. This resulted in the following equation.
[itex]\frac{v_{i}(t) - \dot{x_{1}}}{1 Ω} = x_{1} + \dot{x_{1}}[/itex]
Solving for [itex]\dot{x_{1}}[/itex] I get
[itex]2\dot{x_{1}} = v_{i}(t) + x_{1}[/itex]
[itex]\dot{x_{1}} = \frac{1}{2}x_{1} + \frac{1}{2}v_{i}(t)[/itex]
I seem to be having some trouble because I'm unsure how to solve for the output equation [itex]v_{o}(t)[/itex] in terms of the current through the inductor [itex]x_{1}[/itex]. I know that [itex]v_{o}(t) = \dot{x_{1}}[/itex] but that doesn't really help me because I need to get the equation in terms of [itex]x_{1}[/itex] and not [itex]\dot{x_{1}}[/itex]
When I solved the similar problem I got an answer of the form
[itex][\stackrel{\dot{x_{1}}}{\dot{x_{2}}}] = [\stackrel{-\frac{1}{2}}{1} \stackrel{-1}{0}][\stackrel{x_{1}}{x_{2}}] + [\stackrel{\frac{1}{2}}{0}]v_{i}(t)[/itex]
[itex]v_{o}(t) = [0 1][\stackrel{x_{1}}{x_{2}}][/itex]
Using MATLAB I then did the following to get the step response:
A=[-1/2 0;0 0];
B=[1/2;0];
C=[0 0];
D=0;
step(tf(ss(A,B,C,D)))
I'm not sure how I can apply what I learned from a similar problem to this problem because this problem only has one inductor and I'm not sure if these MATLAB functions will still work with only one variable.
Thanks for any help.
Last edited by a moderator: