New Reply

Control System Question

 
Share Thread Thread Tools
Feb25-13, 12:18 PM   #1
 

Control System Question


I am trying to implement a digital state space control and am confused about something. The system has the standard state space form:
[itex] x(k+1) = Ax(k) + Bu(k)[/itex]
[itex]y(k) = Cx(k)[/itex]

The vector y(k) comes from the sensors measurements and u(k) is what is sent to the actuator, right?
PhysOrg.com
PhysOrg
engineering news on PhysOrg.com

>> PNNL-developed injection molding process recognized with emerging technologies award
>> How soon could car seats enter the 3-D comfort zone?
>> NASA: Austin, calling Austin. 3-D pizzas to go
Feb25-13, 12:28 PM   #2
 
I am confused because I am reading the following in a book that uses standard state space notation:


The flow diagram assumes that the real-time processor provides the following capabilities.

"A real-time clock enabling execution of the update loop at integer multiples of the sampling interval h.

Input devices for reading the plant sensors.

Output devices that enable the controller to drive the plant actuators."
Feb25-13, 01:49 PM   #3
 
If you are talking about a diagram like this:



then Y is your output and U is the input into the system.

Your sensor measurement would happen somewhere after Y and feedback through a controller that would generate U. Remember, the state space diagram is a model of the system you are trying to control and does not include the controller.
Feb25-13, 10:14 PM   #4
 

Control System Question


That block diagram is what we are trying to implement.

So we are measuring two out of four of the states. The system is fully controllable and observable. We want to implement state feedback, and have generated a gain matrix K. So we would like to implement the following algorithm:

1. Get values from sensors, store in [itex]y[/itex].
2. Estimate the state, store in [itex]x[/itex].
3. Calculate [itex]u=-Kx[/itex].
4. Send [itex]u[/itex] to the actuator.
5. Repeat.

Is my logic correct?
Feb26-13, 04:52 AM   #5
 
Sure, if your closed-loop estimator and process poles are placed right.

Does your process model include the dynamics of your actuator though? Otherwise you might not be feeding your process the input you're expecting.
Feb26-13, 01:01 PM   #6
 
No I am not. The system is an inverted pendulum on a cart. The actuator is a DC motor. The value produced for [itex]u[/itex] is the force that is supposed to be applied to the cart to move it.

I would like to just combine the models. How do I do that because the matrices describing the dynamics of the inverted pendulum and the motor are different dimension and also have different state variables.

How do I combine state space models? Here are the models I am using:

Inverted Pendulum:
http://ctms.engin.umich.edu/CTMS/ind...trolStateSpace

Motor:
http://ctms.engin.umich.edu/CTMS/ind...trolStateSpace
Mar2-13, 09:30 AM   #7
 
You generally combine state space models by including their interconnections as internal state information instead.

Here's your 'DC Motor Position' state space model split into electrical and mechanical subsystems:

[tex]
\frac{\mathrm{d}}{\mathrm{dt}}i = -\frac{R}{L}i +
\begin{bmatrix}
\frac{1}{L} & -\frac{K}{L}
\end{bmatrix}
\begin{bmatrix}
V\\
\dot{\theta}
\end{bmatrix}
[/tex]

[tex]
\frac{\mathrm{d}}{\mathrm{dt}}
\begin{bmatrix}
\theta\\
\dot{\theta}
\end{bmatrix} =
\begin{bmatrix}
0 & 1\\
0 & -\frac{b}{J}
\end{bmatrix}
\begin{bmatrix}
\theta\\
\dot{\theta}
\end{bmatrix} +
\begin{bmatrix}
0\\
\frac{K}{J}
\end{bmatrix}i
[/tex]

You can see how they're easily combined by adding more states to account for their interconnections.
Mar2-13, 01:33 PM   #8
 
The variable [itex]\theta[/itex] is what relates the motor to the inverted pendulum system. This is because the torque the motor exerts is converted to the linear force applied to the cart through a pulley gear system.

But I still don't see how I combine their state space models. Do I augment the matrices together - resulting in a higher order system, or do I combine them in some other sense?
Mar2-13, 02:19 PM   #9
 
I used the state space model on the page you have linked to, 'DC Motor Position', as a simple example. I have split it into two state space models (I do not include the output equation for each) so you can see how they're combined to form the model on the 'DC Motor Position' page.

