Fast processing without processors:
The Conductance Matrices
DOMENICO PORTO
System Research and Application
STMicroelectronics S.r.l
Stradale Primosole 50, Catania
ITALY
Abstract: - The proposed work, starting from some basic principles of In Memory Computing, aims to describe
how some relatively complex calculus, such as equation solving, can have a fast answer with a simple HW. be
performed in a fast and accurate way through a very simple hardware structure, avoiding complex nonlinear
operators, without involving processors and providing a huge reduction of computation time and consumption.
This fact opens the way to an alternative way to solve distributed tasks e.g. in microrobotics or other real time
applications.
Key-Words: - In Memory Computing, Phase Changing Memory, Polynomial Equations, Matrix Algebra, Field
Oriented Control, Linear Observer
Received: July 9, 2023. Revised: March 19, 2024. Accepted: May 23, 2024. Published: June 28, 2024.
1 Introduction
Computation time is a topic that is continuously
investigated in order to increase the processor’s
speed and optimize the overall performance. This is
also strictly related to power consumption, meaning
that, according to studies in [1][2][9], 95% of
energy consumption is in data movement among
processors and memory (the “memory wall”
problem). In Memory Computing (IMC) [10] aims
to perform some operations still inside the memory
without involving the processor and limiting the
crossing of the “memory wall” (see Figure 1)
Figure 1. Von Neumann Architecture limitation: Memory Wall
A Phase Changing Memory (PCM) could be a
good technological basis for IMC, allowing matrix
products of data while they are stored [3]. This fact
may open the way to the solution of some nontrivial
problems, if they can be expressed through a
suitable matrix product chain.
2 In Memory Computing with PCM
Phase-change materials are typically compounds
of Ge or Sb that can be switched reversibly between
amorphous and crystalline phases of different
electrical resistivity. The amorphous phase tends to
have high electrical resistivity, while the crystalline
phase exhibits a low resistivity, sometimes three or
four orders of magnitude lower. A PCM device [3]
[11] consists of a certain volume of this phase
change material sandwiched between two
electrodes. An access device such as a field effect
transistor (FET) is typically placed in series with a
PCM device to constitute a complete PCM cell,
modulating the crystallization in the material. This
allows it to store an analogue resistive value until
the next rewriting. By putting PCM cells in a
suitable grid structure (see Fig. 2) and assuming as
input an array of voltages, it can be calculated the
output currents through the matrix product GV=I.
Figure 2. PCM-based In Memory Computing matrix product.
Colors of parameters identify the matrices involved in the product
INTERNATIONAL JOURNAL OF APPLIED MATHEMATICS,
COMPUTATIONAL SCIENCE AND SYSTEMS ENGINEERING
DOI: 10.37394/232026.2024.6.10
Domenico Porto
E-ISSN: 2766-9823
112
Volume 6, 2024
The conductance matrix G allows the calculation of
multiple products and sums, if voltages are taken as
inputs and currents as outputs:
I1= G11v1 + G12v2 I2= G21v1 + G22v2 I3= G31v1 +G32v2
(1)
Inverting this assumption, divisions can also be
implemented. By forcing unitary values to currents,
it is possible to have as output voltages the inverse
values of each conductance:
v1 =1/ G11 , v2=1/G22 , v3=1/G33 (2)
An example is given in Figure 3.
Figure 3. Circuit implementing simple inversion of values stored
in the Conductance Matrix. Here I1=1 , I2=1 I3=1 are forced to obtain
v1=1/G11 , v2=1/G22 v3=1/G33
Cascade connections of structure as in Figure 2 and
3 can simultaneously perform all these operations at
the same time in which the related parameters are
stored, guaranteeing immediate results for a wide
class of linear problems. One of this is the solution
of linear algebraic systems:
AX=B → X=A-1B (3)
The evaluation of inverse matrix A-1 can be reduced
to a routine performing few matrix sums and
products and one scalar divisions, e.g. by using the
Cayley-Hamilton formula:
A-1= (-a1 I- a2A -…..-an-1An2-An1)/a0 (4)
(n = dim(A))
The values a0, a1, ….an-1 are the coefficient of
characteristic polynomial of A, easily derivable with
well-known sums and products of its coefficients
(e.g. an-1 = -Tr(A), a0 =det(A)…).
In the next section we will see how this approach
can be able to solve other nontrivial problems that
would usually require more complex operators and
the use of a processor.
3 How can polynomial equations be
solved only via matrix products?
Polynomial Equations are fundamental in a wide
variety of problems, being also the basis of
differential equations solutions and very often it is a
nontrivial task for processors due to the several
iterations that are needed in some cases when
required solutions are more than two. If we focus
our attention to polynomial equations whose degree
is less than four, these ones, according to Galois
experience, can be solved directly through radicals
without trial-and-error routines and could be good
candidates to be implemented via In Memory
Computing. However, radicals seem to be a huge
task to perform if dealing only with sums and
products. Let us consider for example the second
order equation:
λ2 +b λ +c =0 (5)
Using methods explained in [4] and [5] and
assuming for the moment that Δ>0, factorizing Δ/4
as Δ/4 =g∙h, a good approximation of the square root
is an intermediate value between the positive
numbers g and h . This could be an average among
arithmetic mean and harmonic mean:
󰇡

