• Increase font size
  • Default font size
  • Decrease font size

LTI systems 2

After all the theory we went through in the part 1 it is time for a real design of control system. In this part we are about to design a full state feedback control system of the magnetically suspended ball.

1. Mathematical model

Let's first mathematically describe a behavior of the magnetically suspended ball. It is an iron ball with a weight M that is situated under the electromagnet. There are basically two forces acting on the ball:

1. gravitational force,
2. force of the magnet with the opposite direction to the magnetic one.

Since the forces have opposite direction they are acting against each other = one will be subtracted from the other one.

Let's create a mathematical formulation of the behavior of the ball and magnet. That means let's create a mathematical model of the system.

\begin{aligned} \ddot{x} = g - \frac{c}{M} \frac{i}{x} \qquad (1)\end{aligned}

c = 1 [N*m/A] is a proportionality constant included to make sense of the units.

g = 10 m/s^2 (usually is 9.81, but 10 is pretty close and easy to calculate)

i = current through the coil. The bigger the current is, the stronger is the magnetic force.

x = position of the ball with respect to the magnet = distance from the magnet

M = weight of the iron ball - 0.05kg

$\ddot{x}$ = 2nd derivative of the position = acceleration

Due to a learning purpose it is a very simplified model. More realistic one can be found here. For instance, in our model we do not take into account control of the current. We simply pretend there are no limits to how high the current can be.

2. Linearization

The next step is linearization (that is transformation of the model) into a state-space form:

\begin{aligned} \dot{x} & = A \vec{x} + B \vec{u} \qquad (2) \end{aligned}

where

$\vec{x}$ - state vector

$\vec{u}$ - input vector. Since size of the $\vec{u}$ is 1, it is simply a variable "u".

Sometimes it is pretty easy, for instance .... TODO

But it is not the case. We need to linearize equation (1) about a steady point.

Steady Point

is a point where 'all is steady', that is all derivatives are zero. In equation (1) there is the only derivative, so we can write:

\begin{aligned} 0 = g - \frac{c}{M} \frac{i}{x} \qquad (3)\end{aligned}

Solving of the equation reveals there is infinite number of solutions:

\begin{aligned}0.5 x = i \qquad (4)\end{aligned}

so let choose x (distance from the magnet) to be 10 so i = 5. Then our steady state chosen for linearization is [x,i]=[10,5].

Let's define a few variables to begin with linearization:

input u=i (current)

output y=x (distance from the magnet)

state vector (distance, velocity) $\vec{x}=[x1, x2]=[x, \dot{x}]$ (do not confuse $\vec{x}$ as state vector with x as distance of the ball from the magnet)

1st derivative of the vector $\vec{x}$ is $\dot{\vec{x}}=[\dot{x1}, \dot{x2}]=[x2, g - \frac{c}{M} \frac{i}{x}]$.

Let's call $\dot{x1} = f1$ and $\dot{x2} = f2$.

To linearize equation (1) we have to compute Jacobian matrix:

\begin{aligned} A & = \begin{bmatrix} \frac{\partial f1}{\partial x1} & \frac{\partial f1}{\partial x2} \\ \frac{\partial f2}{\partial x1} & \frac{\partial f2}{\partial x2}\end{bmatrix} \qquad (5) \\ B & = \begin{bmatrix} \frac{\partial f1}{\partial u} \\  \frac{\partial f2}{\partial u} \end{bmatrix} \qquad (6) \end{aligned}

Solving Jacobian (eq. 5, 6) will give us:

\begin{aligned} A & = \begin{bmatrix}0 & 1\\1 & 0\end{bmatrix} \qquad \\ B & = \begin{bmatrix}0 \\ -2 \end{bmatrix} \qquad \\ C & = \begin{bmatrix}1 & 0 \end{bmatrix} \qquad \end{aligned}

note: Matrix C was chosen to be [1, 0] because output variable y is distance from magnet and y=C$\vec{x}$, where $\vec{x}$=[x1,x2]=[x,$\dot{x}$].

http://www.physicsforums.com/showthread.php?p=4408273#post4408273

Now we have LTI model in state-space form, let's continue according to part 1:

3. Stability

Start Octave and issue:

A=[0,1;1,0];
B=[0;-2];
C=[1,0];
eig(A)
ans =
-1
1

we can see that system is unstable. Hence needs feedback controller to be stabilized.

4. Controlability

isctrb(A,B)
ans = 1

which means the system is controllable.

5 Design of the full state feedback controller

To stabilize the system we need to place eigenvalues so that they are all negative. Let's design them to be both poles -1.

P=[-1,-1];
K=place(A,B,P);
Matrix K is computed to be [-1,-1].

Now we can compute new system matrix A and let's call it A_dash:

A_dash=A-B*K;
Matrix is computed to be A_dash=[0,1;-1,-2].

Check the eigenvalues out:

eig(A_dash)
ans =
-1
-1

to find out that the system with a feedback is now stable.

6. Conclusion

In this point I'd like to emphasize one thing the whole philosophy behind design of the controller is this. We have a real system which is likely to be non-linear. We linearize the system because then we are able to better analyze it and design controller. Linearization means that we create another system, which is linear but has the same output as the original one (non-linear) when operating close to the point of linearization = steady point. Then we design a controller for the linearized model BUT apply the controller for the original non-linear model. Please, keep in mind there are 2 different things:

