# Mathematical modeling of technological objects and systems through the eyes and hands of a student

Researching the possibilities and boundaries of using scientific technologies and software both in the usual field of work and in new areas is one of the key priorities of modern industry. We continue our series of articles on mathematical modeling, revealing another area of ​​application for REPEAT software.
Today you see the result of the “School of Modeling” project – a 1D model of a car suspension system. Author of the article, student of the Russian State University. Kosygina – Alexey, who worked on this project using our tools and technologies, which became a good test for their versatility and flexibility of use.

Link to telegram channel REPEAT: https://t.me/repeatlab

## Development of a 1D model of a car suspension system

The article presents a model of a car suspension system developed on the REPEAT platform.

System Description

A car's suspension system should provide a comfortable ride when driving on uneven roads, but if unwanted disturbances occur, the system needs to stabilize as quickly as possible.
To simplify the car suspension diagram, we will model 2 masses and 2 sets of springs and shock absorbers, and analyze ¼ of the car suspension.

Let us consider the vibrations of a wheeled vehicle in the longitudinal-vertical plane. Model includes sprung mass m1, and unsprung mass m2.
Sprung mass is a mass that includes the mass of the frame or body and other parts of the structure (body elements, engine), the weight of which is transferred to the elastic elements of the suspension.
Unsprung mass is a mass that includes the mass of the wheels, the mass of the suspension itself and other parts of the suspension system (tires, transmission and braking system elements, etc.) separated by the suspension from the frame or body.
Connections are applied to the sprung parts of a moving vehicle, as a result of which vibrations in relation to the longitudinal axis are largely compensated by the suspension guide devices. In real conditions, they are insignificant and appear to a greater extent during braking than when driving over uneven surfaces. Damping devices minimize angular vibrations about the vertical axis (yaw) and linear vibrations about the transverse axis, which can be compensated by lateral compliance and lateral slip of the tires.
Unsprung masses perform linear vertical oscillations. With dependent wheel suspension, in some cases it is necessary to take into account the transverse angular vibrations of the unsprung masses. Longitudinal-angular vibrations of the sprung parts of the car, called galloping, are the most unpleasant for humans. Most real suspension systems are symmetrical relative to the longitudinal axis; in this case, longitudinal-angular vibrations will become independent of transverse-angular vibrations and vice versa, which means that they can be studied separately from each other [1].

Mathematical model of a car suspension system

Let's start by introducing forces into our system based on its elements, they are reflected in Figure 1.
The force acting on the spring can be expressed as S. It is proportional to the displacement – the greater the deformation, the greater the force, which is true to Hooke's law. Vector value S can be represented using the following equation:

where k is the elasticity coefficient, and Δ is the spring deformation (linear displacement).

The force acting from the damper can be shown as G. It is proportional to the strain rate and can be represented by the following equation:

Where c – damping coefficient and u – mass velocity.

To represent the motion in the system, we will assume that F represents the forces acting on the system x1 And x2 represent mass displacement m1 And m2 accordingly, and w— disturbance (for example, a bump on the road).

Equations of motion:

Spring equations:

Damper equations:

For the first stage of modeling, it will be sufficient to build a model of the movement of the first sprung mass m1 spring-damper-mass system according to the equation of motion:

Modeling process

To model the damper-mass spring system we will need:

• adder (since all values ​​in parentheses are summed);

• division block (to obtain the mass acceleration value m1);

• 2 integral blocks (to obtain velocity and mass displacement);

• 2 gain blocks (multiply sequentially by values k1 And c1to get the values ​​for the adder block back);

• control force F (in our case a constant).

Now let's move on to the first experiment with the following parameters:

• Elasticity coefficient k1=600 N/m;

• Damping coefficient c1=14 N·s/m;

• Sprung mass m1=650 kg.

In all graphs, the X axis defines time in seconds, and the Y axis defines displacement in meters.
The graph shows the resulting mass displacement behavior. This system stabilizes over time, but slowly and not to a state of equilibrium within 100 seconds. Having this kind of suspension for our car would result in long oscillations that would probably make people feel bad when traveling. You can experiment with parameter values ​​to see how the spring-damper-mass system responds to different values. Below are some brief examples:

Increased elasticity k1 = 1200 N/m will lead to shorter amplitude oscillations, but to a faster transition to equilibrium.

Increasing the damping factor = 28 N·s/m will result in greater stability.

By conducting experiments, we were able to determine the dynamics of the system, which are closer to physical ones. In the last graph there are long-term oscillations, but the dynamics of mass movement, and in fact these are the oscillations that the passenger feels, have a damping character and at 90 seconds practically comes to equilibrium. You can further customize the model by selecting coefficients, but our goal is to show more possibilities for working with the elimination of fluctuations. Since the goal of this work is to reduce vibrations in the car to ensure passenger comfort.

System expansion

We can expand our system to look at changes in mass movements m1 And m2using the following equations:

Below is a step-by-step improvement of the system:

Then we will add a control force F as a constant (which will simulate a step of one second) with a value of 1N and a disturbance w with a value of 0.1 m – imitation of unevenness on the road (disturbance).

The system parameters are as follows

So, the car suspension proposed in Figure 1 was shown in Figure 9 and implemented in REPEAT. This system is open loop and has no feedback. In the model, there is a response of the system to a single step of the control force F and disturbing influence w in increments of one. The disturbance may be a vehicle driving out of a pothole.
Next, we will analyze one graph on which the axis x – time, along the axis y – difference in mass movements (x1-x2). This graph was obtained as the output value of the adder block; it is outlined in green in Figure 9.
If we consider only the influence of the control force Fit is enough to establish the disturbing influence w=0. Thus, the following system response can be observed:

If we consider only the disturbing influence, without the influence of the control force F, it is enough to establish F=0. Thus, the following system response can be observed:

The graph shows that for a single step of applied force, the system has insufficient damping. The maximum value is about 0.072 m and the settling time is 20 s. From this graph we can say that traveling by car will not be comfortable. To improve the driving experience for the driver and his passengers, a simple and reliable solution would be to introduce a controller into the system that could stabilize the suspension. In the case of working with REPEAT, there is already a ready-made solution and this is the “PID controller” block.

Setting up a regulator to control vibrations of a car suspension system

The above model of a car suspension is of a conventionally simple mass-spring-damper design. But the world does not stand still, and modern industry requires improved vehicle performance and passenger comfort. The spring and damper do absorb excess vibrations, but what if we try, in accordance with the trends, to try to introduce another element – a regulator, which will help the mechanical system absorb vibrations even better and faster. It's as if we implemented a hydraulic system into the suspension, controlled by a feedback controller.
A regulator is a device, which can be in the form of an analog circuit, microcircuit or computer, that controls and physically changes the operating conditions of a given dynamic system.
There are various control algorithms that are used in such problems, such as adaptive control, LQG, nonlinear control, H at infinity, P, PI and PID control.
P, PI, PID controllers are widely used by engineers because they are easy to understand and take into account the history of the system, as well as anticipate its future behavior. But we will not stop and repeat ourselves, since many articles have already been written on this topic, but we will simply present the articles here for your reference:

In this paper, we will present a simple but universal feedback mechanism using the example of a proportional-integral-derivative (PID) controller.
The PID controller control function can be represented as follows:

Where u