#### Transcript State equations revisited

```State Equations
BIOE 4200
Processes

A process transforms input to output
 States are variables internal to the process
that determine how this transformation occurs
u1(t)
M
inputs
u2(t)
y1(t)
y1(t)
...
...
um(t)
N state variables
x1(t)
x2(t)
.
.
.
xn(t)
yp(t)
P
outputs
State Variables





Inputs u(t) and outputs y(t) evolve with time t
Inputs u(t) are known, states x(t) determine
how outputs y(t) evolve with time
States x(t) represent dynamics internal to the
process
Knowledge of all current states and inputs is
required to calculate future output values
Examples of states include velocities,
voltages, temperatures, pressures, etc.
Equations and Unknowns

Derive mathematical equations based on
physical properties to find a quantity of
interest
– Find the velocity of the first mass in a two-mass
system
– Find the voltage across a resistor in an electrical
circuit with 3 nodes

Should have same number of equations and
unknowns
– Two mass system should yield two differential
equations based on Newton’s 2nd law
– Three node circuit should yield three differential
equations based on Kirchoff’s Current Law
Finding State Variables

Constants k1, k2, ... are known values that
describe the physical properties of the system
 Inputs u1, u2, ... are variables representing
known quantities that vary with time
– Known force or displacements on elements of the
mechanical system
– Voltage and or current sources in circuit

State variables x1, x2, ... are remaining
unknown quantities that vary with time
– Velocities of each mass in a two-mass system
– Voltages at each node of the electrical circuit
Obtaining State Equations




Express original equations as 1st order differential
equations of with state variables: dx/dt = f(x, u)
derivatives are present
d2
d
x  kx  let x1  x, x 2  x
2
dt
dt
d
d
then x1  x 2 and x 2  kx1
dt
dt
Outputs y1, y2, ... are quantities you originally wanted
to find
Output can be expressed as a combination of states
and/or inputs: y = g(x, u)
Obtaining State Equations



Obtain necessary equations to solve problem
Identify constants ki, inputs ui and states xi
Rearrange equations into the form dx/dt = f(x, u)
– Introduce additional states to eliminate higher order
derivatives

Express output as a function of states and input
– y = g(x, u)
– Outputs y(t) can equal individual states x(t) by setting some
elements of C = 1 and all elements of D = 0
– Input u(t) can also be directly incorporated into the output if
D0

Equations can be represented in matrix form if state
derivatives and outputs are linear combinations of
states and inputs
Matrix Form of State Equations





State equation
x(t) is N x 1 state vector
u(t) is M x 1 input vector
A is N x N state
transition matrix
B is N x M matrix




Output equation
y(t) is P x 1 output
vector
C is P x N matrix
D is P x M matrix



dx(t)
 A  x(t)  B  u(t)
dt



y(t)  C  x(t)  D  u(t)
```