First model has current, i, as state and motor terminal voltage and angular velocity as inputs, V and theta_dot, respectively.

Second model has angular position and angular velocity as states, theta and theta_dot, respectively and current, i, as input.

Can you try to make a combined model of these two? Start with states:
[tex]
\begin{bmatrix}
\theta\\
\dot{\theta}\\
i
\end{bmatrix}
[/tex]
Mar2-13, 02:34 PM   #10
 
Okay, so would the states be augmented like this:

[tex]
\begin{bmatrix}
\theta\\
\dot{\theta}\\
i\\
x\\
\dot{x}\\
\phi\\
\dot{\phi}
\end{bmatrix} [/tex]
Mar2-13, 02:54 PM   #11
 
The variable θ is what relates the motor to the inverted pendulum system. This is because the torque the motor exerts is converted to the linear force applied to the cart through a pulley gear system.
The input for your cart-pendulum model is a force. The DC motor produces torque K*i, so the force applied to the cart will only be a function of current, i. You don't need theta, theta_dot. States could be:

[tex]
\begin{bmatrix}
x\\
\dot{x}\\
\phi\\
\dot{\phi}\\
i
\end{bmatrix}
[/tex]
Mar2-13, 03:39 PM   #12
 
Well, from your equations that separate the electrical and mechanical description of the motor:
[tex]
\frac{\mathrm{d}}{\mathrm{dt}}i = -\frac{R}{L}i +
\begin{bmatrix}
\frac{1}{L} & -\frac{K}{L}
\end{bmatrix}
\begin{bmatrix}
V\\
\dot{\theta}
\end{bmatrix}
[/tex]

[tex]
\frac{\mathrm{d}}{\mathrm{dt}}
\begin{bmatrix}
\theta\\
\dot{\theta}
\end{bmatrix} =
\begin{bmatrix}
0 & 1\\
0 & -\frac{b}{J}
\end{bmatrix}
\begin{bmatrix}
\theta\\
\dot{\theta}
\end{bmatrix} +
\begin{bmatrix}
0\\
\frac{K}{J}
\end{bmatrix}i
[/tex]


The equations written out of matrix notation are:
[itex]
\frac{d}{dt}i=-\frac{R}{L}i + \frac{1}{L}V -\frac{K}{L}\dot{\theta}\\
\frac{d}{dt} \dot{\theta} = -\frac{b}{J} \dot{\theta}+\frac{K}{J}i
[/itex]

But I need to separate [itex] i [/itex] from the variables [itex]V[/itex] and [itex]\theta[/itex] in order to put in in the matrix equation with the state vector you wrote:
[tex]
\begin{bmatrix}
x\\
\dot{x}\\
\phi\\
\dot{\phi}\\
i
\end{bmatrix}
[/tex]

But I can't figure out how to do that. Where is my logic going wrong?
Mar2-13, 03:46 PM   #13
 
You need to know the angular velocity of the motor shaft in order to calculate the back-emf, but if you assume the motor shaft to be connected to the cart through rigid interconnects, then the cart velocity, x_dot, is also a measure of the angular velocity of the motor shaft.

Edit: The motor terminal voltage, V, is still an input to the combined model.
Mar2-13, 04:03 PM   #14
 
Okay, I will walk through what I have done to try to figure out [itex]i[/itex] in terms of [itex] V [/itex]:

[itex]
\frac{d}{dt}i=-\frac{R}{L}i + \frac{1}{L}V -\frac{K}{L}\dot{\theta}\\
\frac{d}{dt} \dot{\theta} = -\frac{b}{J} \dot{\theta}+\frac{K}{J}i
[/itex]


Solve the first equation for [itex]\dot{\theta}[/itex]:
[tex]
\dot{\theta}=-\frac{L}{K} \dot{i} - \frac{R}{K}i +\frac{1}{K}V
[/tex]

Differentiate:
[tex]
\frac{d}{dt}\dot{\theta}=-\frac{L}{K}\frac{d}{dt} \dot{i} - \frac{R}{K}\frac{d}{dt}i +\frac{1}{K}\frac{d}{dt}V
[/tex]

Plug these two equations into the second of the first two equations:
[tex]
(-\frac{L}{K}\frac{d}{dt} \dot{i} - \frac{R}{K}\frac{d}{dt}i +\frac{1}{K}\frac{d}{dt}V) = -\frac{b}{J} (-\frac{L}{K} \dot{i} - \frac{R}{K}i +\frac{1}{K}V)+\frac{K}{J}i
[/tex]

But the terms with the derivatives of [itex]i[/itex] don't fit into the equation with the state vector:
[tex]
\begin{bmatrix}
x\\
\dot{x}\\
\phi\\
\dot{\phi}\\
i
\end{bmatrix}
[/tex]

What am I doing wrong here?
Mar2-13, 04:34 PM   #15
 
You need to fill this out:

[tex]
\frac{\mathrm{d}}{\mathrm{dt}}
\begin{bmatrix}
x\\
\dot{x}\\
\phi\\
\dot{\phi}\\
i
\end{bmatrix} =
\begin{bmatrix}
? & ? & ? & ? & ?\\
? & ? & ? & ? & ?\\
? & ? & ? & ? & ?\\
? & ? & ? & ? & ?\\
? & ? & ? & ? & ?
\end{bmatrix}
\begin{bmatrix}
x\\
\dot{x}\\
\phi\\
\dot{\phi}\\
i
\end{bmatrix} +
\begin{bmatrix}
?\\
?\\
?\\
?\\
?
\end{bmatrix}V
[/tex]

I can not do it for you because I do not know the details of what connects the motor shaft to the cart (I have assumed rigid interconnects). Here are some things you need to get straight before you proceed if you decide to use the state vector I have suggested:

- How is the force applied to the cart related to the motor armature current, i?
- How is the angular velocity of the motor shaft related to the linear velocity of the cart, x_dot?
Mar4-13, 01:42 PM   #16
 
Okay, so referring to my previous post, I am getting to this point:
[tex]
(-\frac{L}{K}\frac{d}{dt} \dot{i} - \frac{R}{K}\frac{d}{dt}i +\frac{1}{K}\frac{d}{dt}V) = -\frac{b}{J} (-\frac{L}{K} \dot{i} - \frac{R}{K}i +\frac{1}{K}V)+\frac{K}{J}i
[/tex]

I can simplify this further to get the last row of the state space equation, but you can already see that the derivatives of [itex]i[/itex] don't fit into the equation:
[tex]
\frac{\mathrm{d}}{\mathrm{dt}}
\begin{bmatrix}
x\\
\dot{x}\\
\phi\\
\dot{\phi}\\
i
\end{bmatrix} =
\begin{bmatrix}
0 & 1 & 0 & 0 & 0 \\
0 & \frac{-(I+ml^2)b}{(M+m)I+Mml^2} & \frac{m^2gl^2}{(M+m)I+Mml^2} & 0 & 0\\
0 & 0 & 0 & 1 & 0\\
0 & \frac{-mlb}{(M+m)I+Mml^2} & \frac{(M+m)mgl}{(M+m)I+Mml^2} & 0 & 0\\
? & ? & ? & ? & ?
\end{bmatrix}
\begin{bmatrix}
x\\
\dot{x}\\
\phi\\
\dot{\phi}\\
i
\end{bmatrix} +
\begin{bmatrix}
0\\
0\\
0\\
0\\
?
\end{bmatrix}V
[/tex]
Mar4-13, 02:45 PM   #17
 
I'm not sure what it is you want from that equation.

As I see it, this:
[tex]
\frac{\mathrm{d}}{\mathrm{dt}}i = -\frac{R}{L}i +
\begin{bmatrix}
\frac{1}{L} & -\frac{K}{L}
\end{bmatrix}
\begin{bmatrix}
V\\
\dot{\theta}
\end{bmatrix}
[/tex]

fits perfectly well into the last row if you can express the angular velocity, theta_dot, as a function of the linear velocity, x_dot.

Also, shouldn't the force applied to the cart affect its acceleration?
New Reply
Thread Tools


Similar Threads for: Control System Question
Thread Forum Replies
control system car park system Engineering, Comp Sci, & Technology Homework 2
control system question Engineering, Comp Sci, & Technology Homework 6
Control System - First order system Engineering, Comp Sci, & Technology Homework 1
DC Motor control system question- random reversals Electrical Engineering 8
Designing a control system for a heating system Engineering, Comp Sci, & Technology Homework 0