MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guia do Utilizador Página 73

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 386
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 72
Code Validation
2-23
Code Validation
After completing the build process, the stand-alone version of the f14 model is
ready for comparison with the Simulink model. The MAT-file data logging
options selected with the Workspace I/O page of the
Simulation Parameters
dialog box cause the program to save the pilot G forces, aircraft angle of attack,
and simulation time. You can save the Stick Input signal to the MATLAB
workspace by setting options in the Scope block. You can now use MATLAB to
produce plots of the same data that you see on the three Simulink scopes.
In both the Simulink and the generic real-time stand-alone executable version
of the
f14 model, the stick input is simulated with a square wave having a
frequency of 0.5 (rad/sec) and an amplitude of plus and minus 1, centered
around zero.
Opening the Stick Input, Pilot G Force, and Angle of Attack scopes and running
the Simulink simulation from
T = 0 to T = 60 produces:
Now run the stand-alone program from MATLAB:
!
f14
The “!” character passes the command that follows it to the operating system.
This command, therefore, runs the stand-alone version of
f14 (not the M-file).
To obtain the data from the stand-alone program, load the file
f14.mat:
clear
load f14
Vista de página 72
1 2 ... 68 69 70 71 72 73 74 75 76 77 78 ... 385 386

Comentários a estes Manuais

Sem comentários