SU762009A1 - Moving average computing apparatus - Google Patents

Moving average computing apparatus Download PDF

Info

Publication number
SU762009A1
SU762009A1 SU782681070A SU2681070A SU762009A1 SU 762009 A1 SU762009 A1 SU 762009A1 SU 782681070 A SU782681070 A SU 782681070A SU 2681070 A SU2681070 A SU 2681070A SU 762009 A1 SU762009 A1 SU 762009A1
Authority
SU
USSR - Soviet Union
Prior art keywords
output
input
register
code
adder
Prior art date
Application number
SU782681070A
Other languages
Russian (ru)
Inventor
Dmitrij A Ivanov
Shamsaddin Yu Ismailov
Boris P Podboronov
Mikhail Reva
Original Assignee
Dmitrij A Ivanov
Shamsaddin Yu Ismailov
Boris P Podboronov
Mikhail Reva
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dmitrij A Ivanov, Shamsaddin Yu Ismailov, Boris P Podboronov, Mikhail Reva filed Critical Dmitrij A Ivanov
Priority to SU782681070A priority Critical patent/SU762009A1/en
Application granted granted Critical
Publication of SU762009A1 publication Critical patent/SU762009A1/en

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

Изобретение относится к вычислительной технике и может быть использовано для определения скользяшего среднего в устройствах обработки цифровой информации, в цифровых измерительных приборах и других устройствах.The invention relates to computing and can be used to determine the moving average in digital information processing devices, digital measuring devices and other devices.

Известно устройство для статистической обработки результатов изме- |θ рений со скользящей выборкой, содержащее входное устройство, коммутатор, схему задержки1, счетчики-хранители информации, количество которых равно объему выборки Ν, N схем И,' через ко_,г торые производится считывание кодов 15 со счетчиков-хранителей информации,A device for the statistical processing of the results measured | θ rhenium from moving sample, comprising an input device, a switch, a delay circuit 1, guardian information counters, which number is equal to the sample volume Ν, N AND circuits' through ko_ g torye produced code reading 15 from the information keepers

N схем И, через которые производится запись кода со входа в счетчики-хранители информации, генератор импуль- сов, реверсивный счетчик [1]. хиN circuits AND, through which the code is recorded from the input to the information storage counters, pulse generator, reversible counter [1]. hee

Устройство работает следующим образом.The device works as follows.

В течение первых N тактов значения входного кода записываются порчередно25 в счетчики-хранители информации и одновременно с этим суммируются в ре(версивном счетчике. Алгоритм дальнейшей работы (после заполнения всех счетчиков-хранителей информации) опи-30During the first N ticks, the values of the input code are written into the sequential25 in the information-keepers of information and at the same time they are summed up in the re (versatile counter. Algorithm of further work (after filling in all the information-keeping counters) opi-30

сывается следующим разностным уравнением: у (ί, ТУ =It is written in the following difference equation: y (ί, TU =

У Г(!-1)т] х [(ΐ-N ) Т]Y T (! - 1) t] x [(ΐ-N) T]

+ X (1, Т) (1)+ X (1, T) (1)

где у(1, Т) — значение выходного кода реверсивного счетчика в момент времени I, Т;where y (1, T) is the value of the output code of the reversible counter at the moment of time I, T;

у βΐ—1)т) — значение выходного кода реверсивного счетчика в момент времени (1—1)Т, равное сумме значений входного кода в моменты времени (ΐ—Ν)τ, (ΐ—Ν +y βΐ — 1) t) is the value of the output code of the reversible counter at time (1-1) T, equal to the sum of the values of the input code at time (ΐ — Ν) τ, (— Ν +

+ 1)Τ, (I—Ν + 2)Τ.....+ 1) Τ, (I — Ν + 2) Τ .....

(1- 1)Τ;(1-1) Τ;

