MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Betriebsanweisung Seite 105

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 210
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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)
Seitenansicht 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 209 210

Kommentare zu diesen Handbüchern

Keine Kommentare