I am trying to model a 1/2 car model in Simulink but it has heave and no pitch.

35 views (last 30 days)
I am modelling a 1/2 car model in Simulink. Currently I have independently moving wheels, moving over the same bump profile, 0.5s apart, however the model is only capable of heave, not pitch. How can I introduce pitch to my model?
  1 Comment
Umar
Umar on 10 Nov 2025 at 10:57

Hi @Sarah, I saw you edited the comments, May I ask why did you delete your screenshots of attached simulink block diagram and car model?

Sign in to comment.

Accepted Answer

Umar
Umar on 6 Nov 2025 at 9:43

Hi @Sarah,

Looking at your model diagram, I can see you've got the basic structure set up nicely with separate front and rear suspension paths, but they're currently operating independently - that's why you're only getting heave and no pitch motion. The issue is that your Suspension Compliance blocks aren't coupled through rigid body dynamics.

I did some digging through the MathWorks documentation and found their official half-car example (just type sldemo_suspn in your MATLAB command window). The key thing they do is add four body states: vertical position, vertical velocity, pitch angle, and pitch angular velocity. These all feed back into both suspension calculations.

Here's what needs to happen in your model: your suspension forces need to account for pitch. Instead of just calculating relative displacement as (z_body - z_wheel), you need (z_body - L*theta - z_wheel) where L is the distance from the center of gravity to that axle and theta is your pitch angle. Super important - the front distance should be negative and rear positive, otherwise your pitch will be backwards!

Then you need a new subsystem that takes both suspension forces and calculates two things simultaneously: heave acceleration (sum of forces divided by body mass) and pitch acceleration (sum of moments divided by pitch inertia). Each gets integrated twice to give you position and velocity states that feed back into your suspension blocks.

You'll probably run into an algebraic loop warning when you close this feedback - just drop a Memory block into the feedback path and that'll solve it. Also make sure to set your pitch angle initial condition to zero in the integrator or your car will start tilted!

One thing I noticed in your simulink block screenshot - there's a "Steering" subsystem with body connections. You might want to check what's inside that first (right-click and "Look Under Mask") because it might already be doing some body dynamics calculations. If it is, you'd modify that instead of creating a separate body dynamics block.

The MathWorks example uses pretty straightforward blocks - just Gains, Sums, and Integrators from the standard library. Their default values are M_body=1200 kg, I_yy=2100 kg*m^2, Lf=-0.9 m, Lr=1.2 m if you need a starting point.

Once you've got it working, test with both wheels hitting the bump simultaneously first - you should see mostly heave with very little pitch. Then try your 0.5s delay and you should see nice pitch oscillations develop as the rear wheel hits the bump after the front.

Hope this helps!

  3 Comments
Sarah
Sarah on 7 Nov 2025 at 8:52

Hi, That is incredibly helpful thank you so much!! Am I right in thinking we are now adding PID control? Thanks, Sarah

Umar
Umar on 7 Nov 2025 at 14:41

Hi @Sarah,

Glad that helped! You don’t actually need a PID controller just to get pitch motion showing up — that comes later if you decide to do active suspension control. Right now, what’s missing is the rigid-body coupling between the front and rear suspension paths.

At the moment, your front and rear suspensions are working as two separate quarter-car models, so the body only moves up and down (heave) with no rotation. To get pitch, you need to give the body two dynamic states — vertical (z) and pitch (theta) — and feed those back into both suspension legs.

In the MathWorks half-car demo (`sldemo_suspn`), they do this by calculating each suspension deflection as:

z_body – L × theta – z_wheel 

where L is the distance from the center of gravity to the axle (front is negative, rear is positive). That term lets the same body respond differently at each end.

Then, you take the two suspension forces and calculate both:

  • heave acceleration = (F_front + F_rear) / M_body
  • pitch acceleration = (F_rear × Lr + F_front × Lf) / Iyy

Those accelerations are integrated to get velocity and displacement (z and theta), which go back into the suspension deflection equations.

You’ll probably get an algebraic loop when you hook it all up — just drop a Memory or Unit Delay block in the feedback path to break it. Also make sure your pitch angle starts at zero in the Integrator or your car will spawn tilted.

Before you add any control (like PID), make sure the basic rigid-body motion looks right: when both wheels hit the bump at once, it should mostly heave; when the rear wheel hits a bit later, you should see a nice pitch oscillation.

If you later want to add active control, then you’d bring in a PID to command an actuator force to reduce pitch or improve comfort, but for now the coupling and geometry changes should be enough.

Hope that clears it up!

Sign in to comment.

More Answers (0)

Categories

Find more on Chassis Systems 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!