controlling a 3d vehicle with simulink jeff bender me-114 12-22-06

20
Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Upload: jonas-william-mathews

Post on 11-Jan-2016

219 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Controlling a 3D Vehicle with Simulink

Jeff Bender

ME-114

12-22-06

Page 2: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

visualNastran 4D Process

The completed SolidWorks assembly is transferred to Nastran using the visualNastran link in the SolidWorks program:

Page 3: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Additional Nastran Constraints

Each wheel must be set to collide with the road

A motor must be added to each wheel

Page 4: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Torque Control

Page 5: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Addition of Control Bar in Nastran

The Torque Control bar in Nastran will be used by Matlab as an input parameter

Page 6: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Addition of Meter in Nastran

The Angular Velocity Meter will be used by Matlab as an output parameter

Page 7: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Matlab Process

The first step in Matlab is to open a new document in Simulink and then open the Simulink Library Browser

New Document

Simulink Library Browser

Page 8: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Matlab Process

Add a “constant”, “sum”, “gain” and “vNPlant” from the Library Browser by clicking and dragging

The constant is found under Sources

The sum and gain are found underMath Operations

The vNPlant is found under MSC.visualNastran 4D

Page 9: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Matlab Process

Open the vNPlant by double clicking it and use the Browse function to open the appropriate Nastran file

Add each of the Torque controls as inputs

Add each of the Angular Velocities of the wheels in the y-direction

Page 10: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Matlab Operations

A feedback loop will be created using data measured from the model as the input and values from the drive motor as the output. The output will adjust according to the target input value.

There will be a large output when far away from the desired input value but the output will gradually reduce until the input matches the desired value.

Page 11: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Matlab Process

Enter Target Value of 720 deg/sec and set damping to -400

Click on “Start Simulation” inthe Simulink window

Page 12: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Results

You can see the difference between the two models

Car running with constant torque value

Click on picture to see simulation

Car running with Simulink Control

Click on picture to see simulation

Page 13: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Velocity Control

Page 14: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Addition of Control Bar in Nastran

Similar to the Torque Control bar, the Velocity Control Bar in Nastran will be used by Matlab as an input parameter

The Rotational Velocity Controlmust be added to each motor

Page 15: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Addition of Meter in Nastran

•The Velocity Meter will be used by Matlab as an output parameter

The Velocity Meter must be added to each wheel

Page 16: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Matlab Process

As before, open a new Simulink file and add a “constant”, “sum”, “gain” and “vNPlant” from the Library Browser

Open the vNPlant and use the Browse function to open the appropriate Nastran file

Add each of the Rotational Velocity controls as inputs

Add each of the Velocities of the wheels in the y-direction

Page 17: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Matlab Process

Enter Target Value of 720 deg/sec and set damping to 0.5and press the “Start Simulation” button

Page 18: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Results

Click on picture to see Matlab simulation

Page 19: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Results

Simulink increases and decreases the velocity of the wheels to compensate for the changing forward velocity with each rotation

Page 20: Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06

Conclusion

Simulink was successfully used to control the torque and velocity of a three dimensional vehicle.

These techniques can be used to analyze many different three dimensional models