---
title: "State variable formulation of circuit with Vx and Vy"
subject: "Electrical Circuit Theory"
chapter: 4
key: "semester_3/electrical_circuit_theory:state-variable-formulation-r-c-l"
source: https://www.bctengineer.com/q/semester_3/electrical_circuit_theory/state-variable-formulation-r-c-l
site: BCT Engineering
---

# State variable formulation of circuit with Vx and Vy

Electrical Circuit Theory · Chapter 4: Transient analysis in RLC circuit by Laplace Transform

- Asked in: 2067 Asar (old course), 8 marks
- Video: [Intro to Control - 6.2 Circuit State-Space Modeling](https://www.youtube.com/watch?v=aNiPDunyXt0) — Engineering with Prof. Kim
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/electrical_circuit_theory/state-variable-formulation-r-c-l
- Whole chapter: https://www.bctengineer.com/md/semester_3/electrical_circuit_theory/chapter-4

## Question

Write the state variable formulation of the circuit shown.
[Figure: voltage source Vx (+ at top) in series with resistor R along the top wire; inductor L as a shunt branch to the bottom wire; then capacitor C in series along the top wire, connected to a voltage source Vy (+ at left) on the right side]

## Short answer

Choose inductor current i_L and capacitor voltage v_C (positive at the node between R and L) as state variables, with inputs V_x, V_y. The state model is ẋ = A x + B u, where x = [i_L, v_C]^T, u = [V_x, V_y]^T, A = [[0, 1/L], [–1/C, –1/(RC)]], B = [[0, 1/L], [1/(RC), –1/(RC)]].

## Answer

**Circuit (as read from the figure).** V_x in series with R feeds node N. The inductor L is connected from N to ground. The capacitor C is connected from N to a node P, and V_y is connected from P to ground (+ at P). Choose the inductor current i_L and capacitor voltage v_C (positive at N) as state variables; V_x and V_y are inputs.

#### Equations
KVL across the capacitor path: the voltage at node N equals the inductor voltage, and v_C = v_L − V_y, so

v_L = v_C + V_y

Inductor: L di_L/dt = v_L = v_C + V_y

KCL at N: current in R equals i_L plus the capacitor current.

```text
i_R = (V_x − v_L)/R = (V_x − v_C − V_y)/R
C dv_C/dt = i_R − i_L = (V_x − v_C − V_y)/R − i_L
```

#### State equations
```text
di_L/dt = (1/L) v_C + (1/L) V_y
dv_C/dt = −(1/C) i_L − (1/RC) v_C + (1/RC) V_x − (1/RC) V_y
```

#### Matrix form
```text
| i_L' |   |  0      1/L    | | i_L |   |  0       1/L    | | Vx |
|      | = |                | |     | + |                 | |    |
| v_C' |   | −1/C  −1/(RC)  | | v_C |   | 1/(RC) −1/(RC)  | | Vy |
```
ẋ = A x + B u with x = [i_L, v_C]ᵀ, u = [V_x, V_y]ᵀ,

A = [[0, 1/L], [−1/C, −1/RC]], B = [[0, 1/L], [1/RC, −1/RC]].

Outputs such as the resistor current are obtained from i_R = (V_x − v_C − V_y)/R. The system has two energy-storing elements, so the order is 2.

Check: the characteristic equation of A is s² + s/(RC) + 1/(LC) = 0, which is the standard parallel RLC (R, L, C) denominator, as expected.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How many state variables are needed and which are chosen?
   A. Two: i_L and v_C, one per energy-storing element
   B. One: the inductor current only
   C. Three: i_L, v_C and i_R
   D. Two: V_x and V_y
   Answer: A. The order equals the number of independent energy-storing elements (L and C); V_x and V_y are inputs. (Key point: Choice of state variables)

2. What is the inductor voltage v_L in terms of the states and inputs?
   A. v_L = v_C - V_y
   B. v_L = v_C + V_y
   C. v_L = V_x - v_C
   D. v_L = V_y
   Answer: B. KVL around the capacitor path gives v_C = v_L - V_y, so v_L = v_C + V_y and L di_L/dt = v_C + V_y. (Key point: Inductor voltage)

3. Which is the correct capacitor state equation?
   A. dv_C/dt = (1/C) i_L - (1/RC) v_C + (1/RC) V_x
   B. dv_C/dt = -(1/C) i_L + (1/RC) v_C - (1/RC) V_x
   C. dv_C/dt = -(1/C) i_L - (1/RC) v_C + (1/RC) V_x - (1/RC) V_y
   D. dv_C/dt = -(1/L) i_L - (1/RC) v_C
   Answer: C. KCL at N: C dv_C/dt = i_R - i_L with i_R = (V_x - v_C - V_y)/R. (Key point: Capacitor equation)

4. Which pair gives the A and B matrices for x = [i_L, v_C], u = [V_x, V_y]?
   A. A = [[0, -1/L],[1/C, -1/RC]], B = [[0, 1/L],[1/RC, 1/RC]]
   B. A = [[0, 1/L],[-1/C, -1/RC]], B = [[1/L, 0],[-1/RC, 1/RC]]
   C. A = [[-1/RC, -1/C],[1/L, 0]], B = [[1/C],[0]]
   D. A = [[0, 1/L],[-1/C, -1/RC]], B = [[0, 1/L],[1/RC, -1/RC]]
   Answer: D. Read the coefficients row by row from the two state equations; the first row is the inductor equation. (Key point: A and B matrices)

## Related in Electrical Circuit Theory

- [Classical: inductor current and capacitor voltage, 100 V](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Aclassical-inductor-current-capacitor-voltage-100v) — Electrical Circuit Theory, chapter 3
- [Classical: capacitor voltage with 200 V source](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Aclassical-capacitor-voltage-200v-100ohm) — Electrical Circuit Theory, chapter 3
- [Classical: capacitor voltage, switch opened, 15 V and 60 V](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Aclassical-capacitor-switch-opened-15v-60v) — Electrical Circuit Theory, chapter 3, asked 2×
- [Classical: capacitor voltage, 10 A source, 0.5 F](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Aclassical-capacitor-voltage-10a-half-ohm) — Electrical Circuit Theory, chapter 3
- [Classical: capacitor voltage, switch opened, 25 V and 60 V](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Aclassical-capacitor-switch-opened-25v-60v) — Electrical Circuit Theory, chapter 3, asked 2×
- [Classical: capacitor voltage, 10 A source, 1 F](https://www.bctengineer.com/question.md?key=semester_3%2Felectrical_circuit_theory%3Aclassical-voltage-capacitor-10a-1f-half) — Electrical Circuit Theory, chapter 3

## Related in other subjects

- [Design Vo = (Vx/Vy)^α·Vz with log-antilog](https://www.bctengineer.com/question.md?key=semester_4%2Fadvanced_electronics%3Adesign-vx-vy-power-alpha) — Advanced Electronics, chapter 6, asked 2×
- [Resistor and capacitor with half voltage](https://www.bctengineer.com/question.md?key=semester_1%2Fbasic_electrical_engineering%3Aadjustable-resistor-25uf-0-8a) — Basic Electrical Engineering, chapter 6
- [State equations of two-source circuit with 2 F](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Ass-two-source-1-2h-2f) — Control Systems, chapter 8
- [State model of two-source RLC circuit](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Ass-model-two-source-circuit) — Control Systems, chapter 8
