State modeling of RL circuit

1. Nov 1, 2013

nbsundaram

Hi.. This is sundaram, I'm trying to learn state space modeling, I'm trying to model the simple RL series circuit, to control/read the current flowing through inductor.

I could find the way to monitor the voltage across inductor. as below

x'=(u - Rx)*(1/L)
y=(u - Rx)

where:
x => i (current), x' => di/dt
R=> resistance & L=> inductance
u is the applied voltage
y=> the voltage across inductor

can any one help me in framing the state space equation to control I

Sundaram..

2. Nov 1, 2013

meBigGuy

I'm too lazy to figure out and rewrite your variables.

Rewrite it with I, V, and R and subscripts.

I'm not sure what you mean by state space, but maybe it will be clear when you rewrite the equations.

3. Nov 2, 2013

weavertri

hello sundaram...
you did right... lemme call the current that is flowing through the inductor iL = x1
using kirchhoff voltage law you got

x1' = u/L - (R/L)*X1

to "control" your current you just need to use y = x1

in MATLAB you can use
A = [-R/L]
B = [u/L]
C = [1]
D = 0
sys = ss(A,B,C,D)
step(sys)
it will show you the step response of your system using the current as output. :D

Last edited: Nov 2, 2013