# How can I control the current in an RL circuit using state space modeling?

• nbsundaram
In summary, Sundaram is trying to learn state space modeling and is attempting to model a simple RL series circuit to control and read the current flowing through an inductor. He has found a way to monitor the voltage across the inductor using the equations x'=(u - Rx)*(1/L) and y=(u - Rx), where x represents current, x' represents di/dt, R represents resistance, L represents inductance, u represents applied voltage, and y represents voltage across the inductor. Sundaram is seeking help in framing the state space equation to control the current. In response, the speaker suggests using iL for current, and provides equations and MATLAB code to achieve this.
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 anyone help me in framing the state space equation to control I

Sundaram..

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.

hello sundaram...
you did right... let me 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:

## 1. What is state modeling of RL circuit?

State modeling of RL circuit is a mathematical representation of the behavior of an RL (resistance-inductance) circuit. It uses a set of differential equations to describe the relationship between the current, voltage, and inductance in the circuit.

## 2. Why is state modeling of RL circuit important?

State modeling of RL circuit is important because it allows us to predict the behavior of the circuit and analyze its performance. It also enables us to design and optimize the circuit for specific applications.

## 3. How is state modeling of RL circuit different from other circuit modeling techniques?

State modeling of RL circuit differs from other circuit modeling techniques, such as Kirchhoff's circuit laws, in that it takes into account the time-varying behavior of inductors. This makes it more accurate for analyzing circuits with inductive components.

## 4. What are the advantages of using state modeling of RL circuit?

The advantages of state modeling of RL circuit include its ability to predict circuit behavior over time, its accuracy in analyzing circuits with inductive components, and its usefulness in circuit design and optimization.

## 5. Can state modeling of RL circuit be applied to other types of circuits?

Yes, state modeling techniques can be applied to various types of circuits, including RC (resistance-capacitance) circuits, RLC (resistance-inductance-capacitance) circuits, and even more complex circuits with multiple components.

Replies
15
Views
3K
Replies
2
Views
839
Replies
1
Views
1K
Replies
12
Views
2K
Replies
5
Views
1K
Replies
10
Views
4K
Replies
4
Views
1K
Replies
1
Views
1K
Replies
4
Views
2K
Replies
2
Views
1K