󰇢 (6)
It must be noted that formally the same could be
applied also if Δ<0. In fact it can be written:
󰇡

󰇢
(7)
Let us consider for simplicity the case Δ>0: one
simple candidate for g is a perfect square
sufficiently close to Δ/4= b2/4-c . If we add the
positive quantity c2/b2 (b ≠0), it holds:


󰇡
󰇢 (8)
Noting that (8) is never zero if Δ>0, it is possible to
assume:
INTERNATIONAL JOURNAL OF APPLIED MATHEMATICS,
COMPUTATIONAL SCIENCE AND SYSTEMS ENGINEERING
DOI: 10.37394/232026.2024.6.10
Domenico Porto
E-ISSN: 2766-9823
113
󰇻
󰇻

󰇻
󰇻 (9)
Considering the general solution of (5), absolute
value can be omitted due to ± operator needed for
the two solutions:
λ
󰇡

󰇢(10)
In matrix form, g and h can be given by:
󰇯

 
󰇰
󰇣
󰇤 (11)
And from g and h, solutions are:
󰇛󰇜 
 󰇛󰇜 

󰇣
󰇤λ
λ
(12)
It can be proven that, in order to cover also the cases
in which Δ<0 (complex roots), the choice of g and h
should be the following:
 =
󰇛󰇜
and
󰇛󰇜
󰇛󰇜
󰇛󰇜 (13)
It must be noted that (13) becomes (9) if sign(Δ)=1
(Δ>0). General solution depends also on sign(Δ) as
follows:
󰇛󰇜
󰇛󰇜
 
󰇛󰇜
󰇛󰇜
 
󰇛󰇜
󰇣
󰇤λ
λ
(14)
4 Hardware implementation
In this section it will be described how to
implement the previous section method. Using the
same approach seen in section 2, Figure 2, let us
consider the quantities b, g and h as conductance.
This means that g+h and gh/(g+h) are respectively
parallel and series connections of g with h. In order
to also cover the complex roots case, four current
values should be the circuit output, indicating the
real and imaginary part of each of the two solutions,
and two switches driven by sign(Δ) should be
included. Input voltages should be v1 and - v1 due
to the sign change between first and second
solution. A possible dedicated implementation is in
Fig. 4.
Figure 4. PCM-based HW structure implementing all the solutions
of a second grade equation, knowing b,g and h. Here I1=Re(λ1) ,
I2=Im(λ1) , I3=Re(λ2) and I4=Im(λ2).
However, it could be better in some case to evaluate
first the quantities b/2, g/4, h/4 and gh/(g+h) (e.g.
using (11)) and adopting a more general matrix
approach with constant parameters stored in the
final matrix like in Fig. 5. This can be useful in
particular when all the quantities in (10) can be
easily calculated by a simple network (e.g when
c<<b, meaning g+hb, gh/(g+h)b/4-c/b).
Figure 5. Alternative approach started from the separate
evaluation of b/2, g/4, h/4 and gh/(g+h)
In both cases, equation solutions are obtained via
elementary operations, involving the evaluation of
auxiliary parameters g and h, according to the flow
(b,c)→(g,h)→(λ23). This approach will be
INTERNATIONAL JOURNAL OF APPLIED MATHEMATICS,
COMPUTATIONAL SCIENCE AND SYSTEMS ENGINEERING
DOI: 10.37394/232026.2024.6.10
Domenico Porto
E-ISSN: 2766-9823
114
followed also to extend the method to higher grade
equations.
5 Extension to third and fourth grade
polynomial equations
If in the second grade formula the only “critical”
operator is square root, further ones must be
considered when complexity increases. For
example, cubic root and sin(arcsin(.)/3) are also
involved in the third (and fourth) grade formula,
making the approach previously described no more
sufficient. However, due to parameter constraints
and formula format, simple and efficient
approximations will be used, like the following ones
coming from classical literature [6]:

