Module 2.3: State Variable Models of Electrical Systems directly from

advertisement
Module 2.3: State Variable Models of Electrical
Systems directly from circuit schematic
Revision: May 28, 2007
Produced in cooperation with
www.digilentinc.com
Overview
This module presents a second approach for generating state variable models of electrical systems.
The approach presented here consists of defining state variables directly in terms of circuit variables
on the circuit schematic. The state equations are then generated by writing Kirchoff’s Current Law
(KCL) and Kirchoff’s Voltage Law (KVL) directly in terms of these state variables.
Before beginning this module, you should
be able to:
•
•
•
Identify state variables for an electrical
system from a schematic of the system
Apply Kirchoff’s Voltage Law and
Kirchoff’s Current Law to electrical
circuits with energy storage elements
Perform basic linear algebra tasks
After completing this module, you should be
able to:
•
Determine an appropriate state variable
model for an electrical system from a
schematic of the circuit
This module requires:
•
N/A
Contains material © Digilent, Inc.
5 pages
®
Module 2.3: State Variable Models of Electrical Systems directly from circuit
schematic
Page 2 of 5
In this module, the system is assumed to be a single input, single output (SISO) system. An overall
block diagram of the system is shown in Figure 1. The input is an arbitrary function of time, u(t) and
the system output is y(t), the parameter we wish to determine.
u(t)
System
y(t)
Figure 1. Overall system block diagram.
It is desired to determine an appropriate mathematical model for the system in state variable model
form:
x& (t ) = A x (t ) + bu (t )
y (t ) = c x (t ) + du (t )
Ex 1 6
(1)
(2)
In this module, we will discuss creation of state variable models for electrical circuits. The approach
presented in this module is to define state variables directly in terms of circuit variables and write the
state equations by writing Kirchoff’s Current Law (KCL) and Kirchoff’s Voltage Law (KVL) directly in
terms of these state variables.
In this approach, state variables are assigned based on the observation that the system state is
dependent upon the energy stored in all elements of the system. Therefore, state variables are
defined in terms most closely related to the energy stored in the system: the currents through
inductors and the voltage differences across capacitors. (See Module2.1 for a discussion and more
detailed justification for this choice.) Assuming that no algebraic constraint equations exist which
relate these parameters, this approach will result in the choice of N state variables for an Nth order
system.
Key Points:
1. State variables describe the energy stored in all elements in the system. Choosing state
variables as voltages across capacitors and currents through inductors is appropriate for
electrical systems, since these variables uniquely define the energy of all elements in the
circuit.
2. Constraint equations are algebraic equations which relate two or more state variables. State
variables related by algebraic constraints are not independent; the constraint equations must
be used to eliminate all but one of the state variables interrelated by the constraint equations.
Example 1:
Consider the circuit shown in Figure 2. The input to the system is an applied voltage, u(t). We wish to
determine the voltage across the resistor, y(t). We choose the voltage across the capacitor to be our
first state variable, x1, and the current through the inductor to be our second state variable, x2.
Module 2.3: State Variable Models of Electrical Systems directly from circuit
schematic
Page 3 of 5
Figure 2. Example electrical circuit.
Applying KVL around the loop results in the following first order differential equation:
u (t ) = x1 (t ) + Lx& 2 + Rx 2
(3)
where the over-dot denotes differentiation with respect to time.
Applying KCL at the node connecting the capacitor and the inductor also results in a first order
differential equation:
Cx&1 = x 2
(4)
Note that equation (3) contains a first order derivative in the state variable x1, with no other derivative
terms. Likewise, equation (4) contains a first order derivative in the state variable x2, with no other
derivative terms. Thus, equations (3) and (4) are easily placed in the matrix form of the state
equations as given in equation (1):
⎡ 1
⎡ x&1 ⎤ ⎢− L
⎢ x& ⎥ = ⎢
⎣ 2⎦ ⎢ 0
⎣
R⎤
⎡1⎤
L ⎥ ⎡ x1 ⎤ + ⎢ ⎥u (t )
1 ⎥ ⎢⎣ x 2 ⎥⎦ ⎢ L ⎥
⎥
⎣0⎦
C ⎦
−
(5)
Example 2:
Consider the circuit shown in Figure 3. The input to the system is the voltage u(t), and the output
variable is the voltage across the resistor, y(t). There are three energy storage elements in the
system (two inductors and a capacitor) so we will expect the system to be third order with three state
variables. These state variables are chosen to be the currents through the inductors and the voltage
difference across the capacitor, as shown in Figure 3.
Figure 3. Circuit for example 2.
Module 2.3: State Variable Models of Electrical Systems directly from circuit
schematic
Page 4 of 5
We now write the state equations (1) by applying KVL and KCL to the circuit. Since there are three
state variables, three state equations must be written. Applying KVL around the leftmost loop results
in:
u (t ) = L1 x&1 + x3
(6)
Applying KVL around the rightmost loop results in:
x3 = L2 x& 2 + Rx 2
(7)
Note that in equation (7), the voltage across the resistor is written as Rx2, rather than y. This is
consistent with the format of equations (1) which requires that the derivative of each state variable be
written only in terms of the other state variables and the input. Our final state equation is obtained by
applying KCL at the node interconnecting the two inductors and the capacitor:
x1 = x 2 + Cx& 3
(8)
Equations (6), (7), and (8) can be re-written in matrix form as:
⎡ 0
⎡ x&1 ⎤ ⎢
⎢ x& ⎥ = ⎢ 0
⎢ 2⎥ ⎢
⎢⎣ x& 3 ⎥⎦ ⎢ 1
⎣ C
0
−R
L2
−1
C
−1 ⎤
L1 ⎥ ⎡ x1 ⎤ ⎡
⎢
1 ⎥ ⎢ x2 ⎥ + ⎢
L2 ⎥ ⎢ ⎥ ⎢
0 ⎥ ⎢⎣ x3 ⎥⎦ ⎣⎢
⎦
1 ⎤
L1 ⎥
0 ⎥u (t )
0 ⎥⎥
⎦
(9)
It should be noted that equations (6), (7), and (8) are not the only equations which can be written to
describe the system. We can apply KVL around the entire outer loop to obtain:
u (t ) = L1 x&1 + L2 x& 2 + Rx 2
(10)
This equation is perfectly correct but it is not independent of the equations written previously; it can be
obtained by adding equations (6) and (7). Thus, equation (10) provides no information not contained
in the above state variable model described by equation (9). The state variable model of equation (9)
could be obtained by writing equation (7), (8), and (10). Equation (10), however, is not written such
that it can directly be placed in the matrix form of equation (1) – we need to substitute equation (7)
into equation (10), and eliminate x& 2 in order to get a state equation in x&1 . This, of course, leads us to
write equation (6) again.
Observation: Writing KVL around a loop which contains only a single inductor and no current sources
results in an equation which is easily placed in state variable equation form. Likewise, writing KCL at
a node to which only a single capacitor and no voltage sources results in an equation which is easily
placed in state variable equation form.
Solving the state equation (9) for the system states as a function of time allows us to determine any
parameter of interest in the circuit. Our output variable is the voltage across the resistor, R. Thus, we
can write the equation describing the desired output in terms of the state variables and the input, per
equation (2). For our example, this simply becomes a statement of Ohm’s Law:
Module 2.3: State Variable Models of Electrical Systems directly from circuit
schematic
⎡ x1 ⎤
y (t ) = [0 R 0]⎢⎢ x 2 ⎥⎥ + 0 ⋅ u (t )
⎢⎣ x3 ⎥⎦
Equations (9) and (11) form a state variable model of the system of Example 2.
Page 5 of 5
(11)
Download