0% found this document useful (0 votes)
39 views8 pages

Assignment 4 Alcisto Instrumentation and Control

1) The document presents a circuit analysis to derive a state space model. Mesh analysis is used to obtain differential equations relating the currents and voltages. 2) State variables are defined as the currents and voltages to write the differential equations in state space form. 3) A 4x4 state space model is obtained relating the derivatives of the 4 state variables to the state variables and 2 inputs. Output equations relating the outputs to the state variables are also presented.

Uploaded by

matt Donor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views8 pages

Assignment 4 Alcisto Instrumentation and Control

1) The document presents a circuit analysis to derive a state space model. Mesh analysis is used to obtain differential equations relating the currents and voltages. 2) State variables are defined as the currents and voltages to write the differential equations in state space form. 3) A 4x4 state space model is obtained relating the derivatives of the 4 state variables to the state variables and 2 inputs. Output equations relating the outputs to the state variables are also presented.

Uploaded by

matt Donor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

EE-PC 4117: INSTRUMENTATION AND CONTROL

Assignment #4: Circuit on Quiz


Submitted By: Submitted To:
LESTER LUKE ALCISTO ENGR. JAYSON C. JUECO
BSEE 4-H INSTRUCTOR

I. I NTRODUCTION Mesh 2:
di2 (t)
v1 (t) − L2 − u2 (t) − R1 i2 (t) = 0
dt
In this paper, we create a state space model for the di2 (t)
given system shown in Figure 1. We define the transfer L2 = v1 (t) − u2 (t) − R1 i2 (t) (2)
dt
functions that relates the output y(t) to the input u(t) di2 (t) R1 1 1
from the state space model. We also represent the state = − i2 (t) + v1 (t) − u2 (t)
dt L2 L2 L2
space model into its phase variable.
Current across capacitor 1
dv1 (t)
i3 (t) = C1 ; where i3 (t) = i1 (t) − i2 (t)
dt
dv1 (t)
i1 (t) − i2 (t) = C1 (3)
dt
dv1 (t) 1 1
= i1 (t) − i2 (t)
dt C1 C1
Current across capacitor 2
dv2 (t)
i1 (t) = C2
dt
(4)
Fig. 1: Electrical Circuit for the Given System dv2 (t) 1
= i1 (t)
dt C2

The system consists of a voltage inputs, u1 (t) Then, we set the ouput equations:
and u2 (t), a resistor, R1 , inductors, L1 and L2 , and di1 (t) di1 (t)
capacitors, C1 and C2 . The current and voltages across y(t)L1 = L1 ; where = eqn. 1
dt dt
each elements are shown in Figure 1. The goal is to get y(t)L1 = −v1 (t) − v2 (t) + u1 (t) (5)
the output y(t) of all the circuit elements. The values
di2 (t) di2 (t)
of each elements are R1 = 10Ω, L1 , L2 = 2H, C1 , y(t)L2 = L2 ; where = eqn. 2
C2 = 10µF , V1 , V2 = 10V . dt dt
y(t)L2 = −R1 i2 (t) + v1 (t) − u2 (t) (6)
y(t)C1 = v1 (t) (7)
We apply mesh analysis to obtain the first-order
differential equations: y(t)C2 = v2 (t) (8)
y(t)R1 = R1 i2 (t) (9)
Mesh 1: II. S TATE S PACE M ODEL
In this paper, we define the state variables
di1 (t) di1 (t)
u1 (t) − L1 − v1 (t) − v2 (t) = 0 x1 = i1 (t) ẋ1 =
dt dt
di1 (t) di2 (t)
L1 = u1 (t) − v1 (t) − v2 (t) (1) x2 = i2 (t) ẋ2 =
dt dt
di1 (t) 1 1 1 dv1 (t)
= − v1 (t) − v2 (t) + u1 (t) x3 = v1 (t) ẋ3 = (10)
dt L1 L1 L1 dt
dv2 (t)
x4 = v2 (t) ẋ4 =
dt
EE-PC 4117: INSTRUMENTATION AND CONTROL

We replace the time-domain variables in the first-order as


differential equations (1 - 9) with the state variables   
0 0 − L11 − L11

ẋ1
(10) to derive the state space equations of the system. ẋ2   0 − R1 1
0 
 = 1 L2 L2
We obtain the state space equations as 1

ẋ3  
C1 − C1 0 0 
ẋ4 1
C 0 0 0
 2  1 
x1 (t) L1 0
1 1 1 x2 (t)  0 − 1 

