1. Introduction
On the basis of the previous literature [
1,
2,
3], this paper explores the determination of state variables of dynamic systems, including both linear and non-linear continuous systems and linear and non-linear discrete systems. For the latter, difference equations with specific mathematical difference solutions or solutions by functional transformations sequence [
1], ref. [
4], can be employed, which enable the conversion from the space of time-dependent function subjects to the space of complex functions or frequency function frames. The discrete Laplace transform, discrete Fourier transform, and lesser-known Z-transformation [
5,
6,
7,
8], are some examples of these transformations, representing a power series of a complex variable.
The focus of this paper is on the numerical solution of ordinary differential equations. While this is a continuously evolving area of research, we present a selection of basic algorithms and underlying theories for a new modified non-approximative method of direct calculation for state variables of dynamic systems. We begin by discussing Euler’s method, which is the natural starting point for any discussion of numerical methods. Although it is not the most accurate method studied, it is by far the simplest, and much of what we learn from analyzing Euler’s method in detail carries over to other methods without significant difficulties. For continuous systems, differential equations are used to describe them, and mathematical methods, including classical and numerical methods and operator methods [
3,
6], are employed to solve them. Other methods, such as the theory of series and spectral analysis, can also be used in particular and predigested cases [
5,
9]. Instantaneous energies of the state variables are proved in [
10,
11].
The proposed method exhibits good accuracy and brings significant computation time savings. We demonstrated the method’s effectiveness through its application to the solution of the Steinmetz circuitry model [
12,
13,
14] using the Matlab environment, which can be verified by the Matlab/Simulink circuit simulator [
15,
16].
This article consists of the following five sections: problem formulation, a new non-approximative method of calculation and a comparison with the Laplace–Carson and implicit Euler solutions, an example in the field of electrical engineering, specifically the Steinitz model solution, simulation and verification, and a discussion and conclusion.
3. Problem Solution and Simulation Example
The resulting relations for determination of the instant value depend on the system matrices , or , , respectively, and the initial conditions .
Consider a second-order ODE system (1) in state-space notation:
where
,
are symbolic constants corresponding to the electrical parameters of the substituted equivalent circuit,
,
,
,
,
, and
3.1. Case of Constant Excitation Function
Furthermore, assume that
Regarding time domain investigation, the Laplace–Carson operator method has been used [
3,
6]. Applying the Laplace–Carson transform, we obtain the operator form of variables the
of Equation (10a,b)
with the initial conditions
.
After the separation of
and
and using the inverse transform and lemma of residua [
4,
6],
we obtain, under zero initial conditions,
where
,
.
For the time waveforms of
and
, see
Figure 1.
These waveforms are the response of the system to a unit step of
. During the calculation, continuous time is substituted by the discrete time instants
, where
is the integration step and
is the step order. The numerical values of the variables at the discrete time instant
n.
t are listed in
Table 1 when the time constant
t =
RC equals 10 msec.
The total response is:
where
.
Now, the values in
Table 1, worked out by solving the system Equation (14a,b), are the reference values for the comparison with the numerical solution using the direct discrete method.
3.2. Case of the Nonharmonic Periodical Excitation Function
Regarding time domain investigation, the Laplace–Carson operatory method has been used [
5,
6] when the input exciting function is known. Function
on the right side of the Equation (14a,b) can be any nonharmonic one, but it must be the periodical function, e.g., the single-phase-rectified output voltage
For simplicity, consider the excitation
rectangular waveform derived by the z-transform in the form:
or simply algebraically:
Now, the notation in the Laplace–Carson form is:
where
The next solution is for the time range 0 to
T/2:
Because is a constant , the time waveforms of variables x1(t) and x2(t) are the same as those in Equation (14a,b) in the range .
In a similar way, the transient component of
can be calculated:
along with the steady-state component for one half-period:
Finally, the total transient waveforms in the entire time range can be calculated:
The results of the simulation of
and
for three half-periods are shown in
Figure 2.
The numerical values of variables at the discrete time instant
n.
t are listed in
Table 2 when the time constant
=
RC equals 10 ms.
3.3. Comparison with Numeric Solution
Now, we compare the values in
Table 1 and
Table 2 with those obtained by solving Equation system (10a,b) using Euler’s implicit method.
Equation (10a,b) was used, knowing
and the response of the system under unit step
U. By substituting
with
in response to Equation (14a,b), we see that the results are the same as those in
Table 2, and the time waveforms are the same as those in
Figure 2. However, the solution using the Laplace–Carson operator method has the advantage of showing both the transient and steady-state components in addition to the overall course of the variables
x1(
t) and
x2(
t).
Equation (10a,b) can be expressed in matrix form and state-space notation:
After implicit Euler forward implementation, we obtain:
In symbolic matrix form and simplification, we obtain Equation (7):
which can be further simplified as Equation (8):
The results are shown in
Table 3 and
Table 4. In order to make the results comparable, the integration step should be significantly smaller than the smallest time constant of the circuit; we chose
Although the accuracy seems to be sufficient for an extended target time, the computational complexity can be considerable. Therefore, in the next section, we introduce a new innovative modified method.
3.4. Direct Non-Approximative Method of Calculation
By successive derivation of Equations (8) and (24a), we gradually obtain:
where the
and
matrices can be determined by Equation (24b). Thus,
Proof:
Therefore, we have to know the exciting vector
as a function of
or
. Since the functions of
vector are analytics, it is sufficient to replace continuous times with discrete ones. If not, then a lookup table must be used. The relation (25) can be also used for non-linear systems when all non-stationary elements of
and
are transferred into the vectors of the input exciting functions
:
where matrices
are stationary ones, and there is no need to count them in each calculation step. □
If the excitation function is fictitiously (
) or truly periodically (
) repeating, then we can use “the long jumps” approach. Outgoing from Equation (23), we substitute the fundamental and transition matrices with the small integration step (
h) by matrices with periodically repeating a long jump, for example,
or
and index
k by
n, where discrete time is equal to
or
, respectively.
The relations (27) for for . are also valid for for .
Figure 3 shows the courses of total system energies represented by the instantaneous energy of the state variables
x1 and
x2 [
10,
11] as a function of
, Equation (3a,b), calculated by the direct DNM method in equidistance instants
. Thus,
where
and
are electrical constants (inductance
and capacitance
). Therefore, Equation (28) expresses a direct relationship between the total energy
and the matrices
and
because of
for
Figure 3a, and
for
Figure 3b.
Going back, consequently, the calculation for
using
is:
Combining Equations (26) and (29), we can obtain [
9]:
where
.
Thus, it is sufficient to compute the matrices (27) for the first long jump ( or .
The time of calculation using the above equations is a rather big one.
Therefore, a modified approach was used. Therefore, starting from Equation (24a) but considering step
equal to the repetitive period (
or
of the sequence of the excitation function, we obtain:
where
are
or
.
Now, we can imply the z-transform for the direct determination of
vector [
6,
7,
9,
11].
or
- A.
Case of
Applying the z-transform (Equation (31a)) yields:
Applying the inverse z-transform using the Cauchy residue theorem gives:
where
is the
j-th root of the denominator of Equation (30b), i.e.,
,
Pseudo-code for the computational algorithm is as follows, Algorithm 1.
Algorithm 1: Direct non-approximative method of calculation |
| Input: |
| —system matrix |
| —input matrix |
| |
| —initial conditions vector |
| —excitation function |
| —small time step size |
| —large time step size |
| —simulation time |
| |
| Output: |
| —state vector |
| state variables |
| —time vector |
| |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | for do |
8 | |
9 | end |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | for do |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | end |
The results of this case using Equation (31) are given in
Table 5.
In this case, when
, it is also possible to perform the calculation with step
and matrix
instead of
. Then,
Such a calculation (35) is optimized, and the calculation time is minimized because of the term total sum in Equation (26b), so there is no need to perform it. Therefore, using Equations (35) or (26), we can easily calculate matrices for step and, consequently, calculate the state variables at discrete instants by using Equation (35).
Table 6 lists the values of variables
x1(
t) and
x2(
t) at discrete time instant
for
=
.
By comparing it with
Table 5, we find that the differences in the values of the variables are negligible, but the calculation time is reduced against
Table 5.
Time circumstances: computation time
tcomp (s) is shown in
Table 7 for the Laplace–Carson method (first line), implicit Euler method (Eul
−1—second line), and direct non-approximative method DNM (third line).
We can also obtain—still for
—a steady-state solution by inverse transform and using the finite value theorem (if needed). The lemma of finite value can be used to compute steady-state values of the
:
or
where
are the roots of the denominator of the fraction z-function.
- B.
Case of
Applying the z-transform (Equation (31b)) yields:
Applying the inverse z-transformation using the lemma of residua gives:
where
is the
j-th root of the denominator of Equation (30b), i.e.,
,
In this case, the matrices
can be calculated using Equations (35) or (25) for step
. The results of this case are shown in
Table 8.
- C.
Case of harmonic function, e.g.,
In this case, the matrices
can be calculated using Equation (25) for step
or the z-transform for the function
and the subsequent inverse z-transformation when:
When calculating the state variable vector
,
we must know matrices
. Unlike the previous case matrices.
cannot be directly calculated with the help of Equations (35a,b) but should be calculated using the z-transform:
for step
, where
–
are roots of the denominator of the fraction z-function. Then, we can calculate matrices
and vector
.
- D.
Case of a nonharmonic function, e.g., that in Figure 4
The time waveform of the nonharmonic exciting function is shown in the following figure.
Taking a discrete state-space model for the three-phase converter output, the state-variable vector can be calculated [
12]:
where
are fundamental and transition matrices (in general) of system parameters. The solution for
, which is rather complicated, is given in
Appendix A. However, a better—simpler—solution is to perform it with the T/2 repetition period with Equations (29)–(34):
and
The matrices
or (
) cannot be directly calculated with the help of Equation (27), but they can be calculated using Equation (25), where
is:
4. Example from the Field of Electrical Engineering—Simulation and Validation
According to the fundamental features of power electronics systems (each power electronics device has a discrete character), their input and output values represent sequences of impulses that are separated by discrete instants of conductivity changes of switching elements (commutation of semiconductor components). At the time between switching states, in other words, in their intervals of activity, the electric quantities are continuous [
13].
The output, which means the voltage of the power electronics system, can be different:
- -
continuous (battery + pulse converters with filter),
- -
ripple voltage (rectifiers without filter),
- -
harmonic (grid or resonant converters),
- -
nonharmonic (inverters without filter), see, e.g.,
Figure 4.
Each of these types was used to supply voltage for the Steinmetz model of overhead lines, as analyzed in the following text.
- A.
Modelling given electric circuit
Consider a system by the circuit diagram using the Steinmetz π-term [
14,
15],
Figure 5.
A continuous dynamic model can be derived from the circuitry equations for
, and
is negligible:
Thus, the state-space form is:
and the shorter matrix form is:
After time discretization with the
-step (see
Appendix B), we obtain fundamental and transition matrices
. Then, we can calculate matrices
(or
, and we obtain:
or
and, consequently, by the DNM method, we obtain the state variables vector
using Equations (38) or (A1), respectively.
In the case of harmonic supply voltage or rectified harmonic voltage, instead of
, it is in its discrete format:
or
A similar method can be used for a nonharmonic impulse supply exciting voltage [
12]:
where
is an order of the period of the impulse switching function (
); replacing
with a new variable
, we obtain the following for the input exciting voltage:
where
are the same as in previous cases.
Simulations have been worked out for a given electric circuit model (
Figure 4) with stationary matrices
,
and
,
or
, under
Figure 9.
Figure 6.
Time waveforms during the first three multiple t for = .
Figure 6.
Time waveforms during the first three multiple t for = .
Figure 7.
Time waveforms during the first three half-periods for =.
Figure 7.
Time waveforms during the first three half-periods for =.
Figure 8.
Time waveforms during the three half-periods for .
Figure 8.
Time waveforms during the three half-periods for .
Figure 9.
Time waveforms during the first three half-periods for .
Figure 9.
Time waveforms during the first three half-periods for .
The results of each case using the direct numeric method are shown in
Table 8,
Table 10, Tables 12 and 14. The time waveforms during the first three multiple
t under
=
are shown in
Figure 6.
The values of state variables
i0,
i1,
u1, and
u2 at discrete time instant
t =
n.
t are given in
Table 10.
Time circumstances: computation time
tcomp (sec) is shown in
Table 11 for the implicit Euler method (Eul
−1—first line) and the direct non-approximative method DNM (second line).
Comparison of computation time: as we can see in
Table 11, the computation time for the first three multiples
t was lower using the Euler implicit method. However, over about 30 times
t, the computation time was lower using the direct numerical method. The higher the multiple, the greater the difference in calculation time in favor of the DNM method.
The time waveforms during the first three half-periods for
=
are shown in
Figure 7.
The values of state variables
i0,
i1,
u1, and
u2 at discrete time instant
t =
n are given in
Table 12.
Time circumstances: computation time
tcomp (s) is shown in
Table 13 for the implicit Euler method (first line) and direct DNM method (second line).
Comparison of computation time: as we can see in
Table 13, the computation time for the first three multiples
t is lower using the Euler implicit method. However, over about 30 times
t, the computation time was lower using the direct numerical method. The higher the multiple, the greater the difference in the calculation time in favor of the DNM method.
The time waveforms during the first three half-period under for
are shown in
Figure 8.
The values of state variables
i0,
i1,
u1, and
u2 at discrete time instant
t =
n are given in
Table 14.
Time circumstances: the computation time
tcomp (s) is shown in
Table 15 for the implicit Euler method (first line) and the direct DNM method (second line).
Comparison of computation time: the time circumstances were very similar to those in
Table 13 when the supply voltage was
=
.
The time waveforms for the first three half-period under for
are shown in
Figure 9.
The values of state variables
i0,
i1,
u1, and
u2 at discrete time instant
t =
n are given in
Table 16.
Time circumstances: computation time
tcomp (s) is shown in
Table 17 for the implicit Euler method (first line) and the direct non-approximative method DNM (second line).
Comparison of computation time: the time circumstances are very similar to those in
Table 13 when the supply voltage is
=
- B.
Validation of chosen configuration using circuit simulator (Matlab/Simulink)
This study presents a validation case in which a single-phase uncontrolled rectifier is fed by a sinusoidal voltage
=
. The circuit simulator used in this research enables the implementation of rectifiers with realistic electronic switch models, specifically diodes.
Figure 10 illustrates the validated circuit’s schematic, with the load parameters remaining consistent with those utilized in previous figures. Rectifier switch parameters were obtained from the catalog values of the diodes used in the experiment. However, the network voltage had to be slightly increased to produce an output voltage similar to that depicted in
Figure 7, accounting for rectifier power losses. The achieved efficiency (97.26%) was computed using [
15,
16] as the ratio of the mean value of active output power to active input power.
The time waveforms resulting from the simulation are illustrated in
Figure 11. The simulated waveforms exhibit similarities to those obtained in
Figure 7 and the values documented in
Table 12 when the supply voltage is
=
. Differences between the waveforms are practically negligible.
Overall, the validation case indicates that the proposed simulation method produces results that are highly consistent with experimental results. These findings lend credibility to the proposed simulation method and offer assurance that it may be employed in a range of practical applications. Future studies may investigate more complex rectifiers and examine the potential of this method for optimizing the design and performance of rectifier circuits.
5. Discussion and Conclusions
In conclusion, this paper introduced a novel direct non-approximative method for computing state variables in any discrete step, which enables the direct calculation of variable values without requiring knowledge of previous variable values. The method uses the successive derivation of the state variable vector to gradually obtain the values at the target time, and to speed up the calculation, the z-transformation method is further used.
The paper demonstrates that the proposed method is advantageous for long periods of stabilization of the system or when the shortest time constant in the system is greater than the repetition period of the excitation function. As evidenced by the example with the Steinmetz model, which shows steady-state behavior for tens of half-periods, the DNM method reduced the calculation time by up to 70% compared with the approximative implicit Euler method.
The results were validated using Matlab/Simulink, and the proposed method offers several advantages over traditional methods, including improved accuracy, reduced computational time, and simplified calculations. This makes it a valuable tool for the correct design and operation analysis of power electronic systems.
In summary, the direct non-approximative method presented in this paper represents a significant advancement in the field of power electronics and offers practical applications in industry. Future research could focus on applying the method to more complex systems and exploring its potential for optimizing the design and operation of power electronic systems.