Are the full models available for vehicle dynamic blocks?
Show older comments
I'm trying to use the blocks in the Vehicle Dynamics Blockset, but there's not quite enough in the documentation for me to understand the full model being used for various blocks.
For example, in the Vehicle Body 3 DOF block, I'm trying to derive complete equations of motion from the documentation, but the documentation only seems to include information on the forces and some accelerations.
It would be very nice if there was clear information available describing how the vehicle's position and orientation changes with each time step, or how yaw rate is calculated. I tried looking under the mask of the block to see if this would provide any more information, but it seems like the underlying code is protected.
In short, I'm looking for a clearer understanding of how the outputs are calculated from the inputs, but the documentation doesn't really organize the equations this way, and it seems like some helpful information is left out.
Is there any more information available for these models?
11 Comments
Paul
on 21 Dec 2024
The Theory section of the doc page looks like it has all of the equations that the block implements. What is missing?
Daniel
on 21 Dec 2024
Paul
on 21 Dec 2024
The doc page has the equation: psidot = r (actually, it says r = psidot, which is the same thing).
I would think that xdot and ydot are found by integrating xddot and yddot starting from the user-specified initial conditions.
Daniel
on 21 Dec 2024
Paul
on 21 Dec 2024
Yes, as far as I know. I don't have access to that block at present. Was not aware that any Simulink blocks are implemented in p-code.
The block outputs xdot and ydot are the components of the inertial velocity resolved in body-fixed coordinates. Hence, the inertial velocity resolved in inertial coordinates would be
v_i = [cos(psi) , -sin(psi);sin(psi), cos(psi)]*[xdot;ydot];
Then, the inertial position would be found by integrating v_i starting from the specified initial conditions.
When I did that, got the exact same output as the position in the inertial frame (which I gather is considered to be the earth-fixed frame in this context) contained in the Info bus (InertFrm->CG-Disp->X(Y) )
Maybe the reference cited at the bottom of the page would be of use.
If you think the doc page is lacking, click one of the rating stars at the bottom of the page and then you'll get a pop-up box where you can enter comments.
Disclaimer: This thread is my very first exposure to the Vehicle Dynamics Blockset.
aditi bagora
on 7 Jan 2025
I understand that you are noticing discrepancies between the results and the documented calculations. Unfortunately, there is no way of accessing the code within the P-code block. However, if you suspect there might be an error in the calculations, I recommend reaching out to MathWorks Technical support. You can raise a request using the following link: https://in.mathworks.com/support/contact_us.html
Hope this helps!
Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!