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.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.