- In R2021b, we provide example Vehicle Dynamics - Car with Heave and Roll (sm_car_heave_roll). Though this is a four-wheel vehicle, you could look at the model and modify one of the suspension to remove a wheel. It shows how to use the Magic Formula Tire Force and Torque.
- This tutorial shows how to model a four-wheeled toy car: Model Wheel Contact in a Car. It shows the basics of assembling components in Simscape Multibody. The ground contact model is not representative of tire dynamics, but it does show you how to get started with this type of modeling.
- This example model shows how to model multi-link suspensions in Simscape Multibody Full Vehicle on Four Post Testrig (sm_car_4post_testrig)
- The Simscape Vehicle Templates contains a very elaborate set of examples covering 4, 6, 10, and 18-wheeled vehicles with trailers. These models are maintained for releases R2018b through the current release. It is much more than you need, but you may find pieces in there that you can reuse, such as a sensor to model roll, pitch, and yaw, and methods for following racetracks.
Modeling a three-wheeled vehicle using Vehicle Dynamics Blockset
25 ビュー (過去 30 日間)
As part of a project, I've been trying to model in simulink a complete vehicle model of a three-wheeled vehicle (like the Polaris Slingshot) but with an electric motor. I've studied and modeled some of the subsystems myself from scratch, like the body dynamical equations, steering and wheel/tire dynamics, but I've realized that continuing in this path will become very time consuming, so I've turned to simulink packages to speed up the process.
I've been trying out the Vehicle Dynamics Blockset, since it seems to be a very complete package, and studying how it all fits together. Right now I'm working with the 3DOF Vehicle Body, changing the parameters and seeing its effects. However, one major headache I've reached is that this block is seemingly locked to a four wheel vehicle with two axles. To accomodate my project I need to have two wheels in the front and one in the rear, I've read the documentation page top to bottom several times and although there are two variables that seem to vary the number of wheels (NF - Front wheel count / NR - Rear wheel count, on the longitudinal parameters section of the block), these don't actually change the dynamical equations. They seem to merely affect the weight distribution calculation on the wheels, which itself doesn't make a lot of sense because I can choose, for example, three front wheels and one rear wheel and the block will always compute two vertical loads for the front and rear axles.
Right now I'm at a crossroad: either I continue working with the Vehicle Dynamics Blockset and try to bootleg my way around this; try to make from scratch a block that implements only the dynamical equations with the required changes, and try to integrate it with the rest of the blockset; or use another simulink package.
On my research I've found that the Simscape Driveline library also seems to be capable of modeling vehicle dynamics, but since I've never worked with that one before I don't know if it's worth the time investment compared to staying with the VDB.
I would very much appreciate the opinion of more knowledgeable individuals on how I should procced with this matter!
PS: Currently I'm using matlab version R2019a but I'll soon upgrade to R2022a
回答 (1 件)
Steve Miller 2022 年 3 月 28 日
I think it depends on what effects you wish to model. The block you have identified in Vehicle Dynamics Blockset has 3 degrees of freedom - longitudinal, lateral, and yaw. This is limits what the model can actually represent. Per the documentation, "when vehicle pitch, roll, and vertical motion are not significant."
Simscape Driveline has a Vehicle Body block. It permits longitudinal and pitch motion, but no lateral motion. It is good for powertrain studies and longitudinal dynamics, but it does not cover lateral dynamics.
If you want true flexibility for your 3-wheeled vehicle model, you should consider Simscape Multibody. You can model any kind of vehicle with any number of wheels on any axle. You will need to assemble the chassis and suspension yourself, but there are plenty of examples to start from.
I think it would be worth your time to at least learn the basics of Simscape and Simscape Multibody. You can get started with the Simscape Onramp.
Some examples for vehicle modeling with Simscape Multibody: