Electrical Engineering - State Space - Matlab

Click For Summary
SUMMARY

The discussion focuses on deriving the state space representation of a circuit with one capacitor and one inductor using MATLAB. The transfer function is identified as G(s) = s/(2 + 1/s). The user successfully applies nodal analysis to derive the state equations but struggles with expressing the output voltage v_o(t) in terms of the state variable x_1. The MATLAB commands used include step and tf for plotting the step response and frequency response, respectively.

PREREQUISITES
  • Understanding of state space representation in control systems
  • Familiarity with MATLAB commands such as step and tf
  • Knowledge of circuit analysis techniques, including nodal analysis
  • Basic concepts of transfer functions and their interpretation
NEXT STEPS
  • Learn how to derive state space representation for circuits with multiple components
  • Explore MATLAB's Control System Toolbox for advanced plotting techniques
  • Study the interpretation of frequency response in terms of filter types (low pass, band pass, high pass)
  • Investigate the relationship between current and voltage in state space models
USEFUL FOR

Electrical engineering students, circuit designers, and anyone working with MATLAB for control systems analysis and simulation.

GreenPrint
Messages
1,186
Reaction score
0

Homework Statement



\dot{}

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 G(s) = \frac{s}{2+\frac{1}{s}}. 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

\stackrel{.}{x} = Ax + Bu
y = Cx + Bv

For the circuit I set the current through the inductor i_{L} to be x_{1}. Because V_{L} = L \frac{d I_{L}}{dt} = L \stackrel{.}{x_{1}}. Since L = 1 H I can state that V_{L} = \dot{x_1}, which is also equal to v_{O}(t).

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 v_{o}(t) across to be going from the top node to ground, and finally the current from the voltage source across the 1 Ω resistor to be going into the node. This resulted in the following equation.

\frac{v_{i}(t) - \dot{x_{1}}}{1 Ω} = x_{1} + \dot{x_{1}}

Solving for \dot{x_{1}} I get

2\dot{x_{1}} = v_{i}(t) + x_{1}
\dot{x_{1}} = \frac{1}{2}x_{1} + \frac{1}{2}v_{i}(t)

I seem to be having some trouble because I'm unsure how to solve for the output equation v_{o}(t) in terms of the current through the inductor x_{1}. I know that v_{o}(t) = \dot{x_{1}} but that doesn't really help me because I need to get the equation in terms of x_{1} and not \dot{x_{1}}

When I solved the similar problem I got an answer of the form

[\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)
v_{o}(t) = [0 1][\stackrel{x_{1}}{x_{2}}]

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:
Physics news on Phys.org
The problem is you're trying to relate current to voltage, which can get difficult. It would be easier to set the voltage as your state variable.
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
Replies
0
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
6
Views
3K
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 17 ·
Replies
17
Views
2K