A836 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A8 · Lesson 36 · State space, previewed

Many first-order equations instead of one high-order one

A circuit with three capacitors and two inductors gives a fifth-order differential equation, and writing it as one equation is a mess. There's a cleaner way to keep track. Every capacitor's voltage and every inductor's current is something the circuit remembers from one instant to the next. List them all as a vector, and the circuit's whole behavior is one matrix equation: the vector's rate of change is a matrix times the vector. The matrix's eigenvalues from A7 turn out to be the roots you've been finding by hand.

Play

  • This is a series RLC circuit drawn in its state plane: the capacitor's voltage across, the inductor's current up. Each segment shows which way the state moves from that point.
  • The curve starts at 5 V with no current. Follow it. Where does it end up, and how does it get there?
  • Raise R past about 63 Ω. How does the path change? Set R = 0.

Predict

With R = 0, what path does the state follow?

Name it

State variables and the state equation

State variables are the quantities a circuit stores: capacitor voltages and inductor currents. Knowing them now, plus the inputs from now on, is enough to predict everything later. A circuit with n independent energy-storing parts has n state variables, and an nth-order equation becomes n first-order ones.

The series RLC. Take v (capacitor) and i (inductor). The capacitor's law gives v˙=i/C; the loop around the circuit gives Li˙=vs−v−Ri. As a matrix:

ddt[vi]=[01/C−1/L−R/L][vi]+[01/L]vs

which is the general state equation

𝐱˙=A𝐱+B𝐮

Any high-order equation converts. For y¨+py˙+qy=u, choose x1=y and x2=y˙. Then x˙1=x2 and x˙2=−qx1−px2+u, so

A=[01−q−p]

Eigenvalues are the characteristic roots. For the RLC matrix,

det⁡(sI−A)=s2+RLs+1LC

exactly the characteristic polynomial of lesson 17. In general, the natural response is built from eλt for each eigenvalue λ of A, and each eigenvector is a mode: a direction in the state plane along which the state simply shrinks (or spirals) without changing direction. The full solution is the matrix exponential, 𝐱(t)=eAt𝐱(0), which course A10 and the controls survey build on.

Why bother. State form handles circuits with many loops and many sources without special cases, it's the form computers solve (lesson 45), and it's the language of control systems. The phase portrait in the sim is the state equation drawn directly.

Worked example

Write y¨+3y˙+2y=0 in state form and find the eigenvalues.

Show the solution
  1. State form. With 𝐱=(y,y˙), 𝐱˙=[01−2−3]𝐱
  2. Eigenvalues. Trace −3, determinant 2, so λ2+3λ+2=0 which gives λ=−1,−2.

Answer with 𝐱=(y,y˙) the state matrix has rows (0,1) and (−2,−3), and its eigenvalues are −1 and −2.

Worked example

Find the state matrix of a series RLC with R = 10 Ω, L = 1 mH, C = 10 µF, using 𝐱=(vC,iL).

Show the solution
  1. State equations. v˙C=iL/Ci˙L=(−vC−RiL)/L
  2. State matrix. A=[0105−1000−104]
  3. Check with the determinant. The determinant 108=1LC gives ω0=104 rad/s.

Answer A has rows (0,105) and (−1000,−104); its determinant gives ω0=104 rad/s.

Worked example

Write mx¨+cx˙+kx=F in state form for m = 2 kg, c = 4 N·s/m and k = 10 N/m, and find the eigenvalues.

Show the solution
  1. State form. With state (x,x˙), the second row comes from the equation solved for x¨: ddt[xx˙]=[01−k/m−c/m][xx˙]+[01/m]F
  2. Put in the numbers. ddt[xx˙]=[01−5−2][xx˙]+[00.5]F
  3. Eigenvalues. They solve λ2+2λ+5=0 so λ=−1±2j.
  4. What they mean. It rings at 2 rad/s inside an envelope e−t.

Answer the state matrix has rows (0,1) and (−5,−2) and the input vector is (0,0.5); the eigenvalues are −1±2j, so it rings at 2 rad/s inside an e−t envelope.

Check

Write y¨+6y˙+8y=0 in state form with x1=y, x2=y˙, as 𝐱˙=A𝐱.

(a)

What is the bottom-left entry of A?

(b)

What is the eigenvalue of A closest to zero?

Check

In the RLC state matrix with R = 47 Ω and L = 1.5 mH, what is the bottom-right entry, in 1/s?

Check

A circuit has two capacitors and one inductor, none of them in parallel or series with each other. How many state variables does it need?

Check

What is the slower eigenvalue of A=[−330−6]?

Check

In a state-plane picture, the path spirals into the origin. What kind of response is this?

Check

Put mx¨+cx˙+kx=F with m = 2, c = 2, k = 20 in state form (x,x˙).

(a)

What is the bottom-left entry of A?

(b)

What is the trace of A?

Check

Write a series RLC in state form with 𝐱=(vC,iL): Cv˙C=iL and Li˙L=−vC−RiL.

Step 1

What is the bottom-right entry of A?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why are capacitor voltages and inductor currents the natural choice of state variables for a circuit?

Practice

Keep practicing

7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.