u1 (t)

ẋ1 = − x3 − x4 + u1 (t) (11) · + L 2 ·
L1 L1 L1
   
x3 (t)  0 0  u2 (t)
R1 1 1 x4 (t) 0 0
ẋ2 = − x2 + x3 − u2 (t) (12)
L2 L2 L2  
x1 (t)
1 1  
ẋ3 = x1 − x2 (13)   x2 (t)   u1 (t)
C1 C1 y(t)L1 = 0 0 −1 −1 ·    + 1 0 ·
x3 (t) u2 (t)
1
ẋ4 = x1 (14) x4 (t)
C2  
x1 (t)
y(t)L1 = −x3 − x4 + u1 (t) (15)  x2 (t) 
 
  u1 (t)
y(t)L2 = −R1 x2 + x3 − u2 (t) (16) y(t)L2 = 0 −R1 1 0 ·  x3 (t)
 + 0 −1 ·
u2 (t)
y(t)C1 = x3 (17) x4 (t)
 
y(t)C2 = x4 (18) x1 (t)  
y(t)R1 = R1 x2 (19)   x2 (t)   u1 (t)
y(t)C1 = 0 0 1 0 ·  x3 (t)
+ 0 0 ·
u2 (t)
x4 (t)
 
We derive the state space system representation x1 (t)  
 x2 (t)  u1 (t)
from the equations (11 - 19). The state space system
 
y(t)C2 = 0 0 0 1 ·    + 0 0 ·
representation is defined by x3 (t) u2 (t)
x4 (t)
 
x1 (t)  
  x2 (t)   u1 (t)
y(t)R1 = 0 R1 0 0 ·  x3 (t)
+ 0 0 ·
ẋ(t) = Ax(t) + Bu(t) u2 (t)
(20) x4 (t)
(22)
y(t) = Cx(t) + Du(t)

where A, B, C, and D are system, input, output, and


feedforward matrices respectively.
Then, we set the state space matrices as

− L11 − L11
1
0 0
  
L1 0
0 −R 1
L2
1
L2 0  1 
 ; B =  0 − L2 

A=
 1 1
C1 − C1 0 0   0 0 
1
C2 0 0 0 0 0
   
0 0 −1 −1 1 0
0
 −R1 1 0
0 −1
 
0
C= 0 1 0 ; D= 0 0 
 
0 0 0 1   0 0
0 R1 0 0 0 0
(21)

We substitute these state space matrices (21) to the equa-


tion in (20) to get the state space system representation
EE-PC 4117: INSTRUMENTATION AND CONTROL

We obtain a state space model with numerical values A. Solving the Inverse of (sI - A)
by substituting the values of each circuit element in The inverse of (sI - A) is defined by
Section I. The state space model is defined as iT
−1 1 h
−1
(sI − A) = adjoint (sI − A) .
   
ẋ1 0 0 −0.5 −0.5
det (sI − A)
ẋ2   0
 = 8 −5 0.5 0   (26)
ẋ3  10 −108 0 0 
ẋ4 108 0 0 0 Initially, we solve for the value of (sI - A) and get
       
x1 (t) 0.5 0   s 0 0 0 0 0 −0.5 −0.5
x2 (t)  0 −0.5 u1 (t) 0 s 0 0  0 −5 0.5 0 
·  +   · (sI − A) =  0 0 s 0 − 108 −108
  
x3 (t)  0 0  u2 (t) 0 0 
x4 (t) 0 0 0 0 0 s 108 0 0 0
   
x1 (t) s 0 0.5 0.5
  x2 (t)  0 s + 5 −0.5 0
y(t)L1 = 0 0 −1 −1 ·   = −108 108
 (27)
x3 (t) s 0
x4 (t) −108 0 0 s
 
  u1 (t) Next, we calculate the determinant of (sI - A) and acquire
+ 1 0 ·
u2 (t)  
  s + 5 −0.5 0
x1 (t) det(sI − A) = (s) · det  108 s 0
 x2 (t)
0 0 s

y(t)L2 = 0 −10 1 0 ·  x3 (t)

 
x4 (t) 0 −0.5 0
  − (0) · det −108 s 0
  u1 (t) −10 8
0 s
+ 0 −1 ·
u2 (t)  
  0 s+5 0
x1 (t)   + (0.5) · det −108 108 0
 x2 (t)  u1 (t) −108 0 s
 
y(t)C1 = 0 0 1 0 ·  x3 (t)
+ 0 0 ·
u2 (t)  
x4 (t) 0 s + 5 −0.5
  − (0.5) · det −108 108 s 
