2. Materials and Methods
The object of the study is a tracked mobile platform equipped with a flywheel enclosed in a protective casing, located on the upper part of the chassis (
Figure 1). The chassis of the platform serves as the supporting structure that houses the main subsystems: the control unit with electronics, the battery module, the inertial measurement unit (IMU) for angular velocity and acceleration sensing, as well as communication modules and the drives of the tracked mechanism.
The main purpose of the design is to generate a compensating reaction torque by accelerating or decelerating the flywheel, thereby maintaining the platform in a stable position under external disturbances.
For a rigorous description of the system dynamics, the Lagrangian formalism is employed. The generalized coordinates are chosen as the platform tilt angle
θ(
t) relative to the horizontal and the relative rotation angle of the flywheel rotor
(
t). Since the flywheel is fixed inside the chassis, its absolute angular velocity is defined by the following expression [
3]:
The kinetic energy of the system is expressed as:
where
is the moment of inertia of the platform chassis, and
Jf is the moment of inertia of the flywheel rotor.
The potential energy is associated with gravitational and structural factors that tend to return the platform to its initial position and is approximately described by the following expression [
4]:
where
k is the equivalent stiffness. The dissipative forces are described by the Rayleigh dissipation function [
5]:
where
bp and
bf—the viscous friction coefficients for the platform and the flywheel.
By applying the Euler–Lagrange equations with dissipation and generalized forces taken into account, we obtain the following system:
where
—the torque generated by the flywheel actuator, and
d(
t) is the external disturbance.
In engineering form, the equations are rewritten as follows:
The electromechanical part of the actuator is described by the equations of a DC motor:
where
i is the armature current,
u is the voltage,
L is the inductance,
R is the resistance,
is the back-EMF constant, and
is the motor torque constant.
The operation of the actuator is constrained by the following conditions:
For feedback generation, an IMU sensor is used to measure the angular velocity and accelerations of the chassis. Its model is described by the following equation:
where
is the gyroscope signal,
ax is the accelerometer signal,
bg is the gyroscope bias, and
are the noise terms.
To improve accuracy, complementary or Kalman filtering is applied. The system of equations can conveniently be written in state-space form:
where the state vector is defined:
A PID controller is used for platform stabilization:
where
.
Alternatively, an optimal controller is employed, minimizing the cost function:
The PID controller is distinguished by its simplicity of implementation, whereas optimal control makes it possible to take all system states into account [
6]. In both cases, it is important to limit the flywheel speed in order to prevent exceeding the maximum threshold
. For this purpose, an unloading strategy is applied. System parameters are identified experimentally: free oscillations make it possible to determine the coefficients
bp and
k, step responses of the motor provide estimates of
Kt and
Jf, and refinement is carried out using the least-squares method [
7]. To systematize the obtained mathematical model and describe the interaction of its components, it is reasonable to represent the stabilization system in the form of a block diagram (
Figure 2). Such a diagram reflects not only the sequence of signal transformations but also the role of each element in the overall control loop.
The system parameters are identified experimentally: free oscillations make it possible to determine the coefficients
bp and
k, step responses of the motor provide estimates of
Kt and
Jf, and refinement is carried out using the least-squares method [
7] (
Table 1). To systematize the obtained mathematical model and describe the interaction of its components, it is reasonable to represent the stabilization system in the form of a block diagram (
Figure 2). Such a diagram reflects not only the sequence of signal transformations but also the role of each element in the overall control loop [
8].
The presented data can be conditionally divided into three groups. The first group includes the mechanical characteristics (
Jp,
Jf,
bp,
bf,
k), which define the inertial and damping properties of the system. The second group describes the electromechanical part of the actuator (
Kt,
Ke,
R,
L), linking the electrical signal to the generated torque. The third group combines the operational constraints (
Umax,
Imax,
), which set the permissible operating limits. Thus,
Table 1 provides the initial parameter base for subsequent modeling.
3. Results and Discussion
To obtain the quantitative characteristics of the system, calculations were carried out based on the equations of motion (see Equations (7)–(9)) and the parameters from
Table 1. The purpose of these calculations is to determine the main dynamic properties of the platform, evaluate the limiting operating modes of the actuator, and estimate approximate energy indicators. These results serve as an intermediate stage between the mathematical formulation of the problem and the simulation modeling, which will be presented further in the form of graphs.
For the calculation of the natural oscillations, the following computation was performed. If the actuator is disconnected (current i = 0), the equation of motion of the platform is written as [
9]:
where
Jp—the moment of inertia of the platform,
bp is the damping coefficient, and
k is the stiffness coefficient of the suspension.
This is the standard equation of a damped oscillatory system. Its solution is characterized by the natural frequency [
10]:
Without control, the platform will oscillate with a period of about 5 s. These data are important for selecting the simulation time and for comparison with the transient processes in the graphs (see
Figure 3). The effect of damping is characterized by a dimensionless quantity—the logarithmic decrement [
11]:
The equation of the motor’s electrical circuit is defined as follows [
12]:
If assumed
at startup and apply the maximum voltage
, the estimated current is:
The obtained value is close to the rated limit
, which confirms the necessity of introducing current limitations in the numerical model and explains the presence of cutoffs in the current plots (see
Figure 4). The instantaneous power is defined as the product of voltage and current:
The total energy consumed during the stabilization time
tset [
13]:
Under typical conditions (
. If the stabilization time is
tset ≈ 5 s, then
E ≈ 300 J. It is also convenient to consider the accumulated energy:
which increases over time and reaches a plateau after the completion of the transient process. These estimates will be compared with the energy graphs (see
Figure 4 and
Figure 5), generated on the basis of numerical modeling in Python 3.12.
The calculations have shown that:
the system has a low natural frequency (ω0 ≈ 1.3 rad/s) and weak damping, which makes it prone to prolonged oscillations;
at maximum voltage, the motor current reaches its rated limits, which requires strict current protection;
the energy expenditure for stabilization is on the order of several hundred joules, which corresponds to the actuator’s rated capabilities.
Based on the equations of motion and the system parameters (see
Table 1), a series of numerical experiments was carried out. The modeling was performed using the fourth-order Runge–Kutta method with a 1 ms integration step, which provided sufficient accuracy in describing the transient processes. The purpose of the modeling was to confirm the earlier analytical estimates (natural frequency, damping, current and energy limits) and to analyze the performance of the proposed control algorithms in various scenarios: from free oscillations to stabilization under disturbances, measurement noise, and actuator constraints.
The motion of the platform was examined for
. For comparison, two cases were considered: without control and with the operation of the cascade controller (
Figure 6). The computations were carried out in Python 3.12.
The graph shows that without control, the system undergoes damped oscillations but does not reach equilibrium within the simulation time. When the controller is activated, the oscillations are quickly suppressed, the settling time is about 5 s, and the overshoot does not exceed 10%. The obtained
tset is consistent with the analytical estimates of energy and power (see the previous section). Thus, the cascade controller ensures the required quality of the transient process and can be applied for platform stabilization. To investigate the effect of an impulse disturbance (0.5 N·m, 0.1 s), a graph was generated in Python 3.12, shown in
Figure 7.
At t = 1 s, a short disturbance torque of 0.1 s duration was applied. The platform angle deviated by no more than 3°, after which the controller returned the system to equilibrium in less than 4 s. The impulse disturbance did not change the total system energy by more than 5% compared to stabilization without disturbance, which confirms robustness against short-term loads. Thus, the system reliably compensates for external transient impacts. To analyze the effect of filtering on measurement quality, a spectral analysis of the error was performed in Python 3.12 using the Fast Fourier Transform (FFT) method (
Figure 8).
In the spectrum of the raw data, distinct high-frequency peaks caused by sensor noise are clearly visible. After applying the complementary filter (α = 0.96), the amplitude of these peaks is significantly reduced, indicating the suppression of high-frequency components. At the same time, the low-frequency part of the spectrum remains practically unchanged, which preserves the reliability of the dynamic information for the controller. Thus, the filter improves the quality of feedback, minimizes the risk of system excitation due to noise, and ensures correct control.
To study actuator stability under prolonged disturbances, a constant torque of d = 0.6 N·m, applied starting from t = 1 s, was simulated in Python 3.12 (
Figure 9). In the absence of unloading, the flywheel speed tends toward the maximum limit of
rad/s. This leads to saturation of the actuator and loss of control efficiency. When the unloading algorithm is enabled, the flywheel speed is maintained within
, which prevents motor overload.
The results confirm that unloading is an essential element of the system, providing actuator protection and maintaining stability under prolonged external disturbances. In Python 3.12, simulations were carried out for two types of controllers with the same initial platform deviation
θ(0) = 5° (
Figure 10).
The results showed that both algorithms ensure the system returns to equilibrium. At the same time, the cascade controller is characterized by smaller overshoot and a faster transition to the steady state, whereas state-feedback demonstrates smoother and softer dynamics. Thus, both methods are workable: the cascade controller is convenient in practical applications, while state-feedback is advisable in optimization tasks where a balance between smoothness and speed of the transient process is required.
Therefore, modeling in Python 3.12 confirmed the results of the analytical calculations. It has been shown that the flywheel stabilization system effectively suppresses both free oscillations of the platform and external disturbances of impulsive and constant nature. Filtering algorithms significantly improve measurement quality, while the unloading strategy prevents actuator overload under prolonged disturbances. The comparison of different controllers demonstrated that the cascade controller is simple to implement and provides sufficient efficiency, while state-feedback yields a smoother transient response. Thus, the modeling demonstrated the practical feasibility of the proposed control structure and its consistency with the analytical results.