󰇧

󰇨
󰇡󰇛󰇜
󰇢
󰇡

󰇢 (15)
Let us briefly describe how the routine can be
extended to these more complex cases, keeping,
when possible, a modular structure to algorithms
and implementation.
5.1 The 3rd degree equation solution
The general form of the equation is in this case
the following:
λ3 +b λ2 +c λ +d =0 (16)
with one additional parameter and one more
solution with respect to the previous case. To solve
it, the auxiliary variables p, q and of course Δ
should be found. These are fundamental to find the
three solutions (one real, the other two real or
complex, depending on the sign of Δ). Examples of
matrix chains able to evaluate them can be:
󰇣
󰇤 
 
  󰇣
󰇤 (17)
󰇟 󰇠
󰇣
󰇤 (18)
Finding one of the solutions reduces the problem to
the previous section second grade case. To this aim,
it could be structured in a modular structure
according to the flow:
(b,c,d)→(p,q)→(λ1, B1), C1)) (g,h)→(λ23)
meaning that p and q help to calculate the first (real)
solution λ1 and the coefficients B(λ1) and C(λ1) of a
new second grade equation, to be solved with
methods described in Section 3. It can be easily
demonstrated from polynomial division that
B1) = b+ λ1 ; C(λ1) = λ12+b λ1+c (19)
The solution λ1 depends even in this case from the
sign of Δ


󰇛󰇜

󰇡
 
󰇢
󰇛󰇜
(20)
Using approximation formulas in (15), (20) can
be written as:
󰇡


󰇢󰇡

󰇢
󰇛󰇜
󰇡

󰇢
󰇛󰇜
(21)
Many different matrix representations (and therefore
hardware implementations) can be used to calculate
(21). An example for Δ>0 could be:
󰇟  󰇠

 







 

 
󰇯

󰇰
(22)
This can be implemented in hardware in a very
similar way to the one described in fig. 5.
A representation for Δ<0 is simpler and given by:
INTERNATIONAL JOURNAL OF APPLIED MATHEMATICS,
COMPUTATIONAL SCIENCE AND SYSTEMS ENGINEERING
DOI: 10.37394/232026.2024.6.10
Domenico Porto
E-ISSN: 2766-9823
115
󰇟  󰇠





 
󰇯