x1 (t)   −108 0 0
  x2 (t)   u1 (t)
y(t)C2 = 0 0 0 1 ·  
x3 (t)
 + 0 0 ·
u2 (t) det(sI − A) = s4 + 5s3 + 1.5 × 108 s2 + 5 × 108 s + 2.5 × 1015
x4 (t) (28)
 
x1 (t)  
  x2 (t)   u1 (t)
y(t)R1 = 0 10 0 0 ·
  + 0 0 ·
x3 (t) u2 (t)
x4 (t)
(23)
III. T RANSFER F UNCTION
The transfer function G(s) is a ratio of output Y(s)
and input U(s) of the system. We can derive the transfer
function from the state space equation (20). Initially, we
apply Laplace transform to the state space equation (20)
and set the initial condition for system equal to zero.
The state space equation in phase domain is defined as
sX(s) = AX(s) + BU (s)
Y (s) = CX(s) + DU (s). (24)
We equate the equations in (24) and define the transfer
function as
Y (s) −1
G(s) = = C (sI − A) B + D. (25)
U (s)
where I is an identity matrix.
EE-PC 4117: INSTRUMENTATION AND CONTROL

s3 + 5s2 + 5 × 107 s 5 × 107 s 108 s2 + 5 × 108 s 108 s2 + 5 × 108 s + 5 × 1015


 

 5 × 107 s s3 + 108 s −108 s2 − 5 × 1015 5 × 1015 

 −0.5s2 − 2.5s 0.5s2 + 2.5 × 107 s + 5s2 + 5 × 107 s + 2.5 × 108
3
−5 × 107 s − 2.5 × 108 
−0.5s − 2.5s − 2.5 × 107
2
−2.5 × 107 −5 × 107 s − 2.5 × 108 s3 + 5s2 + 108 s + 2.5 × 108
(29)

Fig. 2: Cofactor (sI − A)

s3 + 5s2 + 5 × 107 s 5 × 107 s −0.5s2 − 2.5s −0.5s2 − 2.5s − 2.5 × 107


 

 5 × 107 s s3 + 108 s 0.5s2 + 2.5 × 107 −2.5 × 107 

 10 s2 + 5 × 108 s
8
−10 s − 5 × 1015
8 2
s + 5s + 5 × 107 s + 2.5 × 108
3 2
−5 × 107 s − 2.5 × 108 
10 s + 5 × 108 s + 5 × 1015
8 2
5 × 1015 −5 × 107 s − 2.5 × 108 s3 + 5s2 + 108 s + 2.5 × 108
(30)

Fig. 3: Adjoint (sI − A)

s3 + 5s2 + 5 × 107 s 5 × 107 s −0.5s2 − 2.5s −0.5s2 − 2.5s − 2.5 × 107


 

 5 × 107 s 3
s + 10 s8
0.5s2 + 2.5 × 107 −2.5 × 107 

 10 s + 5 × 108 s
8 2 8 2
−10 s − 5 × 10 15
s + 5s + 5 × 107 s + 2.5 × 108
3 2 7
−5 × 10 s − 2.5 × 10 8 
10 s + 5 × 108 s + 5 × 1015
8 2
5 × 10 15
−5 × 107 s − 2.5 × 108 3 2 8
s + 5s + 10 s + 2.5 × 10 8

s + 5s + 1.5 × 10 s + 5 × 108 s + 2.5 × 1015


4 3 8 2

Fig. 4: Inverse (sI − A)

Then, we solve for the adjoint of (sI - A). We solve


for each elements of the cofactor of (sI - A) by
   
s + 5 −0.5 0 s 0 0.5
A11 = +det  108 s 0 A24 = +det −108 108 s 
0 0 s −108 0 0
   
0 −0.5 0 0 0.5 0.5
A12 = −det −108 s 0 A31 = +det s + 5 −0.5 0 
−108 0 s 0 0 s
   
0 s+5 0 s 0.5 0.5
A13 = +det −108 108 0 A32 = −det  0 −0.5 0 
−108 0 s −108 0 s
   
0 s + 5 −0.5 s 0 0.5
A14 = +det −108 108 s  A33 = +det  0 s+5 0 
8
−10 0 0 −108 0 s
   
0 0.5 0.5 s 0 0.5
A21 = −det 108 s 0 A34 = −det  0 s+5 −0.5
0 0 s −108 0 0
   
