RU1807482C - Random-number generator - Google Patents
Random-number generatorInfo
- Publication number
- RU1807482C RU1807482C SU4911111A RU1807482C RU 1807482 C RU1807482 C RU 1807482C SU 4911111 A SU4911111 A SU 4911111A RU 1807482 C RU1807482 C RU 1807482C
- Authority
- RU
- Russia
- Prior art keywords
- output
- input
- elements
- outputs
- group
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
Abstract
Изобретение относитс к автоматике и вычислительной технике и может быть использовано в системах статистического моделировани . Генератор моделирует однородные случайные сигналы, соответствующие заданной функции распределени веро тностей, по методу П.Хубера. Использование предложенных новых св зей и блоков позвол ет увеличить быстродействие генератора в асинхронном режиме работы в 2 раза по сравнению с прототипом. Вмход- ные случайные сигналы генератора практически точно описывают реальные случайные возмущени и сигналы, наблюдаемые при исследовании различных технических систем . Генератор содержит генератор тактовых импульсов, ключи, блок синхронизации, делитель .частоты, триггеры, счетчики, элемент ИЛИ. регистр, группы элементов И, коммутаторы, датчики равномерно распределенных случайных чисел, дешифратор и схему сравнени . 3 ил. ел СThe invention relates to automation and computer technology and can be used in statistical modeling systems. The generator models homogeneous random signals corresponding to a given probability distribution function according to the method of P. Huber. Using the proposed new connections and blocks allows to increase the speed of the generator in asynchronous operation by 2 times compared with the prototype. The input random generator signals almost exactly describe the real random perturbations and signals observed in the study of various technical systems. The generator contains a clock, keys, a synchronization unit, a frequency divider, triggers, counters, an OR element. register, groups of AND elements, switches, uniformly distributed random number sensors, decoder and comparison circuit. 3 ill. ate with
Description
Изобретение относитс к автоматике и вычислительной технике и может быть использовано в системах статистического моделировани .The invention relates to automation and computer technology and can be used in statistical modeling systems.
Целью изобретени вл етс увеличе- ние.быстродействи работы генератора случайных чисел в асинхронном режиме при выдаче последовательности реализации случайной величины.The aim of the invention is to increase the speed of operation of the random number generator in asynchronous mode when issuing a sequence of implementation of a random variable.
На фиг. 1 дана структурна схема генератора случайных чисел; на фиг. 2 - временна диаграмма работы генератора в асинхронном режиме; на фиг. 3 - временна диаграмма работы генератора в синхронном режиме.In FIG. 1 is a structural diagram of a random number generator; in FIG. 2 is a timing diagram of the operation of the generator in asynchronous mode; in FIG. 3 is a timing diagram of the operation of the generator in synchronous mode.
Генератор случайных чисел содержит генератор 1 тактовых импульсов, выход которого соединен с информационным входом первого ключа 2, управл ющий вход которого соединен:с выходом Пуск блока 3 синхронизации, а выход - со счетным входом делител 4 частоты и с информационным входом второго ключа 5, управл ющий вход которого соединен с единичным выходом триггера 6, управл ющий единичный вход которого соединен с установочным входом первого счетчика 7, а управл ющий вход подключен к выходу элемента.ИЛИ 8 и управл ющему входу первого счетчика 7, выход второго ключа 5 соединен со счетным входом первого счетчика 7. разр дные входы которого соединены с информационными входами разр дов регистра 9. разр дные выходы которого вл ютс выходами генератора случайных чисел, выходы элементов И 10 каждой j-й группы (j 1. К. где К - числоThe random number generator contains a clock generator 1, the output of which is connected to the information input of the first key 2, the control input of which is connected: to the start output of the synchronization unit 3, and the output to the counting input of the frequency divider 4 and to the information input of the second key 5, control whose input is connected to the single output of trigger 6, the control single input of which is connected to the installation input of the first counter 7, and the control input is connected to the output of the element. OR 8 and the control input of the first counter 7, you the stroke of the second key 5 is connected to the counting input of the first counter 7. The bit inputs of which are connected to the information inputs of the bits of register 9. The bit outputs of which are outputs of a random number generator, outputs of the elements AND 10 of each j-th group (j 1. K where K is the number
0000
о чabout h
N 00N 00
юYu
законов распределени случайных чисел, обеспечиваемых генератором), соединены с j-й группой информационных входов коммутатора 11, кажда j- группа выходов которого соединена с входами j-ro элемента ИЛИ 12 первой группы, выходы которых соединены с разр дными входами делител 4 частоты, выход которого соединен со счетным входом второго счетчика 13, выход переполнени которого соединен с вторым входом второго дополнительного элемента И 14. Выход последнего соединен с первым входом первого дополнительного элемента ИЛИ 15, второй вход которого соединен с выходом первого дополнительного элемен- та И 16, а выход соединен с входом формировател 17 импульсов, выход которого соединен с синхронизирующим входом регистра 9 и входом элемента 18 задержки,distribution laws of random numbers provided by the generator) are connected to the jth group of information inputs of the switch 11, each j-group of outputs of which is connected to the inputs of the j-ro element OR 12 of the first group, the outputs of which are connected to the digital inputs of the frequency divider 4, output which is connected to the counting input of the second counter 13, the overflow output of which is connected to the second input of the second additional element AND 14. The output of the last is connected to the first input of the first additional element OR 15, the second input of which is single with the output of the first additional element And 16, and the output is connected to the input of the pulse shaper 17, the output of which is connected to the synchronizing input of the register 9 and the input of the delay element 18,
выход которого соединен с вторым входомthe output of which is connected to the second input
элемента ИЛИ 8 и с входами запуска первого датчика 19 и второго датчика 20 равномерно распределенных случайных чисел. Разр дные выходы датчика 19 соединены с первой группой входов схемы 21 сравнени , втора группа входов которой соединена с разр дными выходами второго счетчика 13 и с входом дешифратора 22, выходы которого соединены с первыми входами элементов И 10 j-й группы, выход Равно схемы 21 сравнени соединен с нулевым входом триггера 6, выход Сброс блока синхронизации 3 соединен с входами начальной установки делител 4 частоты, регистра 9, второго счетчика 13 и вторым входом элемента ИЛИ 8. Выходы каждого j-ro элемента И из группы 23 и группы 24 соединены с входами j-ro элемента ИЛИ второй группы 25, выходы которой соединены с вторыми входами элементов И j-й группы 10, разр дные выходы второго датчика 20 равномерно распределенных случайных чисел соединены с первыми разр дными входами второй схемы 26 сравнени , вторые разр дные входы которой соединены с первой группой выходов блока3 синхронизации, а выход-с первыми пр мыми входами элементов И первой группы группы 24, j-й выход второй группы выходов блока 3 соединен с вторыми пр мыми входами j-x элементов И группы 23 и вторыми инверсными входами j-x элементов И группы 24, j-e выходы третьей группы выходов блока 3 синхронизации соединены с третьими пр мыми входами групп 23 и 24 элементов И. Первые входы дополнитель- ных элементов И 14, 16 и 27 соединены с выходом Синхронно-асинхронно блока 3 синхронизации, а второй вход первого дополнительного элемента И 16 подключен к единичному выходу триггера, второй входelement OR 8 and with the input inputs of the first sensor 19 and the second sensor 20 uniformly distributed random numbers. The bit outputs of the sensor 19 are connected to the first group of inputs of the comparison circuit 21, the second group of inputs of which is connected to the bit outputs of the second counter 13 and to the input of the decoder 22, the outputs of which are connected to the first inputs of the elements And 10 of the jth group, the output is equal to the circuit 21 comparison is connected to the zero input of the trigger 6, the output Reset synchronization block 3 is connected to the inputs of the initial installation of the frequency divider 4, register 9, second counter 13 and the second input of the OR element 8. The outputs of each j-ro element And from group 23 and group 24 are connected to entry mi j-ro element OR of the second group 25, the outputs of which are connected to the second inputs of the elements AND of the j-th group 10, the bit outputs of the second sensor 20 evenly distributed random numbers are connected to the first bit inputs of the second comparison circuit 26, the second bit inputs of which connected to the first group of outputs of the synchronization block 3, and the output to the first direct inputs of the And elements of the first group of group 24, the jth output of the second group of outputs of the block 3 is connected to the second direct inputs of jx elements AND of group 23 and the second inverse inputs jx element in And groups 24, je the outputs of the third group of outputs of the synchronization block 3 are connected to the third direct inputs of the groups of 23 and 24 elements I. The first inputs of the additional elements And 14, 16 and 27 are connected to the synchronously-asynchronous output of the synchronization block 3, and the second the input of the first additional element And 16 is connected to a single output of the trigger, the second input
третьего дополнительного элемента И 27 подключен к выходу элемента ИЛИ 8, выход элемента 18 задержки вл етс выходом синхронизации генератора случайных чисел .the third additional AND element 27 is connected to the output of the OR element 8, the output of the delay element 18 is the synchronization output of the random number generator.
Формирование случайных чисел основано на преобразовании равномерно распределенных на интервале (0,1) случайных чисел R в случайные числа с заданным законом распределени веро тностей F(X), которое сводитс к решению относительно X уравнени The formation of random numbers is based on the conversion of random numbers R uniformly distributed over the interval (0,1) into random numbers with a given probability distribution law F (X), which reduces to solving with respect to X the equation
0000
/ f(X)dxeRi./ f (X) dxeRi.
- 00- 00
(1)(1)
или F(X) R, где F(X) - функци распределени .or F (X) R, where F (X) is the distribution function.
Формирование композиции случайных чисел, включающей основное случайное число и случайное число, описывающее грубые ошибки, осуществл етс по методу П.Хубера согласно следующему соотношению:The composition of random numbers, including the main random number and a random number describing gross errors, is formed according to the method of P. Huber according to the following relation:
Y (1 -E)X1 EX2,Y (1 -E) X1 EX2,
(2)(2)
где Х1 - случайные числа, распределенные по основному закону распределени веро тностей;where X1 are random numbers distributed according to the basic law of probability distribution;
Х2 - загр зн ющие случайные числа, распределенные по соответствующему закону распределени веро тностей;X2 - contaminating random numbers distributed according to the corresponding law of probability distribution;
Е - малый параметр, указывающий на процентное содержание грубой ошибки в модели случайных чисел.E is a small parameter indicating the percentage of gross error in the random number model.
Генератор работает следующим образом . .The generator operates as follows. .
В исходном состо нии ключ 2 разомкнут , на выходах датчиков 19 и 20 равномерно распределенных случайных чисел сформированы числа, на выходах второй группы выходов блока синхронизации установлены 1, на выходах третьей группы выходов блока синхронизации - О. Настройка генератора случайных чисел на формирование композиции случайных чисел с заданными законами распределени веро тностей производитс путем установки на выходах первой группы выходов блока 3 синхронизации кода, соответствующего значению малого параметра Е. установки 1 на выходах третьей группы выходов блока 3 синхронизации, которые соответствуют выбранным законам распределени случайных чисел (основному и загр зн ющему) и О на выходе второй группы выходов блока 3 синхронизации, который соответствует закону распределени веро тностей загр зн ющих случайных чисел. Сигналом Сброс с блока 3 синхронизации, делитель 4 частоты, счетчики 7 и 13, регистр 9 устанавливаютс в нулевое состо ние, триггер 6 устанавливаетс в такое состо ние, когда ключ 5 замкнут. Сигнал с выхода схемы 27 сравнений (1, если число с датчика равномерно распределенных чисел Е и О - в противном случае) через соответствующие группы элементов И (23 или 24) и группы ИЛИ 25 подключает соответствующую группу элементов И 10, производ таким образом настройку генератора на формирование случайного числа, распределенного по одному из выбранных законов распределени веро тностей (основному или загр зн ющему). Сигнал Синхронно-асинхронно (0 - синхронно, 1 - асинхронно ) с блока синхронизации 3 устанавливает соответствующий режим работы генератора.In the initial state, key 2 is open, numbers are generated at the outputs of the sensors 19 and 20 of the uniformly distributed random numbers, 1 is set at the outputs of the second group of outputs of the synchronization block, O is set at the outputs of the third group of outputs of the synchronization block. Setting the random number generator to generate a random number composition with predetermined laws of probability distribution is performed by setting at the outputs of the first group of outputs of the block 3 synchronization code corresponding to the value of the small parameter E. setting 1 at the output ah third group synchronization unit 3 outputs which correspond to the selected distribution law of random numbers (primary and contaminate yuschemu) and D at the output of the second group synchronization unit 3 outputs, which corresponds to the law of distribution of probabilities contaminating random numbers. The Reset signal from synchronization unit 3, frequency divider 4, counters 7 and 13, register 9 are set to zero, trigger 6 is set to such a state when key 5 is closed. The signal from the output of the comparison circuit 27 (1, if the number from the sensor is uniformly distributed numbers E and O - otherwise) through the corresponding groups of elements AND (23 or 24) and the group OR 25 connects the corresponding group of elements AND 10, thus setting up the generator to the formation of a random number distributed according to one of the selected laws of probability distribution (main or polluting). The signal Synchronously-asynchronously (0 - synchronously, 1 - asynchronously) from synchronization block 3 sets the corresponding operating mode of the generator.
В синхронном режиме работы генератора по команде Пуск замыкаетс ключ 2 и импульсы с renepatopa 1 тактовых импульсов через делитель 4 частоты начинают поступать на вход счетчика 13. По цепи обратной св зи через дешифратор 22, включенную группу 10 элементов И и элементы ИЛИ 12 производитс управление коэффициентом делени делител 4 частоты, обеспечивающим необходимую частоту дл каждого участка аппроксимированной функции распределени , котора формируетс на выходах счетчика 13. В момент, когда число на выходе счетчика 13 становитс равным числу на выходе датчика 19 равномерно распределенных случайных чисел, с выхода схемы 21 сравнени оно поступает на триггер 6, который перебрасываетс и размыкает ключ 5. Число, записанное е счетчик 7, вл етс искомым. После переполнени счетчика 13 сигнал с него поступает на второй вход дополнительного элемента И 14, сигнал с выхода которого через дополнительный элемент И 15 поступает на формирователь 17 импульсов, импульс с которого переписывает число с выхода счетчика 7 в регистр 9. Импульс, задержанный элементом 18 задержки на врем установки числа в регистр 9, сбрасывает в нулевое состо ние счетчик 7, производит смену чисел в датчиках 19 и 20 равномерно распределенных случайных чисел и устанавливает триггер 6 в такое состо ние, когда ключ 5 замкнут. За врем записи числа в регистр 9 сигнал с выхода схемы 27 сравнени настраивает (перенастраивает) генератор ка формирование нового случайного числа по одному из выбранных законов распределени веро тностей . Формирование следующих случайных чисел производитс аналогично. Генерирование однородных случайных чисел осуществл етс при величине Е 0.In the synchronous operation mode of the generator, the Start command closes the key 2 and the pulses from renepatopa 1 of the clock pulses through the frequency divider 4 begin to arrive at the input of the counter 13. Through the feedback circuit through the decoder 22, the included group of 10 AND elements and OR 12 controls the coefficient dividing the frequency divider 4, providing the necessary frequency for each section of the approximated distribution function, which is generated at the outputs of counter 13. At the time when the number at the output of counter 13 becomes equal to the number at the output of the sensor 19 evenly distributed random numbers, from the output of the comparison circuit 21, it goes to the trigger 6, which is thrown and opens the key 5. The number recorded by counter 7 is the desired one. After the counter 13 is overflowed, the signal from it enters the second input of the additional element And 14, the signal from the output of which through the additional element And 15 enters the pulse shaper 17, the pulse from which rewrites the number from the output of the counter 7 to register 9. The pulse delayed by the delay element 18 at the time of setting the number in register 9, resets counter 7 to zero, performs a change of numbers in the sensors 19 and 20 of evenly distributed random numbers and sets trigger 6 to the state when key 5 is closed. During the recording of the number in the register 9, the signal from the output of the comparison circuit 27 tunes (reconfigures) the generator to generate a new random number according to one of the selected probability distribution laws. The following random numbers are generated in a similar fashion. Homogeneous random numbers are generated at an E 0 value.
При асинхронном режиме работы гене- 5 ратора по команде Пуск замыкаетс ключ 2 и импульсы с генератора 1 тактовых импульсов через делитель 4 частоты начинают поступать на вход счетчика 13. По цепи обратной св зи через дешифратор 22, вклю0 ченную группу 10 элементов И и элементы ИЛИ 12 производитс управление коэффициентом делени делител 4 частоты, обеспечивающим необходимую частоту дл каждого участка аппроксимированной фун5 кции распределени , котора формируетс на выходах счетчика 13. В момент, когда число на выходе счетчика 13 становитс равным числу на выходе датчика 19 равномерно распределенных случайных чисел, с выходаIn the asynchronous mode of operation of the generator 5, the Start key closes the key 2 and the pulses from the clock generator 1 through the frequency divider 4 begin to arrive at the input of the counter 13. Through the feedback circuit through the decoder 22, the included group of 10 AND elements and OR elements 12, the dividing factor of the frequency divider 4 is controlled, providing the necessary frequency for each section of the approximated distribution function 5, which is generated at the outputs of counter 13. At the time when the number at the output of counter 13 becomes equal to the number at the output of the sensor 19 uniformly distributed random numbers from the output
0 схемы 21 сравнени оно поступает на триггер 6, который перебрасываетс и размыкает ключ 5. Число, записанное в счетчик 7, вл етс искомым. Сигнал с выхода триггера 6 поступает также на второй вход первого0 of the comparison circuit 21, it enters the trigger 6, which is thrown and opens the key 5. The number recorded in the counter 7 is the desired one. The signal from the output of trigger 6 is also fed to the second input of the first
5 дополнительного элемента И 16 и через дополнительный элемент И 15 поступает на формирователь 17 импульсов, импульс с которого переписывает число с выхода счетчика 7 в регистр 9. Импульс, задержанный5 of the additional element And 16 and through the additional element And 15 enters the pulse shaper 17, the pulse from which rewrites the number from the output of the counter 7 to register 9. The pulse delayed
0 элементом 18 задержки на врем установки числа в регистр 9. сбрасывает в нулевое состо ние счетчик 7. производитс смена чисел в датчиках 19 и 20 равномерно распределенных случайных чисел, устанавли5 зает триггер 6 в такое состо ние, когда ключ 5 замкнут, через третий дополнительный элемент И 27 устанавливает в нулевое состо ние второй счетчик 13 и делитель 4 частоты и поступает на выход синхронизации0 by the delay element 18 for the time the number is set in register 9. resets counter 7. The numbers in the sensors 19 and 20 are uniformly distributed; the trigger 6 is set to the state when the key 5 is closed, through the third additional element And 27 sets to zero the second counter 13 and the frequency divider 4 and is fed to the synchronization output
0 генератора случайных чисел. За врем записи числа в регистр 9 сигнал с выхода схемы 27 сравнени настраивает (перенастраивает ) генератор на формирование нового случайного числа по одному из выбранных0 random number generator. During the recording of the number in the register 9, the signal from the output of the comparison circuit 27 tunes (reconfigures) the generator to generate a new random number from one of the selected
5 законов распределени веро тностей. Формирование следующих случайных чисел производитс аналогично. Генерирование однородных случайных чисел осуществл етс при величине Е О,5 laws of probability distribution. The following random numbers are generated in a similar fashion. The generation of homogeneous random numbers is carried out at a value of E O,
0 0
Таким образом, генератор случайных чисел имеет существенное преимущество перед указанным прототипом, заключающеес в том, что .он имеет большее быстро5 действие в асинхронном режиме, что позвол ет сократить врем выдачи последовательности реализации случайной величины в среднем в 2 раза. Применение устройства позволит получить экономию и снижение себестоимости устройства за счетThus, the random number generator has a significant advantage over the specified prototype, namely that it has a greater fast5 action in asynchronous mode, which allows to reduce the average execution time of the random sequence by 2 times. The use of the device will allow to save and reduce the cost of the device due to
сокращени затрат электроэнергии при его эксплуатации.reduce energy costs during its operation.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU4911111 RU1807482C (en) | 1990-11-21 | 1990-11-21 | Random-number generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU4911111 RU1807482C (en) | 1990-11-21 | 1990-11-21 | Random-number generator |
Publications (1)
Publication Number | Publication Date |
---|---|
RU1807482C true RU1807482C (en) | 1993-04-07 |
Family
ID=21560432
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU4911111 RU1807482C (en) | 1990-11-21 | 1990-11-21 | Random-number generator |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU1807482C (en) |
-
1990
- 1990-11-21 RU SU4911111 patent/RU1807482C/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР . № 741297, кл. G 06 F 7/58, 1980, Авторское свидетельство СССР № 1684793, кл. G 06 F 7/58, 1989. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4354176A (en) | A-D Converter with fine resolution | |
US2972718A (en) | Synchronized sampled data digital servo | |
RU1807482C (en) | Random-number generator | |
US3237171A (en) | Timing device | |
SU1136158A1 (en) | Random process generator | |
SU1083188A1 (en) | Random event arrival generator | |
SU1363201A1 (en) | Random-pulse generator | |
SU1401585A1 (en) | Time interval shaping device | |
RU1820385C (en) | Device for majority selecting of async signals | |
SU953703A2 (en) | Multi-channel programmable pulse generator | |
SU1083206A1 (en) | Device for simulating probabilistic graph | |
SU1132294A1 (en) | Device for simulating communication channel | |
SU991374A1 (en) | Function interpolator | |
SU1425635A1 (en) | Programmable multifunction a-d interface | |
SU1524037A1 (en) | Device for shaping clock pulses | |
SU868756A1 (en) | Frequency multiplier | |
SU1533021A2 (en) | Mutiple-frequency receiver | |
SU1621145A1 (en) | Device for shaping pulse train | |
SU1529207A1 (en) | Device for input of digital information | |
RU2071117C1 (en) | Device for determining optimal maintenance intervals | |
SU1674350A1 (en) | Controlled pulse generator | |
SU798727A1 (en) | Apparatus for controlling speed-up and deceleration of actuating motor | |
SU692065A1 (en) | Digital pulse recurrence frequency multiplier | |
SU1008893A1 (en) | Pulse train generator | |
SU1656674A1 (en) | Spectrum generator |