Project

Starting with Simulink

Starting with Simulink by plotting functions and doing a comparison on Suspension Systems

Objectives:

1. To plot a function y(x)=(x-1)*(x-3)^2*(x-9)^2 using basic Simulink blocks.

2. To run Simulink example “Suspension System Comparison” and answer the following:

What is the objective of the simulation? What are the similarities and differences between the three systems understudy?

What are your observations from the results?

How the oscillating velocity source is created?

Theory:

What is Simulink?

Simulink is a block diagram environment for multidomain simulation and Model-Based Design. It supports system-level design, simulation, automatic code generation, and continuous test and verification of embedded systems. Simulink provides a graphical editor, customizable block libraries, and solvers for modelling and simulating dynamic systems. It is integrated with MATLAB, enabling you to incorporate MATLAB algorithms into models and export simulation results to MATLAB for further analysis.

Simulink is a visual tool for doing computational simulations. It uses a drag and drop system for simulation components that can then be connected between them with lines. The components you use can be configured and you have components that allow for mathematical operations.

It is mostly used for engineering, where you can represent your system as a set of variables and model it mathematically. Some examples are electrical circuits; mechanical systems that need to be controlled, like cars, aeroplanes, etc; chemical industry pipelines; robotics; etc.

This is how the Simulink window looks like

It is a great way to model your systems, as it is very visual, and is suited for some applications that are not too specific, or performant. Unfortunately, it is a proprietary system and somewhat expensive. It is used by industries.

Simulink is a graphical modelling and simulation environment for dynamic systems. You can create block diagrams, where blocks represent parts of a system. A block can represent a physical component, a small system, or a function. An input/output relationship fully characterizes a block.

Simulink handles data in three categories:

  • Signals — Block inputs and outputs, computed during the simulation

  • States — Internal values, representing the dynamics of the block, computed during the simulation

  • Parameters — Values that affect the behaviour of a block, controlled by the user

At each time step, Simulink computes new values for signals and states. By contrast, you specify parameters when you build the model and can occasionally change them while the simulation is running.

What is Non-linear Spring and Variable Spring?

In a linear spring, the distance between two coils is always constant till the end of the spring. In a non-linear spring, the distance between coils is not constant and there might be unevenly shaped springs too, like the one shown above which is shaped like a tornado.

In a variable spring, the distance between coils need not be the same, they are variable.

Why is Suspension important?

It is important for the suspension to keep the road wheel in contact with the road surface as much as possible because all the road or ground forces acting on the vehicle do so through the contact patches of the tyres. The suspension also protects the vehicle itself and any cargo or luggage from damage and wear. It also keeps passengers comfortable.

Answers to Objectives:

1. To plot a function y(x)=(x-1)*(x-3)^2*(x-9)^2 using basic Simulink blocks.

Block Diagram:

Clicking on "Scope", we will get the plot for the given function y(x). That plot is shown below:

Here we have given stop time as 10 seconds, so we get 10 values of x. That is why there are 10 divisions on the x-axis. The y-axis shows the value of calculated y(x).

2. To run the Simulink example “Suspension System Comparison” and answer the following:

What is the objective of the simulation? What are the similarities and differences between the three systems understudy?

What are your observations from the results?

How the oscillating velocity source is created?

This example shows a testbed containing three sets of springs and dampers excited by the same oscillating velocity source.

The first uses the Shock Absorber block and includes linear stiffness and damping. Optional friction and hard stops are not used. The second shock absorber uses a Nonlinear Translational Spring and a Nonlinear Translational Damper specified by symmetric polynomials. The third uses a Variable Translational Spring and Variable Translational Damper.

The spring constant is varied during the simulation using open loop control and the damping coefficient adjusts to ensure critical damping is achieved. Closed loop control can be added to simulate an adaptive suspension system.

Velocity Modelling:

Values for amplitude and frequency for the sine waves and amplitude, period and pulse width have been inputted for the sine waves and pulse generators.

These graphs are then multiplied using a product block. Finally, all the 3 products are added to show to the final plot of all 3 road conditions.

Common inputs have been given to the 3 suspension systems. It is basically different road conditions, one is bumpy, one is slightly bumpy and the last one is an even road but still with slight minute bumps.

If we zoom in on the graph of the 3rd case, we can still see some light pulse widths. Below is the zoomed-in plot of the 3rd case.

Plot in Scope:

Results & Conclusions:

Block diagram for the given function was done successfully and the graph was plotted for time vs y(x).

The second study has helped us to understand the application of shock absorbers in real-life applications. Therefore, we could see that the variable shock absorber displays the best characteristics because it comes fastest to a straight line (in the graph) when the velocity is removed whereas the other 2 take some time to eventually dampen to a straight line.

The yellow line represents the variable shock absorber. Therefore we can see that when compared to the other 2, the variable one has very little or almost no variations when the velocity is removed.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.