MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guide de l'utilisateur Page 85

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 130
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 84
Quick Start Tutorials
3-29
Comparing Numerical Results of the Simulation
and the Generated Program
Your Simulink simulations and the generated code should produce nearly
identical output.
You have now obtained data from a Simulink run of the model, and from a
run of the program generated from the model. It is a simple matter to
compare the
f14rtw model output to the results achieved by Real-Time
Workshop.
Comparing
Angle_of_attack (simulation output) to rt_Angle_of_attack
(generated program output) produces
max(abs(rt_Angle_of_attack-Angle_of_attack))
ans =
1.0e-015 *
0 0.3331
Comparing Pilot_G_force (simulation output) to rt_Pilot_G_force
(generated program output) produces
max(abs(rt_Pilot_G_force-Pilot_G_force))
1.0e-013 *
0 0.6395
Overall agreement is within 10
-13
. The means of residuals are an order of
magnitude smaller. This slight error can be caused by many factors, including
Different compiler optimizations
Statement ordering
Run-time libraries
For example, a function call such as
sin(2.0) might return a slightly
different value, depending on which C library you are using.
For the same reasons, your comparison results might not be identical to those
above.
Vue de la page 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 129 130

Commentaires sur ces manuels

Pas de commentaire