MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Guide de l'utilisateur Page 105

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 210
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 104
Examples of C MEX-File S-Function Blocks
3-61
Example - Discrete State S-Function
The matlabroot/simulink/src/dsfunc.c example shows how to model a
discretesystemin a C MEX S-function.Discretesystems can bemodeled bythe
following set of equations:
dsfunc.c implements a discrete state-space equation. The output portion is
placed in
mdlOutputs and the update portion in mdlUpdate. To visualize how
the simulation works, refer to the flowchart on page 3-16. The output equation
above corresponds to the
mdlOutputs in the major time step. The update
equation above corresponds to the
mdlUpdate in the major time step. If your
model does not contain continuous elements, the integration phase is skipped
and time is moved forward to the next discrete sample hit.
(output)
(update)
yf
0
tx
d
u,,()=
x
d1+
f
u
tx
d
u,,()=
x
d
(states)
uy
(input) (output)
Vue de la page 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 209 210

Commentaires sur ces manuels

Pas de commentaire