Controlling a 3D Vehicle with Simulink Jeff Bender ME-114 12-22-06.
-
Upload
jonas-william-mathews -
Category
Documents
-
view
219 -
download
4
Transcript of 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
visualNastran 4D Process
The completed SolidWorks assembly is transferred to Nastran using the visualNastran link in the SolidWorks program:
Additional Nastran Constraints
Each wheel must be set to collide with the road
A motor must be added to each wheel
Torque Control
Addition of Control Bar in Nastran
The Torque Control bar in Nastran will be used by Matlab as an input parameter
Addition of Meter in Nastran
The Angular Velocity Meter will be used by Matlab as an output parameter
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
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
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
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.
Matlab Process
Enter Target Value of 720 deg/sec and set damping to -400
Click on “Start Simulation” inthe Simulink window
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
Velocity Control
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
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
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
Matlab Process
Enter Target Value of 720 deg/sec and set damping to 0.5and press the “Start Simulation” button
Results
Click on picture to see Matlab simulation
Results
Simulink increases and decreases the velocity of the wheels to compensate for the changing forward velocity with each rotation
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