•χ(1, Τ) — значение входного кода в момент времени 1(Т,• χ (1, Τ) - the value of the input code at time 1 ( T,

N — объем выборки,N is the sample size,

1 «« N + 1, Ν+2,..·ί Т — интервал дискретизации.1 «« N + 1, Ν + 2, .. · ί T is the sampling interval.

Недостатками описанного выше устройства является большой требуемый объем памяти и низкое быстродействие.The disadvantages of the above device is the large amount of memory required and low speed.

Наиболее близким по техническойThe closest technical

сущности к предлагаемому является устройство для определения скользящегоthe essence of the proposed is a device for determining the sliding

среднего, содержащее входной блок, четыре ключа, триггер, два элемента ИЛИ,a medium containing an input block, four keys, a trigger, two elements OR,

33

762009762009

4four

гейератор импульсов, счетчик разности, счетчик-делитель, группу ключей, реверсивный счетчик среднего, которое по своему принципу действия является рекурсивным цифровым фильтром, имеющим всего два элемента памяти. Текущее значение входного кода запоминается во входном блоке, а предыдущее значение выходного кода — в реверсивном счетчике среднего.pulse generator, difference counter, counter-divider, group of keys, reversible average counter, which by its principle of operation is a recursive digital filter with only two memory elements. The current value of the input code is stored in the input block, and the previous value of the output code is stored in the reversible average counter.

Устройство работает следующим образом.The device works as follows.

В каждом такте значение кода с выхода реверсивного счетчика переписывается в счетчик разности. Затем это Число складывается с числом импульсов равным значению входного кода. Эти импульсы поступают на вход счетчика разности из входного блока. Полученная разность делится счетчиком-дели- телем на объем выборки и результат деления с учетом знака суммируется 0 содержимым реверсивного' счетчика. Выходной код реверсивного счетчика является выходным кодом фильтра £2].In each clock cycle, the code value from the output of the reversible counter is written to the difference counter. Then this number is added to the number of pulses equal to the value of the input code. These pulses are fed to the input of the difference counter from the input block. The resulting difference is divided by the delimiter counter into the sample size and the result of the division, taking into account the sign, is summed up by the contents of the reversible counter. The output code of the reversible counter is the output code of the filter £ 2].

Недостатки этого устройства — низкое быстродействие, связанное с выполнением вычислительных операций в число-импульсных кодах, и большая погрешность выполнения операции деления с помощью счетчика-делителя вследствие округления частного без учета отбрасываемой части кода.The disadvantages of this device is the low speed associated with the execution of computational operations in the number of pulse codes, and a large error in the performance of the division operation using a counter-divider due to rounding off the private without taking into account the discarded part of the code.

Цель предлагаемого изобретения повышение быстродействия и уменьшение погрешности выполнения операции деления.The purpose of the invention to increase speed and reduce the error of the operation of division.

Указанная цель достигается тем, что в известное устройство, содержащее генератор тактовой частоты, первый и второй регистры, причем вход первого регистра является входом устройства, введены два сумматора, при этом Выход второго регистра соединен с первым входом первого сумматора, выход η старших разрядов второго регистра подключен ко второму входу первого сумматора, ко входу переноса второго подключен выход (п + 1)-го разряда второго регистра, тактовый вход которого объединен с тактовым входом первого регистра и подключен к выходу генератора тактовой частоты, выход первого регистра соединен с первым входом второго сумматора, выход которого является выходом устройства и соединен со входом второго регистра, а выход первого сумматора подключен ко второму входу первого сумматора. Повышение быстродействия достигается применением комбинационных логических сумматоров, заменой операции деления эквивалентной операцией сдвига кода и выполнением всех вычислительных операций над параллельными кодами. Для уменьшения погрешности 'выполнения операции деления округление частного осуществляется с учетом отбрасываемой части кода, для чегоThis goal is achieved by the fact that in the known device containing a clock frequency generator, the first and second registers, the input of the first register being the input of the device, two adders are entered, while the output of the second register is connected to the first input of the first adder, output η most significant bits of the second register connected to the second input of the first adder, the output of the second transfer is connected to the output of the (n + 1) -th digit of the second register, the clock input of which is combined with the clock input of the first register and connected to the output of the generator Ora clock frequency, the output of the first register is connected to the first input of the second adder, the output of which is the output of the device and connected to the input of the second register, and the output of the first adder is connected to the second input of the first adder. The performance increase is achieved by using combinational logic adders, replacing the division operation with the equivalent code shift operation and performing all computational operations on parallel codes. To reduce the error of the execution of the division operation, rounding of the private one is carried out taking into account the dropped part of the code, for which

обратный код (п + 1)-го разряда (считая со старшего разряда), второго регистра памяти с третьего выхода второго регистра памяти подается на вход переноса первого сумматора.the return code (n + 1) -th digit (counting from the senior digit), the second memory register from the third output of the second memory register is fed to the transfer input of the first adder.

На чертеже приведена функциональная схема устройства.The drawing shows a functional diagram of the device.

Устройство содержит генератор 1 тактовой частоты, первый регистр 2 (памяти текущего значения входного кода), второй регистр 3 (памяти предыдущего значения выходного кода), первый сумматор 4, второй сумматор 5, выход 6 генератора тактовых импульсов , вход 7 устройства, выход 8 первого регистра памяти, первый выход 9, второго регистра памяти, второй выход 10 второго регистра памяти, третий выход 11 второго регистра памяти, выход 12 первого сумматора, выход 13 второго сумматора. Регистр 2 памяти имеет разрядность η и пред назначен для выборки и хранения текущего значения параллельного п-разрядного двоичного входного кода, поступающего на вход 7. Параллельный код с выхода 8® регистра 2 памяти поступает на второй вход двоичного комбинационного логического сумматора 5, имеющего разрядность η + к, где к двоичный логарифм объема выборки. Регистр 3 памяти разрядности η + к предназначен для выборки и хранения предыдущего значения параллельного выходного кода устройства, поступающего на информационный вход регистра 3' памяти с выхода 13 сумматора 5. Управляющие входы регистров 2 и 3 памяти соединены с выходом 6 генератора тактовой частоты. Параллельный прямой (п + к)-разрядный двоичный код с первого выхода 9 регистра 3 памяти посту пает на первый вход двоичного комбина ционного логического сумматора 4, имеющего разрядность η + к. На второй вход сумматора 4 с выхода 10 регистра 3 памяти поступает параллельный обрат ный двоичный код п старших разрядов регистра 3 памяти. Обратный код (п +The device contains a generator 1 clock frequency, the first register 2 (memory of the current value of the input code), the second register 3 (memory of the previous value of the output code), the first adder 4, the second adder 5, the output 6 of the clock generator, input 7 of the device, the output 8 of the first memory register, the first output 9, the second memory register, the second output 10 of the second memory register, the third output 11 of the second memory register, the output 12 of the first adder, the output 13 of the second adder. Memory register 2 has a bit width η and is intended for sampling and storing the current value of the parallel p-bit binary input code input to input 7. The parallel code from output 8® of memory register 2 is fed to the second input of binary combinational logic adder 5 having word width η + k, where k is the binary logarithm of the sample size. Register 3 of the memory capacity of η + k is intended for sampling and storing the previous value of the parallel output code of the device arriving at the information input of the memory register 3 ′ from output 13 of the adder 5. The control inputs of memory registers 2 and 3 are connected to the output 6 of the clock generator. A parallel direct (n + k) -bit binary code from the first output 9 of register 3 memory is supplied to the first input of a binary combination logic adder 4 having a capacity of η + k. The second input of the adder 4 from output 10 of register 3 memory receives a parallel reverse the new binary code is the high bits of memory register 3. Reverse code (n +

+ 1)-ого разряда регистра 3 памяти с выхода 11 регистра поступает на вход переноса сумматора 4. Параллельный двоичный код с выхода 12 сумматора 4 поступает на первый вход сумматора 5. Выход 13 сумматора 5 является выходом устройства.+ 1) -th digit register 3 memory from the output 11 of the register is fed to the transfer input of the adder 4. Parallel binary code from the output 12 of the adder 4 is fed to the first input of the adder 5. The output 13 of the adder 5 is the output of the device.

