Hi Divyansh,
From what I understand, the goal is to provide an initial velocity for mass 2, which is part of the double inverted pendulum model. However, the challenge is to assign an initial velocity to mass 2 without directly adding a signal input to the revolute joint representing mass 2.
You can achieve this by modifying the Simulink model as follows:
- Add a “Zero-Order Hold” block to the model.
- Connect the output of the “Zero-Order Hold” block to the input of the revolute joint representing mass 2 (theta 2).
- Configure the “Zero-Order Hold” block to hold the initial velocity value you desire.
Here is it step by step:
- From the Simulink Library Browser, locate the Signal Attributes category and expand it.
- Drag and drop the “Zero-Order Hold” block into your model.
- Connect the output of the “Zero-Order Hold” block to the input of the revolute joint representing mass 2 (theta 2).
- Double-click on the “Zero-Order Hold block” to open its block parameters.
- In the block parameters, set the Initial condition to the desired initial velocity value for mass 2.
The “Zero-Order Hold” block will hold the initial velocity value until the simulation starts.
Attached below are some documentation links that you may find helpful:
Hope this helps!
Karan Singh Khati