󰇰
(23)
with the same procedure for hardware
implementation.
5.2 The 4th degree equation solution
Let now us consider the equation:
λ4 +bλ3 +c λ2 +d λ +e = 0 (24)
This is the highest degree equation that is solvable
by formulas and is very common in a wide variety
of applications, such as the observer problem in
Field Oriented Control of motors and kinematic
description of robotic arm motion. The solution
method can be summarized in five steps, using
partially the previously described routines.
Step 1: Matrix calculation of auxiliary variables p,
q, r. A compact formulation for them can be the
following:
(25)
Step 2: Solve the auxiliary third degree equation
s3 +2ps2 +(p2-4r)s - q2 = 0 with method described in
section 5.1.
Step 3: Using p, q and the positive solution s,
calculate the following auxiliary values:
(26)
(note: α can be evaluated using (6) with suitable
values)
Step 4: Solve the two second order equations
2+=0 and 2+=0 with method described
in section 3. Here we have two parallel flows:
, )→(g1,h1)→(x1, x2) & (-α, )→(g2,h2)→(x3, x4)
Step 4: Final solutions are given by the linear
relation:
λ=(-b)/4 (27)
6 A case study: Field Oriented
Control motor observer
Many applicative areas may benefit from an
immediate solution of algebraic equations, but one
the most consistent boost can be given to the
observer problem in the mainframe of the electrical
motor control. A linear observer [7] is an artificial
system able to estimate as fast as possible the state
variables of the main system (here, the motor) in
order to arrange an optimal control of it. This task is
performed to mimic the behavior of the system by
choosing the suitable values of variable gain vector
H of the observer. Taking into account that the
FOC-based state variables [8][12] of a motor lead to
a fourth order dynamical system, a block diagram of
the whole controlled system is depicted in Figure 6
Figure 6. State observer of a PMSM motor.
From the theory, the observer matrix is defined as
follows:
INTERNATIONAL JOURNAL OF APPLIED MATHEMATICS,
COMPUTATIONAL SCIENCE AND SYSTEMS ENGINEERING
DOI: 10.37394/232026.2024.6.10
Domenico Porto
E-ISSN: 2766-9823
116
(28)
where rs, Ls, p and ωr are the parameters of the
motor. The observer dynamics is established by the
solutions of characteristic polynomial of (28), which
has exactly the same form of (24). The coefficients
can be obtained by the product
(29)
and the related equation can be solved as described
in the previous section. It must be noted that these
coefficients depend on the gains h1 and h2 of the
observer: this means that it is possible to see the
effect of their changes immediately on the
eigenvalues, allowing a sort of real-time tuning of
the gains.
6.1 Numerical simulation
Let us consider a motor with the following
parameters: rs=2Ω Ls=0.1mH, p=3 and ωr=16rad/s.
Formula (29) becomes:
(30)
Stability of the observer (Re(λi)<0) requires that all
terms in (30) should be positive. It can be easily
shown that if d >0, this is always true. The search
space could be restricted to all h1 and h2 satisfying
h2 <0.46+ 2.3∙10-4 h1 (roughly, h1 >0 and h2 <0)
Moreover, from matrix A in (28), it can be easily
seen that the fastest dynamics of the motor is given
by the (double) eigenvalue λ1= λ2= -rs/ Ls=-2∙104.
This means that the observer eigenvalues must be
five times this quantity to have a fast and accurate
estimation of state variables [8][12]. Solutions of the
equation represented by (30) can be immediately
calculated, focusing on the couples h1, and h2 giving
solutions with real part < -105 (Re(-λmax)> 105).
From Fig. 7, it can be seen that a good choice of the
gains of the observer can be h1 =2∙105 and h2 =-5∙106
(top area in the graphics)
Figure 7. Evolution of the slowest eigenvalue of the observer for
different values of h1 and h2 . Absolute values >100000 (on the top)
identify the area of good choice of the gains.
7 Conclusions
In this paper, it has been described how the same
mechanism of In Memory Computing can be used in
order to build very simple hardware structures, able
to perform nontrivial tasks such as polynomial
equation solving. It has been also shown how can be
removed the obstacles of having complex operators
in the resolution formulas by using suitable
approximations that are more than acceptable in
most cases. Moreover, the presented approach is
modular, meaning that the problem is decomposed
in subproblems needing lower-level routines. A case
study in which it is required the solution of a fourth
order equation continuously updated has been also
presented.
The advantage of avoiding some nontrivial
computations to the processor may offer fast and
low-consumption solutions to some real-time tasks,
for example those dealing with complex control
problems. Further investigations will involve an
additional module to solve differential equations for
robotic application, in order to provide a cheap and
at the same time powerful computation unit locally
to every link of a multi-armed robot or to a
󰇯
󰇰

 
 

 








󰇯
󰇰
 


 


