Report Phase 2
Report Phase 2
Phase 2
Prof. Kebriaei
January 26, 2023
Shiva Shakeri
1
Contents
1. Introduction 3
2. State-Feedback 4
5. Observer 13
2
1. Introduction
Magnetic levitation system is known as electro-mechanical systems in which an object is
levitate in speci c region without using any support. Now a days this technology is spreading
over a wide range because of its contact-less and friction-less properties as it removes energy
losses which occur due to friction. Since this technology was developed, researchers have
analyzed a large number of such systems. In the analysis of such systems most of the work has
been done on designing of controller as they require appropriate control action and are more
complex, such as State space controller, feedback linearization is used to control the position of
ball. However, there are mostly highly non-linear systems and open loop unstable. This
nonlinearity and unstability feature of magnetic levitation systems makes their control and
modeling very challenging.
The problem of controlling the magnetic eld by control method is taken up to levitate a metal
hollow sphere, here. The control problem is to supply controlled position of the ball such that the
magnetic force on the levitated body and gravitational force acting on it are exactly equal. Thus
the magnetic levitation system is inherently unstable without any control action.
The objective of the work can be directed to design controller considering the linear model as
well as nonlinear model. The controller designed is validated by simulating and implementing on
real time system.
3
fi
fi
2. State-Feedback
“Intuitively, the state may be regarded as a kind of information storage or memory or
accumulation of past causes. We must, of course, demand that the set of internal states Σ be
sufficiently rich to carry all information about the past history of Σ to predict the effect of the
past upon the future. We do not insist, however, that the state is the least such information
although this is often a convenient assumption.”
R. E. Kalman, P. L. Falb and M. A. Arbib, 1969
State feedback, or pole placement, is a method employed in feedback control system theory
to place the closed-loop poles of a plant in pre-determined locations in the s-plane. Placing poles
is desirable because the location of the poles corresponds directly to the eigenvalues of the
system, which control the characteristics of the response of the system. The system must be
considered controllable in order to implement this method. We have checked the controllability
of the system in the first phase of this project. Therefore this method can be implemented on this
system. The block diagram of state-feedback in a system is shown in Fig. 1.
0 1 0 0
x· = 245 −0.0814 24.27 x + 0 u
0 0 −250 5
4
The poles of the system are equal to the eigenvalues of matrix “A,” which are -250, -15.7,
and 15.61. Therefore the system is inherently unstable based on the root locus shown in Fig. 2.
To observe what happens to this unstable system when there is a non-zero initial condition,
we use the code in (Appendix B.1); the Fig. 3 shows the ball’s behavior.
x· = A x + B(−K x + r) = (A − BK )x + Br,
y = Cx
5
I=eye(3,3);
By running this code in the Fig. 4 shows the step response after the designed state feedback
is added to the closed loop system.
Figure. 4
6
%Fast Poles
p11 = -30;
p22 = -35;
p33 = -45;
%Gain
K_f = place(A,B,[p11 p22 p33])
%step
step(ss(A-B*K_f,B,C,D),t)
title('Step Response Fast Poles')
Figure. 5
Figure 7
Figure. 8.
As can be seen, the system for which the faster poles are considered has a significant
overshoot. If the system does not overshoot with slower poles, it converges slowly to the final
8
𝑃
value. Therefore, the effort we paid for increasing the speed is actually increasing the system
overshoot.
We’ll implement this controller using the “Band-Limited White Nosie” block in Simulink as
Fig. 10.
Figure. 10
9
Figure. 11: State-Feedback +Noise Figure. 12: State-Feedback + Gain + Noise
As we can see, the system is not robust to noise (due to the large coef cients in the conversion
function). But relatively, in the case where the poles are slower, the system has less uctuations
compared to the mode and has better relative stability. In both systems, after removing the noise,
the system reaches a steady state and becomes stable.
Figure. 13.
We have:
u = − K x − Ke q = − [K Ke] [q]
x
· = r − y(t) = r − Cx (t)
q(t)
10
fi
fl
x· = A x + Bu
q· = − Cx + r
The state-space is:
4.1. Controllability
In order to use this method, the matrices Ā and B̄ should be controllable.
0 1 0 0 0
[−C 0]
, B̄ = [ ] =
A 0 245 −0.0814 24.47 0 B 0
Ā = =
0 0 −250 0 0 5
−1 0 0 0 0
0 0 122.35 −30597.459
0 122.35 −30597.459 7679341.383
⇒ Φ̄c = [B̄ Ā B̄ Ā2 B̄ Ā3 B̄] =
5 −1250 312500 −78125000
0 0 0 −122.35
The controllability matrix’s rank is 4. Therefore it’s full rank and controllable.
Fig 14
11
We used the White Noise as is shown in Fig. 14.
Fig. 15
Figure. 16
The results show that the system is robust against disturbance and noise.
12
5. Observer
When we can't measure all state variables (often the case in practice), we can build an
observer to estimate them, while measuring only the output . For the magnetic ball
example, we will add three new, estimated state variables ( ) to the system. The schematic is as
follows:
Figure. 15.
Figure. 16
13
Figure. 17 Figure. 18. x − x ̂
Also, in order to check whether the estimator has worked well or not, we also check the
difference between the main states and the estimated states, whose graph is as follows, as it can
be seen that they match.
14
6. Reduced Order Observer
Using the Lyapunov equation, we design a reduced order estimator:
[ 0 −10] [1]
−8 0 1
F= ,L =
[1 −10]
1 −8
Φ(F,L) = → r a n k = 2 , then it’s controllable.
Therefore, the matrix T is obtained by the Lyapunov equation method as follows:
z· = Fz + T Bu + Ly, x ̂ = [ ] [ z]
C −1 y
T
Figure. 21
Figure. 22
15
7. Non-Linear Model Control
A magnetic levitation system is a system that uses magnetic forces to levitate an object. The
magnetic levitation system is a non-linear system because the magnetic forces are proportional to
the magnetic field intensity and the inverse of the distance between the magnetic source and the
levitated object. This results in a non-linear relationship between the input variables and the
output variables (position of the levitated object).
We will see the results of applying one of the controllers and an observer to a non-linear
system in this section.
16