Алгоритм работы устройства описывается разностным уравнениемThe algorithm of the device is described by a difference equation.

У (гТ)= ЗКИТ? Г?УЦ<-1)Т]+ ( 2,)Do (rt) = SITI? G? TC <-1) T] + (2,)

где у£(|—1)т], у(! , Т) — значения выходного кода устройства соответственно в моменты времени (ϊ—1)Т и 1Т;where y £ (| -1) t], y (!, T) are the values of the output device code, respectively, at time instants (ϊ — 1) T and 1T;

χ(ΐΤ) — значение входного кода в момент времени ί ,· Т;χ (ΐΤ) is the value of the input code at the moment of time ί, · T;

! — номер момента времени! - moment number

(ί - 1, 2,...);(ί - 1, 2, ...);

762009 ·762009 ·

Т — интервал дискретизации;1 N — объем выборки.T - sampling interval; 1 N - sample size.

Устройство работает следующим образом.The device works as follows.

В момент времени И с выхода 6 генератора 1 тактовых импульсов по- 5 ступает сигнал управления записью на управляющие входа регистров 2 и 3 памяти. По этому сигналу происходит запись текущего значения входного кода χ(ι'Τ) в регистр 2 памяти и предадущего значения выходного кода у[(| —1)Т] в регистр 3 памяти. Значения кодов на выходе 8 регистра 2 памяти и на выходе 9 регистра 3 памяти устанавливаются соответственно равным.. χ(ΐΤ) и у [.(« — 1)т] . С целью повышения э быстродействия устройства и упрощения выполнения операции деления предыдущего значения выходного кода на объем выборки (см. формулу 2) объем выборки N выбран равным: 20At the moment of time And from the output 6 of the generator 1 of clock pulses, the recording control signal is applied to the control inputs of memory registers 2 and 3. This signal is used to record the current value of the input code χ (ι'реги) in register 2 of memory and the previous value of the output code of [(| -1) T] in register 3 of memory. The values of the codes at the output 8 of the register 2 memory and at the output 9 of the register 3 memory are set respectively to .. χ (и) and y [. ("- 1) t]. In order to improve device performance and e facilitate operation dividing the previous value of the output code on sample size (. See formula 2) the sample size N is selected equal to 20

N = 2Κ , (3)N = 2 Κ, (3)

где к — целое положительное число.where k is a positive integer.

При выполнении условия (3) операция деления двоичного; кода у [(ί- 1)т] 25When condition (3) is satisfied, the division operation is binary; code for [(ί- 1) t] 25

на N эквивалентна отбрасыванию к младших разрядов кода. Для уменьшения погрешности округления значение оставшейся части кода суммируется со значением старшего разряда отбрасыва-30 емой части кода. Операция вычитания у ί(ΐ~ 1)Т] реализуетсяby N is equivalent to dropping to the lower bits of the code. To reduce the rounding error, the value of the remaining part of the code is summed with the value of the most significant digit of the discarded part of the code. The subtraction operation for ί (ΐ ~ 1) T] is implemented

с помощью сумматора 4 путем сложения кода уменьшаемого у [(ϊ — ,)т] с дополнительным кодом вычитаемого у ((ί —1 ) Т], 35 Последнее справедливо только для положительных входных чисел χ(ϊ , т), так как, при этом справедливо неравенство л with the help of adder 4 by adding the code decreasing y [(ϊ -,) t] with the additional code deductible y (((ί —1) T], 35 The latter is true only for positive input numbers χ (, t), because this is true inequality l

у [(ϊ-1 ) Т] >/ -^-у Г( ΐ —1 )т] 40at [(ϊ-1) T]> / - ^ - at G (ΐ —1) t] 40

и неотрицательная разность у [( ϊ-1 )Т]~ у [(Ϊ-1 )т]and nonnegative difference y [(ϊ -1) T] ~ y [(Ϊ -1) t]

будет выражена в прямом двоичном ко- 45 де.will be expressed in direct binary code 45 d.

Таким образом, предлагаемое устройство обладает более высокой точностью, округление частного с учетом отбрасываемой части позволяет среднее квадратическое значение погрешности операции деления снизить по сравнению с известным в два раза. При этом систематическая составляющая погрешности операции деления в предлагаемом устройстве равна "О", а в известном половине единицы младшего разряда кода. Предлагаемое устройство имеет также более простую структуру, чем известное.Thus, the proposed device has a higher accuracy, the rounding of the private with regard to the discarded part allows the mean-square value of the error of the division operation to be reduced compared to the known two times. In this case, the systematic component of the error of the division operation in the proposed device is equal to "O", and in the known half of the unit of the lower order code. The proposed device also has a simpler structure than the known one.

Claims (1)

Формула изобретенияClaim Устройство для вычисления скользящего среднего, содержащее генератор тактовой частоты, первой и второй регистры, причем вход первого регистра является входом устройства, о т л и чающееся тем, что, с целью повышения быстродействия и точности, в него введены два сумматора, при этом выход второго регистра соединен с первым входом первого сумматора, ' выход η старших разрядов второго регистра подключен ко второму входу первого сумматора, ко'входу переноса которого подключен выход (п + 1)-го разряда второго регистратактовый, вход которого объединен с тактовый входом первого регистра и подключен к выходу генератора тактовой частоты, выход первого регистра соединен с первым входом второго сумматора, выход которого является выходом устройства и соединен со входом второго регистра, а выход первого сумматора подключен ко второму входу второго сумматора.A device for calculating the moving average, containing a clock frequency generator, the first and second registers, and the input of the first register is the device input, which is due to the fact that, in order to increase speed and accuracy, two adders are entered into it, while the output of the second the register is connected to the first input of the first adder, the high-order output η of the second register is connected to the second input of the first adder, to the transfer input of which the output n + 1 of the second register is connected, the input of which ene with a clock input of the first register and is connected to the output of the clock generator, the first register output connected to a first input of a second adder whose output is an output device and is connected to the input of the second register and the output of the first adder is connected to the second input of the second adder.
SU782681070A 1978-11-02 1978-11-02 Moving average computing apparatus SU762009A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU782681070A SU762009A1 (en) 1978-11-02 1978-11-02 Moving average computing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU782681070A SU762009A1 (en) 1978-11-02 1978-11-02 Moving average computing apparatus

Publications (1)

Publication Number Publication Date
SU762009A1 true SU762009A1 (en) 1980-09-07

Family

ID=20792174

Family Applications (1)

Application Number Title Priority Date Filing Date
SU782681070A SU762009A1 (en) 1978-11-02 1978-11-02 Moving average computing apparatus

Country Status (1)

Country Link
SU (1) SU762009A1 (en)

Similar Documents

Publication Publication Date Title
RU2680759C1 (en) Device of serial type for detection of groups of zero and unit bits and determination of number thereof
SU762009A1 (en) Moving average computing apparatus
US3947673A (en) Apparatus for comparing two binary signals
US3644724A (en) Coded decimal multiplication by successive additions
SU922765A1 (en) Device for determining probability distribution laws
SU1437877A1 (en) Device for smoothing signals
RU2130644C1 (en) Device for information retrieval
SU1035804A1 (en) Magnetic correlator
SU826350A1 (en) Address forming device
SU728126A1 (en) Exponential function computing arrangement
RU1783520C (en) Device for dividing binary number
SU1617437A1 (en) Device for dividing binary numbers
SU881740A1 (en) Device for computing pulse-number code square
RU2020759C1 (en) Device for forming remainder for random module of number
SU942017A1 (en) Stochastic integrator
RU2029434C1 (en) Device for formation of remainder by arbitrary modulus of number
SU758166A1 (en) Digital filter
SU1012272A1 (en) Device for computing sliding mean
SU1142845A1 (en) Device for implementing two-dimensional fast fourier transform
SU479111A1 (en) A device for simultaneously performing arithmetic operations on a set of numbers
SU857977A1 (en) Dividing device
SU385283A1 (en) ANALOG-DIGITAL CORRELATOR
SU363957A1 (en) ALL-UNION
SU1116426A1 (en) Device for searching numbers in given range
SU694867A1 (en) Device for the digital averaging of binary -coded signals