For this example, the dataFcnMaglev.m data function describes the dynamics of a magnetic levitation system.
This model is not valid for height = 0. Create an LPV model with a different value for the test height. For this model set t0 = 0 because the parameters do not depend explicitly on time.
h0 = 1;
sys = lpvss('h',@dataFcnMaglev,0,0,h0)
Continuous-time state-space LPV model with 1 outputs, 1 inputs, 2 states, and 1 parameters.
Model Properties
Get the test values lpvss used to validate dataFcnMaglev.m.
[t0,p0] = getTestValue(sys)
t0 =
0
p0 =
1
The function returns the same value that was used to validate the data function when you created the LPV object.
View the data function code.
type dataFcnMaglev.m
function [A,B,C,D,E,dx0,x0,u0,y0,Delays] = dataFcnMaglev(~,p)
% MAGLEV example:
% x = [h ; dh/dt]
% p=hbar (equilibrium height)
mb = 0.02; % kg
g = 9.81;
alpha = 2.4832e-5;
A = [0 1;2*g/p 0];
B = [0 ; -2*sqrt(g*alpha/mb)/p];
C = [1 0]; % h
D = 0;
E = [];
dx0 = [];
x0 = [p;0];
u0 = sqrt(mb*g/alpha)*p; % ibar
y0 = p; % y = h = hbar + (h-hbar)
Delays = [];
Test value of time, returned as a scalar. This is the value ltvss
and lpvss uses to evaluate the data function.
Test values of parameters, returned as a vector of length equal to the number of
parameters in the model. These are the values lpvss uses to evaluate
the data function.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.