Matlab

Páginas: 14 (3416 palabras) Publicado: 1 de septiembre de 2011
C H A P T E R

9

Simulink® Integration

Exercise 9-1

Open-Loop Controller for Interval Windshield Wipers
In this exercise, you will design a control system in Simulink to control an automotive windshield-wiper model. The physical model of the windshield wiper was constructed in a CAD package and imported into MSC.visualNastran 4D.

Objectives

In this exercise, you will learn to 9-2

Chapter 9—Simulink® Integration

• • • • •

Connect MSC.visualNastran 4D (vN4D) with Simulink. Access the vNPlant block in Simulink. Pass variables from vN4D to Simulink. Pass variables from Simulink to vN4D. Run the integrated simulation. Tutorials\Chapter 09\Exercise 9.1\wipers.wm3 Matlab\vNPlantBlock.mdl

Support Files

• •

Launch Applications and Open Files
NOTE:Instructions for this section are divided into two subsections: Instructions for Simulink 4 and MATLAB 6 and Instructions for Simulink 3 and MATLAB 5.3. Please choose the appropriate subsection based on your software version.

Instructions for Simulink 4 and MATLAB 6

1. 2.

Launch MATLAB. In the MATLAB Launch Pad, double-click Simulink to view its menu.

Figure 9-1 MATLAB’s Launch Pad

3.Double-click Library Browser.

Open-Loop Controller for Interval Windshield Wipers

9-3

Figure 9-2 Simulink Library Browser

4.

In the Simulink Library Browser window, click MSC.visualNastran 4D. The vNPlant block appears in the right column. From the File menu of the Library Browser, select New, then Model. This file will consist of the control system for the integrated simulation. Dragand drop the vNPlant block from the right column of the Simulink Library Browser to the new model window.

5.

6.

Figure 9-3 vNPlant Block

This block is the starting point for all vN4D and Simulink integration. Arrows (>) exist on both the left and right sides of the vNPlant block. The > on the left indicates the flow of information from Simulink to vN4D. The > on the right indicatesthe flow of information from vN4D to Simulink.

9-4

Chapter 9—Simulink® Integration

The model file for the vNPlant block (vNPlantBlock.mdl) is located in the Matlab folder of your installation directory.

7. 8.

Save your Simulink model as wipers.mdl. In the MATLAB Launch Pad, double-click MSC.visualNastran 4D to view its menu. Double-click Launch MSC.visualNastran 4D.

9.

Figure9-4 MATLAB’s Launch Pad

10. In vN4D, choose Open from the File menu. 11. Browse the Tutorials\Chapter 9\Exercise 9.1 folder and open the file wipers.wm3.
Instructions for Simulink 3 and MATLAB 5.3

1. 2.

Launch MATLAB. Launch the Simulink Library Browser from the toolbar or type

simulink at the MATLAB command line.
3. In the Library Browser window, double-click MSC.visualNastran 4D toexpand its menu. vNPlant is listed here. Create a new Simulink model window by clicking the new model icon (blank white page) in the tool bar of the Library Browser. You will build the control system for the integrated simulation in this window. Drag and drop vNPlant from the Library Browser to the new model window.

4.

5.

Open-Loop Controller for Interval Windshield Wipers

9-5

Thisblock is the starting point for all vN4D and Simulink integration. Arrows (>) exist on both the left and right sides of the vNPlant block. The > on the left indicates the flow of information from Simulink to vN4D. The > on the right indicates the flow of information from vN4D to Simulink.

The model file for the vNPlant block (vNPlantBlock.mdl) is located in the Matlab folder of yourinstallation directory.

6. 7.

Save your Simulink model as wipers.mdl. Launch vN4D from the MATLAB command line by typing vN4D, or separately from your Windows environment. In vN4D, choose Open from the File menu. Browse the Tutorials\Chapter 9\Exercise 9.1 folder and open the file wipers.wm3.

8. 9.

vN4D and Simulink Integration
Your Simulink model will communicate with your vN4D model through...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • matlab
  • Matlab
  • Matlab
  • matlab
  • MATLAB
  • MATLAB
  • Matlab
  • Matlab

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS