Input Driver reference to vehicle body in Simulink

7 次查看(过去 30 天)
Hi everyone!
I am modelling a car on Simscape/Simulink within a skidpad test. The 3 main blocks are Skidpad track, driver commands and my vehicle. I have issues linking the Reference and Lights control outputs from the Predictive Driver to the vehicle subsystem, which results in the loop not having a start point. I tried inputting the reference (lat and long positions) directly to the 3DOF vehicle body, but it still didn't work. Would anyone be able to help me on this?
Also, should I use a bus creator to separate each Driver output and link them individually to the relevant vehicle input? Or is linking the Driver Commands output to all vehicle inputs enough?
Last, I am not sure how to use the decelleration and lights control outputs, or where to link them in my model. I don't have a braking block in my vehicle model, as from what I understand I have to choose between a velocity input and a force on wheels input. Is there a way to combine these two in order to have a braking system in the model while using the velocity out of the suspension?
As a reference, my model is attached to this post, with most of my questions related to the vehicle subsystem. I haven't inputted all the data specific to my car, which is why the numbers within the blocks seem odd/unrealistic.
Thank you in advance!

回答(1 个)

Sahas
Sahas 2024-9-10
As per my understanding, you are modelling a car using Simulink that contains three main subsystems, a “Vehicle” subsystem, a “Driver” subsystem and a “Skidpad” subsystem for reference and testing.
To connect all the outputs from the “Driver” subsystem to the “Vehicle” subsystem, it is a good practice to use “Bus Creator” and “Bus Selector” block pairs as it makes managing multiple signals easy and efficient. It also enhances the system modularity making it easier to debug issues.
Refer to the following MathWorks documentation link for information on the usage of “Bus Selector” and “Bus Creator” blocks:
After executing the model, I could trace back the issue to “xdot” output signal in the “Vehicle Body 3DOF” block of the “Vehicle” subsystem. When traced back further, the Wheel Velocity signal, “WHlVz”, was not connected in the “Independent Suspension - Double Wishbone” block, as highlighted in the attached image. To connect this signal from to appropriate ports from the “Driver” subsystem, refer to the following MathWorks documentation links of these blocks:
Hope this is beneficial!

类别

Help CenterFile Exchange 中查找有关 Simscape Multibody 的更多信息

产品


版本

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by