INTERNATIONAL JOURNAL OF APPLIED MATHEMATICS,
COMPUTATIONAL SCIENCE AND SYSTEMS ENGINEERING
DOI: 10.37394/232026.2024.6.10
Domenico Porto
E-ISSN: 2766-9823
117
distributed environment of robots cooperating for a
target task.
Even if HW implementation will benefit for sure
of future technological evolution of PCM cells (i.e.
increased storage capability), the Conductance
matrix approach seems to be promising, in a shorter
time frame, also with traditional resistive networks
that could be highly performant for fixed-structure
problems solving, like PID controllers tuning or
parametric system identification [13].
References:
[1] M. Horowitz, 1.1 Computing's Energy Problem
(and what we can do about it), 2014 IEEE
International Solid-State Circuits Conference
(ISSCC), IEEE, 2014, pp. 10-14.
[2] Y.H. Chen, J. Emer, V. Sze, Using Dataflow to
Optimize Energy Efficiency of Deep Neural
Network Accelerators, IEEE Micro, Vol. 37,
No. 3, 2017, pp. 12-21.
[3] A. Sebastian, M. Le Gallo, E. Eleftheriou,
Computational phase-change memory: beyond
von Neumann computing, Journal of Physics
D: Applied Physics, Vol. 52, No. 44, 2019,
pp.1-12
[4] A.I. Hussen, Approximating Square Roots and
Cube Roots”, At Right Angles, Vol. 4, No. 1,
2015
[5] C. M. Taisbak, Cube roots of integers. A
conjecture about Heron’s method in Metrika
III.20 , Historia Math. , Vol 41, 2014, pp. 103–
104
[6] L. Leithold, The Calculus with Analytic
Geometry, (fifth edition), Harper & Row
Publishers, Inc, 1986.
[7] E. Tse, M. Athans, Observer theory for
continuous-time linear systems, Information
and Control, Vol. 22 No. 5, 1973, pp. 405-434
[8] B.H. Mouna, S. Lassaad, Speed sensorless
indirect stator field oriented control of
induction motor based on Luenberger observer,
2006 IEEE International Symposium on
Industrial Electronics, Vol. 3. IEEE, 2006, pp.
2473-2478
[9] Y. -B. Lee et al., "A Fast and Energy-Efficient
Nanoelectromechanical Non-Volatile Memory
for In-Memory Computing," 2023 IEEE 36th
International Conference on Micro Electro
Mechanical Systems (MEMS), Munich,
Germany, 2023, pp. 5-8,
[10] N. Srivastava, A. K. Rajput, M. Pattanaik and
G. Kaushal, "An Energy-Efficient and Robust
10T SRAM Based in-Memory Computing
Architecture," 2023 36th International
Conference on VLSI Design and 2023 22nd
International Conference on Embedded
Systems (VLSID), IEEE, 2023, pp. 133-138
[11] A. Antolini, A. Lico, E. F. Scarselli, M.
Carissimi and M. Pasotti, "Phase-change
memory cells characterization in an analog in-
memory computing perspective," 2022 17th
Conference on Ph.D Research in
Microelectronics and Electronics (PRIME),
IEEE, 2022, pp. 233-236
[12] M. Nicola and C. -I. Nicola, "Improvement
Performances of Sensorless Control for PMSM
Based on FOC Strategy Using Luenberger
Observer, Sine Cosine Algorithm, and RL-TD3
Agent," 2023 International Conference on
Electromechanical and Energy Systems
(SIELMEN), IEEE, 2023, pp. 1-7
[13] M. Li and Y. Ma, "Parameter Identification of
DC Motor based on Compound Least Square
Method," 2020 IEEE 5th Information
Technology and Mechatronics Engineering
Conference (ITOEC), IEEE, 2020, pp. 1107-
1111
Sources of Funding for Research Presented in a
Scientific Article or Scientific Article Itself
No funding was received for conducting this study.
Conflict of Interest
The author has no conflicts of interest to declare that
are relevant to the content of this article.
Creative Commons Attribution License 4.0
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the
Creative Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en
_US
INTERNATIONAL JOURNAL OF APPLIED MATHEMATICS,
COMPUTATIONAL SCIENCE AND SYSTEMS ENGINEERING
DOI: 10.37394/232026.2024.6.10
Domenico Porto
E-ISSN: 2766-9823
118
Contribution of Individual Authors to the
Creation of a Scientific Article (Ghostwriting
Policy)
The author contributed in the present research, at all
stages from the formulation of the problem to the
final findings and solution.