1. system that has to be linearized (if not linear by itself which usually is not the case)
2. controller designed for linearized system but used in real life on non-linear system.

It is also important to realize that matrixes A,B,C,D, vector, x, equation x_dot = Ax + Bu; y = Cx, all this is just to model the system. The controller itself is hidden in the K matrix.

Therefore:

- Model the system (linearize about an operating point if needed)
- Close the loop by u=-Kx (use for example pole placement)
- Implement the non-linear system
- Use K to control the system = to drive it to the zero
- Use r*N_scale to drive the system to the desired value represented by r

Note: refer to N_scale in here.

7. Simulation

Below you may find a processing applet that is demonstrating our full-state feedback controller. The simulation runs non-linear equation (1) and the ball is stabilized by the controller designed in point 3.

- pres "RUN" button to run the simulation
- move a ball by the mouse

 

Comments  

 
0 #272 Douglaslek 2018-11-28 14:47
canada online pharmacies drugs for sale on internet canadianpharmac yonli.com
canada pharmacies http://canadianpharmac yonli.com/: http://canadianpharmac yonli.com/#
pharmacy canada best http://canadianpharmac yonli.com/
canadian pharmacies online: http://canadianpharmac yonli.com/#
http://tradingdogs.com/__media__/js/netsoltrademark.php?d=canadianpharmac yonli.com
canada medications cheap
http://bambi.uz/bitrix/rk.php?goto=http://canadianpharmac yonli.com/
no 1 canadian pharcharmy online
Quote
 
 
0 #271 gtaletqwus 2018-10-15 23:11
cheap levitra: http://top-monterey-salinas-dentists.com levitra 20 mg film coated tablets http://top-monterey-salinas-dentists.com
Quote
 
 
0 #270 otaletkcep 2018-10-15 19:11
viagra professional 120 pills: http://canadian-pharmapills.com order viagra professional 270 pills http://canadian-pharmapills.com
Quote
 
 
0 #269 staletinuv 2018-10-15 08:27
cialis professional reviews: http://canadian-pharmacyiorder.com buy cialis 120 pills http://canadian-pharmacyiorder.com
Quote
 
 
0 #268 gtaletdfff 2018-10-15 00:31
cialis usa price: http://canadian-pharmasale.com buy cialis online paypal http://canadian-pharmasale.com
Quote
 
 
0 #267 gtaletfnyv 2018-10-14 14:51
buy cialis 60 mg online: http://canadian-pharmasale.com order cialis canada http://canadian-pharmasale.com
Quote
 
 
0 #266 etaletqlck 2018-10-14 12:17
cialis coupons: http://valladium.com order cialis now http://valladium.com
Quote
 
 
0 #265 utaletmrtf 2018-10-14 12:15
buy cialis pills: http://canadian-pharmamrdi.com how long does it take cialis to work http://canadian-pharmamrdi.com
Quote
 
 
0 #264 etaletztun 2018-10-14 07:33
buy cialis professional usa: http://canadian-pharmacheap.com cialis 20mg price http://canadian-pharmacheap.com
Quote
 
 
0 #263 gtalethgts 2018-10-14 00:59
cheap cialis tablet: http://gigawatt6.com order generic cialis online no prescription http://gigawatt6.com
Quote
 
 
0 #262 mtaletnrll 2018-10-13 23:15
generic viagra pills: http://canadian-pharmausa.com order viagra generic 100mg http://canadian-pharmausa.com
Quote
 
 
0 #261 ktaletwndz 2018-10-13 22:49
generic cialis online pharmacy: http://rabbitinahat.com cheap cialis in the usa http://rabbitinahat.com
Quote
 
 
0 #260 htaletgbku 2018-10-13 19:34
how long for cialis to work: http://valladium.com usa rundreise erfahrungsberic ht cialis http://valladium.com
Quote
 
 
0 #259 btaletweqb 2018-10-13 11:36
cialis 90 pills: http://baymontelreno.com red cialis viagra usa http://baymontelreno.com
Quote
 
 
0 #258 ttaletzcjm 2018-10-13 10:11
generic cialis usa pharmacy: http://baymontelreno.com order cialis without perscription http://baymontelreno.com
Quote
 
 
0 #257 italetshai 2018-10-13 09:17
brand name cialis online: http://buycialisonlineglka.com bula cialis generico usa http://buycialisonlineglka.com
Quote
 
 
0 #256 htaletdqjm 2018-10-13 06:21
cheap viagra paypal: http://vico4me.com order brand viagra 50mg http://vico4me.com
Quote
 
 
0 #255 xtaletgqdo 2018-10-13 01:49
order cialis without prescription: http://missreplicawatches.com order 5mg cialis online http://missreplicawatches.com
Quote
 
 
0 #254 xtaletlsoa 2018-10-12 23:56
generic cialis without prescription: http://canadian-pharmacyibuy.com cheapest generic cialis http://canadian-pharmacyibuy.com
Quote
 

Add comment

No bad words.


Security code
Refresh


Design by i-cons.ch / etosha-namibia.ch