0% found this document useful (0 votes)
38 views10 pages

Dcs Cource Work

This document provides details on the design of a digital controller for a magnetic levitation system. It describes: 1) The method used which is to discretize the continuous-time system model using bilinear transformation. 2) The mathematical modeling of the electrical and mechanical subsystems, including derivation of transfer functions relating ball position to coil current. 3) Conversion of the subsystem models from s-domain to z-domain using MATLAB.

Uploaded by

junaid saleem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views10 pages

Dcs Cource Work

This document provides details on the design of a digital controller for a magnetic levitation system. It describes: 1) The method used which is to discretize the continuous-time system model using bilinear transformation. 2) The mathematical modeling of the electrical and mechanical subsystems, including derivation of transfer functions relating ball position to coil current. 3) Conversion of the subsystem models from s-domain to z-domain using MATLAB.

Uploaded by

junaid saleem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Sunil Jamil 15103122-018

Mansoor Kashif 15103122-024

Design Course Work


Design and Implementation of Digital Controller for Magnetic Levitation
System.
Task : Method of designing controller with all mathematical details

Method Selected:
We use following method for designing Digital Controller for Magnetic Levitation system:
“Digital Control Design via Continuous Design”
And use “bilinear transformation” for discretizing continuous time signal. For this purpose, we
use following command in MATLAB code:
c2d(sys,Ts,'tustin')

Mathematical Modeling:
The mathematical modeling of the system is divided in two parts which are:
 Electrical subsystem modeling
 Mechanical subsystem modeling
Electrical subsystem modeling:
A schematic representation of the maglev ideal electrical subsystem is shown in figure 1. The
voltage V applied to the coil results in a current i governed by the differential equation.
di
V  iRl  L ----- 1
dt
In order to determine the current in the coil, the maglev actual electrical subsystem (shown in
figure 2) is equipped with a resistor Rs in series with coil.
di
V  i ( Rl  Rs )  L ----- 2
dt

Finally, taking Laplace transform of eq 2, we get

V ( s)  ( Rl  Rs ) I(s)  LsI (s)

I(s) 1

V ( s ) Ls  ( Rl  Rs )

Let,

I(s) 1
Ge (s)  
V ( s) Ls  ( Rl  Rs )

Mechanical subsystem modeling:


The force experienced by a ball under the influence of electromagnet is given as:
2
i
F  mg  K f   ----- 3
x
where,

i = current in electromagnet
x = distance of ball from electromagnet face
g = gravitational acceleration
Kf = magnetic force constant for electromagnet ball pair
m = mass of steel ball
By using Newton second law:
2
d 2x i
m 2  mg  K f   ----- 5
dt  x
Using eq 5 , we can compute steady state coil current iss, that produce desired steady state
d 2x
constant ball position xss. For this  0 , eq 5 become:
dt 2
2
i
0  mg  K f  
x
2
i
K f    mg
x
2
 i  mg
  
x Kf

i mg

x Kf

mg
iss  xss ----- 6
Kf

Eq 6 is use to regulate ball position. However, external disturbance, system parameter


uncertainty / variation etc necessitate a feedback controller to improve the mechanical subsystem
performance.
Now, defining set of shifted variables,

x(t )  x(t )  xss ----- 7


i (t )  i (t )  iss ----- 8

We can write eq 5 as:


2
  
d 2x i i
m 2  mg  K f   ss  ----- 9
dt  x x 
 ss 
 
Now, linearizing eq 9 about x  0 , i  0

  2
  2
 
    
d x 1  
2
 i  iss       i  iss   
  mg  K f x    mg  K f i ----- 10
dt 2 m   x   x  x  
  i   x  x  
  
 ss   ss 
   x 0, i 0   x 0, i 0 

d 2x 1  iss 2   2i  
2
 
 f 3
K ( 2) x    K f ss2 i 
dt m xss  xss 
2
d 2 x 2 K f iss  2 K f iss 
 x 2 i ----- 11
dt 2 xss 3m xss m

Taking Laplace transform,

2 K f iss 2  2 K f iss 
s X ( s) 
2
X (s) I ( s)
xss 3m xss 2 m

 2 2 K f iss 2   
 s   X (s)   I ( s)
 xss 3m 

2 K f iss

X (s) xss 2 m

 ----- 12
2 K f iss 2
I (s) s2 
xss 3 m

Let,

2 K f iss 2 K f iss 2
a and b 
xss 2 m xss 3 m

So,

X (s) a

 ------ 13
I ( s) s b
2

The numerical values of electrical and mechanical subsystem parameters for maglev model are
given in table:
In addition, the variables a and b are computed with xss  7mm and iss  1Amp .

MATLAB code to convert subsystems from s-domain to z-domain:


clc;
clear all;
close all;
L=0.4125;
Rl=10;
Rs=1;
Kf=32654;
g=9810;
m=0.068;
xs=7;
is=1;
Ts=0.015;
% electrical subsystem
num1=[1];
den1=[L Rl+Rs];
sys1=tf(num1,den1) %s-doamin
ss(sys1)
figure(1)
subplot(1,2,1)
step(sys1)
Ge = c2d(sys1,Ts,'tustin') %z-domain
ss(Ge)
subplot(1,2,2)
step(Ge)
% mechanical subsystem
a=(2*Kf*is)/(xs*xs*m);
b=(2*Kf*is*is)/(xs*xs*xs*m);
num2=[-a];
den2=[1 0 -b];
sys2=tf(num2,den2) %s-doamin
ss(sys2)
figure(2)
subplot(1,2,1)
step(sys2)
Gm = c2d(sys2,Ts,'tustin') %z-domain
ss(Gm)
subplot(1,2,2)
step(Gm)

Output:
sys1 =
1
-------------
0.4125 s + 11
Continuous-time transfer function.

ans =
A =
x1
x1 -26.67
B =
u1
x1 2
C =
x1
y1 1.212
D =
u1
y1 0
Continuous-time state-space model.

Ge =
0.01515 z + 0.01515
-------------------
z - 0.6667
Sample time: 0.015 seconds
Discrete-time transfer function.

ans =
A =
x1
x1 0.6667
B =
u1
x1 0.125
C =
x1
y1 0.202
D =
u1
y1 0.01515
Sample time: 0.015 seconds
Discrete-time state-space model.

sys2 =
-1.96e04
----------
s^2 - 2800
Continuous-time transfer function.

ans =
A =
x1 x2
x1 0 43.75
x2 64 0
B =
u1
x1 16
x2 0
C =
x1 x2
y1 0 -19.14
D =
u1
y1 0
Continuous-time state-space model.

Gm =
-1.309 z^2 - 2.617 z - 1.309
----------------------------
z^2 - 2.748 z + 1
Sample time: 0.015 seconds
Discrete-time transfer function.

ans =
A =
x1 x2
x1 2.748 -1
x2 1 0
B =
u1
x1 2
x2 0
C =
x1 x2
y1 -3.107 -1.11e-16
D =
u1
y1 -1.309
Sample time: 0.015 seconds
Discrete-time state-space model.

 Step response for electrical subsystem


 Step response for mechanical subsystem

You might also like