Application Center - Maplesoft

App Preview:

Ball and wheel in non-linear affine-input systems

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

AIsys_1.mws

Ball and Wheel - Example of a Non-Linear Affine-Input System

by A. Kugi, K. Schlacher and R. Novak, Department of Automatic Control, Johannes Kepler University, Linz, Austria,

kugi@mechatronik.uni-linz.ac.at

NOTE: This worksheet demonstrates the use of the AIsys package to solve a system of a Ball and Wheel.

Introduction

The AIsys package contains several algorithms for the analysis and synthesis of nonlinear Affine-Input control systems, or AI-systems for short. This class of systems describes a large number of physical systems in many engineering applications. However, only the increasing availability of low cost digital signal processors in combination with the increasing power of computer algebra programs like Maple enable the practical use of these nonlinear control strategies.

The AIsys package contains four examples which prove that the proposed algorithms are also feasible for practical problems. This mechanical example is the ball and wheel experiment. Other examples in the Maple Application Center include benchmark tests for nonlinear control systems, namely the chemical stirrer vessel, the squirrel cage induction motor and a hydraulic system.

Loading the AIsys package

The AIsys package has been archived into a Maple Library. To install it download the file AIsys2.zip and extract the contents into a directory.

Note: Do not extract these files into your Maple "lib" directory since you could overwrite your main Maple library.

> restart;

> libname := "C:/mylib/aisys", libname:

> with(AIsys);

[ElimSt, GLie, Interior_prod, InvClos, Invar, Invol...
[ElimSt, GLie, Interior_prod, InvClos, Invar, Invol...

To find out more read this worksheet or the help file:

> ?AIsys

Example 1: Ball and Wheel

[Maple OLE 2.0 Object]

A very interesting example of a nonlinear system that is also commercially available is the ball and wheel model. The wheel (green), driven by a motor is used to position the ball (blue). The parameters are given by Jb (Jw), moment of intertia of the ball (wheel), radii r2 (r1) and the mass of the ball mb. As coordinates, we use the angular displacement of the wheel x1, the the rod x2 and their time derivatives w1, w2, as shown above. It is assumed, that the rod has no mass.

> f_x := [w1, w2, 2*mb*g*sin(x2)*r1/(7*Jw+2*mb*r1^2), g*sin(x2)*(5*Jw+2*mb*r1^2)/((r1+r2)*(7*Jw+2*mb*r1^2))];
g_x := [0, 0, 7*1/(7*Jw+2*mb*r1^2), 2*r1/((r1+r2)*(7*Jw+2*mb*r1^2))];
xx:=[x1,x2,w1,w2];

f_x := [w1, w2, 2*mb*g*sin(x2)*r1/(7*Jw+2*mb*r1^2),...

g_x := [0, 0, 7*1/(7*Jw+2*mb*r1^2), 2*r1/(r1+r2)/(7...

xx := [x1, x2, w1, w2]

Setup mathematical model for AIsys package

> f_x:=M_AIsys(f_x);
g_x:=M_AIsys(g_x);

f_x := TABLE([index_char = [1], compts = vector([w1...

g_x := TABLE([index_char = [1], compts = vector([0,...

Check relative degree for output x2

> RelDeg(f_x,g_x,x2,xx);

`Attention - Jacobian not checked.`

TABLE([relD = 2, t_vec = [x2, w2]])

As one can see, the relative degree is 2

Calculate the maximum possible relative degree

> MaxRelDeg(f_x,[g_x],xx);

[4]

As a result, we obtain 4, hence the system must be exact input-state linearizable. In the next step, we will check if this is the fact.

> LinPart(f_x,g_x,xx);

`The system is state space linearizable.`

[g_x, TABLE([index_char = [1], compts = vector([-7*...
[g_x, TABLE([index_char = [1], compts = vector([-7*...
[g_x, TABLE([index_char = [1], compts = vector([-7*...
[g_x, TABLE([index_char = [1], compts = vector([-7*...
[g_x, TABLE([index_char = [1], compts = vector([-7*...

Indeed, the system is exact input-state linearizable.

For the special choice of the output function h, we get relative degree 4 and we calculate the corresponding diffeomorphism.

> h:=(-2*r1*x1+7*x2*r1+7*x2*r2)/((r1+r2)*(7*Jw+2*mb*r1^2));
trans:=RelDeg(f_x,g_x,h,xx);

h := (-2*r1*x1+7*x2*r1+7*x2*r2)/(r1+r2)/(7*Jw+2*mb*...

`Attention - Jacobian not checked.`

trans := TABLE([relD = 4, t_vec = [(-2*r1*x1+7*x2*r...
trans := TABLE([relD = 4, t_vec = [(-2*r1*x1+7*x2*r...
trans := TABLE([relD = 4, t_vec = [(-2*r1*x1+7*x2*r...

At last we calculate the nonlinear feedback law for the considered output h with relative degree 4.

> UTrans(f_x,g_x,h,xx,v,true);

`Checking column dimension of jacobian A = dt/dx`

`Computed relative degree is 4 and jacobian of A is regular`

`Used coefficients: a0, a1, a2, a3, `

`Coefficient: a4 set to 1`

TABLE([utrans = 1/10*(v-a0*(-2*r1*x1+7*x2*r1+7*x2*r...
TABLE([utrans = 1/10*(v-a0*(-2*r1*x1+7*x2*r1+7*x2*r...
TABLE([utrans = 1/10*(v-a0*(-2*r1*x1+7*x2*r1+7*x2*r...
TABLE([utrans = 1/10*(v-a0*(-2*r1*x1+7*x2*r1+7*x2*r...
TABLE([utrans = 1/10*(v-a0*(-2*r1*x1+7*x2*r1+7*x2*r...
TABLE([utrans = 1/10*(v-a0*(-2*r1*x1+7*x2*r1+7*x2*r...

The same result is obtained by the corresponding MIMO algorithm

> MUTrans(f_x,[g_x],[h],xx,v);

`Checking the rank of the decoupling matrix`

`Decoupling matrix seems to be regular.`

`Computing inverse matrix`

`Computing Transformation`

TABLE([utrans = vector([-1/2/cos(x2)/r1*sin(x2)*(-7...
TABLE([utrans = vector([-1/2/cos(x2)/r1*sin(x2)*(-7...
TABLE([utrans = vector([-1/2/cos(x2)/r1*sin(x2)*(-7...
TABLE([utrans = vector([-1/2/cos(x2)/r1*sin(x2)*(-7...
TABLE([utrans = vector([-1/2/cos(x2)/r1*sin(x2)*(-7...
TABLE([utrans = vector([-1/2/cos(x2)/r1*sin(x2)*(-7...

Checking singularities by means of the `AIsys/SIMP` command

> `AIsys/SIMP`[2]:={x2=Pi/2};
UTrans(f_x,g_x,h,xx,v,true);

`AIsys/SIMP`[2] := {x2 = 1/2*Pi}

`Cannot assign relative degree.`

TABLE([utrans = 0, relD = 0])

>

>

Disclaimer: While every effort has been made to validate the solutions in this worksheet, Waterloo Maple Inc. and the contributors are not responsible for any errors contained and are not liable for any damages resulting from the use of this material.