## Question

- Compute the linearized model at this equilibrium point and show that the equilibrium point obtained by taking u = v(steady state value of the voltage) is unstable.

- Write a Matlab function that returns the equilibrium current, voltage and state space matrices as a function of r.

- Using linearization, design state feedback control laws to stabilize the ball at y = 1cm, y = 5cm and y = 8cm. You may use the commands place and 1qr. In each case, carry out closed loop performance analysis (e.g time responses to step commands).

- Assume that the permissible range of y is 0 to 10 cm and the permissible range of the voltage is 0 to 50 V. Starting with the ball at equilibrium, move it a small distance up (and the down) and let it go. Using simulation, determine the largest range of initial disturbance for which the ball will return to the equilibrium position without violating the constraints of y and v. To account for the constraints on v, include a limiter in your simulation.

- The non-linear closed loop system responses will be computed with Matlab/Simulink. The effect of 20% parameter variations from nominal values for all parameters will be investigated as well as the effect of the current protection circuits (‘i’ will be set to zero if it goes over a certain value ‘imax’ = 5A.

Values used in Matlab for disturbance testing (proper values can be acquired by running maglevlinearizationandstep.m):

r=0.01

usim=1.9809;

x3sim=1.1885;

r=0.05

usim=9.904;

x3sim=1.9809;

r=0.08

usim=15.847;

x3sim=2.5752;

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

%Clearing memory and screen, closing all open windowsclear;

clc;

close all;

%Defining symbolic variables

syms x1 x2 x3 m g k L0 a R L1 u r x1e x2e x3e ue

%Defining differential equations

x1dot=x2;

x2dot=g-(k*x2)/m-(L0*a*x3^2)/(2*m*(a+x1)^2);

x3dot=(u-R*x3+(L0*a*x2*x3)/(a+x1)^2)/(L1+L0/(x1/a+1));

%Jacobian linearization

A=[diff(x1dot,x1) diff(x1dot,x2) diff(x1dot,x3);diff(x2dot,x1) diff(x2dot,x2) diff(x2dot,x3);diff(x3dot,x1) diff(x3dot,x2) diff(x3dot,x3)]

B=[diff(x1dot,u);diff(x2dot,u);diff(x3dot,u)]

%Defining matrix C

C=[1 0 0];

%Finding and defining equilibrium states

x2e=solve(x1dot)

x2=x2e;

x1e=r

x1=x1e;

x2dot=eval(x2dot)

x3e=solve(x2dot,x3)

x3=x3e(1,1)

x3dot=eval(x3dot)

ue=solve(x3dot,u)

u=ue;

Alin=eval(A)

Blin=eval(B)

%Defining parameters

m=0.01; %mass in kg

k=0.001; %in N/m/s;

g=9.81; %m/s^2

a=0.05; % in meters

L0=0.01;

L1=0.02;

R=10; % in Ohms

Alin=eval(Alin)

Blin=eval(Blin)

x2sim=eval(x2e);

s=tf('s');...

By purchasing this solution you'll be able to access the following files:

Maglev.zip.