Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
SECTION 3 FUNCTION EVALUATION, CO-SIMULATION PERFORMANCE ADM711, Section 3, January 2013 Copyright© 2013 MSC.Software Corporation S3 - 1 OVERVIEW • Investigate Function Evaluation mode, compare results quality to co-simulation mode. Explore co-simulation performance as simulation parameters are altered. ADM711, Section 3, January 2013 Copyright© 2013 MSC.Software Corporation S3 - 2 FUNCTION EVALUATION MODE • Function evaluation (or continuous) mode lets the MATLAB (or EASY5) integrators solve the entire problem made up of the Adams equations and the MATLAB (EASY5) equations. In this mode, Adams simply acts as a ‘function evaluator’ for the MATLAB (EASY5) integrator. Mode Integrators used Co-simulation MATLAB and Adams Function Evaluation ADM711, Section 3, January 2013 Copyright© 2013 MSC.Software Corporation Comments MATLAB solves Simulink model, Adams/Solver solves Adams model. Data exchanged periodically. MATLAB solves both Simulink and Adams models. Adams/Solver just acts as function evaluator for MATLAB integrator. MATLAB S3 - 3 FUNCTION EVALUATION MODE • Limitations of the method: – Adams/Solver is often better at solving complicated Adams models, especially with entities like CONTACTs. Co-simulation is therefore, often more robust. – Function Evaluation mode does not work with most Adams/Car (Adams/Engine, Adams/Driveline, etc.) models as the CONTROL/ statement is not supported in continuous mode. ADM711, Section 3, January 2013 Copyright© 2013 MSC.Software Corporation S3 - 4 TCP/IP COMMUNICATION • Traditional communication method for Adams/Controls: – ‘Named pipe’ files - basically input/output file buffers. • Alternative communication method: – TCP/IP communication - uses network infrastructure found in all modern computer Operating Systems. • Advantages of TCP/IP communication method: – MATLAB (EASY5) and Adams do not need to be on the same machine: can be run across a network. In reality, though, this is not encouraged as it is quite slow! ADM711, Section 3, January 2013 Copyright© 2013 MSC.Software Corporation S3 - 5 TCP/IP COMMUNICATION • Additional setup required for using the TCP/IP communication method: – The ‘Adams Daemon’ must be started by either method: 1.Manually: copy the ‘adams_daemon.py’ file from the Adams/Controls installation directory to your working directory and then start is using ‘adams2012_x64 python adams_daemon.py’. 2.From within MATLAB, issue command: ‘start_adams_daemon’ – The TCP/IP communications method must be chosen in the Adams plant mask (MATLAB) or the component data table (EASY5). ADM711, Section 3, January 2013 Copyright© 2013 MSC.Software Corporation S3 - 6 CO-SIMULATION PERFORMANCE SETTINGS • To save less data in Adams: – By default, each communication interval generates output data for the Adams output files (*.req, *.res, *.gra) during a cosimulation. Adams/Controls can save every nth sample using the ‘Number of communications per output step’ parameter in the MATLAB plant mask. • Use ‘batch’ animation mode, avoid ‘interactive’ mode: – Interactive mode uses Adams/View, while batch mode uses Adams/Solver. The smaller resource overhead of Adams/Solver generally leads to faster simulation times. ADM711, Section 3, January 2013 Copyright© 2013 MSC.Software Corporation S3 - 7 CO-SIMULATION PERFORMANCE SETTINGS • Disable interactive charts or similar elements in Simulink (or EASY5). • Use a coarser sampling rate: – This will speed up co-simulations, typically at the expense of solution precision. ADM711, Section 3, January 2013 Copyright© 2013 MSC.Software Corporation S3 - 8