s 0.5 0.5 0 0.5 0.5
A22 = +det −108 s 0 A41 = −det s + 5 −0.5 0 
−108 0 s 108 s 0
   
s 0 0.5 s 0.5 0.5
A23 = −det −108 108 0  A42 = +det  0 −0.5 0 
−108 0 s −108 s 0
(31)
EE-PC 4117: INSTRUMENTATION AND CONTROL

 
s 0 0.5
A43 = −det  0 s+5 0 
−108 108 0
 
s 0 0.5
A44 = +det  0 s+5 −0.5
−108 108 s

Fig. 8: Matrix D for Capacitor 1


Solve for the determinants of the matrices in equation
(20) and create the cofactor matrix of (sI - A). We defined
the cofactor matrix of (sI - A) as shown in Figure: 2. The
adjoint of (sI - A) is the tranpose of the cofactor matrix
of (sI - A). The adjoint of (sI - A) as shown in Figure:
3. Finally, the inverse of (sI - A) as shown in Figure: 4
B. Solving for the Transfer Function in MATLAB
First, we will call the respective matrix variables.

Fig. 9: Matrix C for Capacitor 2

Fig. 5: Matrix A

Fig. 10: Matrix D for Capacitor 2

Fig. 6: Matrix B

Fig. 11: Matrix C for Inductor 1

Fig. 12: Matrix D for Inductor 1


Fig. 7: Matrix C for Capacitor 1
EE-PC 4117: INSTRUMENTATION AND CONTROL

the input signal in terms of factors like attenuation,


phase shift, and impedance. Comprehending these trans-
fer functions is essential to understanding the circuit’s
overall behavior and how it reacts to input stimuli.

Fig. 13: Matrix C for Inductor 2 Fig. 17: Capacitor 1 Transfer Function

Fig. 18: Capacitor 2 Transfer Function

Fig. 14: Matrix D for Inductor 2

Fig. 19: Inductor 1 Transfer Function

Fig. 20: Inductor 2 Transfer Function

Fig. 15: Matrix C for Resistor

Fig. 21: Resistor Transfer Function

Fig. 16: Matrix D for Resistor

Transfer functions, which represent a system’s behav-


ior in terms of impedance, frequency response, and other
pertinent parameters, define the relationship between an
input and output in a circuit analysis. Resistors, capaci-
tors, and inductors are examples of passive components
that distribute or store energy rather than add gain or
amplify signals in a circuit. Explaining their transfer
functions helps to clarify how these components impact
EE-PC 4117: INSTRUMENTATION AND CONTROL

C. Transfer Functions in MATLAB


• Transfer Function of Capacitor 1
 7 7

5×10 5×10
− s4 +5×103 s3 +1.5×108 s2 +5×108 s+2.5×1015 − s4 +5×103 s3 +1.5×108 s2 +5×108 s+2.5×1015

• Transfer Function of Capacitor 2


 7

5×10
− s4 +5×101 s3 +1.5×108 s2 +5×108 s+2.5×1015 0

• Transfer Function of Inductor 1


 
1×108 5×107
s4 +5 s3 +1.5×108 s2 +5×108 s+2.5×1015
+1 s4 +5 s3 +1.5×108 s2 +5×108 s+2.5×1015

• Transfer Function of Inductor 2


 7

5(s+5) 5×107
− s4 +5s3 +1.5×1085×10
s2 +5×108 s+2.5×1015 , s4 +5s3 +1.5×108 s2 +5×108 s+2.5×1015 − s4 +5s3 +1.5×108 s2 +5×108 s+2.5×1015 −1

• Transfer Function of Resistor


 
0 − s4 +5 s3 +1.5×1085 s(s+5)
2 +5×108 s+2.5×1015

IV. C ONCLUSION
In electrical engineering, transfer functions are es-
sential for both circuit analysis and design. By cre-
ating a link between input and output signals, they
help engineers understand how external stimuli affect
a system’s behavior. Without the need for complex
mathematical models, engineers can accurately predict
circuit behavior and expedite the design process by
employing transfer functions. Transfer functions also aid
in determining system parameters and provide assistance
during troubleshooting, which ultimately improves the
dependability of electrical systems. Their versatility en-
compasses a wide range of disciplines, including control
theory, communication systems, and signal processing.
Furthermore, by taking into account state variables and
their derivatives, the idea of state space enhances transfer
functions by offering a thorough comprehension of a
system’s internal dynamics. This all-encompassing per-
spective encourages progress in fields such as robotics.

You might also like