text:
# Comparator inputs

Feb 9, 2012
29
I'd like to design a circuit to do the following but I'm not sure if I'm on the right track ?
I want to monitor the 230V AC current through two separate conductors so I envisage using two current transformers
Can I connect these both to the input of a simple comparator so that the output changes state when input A is greater than Input B
All comparator circuits show a ref voltage, but can a varying voltage take the place of a ref voltage, as described above
Will the outputs from the current transformers be large enough to operate the comparator inputs
The currents I wish to monitor will vary between 0 and 60Amp 230V AC and I guess this will give a current transformer output of around 0-30mA

Any advice would be most welcome
Alan

#### MrEE

Apr 13, 2012
84
You'd probably want to rectify and filter the output of each current transformer and then apply to a simple voltage comparator such as the LM339.

#### KrisBlueNZ

##### Sadly passed away in 2015
Nov 28, 2011
8,393
A comparator just compares two voltages. There's no requirement that one of those voltages is a fixed reference voltage. You just need to ensure that the two inputs are always within the operating range of the comparator.

A comparator compares instantaneous voltages. Your current transformers will produce an AC voltage (actually an AC current which you connect across a resistor to convert it into an AC voltage), where the instantaneous voltage is continuously changing, and which reverses polarity.

The first step in dealing with an AC signal is to rectify it, so that the negative excursions are either ignored, or are converted to positive excursions. This can be done with a diode, but if you need accuracy down to low amps, you need to use a lossless rectifier, based on an op-amp - see http://en.wikipedia.org/wiki/Precision_rectifier and http://www.play-hookey.com/analog/feedback_circuits/full-wave_rectifier.html.

You might also need some clean-up circuitry if the waveform has spikes or interference on it.

You could compare the two rectified signals, but this won't give a useful result around the points where the AC waveform crosses zero, because the outputs of both rectifiers will be very close to zero and the comparator won't be able to reliably tell which one has the higher amplitude. It also requires that the signals and transformers are exactly in phase with each other, which would normally be true.

More often you would convert each rectified AC voltage into a smoothed DC voltage, using the rectified voltage to charge a capacitor, with a resistor across it to allow it to discharge. This should be reasonably accurate if both waveforms are the same type, i.e. a sinewave in this case. This will give a clean comparator output but will affect the timing of the response to changing AC current.

You can compare the voltages with a comparator like the LM393 (dual) or LM339 (quad). You may find it useful to have two outputs and a deadband. One output would be "A is definitely greater than B" and the other would be "B is definitely greater than A". When they're too close to reliably tell the difference, neither output would be active.

If you're prepared to do some testing, and give more details of the project, I can give more detailed advice.

Last edited:

Feb 9, 2012
29
Thank you MrEE and especially KrisBlue for your very helpful reply, now that I know it can be done I shall do some testing .
Thanks again,
Alan

#### duke37

Jan 9, 2011
5,364
You could connect the two DC voltages in series, one oposing the other, so you have made a comparator. A positive voltage on the output could drive an indicator.

Feb 9, 2012
29
I'm not sure how that would work Duke 37
I want to compare the current flowing through two conductors of an AC 230v UK domestic supply.
I wish to operate a relay depending on which conductor is carrying the most current.
The value of current isn't important
For instance if conductor A is carrying the most current then the relay is in it's normally closed position.
If conductor B is carrying the most current then the relay operates .

#### duke37

Jan 9, 2011
5,364
Put a current transformer in each line, rectify the output curents to get DC, load the outputs with a resistors to get a voltage. Connect these two voltages in opposition and feed a relay through a diode so the relay switches when the voltage A is bigger than voltage B.
This might not be sensitive enough for you and you may have to go to an electronic solution.

Whatever the solution, you will need a certain sensitivity and will need to cater for large differences in current without damage.
Hall effect devices are alternatives to transformers and can be installed without cutting wires.

Feb 9, 2012
29
Thanks all for help so far, I have a question concerning the current transformers.
I see ones advertised as input current 30A , input current o-100 A or 60A etc .
It seems the ratios are similar , for example The 30A transformer will produce 30mA at 30A. The 100A transformer will also produce 30mA at 30A and of course 100mA at 100A
I can not find an explanation as to the suitability of the different current ratings .
For example if a project only required to monitor up to 30A then would we chose a 30A transformer or could we also use the 100A transformer with the same results .
This is puzzling me

#### (*steve*)

##### ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
probably.

If you're using two of them and comparing the output, make sure you use two of the same unit.

The higher current one may be less linear at low currents, or there may be some other subtle differences (maybe not so subtle -- maybe it's physically larger?)

Feb 9, 2012
29
Thanks Steve, I asked a manufacturer , seems it's price, size and probably subtle differences which don't affect my project.
To be clear; KrisBlueNZ suggests using an LM339 dual or LM 339 Quad comparator .
As I only wish to compare two voltages am I correct in thinking that an LM 139 single comparator will do the job ?
Alan

#### (*steve*)

##### ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,505
As I only wish to compare two voltages am I correct in thinking that an LM 139 single comparator will do the job ?

Probably. But the issue is availability. You may find that is is easier and cheaper to use 1/4 of a quad comparator than to locate a single comparator (this particular device). Sure it may be listed on the datasheet, but maybe nobody carries it.

#### KrisBlueNZ

##### Sadly passed away in 2015
Nov 28, 2011
8,393
Steve is right. That's why I didn't suggest a single comparator, although you only need one. The LM393 (dual) is fairly widely available, and is the same physical size as a through-hole single comparator; the LM339 (quad) is even more widely available. Also, they're not all the same internally, and I know from prior experience that the LM393 gives good performance.

Feb 9, 2012
29
Thanks Steve and Kris, that makes sense

Feb 9, 2012
29
http://electronguide.com/circuits_pages/ACLineCurrentDetector.html
Hi, after a break of a few months I have returned to my project
The link is to somebody else's project that I thought I might adapt . I would use two LM1458 and feed the output to a LM393 .I will use YHDC SCT-013-000 current transformers in place of the home made one.
Can anyone please explain the operation of the first LM 1458 in the example. The Op Amp circuits I have looked at at place the input between + and ground , this one doesn't how does it work, what determines the amplification, and how does the 'ct burden resistor' feature in this circuit, where is it ?
thanks

Last edited by a moderator:

#### KrisBlueNZ

##### Sadly passed away in 2015
Nov 28, 2011
8,393
That's a good design. It uses a few tricks so minimise components and simplify the circuit that make it a bit hard to explain though.

The first op-amp operates in the "inverting amplifier" configuration (Google or Wikipedia it), with a gain of about 200 (100k / 470). Its input is the left hand end of the 470 ohm resistor. This resistor also functions as the burden or shunt resistor.

It uses a simple AC-to-DC conversion circuit consisting of the diode, capacitor and resistor between the two op-amps. This circuit responds to the peak voltage of the AC signal. This may be good enough for your application, if the AC current signals are clean. What type of loads are you powering from the AC mains?

You can use an op-amp as a comparator; since you will already have two op-amps in your circuit, you could use a quad op-amp IC and you won't need a separate comparator IC. I recommend the MC34074 (for pretty much all applications actually; I really like that IC).

If you want a small bias in favour of one of the sources, so that if both mains loads are the same, or are zero, the comparator always chooses a certain option, this can be done fairly easily in various ways. You can also add hysteresis (Wikipedia it) to the comparator so that it doesn't chatter (switch randomly due to small variations) when the two mains load currents are the same, or nearly.

What power source(s) do you have available for this circuit?

Have you chosen a relay? If so, can you state the part number and/or a link to the data sheet?

Answer the questions in this post and I'll draw up a circuit for you.

Feb 9, 2012
29
Thanks for the explanation and the offer Krisblue, here goes
Current flowing through two separate kW hr meters is monitored by two YHDC SCT-013-000 current transformers 100A gives 50mA
The kW hr meters supply two fuseboards in a domestic situation, one fuseboard is for sockets ,lights etc, the other is for electric heating.
The power company charge half rate for the heating power
There is an alternative free source of power available but it can not be connected to both fuseboards at the same time so the idea is to switch the alternative power to whichever fuseboard is drawing the most current
( the burden resistors could be two different sizes to account for the different tariffs)
I think I would prefer the power and lights fuseboard to be the default board
I can tie the output of the comparator to a small pcb mounting relay ( I happen to have a box of, 12V 40mA ) using a transistor.
This in turn will operate a larger 40A contactor to switch the loads
The maximum alternative energy is 5kW 22Amps there about
A tricky part... once the current being drawn exceeds 22A I don't suppose it matters which fuseboard is drawing the most current neither by how much, the alternative energy could be switched to either.
I would like to keep the switching to as little as possible, I don't think it is necessary to switch small loads, anything below a few hundred watts , 400w perhaps needn't be monitored
Yes hysteresis is a good idea and also 'capacitor/resistor' circuitry would be good to slow things down, as it doesn't need to be switching precisely at every change of current, it would be better in fact if it didn't.
I intended to operate it using a voltage regulator at 12V
This will all be built into a small enclosure along with the contactor

I really look forward to your circuit
thanks

Last edited:

#### KrisBlueNZ

##### Sadly passed away in 2015
Nov 28, 2011
8,393
I'm not totally clear on what you want to do. I've mostly designed something that MAY do everything you want. It would be best if I describe it to you, and you tell me whether it's right or not. I'll do that tomorrow. Your last post was very helpful but I still need one other piece of information.

You say that the maximum current in the alternative energy circuit will be about 22A, but what is the maximum current in the other circuit?

Feb 9, 2012
29
KrisBlue hope this helps
Utility company supply power to a domestic household
Utility company fuse is a maximum of 100A
Within the household the supply is split between to fuseboards
Each fuseboard is separately metered
The fuseboard supplying the heating load is charged $Y per kW hr The fuseboard supplying the power points and lights etc is charged$ 2xY per kW hr
A wind turbine supplies power up to its limit of 5kW 22Amp
The turbine power can not be connected to both fuseboards at once as that would effectively connect the two meters etc together
To make best use of the turbine power its output would need to be switched to whichever fuse board was using the most power
The loads on either fuse board will of course be changing depending what is connected and the time of day ( electric heating load will be timed )
I suppose either load could reach the maximum of the service fuse 100A , that is unlikely but it could happen in a large house
The thing is that I suspect it is irrelevant what the current is doing in either fuseboard once the load is taking more than 22A
ie once fuseboard 'A' is drawing 22A then there is no point in switching to fuseboard 'B' if it happens to be drawing more than fuseboard 'A' because the turbine can only supply a maximum of 22A
To accomodate the difference is price per unit between the two fuseboards the burden resistor on the ct connected to the heating fuseboard would need to be half the size of the resistor connected to the sockets and lights fuseboard, or accomplished by some other means.
thanks

#### KrisBlueNZ

##### Sadly passed away in 2015
Nov 28, 2011
8,393

I'm afraid I'm still not sure what you want, but here's what I have so far.

I'm not sure whether this circuit will do everything you want. Have a look at the description and let me know.

I haven't worked with current transformers before, so if you use this circuit, be prepared to do a bit of testing, measurement and experimentation. I hope you have Skype and are prepared to spend some time on this project, because this will probably be required! Do you have access to an oscilloscope? It will probably be needed.

Currents in two mains circuits are monitored by T1 and T2 which have a ratio of 100A:50mA. The maximum current of interest in either phase is 22A RMS which translates to 11 mA RMS or 15.6 mA peak.

U1A and U1B convert this current into a voltage. The 12V supply is split by RH1 and RH2, forming a voltage rail called VAR (amplifier reference voltage) which is about 2.8V. This is done to keep the voltages at U1A and U1B's inputs inside the power supply rails so they can amplify correctly.

U1A operates as an inverting conductance amplifier, which converts an input current (coming from T1) into an output voltage, which is relative to VAR. An op-amp with negative feedback (through RC1) adjusts its output voltage to keep its inputs at the same voltage. When current out of the bottom pin of T1's secondary is negative, U1A's output will provide an equal current in the opposite direction through RC1 to keep the inputs at the same voltage.

U1 is an ON Semiconductor MC33179P quad op-amp with high current outputs that can easily supply enough current to match the 15.6 mA coming from the current transformer. To force 15.6 mA through RC1, U1A's output must go about 4.2V positive with respect to VAR, i.e. to about +7V.

When the current from the bottom end of T1 is positive, U1A's output cannot swing low enough to match the current; it will just bottom out, and the two 1N914 diodes across the current transformer will limit the differential input voltage to about +/- 0.8V and prevent damage to U1A.

So U1A's output is biased at 2.8V (from VAR) and swings positive in response to negative current from the bottom end of T1's secondary, translating a peak current from T1 of 15.6 mA into a peak voltage of 4.2V relative to VAR.

U1A's output cannot go higher than about 9V so the U1A circuit block cannot reproduce peaks that exceed about 23 mA at T1 secondary, which corresponds to a mains current of about 32A RMS.

The other side of the mains current waveform is not used, and only the peak current of the mains waveform is measured, so it's assumed that this current is a sinewave (or at least that both phase current waveforms have the same shape or are at least symmetrical above and below zero). This is true if the loads have a power factor of 1, which is true of heating loads and incandescent lighting loads, but not necessarily true of energy-efficient lights and fluorescent lighting, and switching power supplies such as those used in computers and electronic consumer appliances.

The output of U1A is rectified by DR1 and smoothed by CT1. There is a voltage loss of about 0.7V in DR1.

The voltage on DR1 cathode represents the measured phase current, relative to about 2.1V (VAR minus one diode voltage drop).

U1B operates identically but measures the current in mains circuit 2.

RT1, VRF and RT2 form a voltage divider that taps off about half of the CT1 voltage; this is fed to one input of U1C, which compares two voltages. Its other input is fed with about half the CT2 voltage (which represents the current in the second mains circuit).

U1C's output drives QI which acts as an inverter and produces a voltage at its collector that swings almost fully from one supply rail to the other. When QI.C (collector of QI) is high, current through RL causes LED1 to light, indicating that the current in mains circuit 2 is higher than that in mains circuit 1, and current through DH produces a voltage of 0.7V on DH's anode.

An adjustable amount of this voltage is taken off by VRH (hysteresis setting trimpot) and fed to the bottom of the RT3/RT4 voltage divider, providing hysteresis in the comparator.

Here is the hysteresis action described in detail.

Assume the VCT1 (voltage on CT1) is much higher than the VCT2. U1.10 (U1 pin 10) will be much higher than U1.9, so the output at U1.8 will be high. (U1C is used as a simple voltage comparator.) There is no base bias for QI so QI is OFF, and RP pulls QI.C to zero volts. There is no voltage on VRH, so the RT3/RT4 voltage divider divides the voltage between CT2 and 0V, and the result feeds U1.9.

Now assume that the mains phase 2 current increases steadily. The voltage on CT2 increases steadily until VU1.9 is higher than VU1.10; when this happens, U1.8 will go low. This turns QI ON, and current flows through RL, LED1 and DH, producing a single diode voltage drop (about 0.7V) on DH.A (anode of DH). An adjustable portion of this voltage (adjusted by VRH) now appears on the bottom of the RT3/RT4 voltage divider, causing VU1.9 to increase further. This produces the clean switching action that is characteristic of hysteresis, because VCT2 now has to decrease further before U1C will switch back the other way.

VRF adjusts the voltage division in the RT1/VRF/RT2 divider so that one or other phase can be favoured. That is, when VCT1 and VCT2 are equal, and ignoring the effect of the hysteresis circuit, adjusting VRF causes U1.10 to see a greater or lesser portion of VCT1, so that the comparison is biased in favour of one phase or the other.

So VQI.C is high when the phase 2 current is higher than the phase 1 current, and otherwise is low. This voltage is fed through RD to CD which provide a delay to prevent rapid switching. (The hysteresis in the comparator stage will also tend to prevent rapid switching.) The time delay of the RD/CD circuit is roughly equal to RD (in ohms) multiplied by CD (in farads), which is 330e3 * 100e-6 which is 33 seconds. This is only approximate. To change this delay, vary CD, not RD.

U1D operates as a Schmitt trigger (a voltage detector with hysteresis). The trigger voltages are about 1/3 and 2/3 of the supply rail, i.e. 4V and 8V, and these thresholds apply to VCD. RSF provides the hysteresis; it adjusts U1D's threshold voltage (U1.12) according to the output state. The output on U1.14 is the opposite of U1.13 (because it's an inverting Schmitt trigger), so when the phase 2 current is greater than the phase 1 current, VCD is high, and U1.14 is low, turning ON QR and activating the relay.

Therefore the relay closes when the phase 2 current is higher than the phase 1 current.

#### Attachments

15.4 KB · Views: 2,993
Last edited:

Feb 9, 2012
29
Kris, that's brilliant, a more intricate circuit than I expected, I will have to order the MC3317P so it will be a while before I can try it out and report back. I'm not too hot on electronics but I do have an oscilloscope, not sure why you say 'i hope you have Skype' ?. Thanks also for the detailed description of its operation, I think it will do what I want, but I need to read your description through a few more times and of course try it out.
Thanks for going to all that trouble, I will try it out as soon as possible.

W
Replies
10
Views
1K
Winfield Hill
W
Replies
6
Views
1K
Replies
17
Views
2K
Replies
7
Views
1K
Replies
2
Views
1K


text:
MathSciNet bibliographic data MR2218422 57R56 (17B37) Freedman, Michael; Krushkal, Vyacheslav On the asymptotics of quantum ${\rm SU}(2)$${\rm SU}(2)$ representations of mapping class groups. Forum Math. 18 (2006), no. 2, 293–304. Article

For users without a MathSciNet license , Relay Station allows linking from MR numbers in online mathematical literature directly to electronic journals and original articles. Subscribers receive the added value of full MathSciNet reviews.

format: plain


text:
Experiment 2: Avogadro and All That

Objective

• To help you become familiar with the layout of the laboratory including safety aids and the equipment that you will be using this year.
• To make an order-of-magnitude estimate of the size of a carbon atom and of the number of atoms in a mole of carbon, based on simple assumptions about the spreading of a thin film of stearic acid on a water surface

• Lab Report (90%)
• TA points (10%)

Before coming to Lab

• Lab instructions
• Background Information
• Concepts of the experiment

Print out the lab instructions and report form.

Read and sign the equipment responsibility form and the safety rules. Email Ms. Duval, at nduval@rice.edu , to confirm completing this requirement by noon on September 14 ${}^{\text{th}}$ .

Introduction

Since chemistry is an empirical (experimental) quantitative science, most of the experiments you will do involve measurement. Over the two semesters, you will measure many different types of quantities – temperature, pH, absorbance, etc. – but the most common quantity you will measure will be the amount of a substance. The amount may be measured by (1) weight or mass (grams), (2) volume (milliliters or liters), or (3) determining the number of moles. In this experiment we will review the methods of measuring mass and volume and the calculations whereby number of moles are determined.

Experimental Procedure

1. Identification of Apparatus

On the tray (in DBH 214) we have a number of different pieces of common equipment. We will, identify and sketch each - I know this may sound a trivial exercise but it is necessary so that we are all on the same page.

1. beaker
5. pipettes, both types graduated and bulb
6. burette
7. Bunsen burner
8. test tubes
9. watch glass

2. Balance Use

In these general chemistry laboratories, we only use electronic balances – saving you a lot of time. However, it is important that you become adept at using them.

Three aspects of a balance are important:

1. The on/off switch. This is either on the front of the balance or on the back.
2. The "Zero" or "Tare" button. This resets the reading to zero.
3. CLEANLINESS . Before and after using a balance, ensure that the entire assembly is spotless. Dirt on the weighing pan can cause erroneous measurements, and chemicals inside the machine can damage it.

Balance Measurements :

1. Turn the balance on.
2. After the display reads zero, place a piece of weighing paper on the pan.
3. Read and record the mass. (2)
4. With a spatula, weigh approximately 0.2 g of a solid, common salt NaCl. The excess salt is discarded, since returning it may contaminate the rest of the salt.
5. Record the mass (1). To determine how much solid you actually have, simply subtract the mass of the weighing paper (2) from the mass of the weighing paper and solid (1). Record this mass (3). You have just determined the mass of an "unknown amount of solid."
6. Now place another piece of weighing paper on the balance and press the Zero or Tare button then weigh out approximately 0.2 g of the salt (4). Thus, the zero/tare button eliminates the need for subtraction.

state and explainfour function of a costumer service
the circular flow model of the economy is a simplification showing how the economy works and the relationship between income,production and spending in the economy as a whole
what is circular flow
what is economics?
Economics is defined as the science that study human behaviour as a relationship between ends and scarce means which have alternative uses.
Emmanuella
economics is a social science concerned with the production,distribution, and consumption of goods and services
Michael
in 2021 Amazon reduced the annual subscription fee for its prime membership service which provides free two_day shipping on many goods and other benefits, from $119 to$99. Zoppa consulting, an investment firm estimated that before the price reduction, prime had 62million subscribers globally. If so, what is the arc elasticity of demand for a prime membership.
Differences between microeconomics and macroeconomics
Macroeconomics deal with the economy as a whole.that is an economy affect the firm ,government and the households eg.unemployment, whilst Microeconomics deal with the the decision making of households,firm and government separately.
Amah
what is Economics
the branch of knowledge concerned with the production, consumption, and transfer of wealth and has Influence by sociology!!!!
Ajay
Economics is the study of how humans make decisions when they want to fulfil their requirements and desires for goods, services and resources.
Abdullah
Economics is the study how humans make decisions in the faces of scarcity.
Rose
economic is the study of how human make decision in the fact of scarcity.
Toang
Economics is a social science which study human behavior as a relationship between earn and scarce mean which have alternative uses
Juliet
what is market structure
Fatima
market structure in economics depicts how firms are differentiated and categorised based on types of goods they sell and how their operations are affected by external factors and elements.
Nasir
what is economic theory
what is demand
demand is the willingness to purchase something
Mohamed
demand is the potential ability or williness to purchases something at a particular price at a given period of time..
Ahmed
Demand refers to as quantities of a goods and services in which consumers are willing and able to purchase at a given period of time. Demand can also be defined as the desire backed by ability to purchase .
what is demand
is the production of goods in scarcity
David
thanks
John
Demand refers to as quantities of a goods and services in which consumers are willing and able to purchase at a given period of time.
Demand refers to the quantity of goods and services that a consumer is willing and able to buy at a given price over a period of time
Augustina
Do high interest rate in a country increase investment
Alfred
what is demand of supply
What is the meaning of supply of labour
what is production?
Production is basically the creation of goods and services to satisfy human wants
Anthonia
importance of tertiary and example
Elizabeth
Production is the process of producing goods and services to satisfy human needs and want.
Augustina
under what condition will demand curve slope upward from left to right instead of normally sloping downward from left to right
how i can calculate elasticity?
What is real wages
Got questions? Join the online conversation and get instant answers!


text:
Precalculus (10th Edition)

$x=0$ or $x=-9$.
We know that for a matrix $\left[\begin{array}{rrr} a & b & c \\ d &e & f \\ g &h & i \\ \end{array} \right]$ the determinant, $D=a(ei-fh)-b(di-fg)+c(dh-eg).$ Hence here $D=x(x\cdot(-2)-0\cdot1)-2(1\cdot(-2)-0\cdot6)+3(1\cdot1-x\cdot6)=0\\x(-2x)-2(-2)+3(1-6x)=7\\-2x^2+4+3-18x=7\\2x^2+18x=0\\2x(x+9)=0.$ Hence by the zero product property $x=0$ or $x+9=0\\x=-9$.


text:
Generates a lookup vector such that x_at_y(x, y)[y] == x. Particularly useful for generating lookup tables for nested indices in conjunction with compose_data().

x_at_y(x, y, missing = NA)

## Arguments

x Values in the resulting lookup vector. There should be only one unique value of x for every corresponding value of y. Keys in the resulting lookup vector. Should be factors or integers. Missing levels from y will be filled in with this value in the resulting lookup vector. Default NA.

## Details

x_at_y(x, y) returns a vector k such that k[y] == x. It also fills in missing values in y: if y is an integer, k will contain entries for all values from 1 to max(y); if y is a factor, k will contain entries for all values from 1 to nlevels(y). Missing values are replaced with missing (default NA).

compose_data().

Matthew Kay

## Examples

library(magrittr)

df = data.frame(
plot = factor(paste0("p", rep(1:8, times = 2))),
site = factor(paste0("s", rep(1:4, each = 2, times = 2)))
)

# turns site into a nested index: site[p] gives the site for plot p
df %>%
compose_data(site = x_at_y(site, plot))
#> $plot #> [1] 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 #> #>$n_plot
#> [1] 8
#>
#> $site #> [1] 1 1 2 2 3 3 4 4 #> #>$n_site
#> [1] 4
#>
#> \$n
#> [1] 16
#>


text:
# Introducing Log4Shell Sentinel

A smart Log4Shell/Log4j/CVE-2021-44228 scanner

# Introduction

The Internet’s on fire. CVE-2021-44228, a critical vulnerability in the Apache Log4j, one of the most widely used libraries, allows unauthenticated users to easily gain full server control of vulnerable applications and is currently being massively exploited. This is hands down one the worst Java-related vulnerability in the past decade. For more on the vulnerability itself, I would recommend reading this and this by the Lunasec team.

To help organizations identify vulnerable applications in their environment, I developed Log4Shell Sentinel that takes a somewhat unique approach to tackling the issue at enterprise-scale.

NOTE This article will only touch on some of the tool’s features. For more document, kindly refer to the GitHub

# Why Another Tool?

There are already a number of excellent tools available to help organizations scan their environments. This includes:

• passive and active DAST tools including Burp Suite plugins
• SAST tools to identify vulnerable code (if you have access to the source code)
• filesystem scanners
• web log scanners such as log4shell-detector.

But the truth is that despite the availability of these tools, the vast majority of enterprises are struggling. Even if they successfully identify a few applications, this is typically only a small subset of the applications that may be vulnerable. Add to this the tremendous adoption of containers over the past few years and this problem is further compounded. Until now.

Log4Shell Sentinel. Log4Shell Sentinel empowers companies to quickly:

• identify all (except for appliances you don’t have access to) uses of the vulnerable library in their environments (typically within minutes). It uses a file-system scanning based approach with some smarts added to it
• enable an IT / security analyst / GRC specialist to:
• identify duplicates of the same application running across their environment and handle them as a single instance
• map file system mappings to container images
• setup ignore lists for applications known to be not impacted by this vulnerability, even if they use the vulnerable library

Log4Shell Sentinel is the only open-source tool I’m aware of that takes a holistic view of the lifecycle of identifying and tracking the vulnerability across the enterprise. Using it, along with other tools that can help validate findings, will give enterprises more visibility into their exposure levels.

Let’s first look at the general solution design.

# Solution Design

The approach I adopted was a low-level approach based on file system scanning. While a match does not necessarily mean that an application is vulnerable, it does mean that the application may be vulnerable and you’ll have to add either source code analysis or run a SAST or DAST tool to definitely know if it is vulnerable or not (or possibly take the vendor’s word for it if it is a 3rd party application). This also means that:

• a scan across your environment can be completed in minutes
• a re-scan can easily be run to identify if all instances of a vulnerable application were updated or not

When combined with configuration management tools such as Ansible and the ability to ignore findings, you can easily scale a scan across hundreds / thousands of servers while progressively moving through the list of findings.

## Filesystem Scanning

As there are a number of ways to deploy Java applications, Log4Shell Sentinel inspects the following file types:

• simple jar
• fat / uber jar
• WAR
• EAR

Filesystem scanning has both pros and cons. Pros include:

• being able to identify with high certainty possibly vulnerable apps
• speed

The main cons are:

• not being able to actually trigger the vulnerability to definitively know if it vulnerable or not
• not knowing if the artifact found actually corresponds to a running process / container (LogShell Sentinel does this for you in some cases)

One of the key features of Log4Shell Sentinel is its ability to enrich findings, allowing analysts to focus on whats important. Out of the box, for each jar file detected, it adds the following:

• application fingerprinting
• container image mapping

### Host Enrichment

To allow an analyst to quickly identify what host a given application runs on, all matches add the following fields:

• IP
• hostname

For hosts with multiple IPs, the IP used for default routing is used. This allows an analyst to easily the host the potentially vulnerable application.

### Application Fingerprinting

Although there is no way to identify the actual application used, Log4Shell Sentinel does help analysts identify multiple copies of a single application across their environment, even if it doesn’t know what this application translates to in terms of business functionality. It does this by calculating an MD5 hash of the corresponding JAR/WAR/EAR file and adds this to the output. As the scanner outputs findings in CSV format, the analyst can then sort on this field within Excel and treat this as a single finding. However, in instances where a simple jar is used, no hash is calculated as this would be meaningless due to many applications likely using the same log4j-core-X.X.jar file. In this case, the analyst can use the full path to possibly identify multiple instances of the same application.

### Container Image Mapping

One major issue with current filesystem scanners is that they can be difficult to work with, especially for containerized apps. For example, a typical scan may result in a match such as this:

/var/lib/docker/overlay2/192768f471818601094bf4edd96d14bfc0e2b178a04a2efd00b2231ad4e46b33/merged/app/spring-boot-application.jar

An analyst would then have to SSH to the host and try to determine what container this file belongs to. Determining this is further compounded by the fact that different container runtime interfaces such as:

use different paths and require different techniques to match a file to a container. In fact, even within a given container runtime, the storage driver used (overlay2, aufs, devicemapper etc.) impacts this. As of v1.0.0, Log4Shell Sentinel supports the following mappings:

• CRI-O
• Docker (overlay2, aufs)
• containerd

This is a killer feature that can save analysts hours of frustration trying to determine what an entry like the above maps to. Instead, a match would give the analyst both the full path + the container image responsible for running this container. In our case, this is: ghcr.io/christophetd/log4shell-vulnerable-app. For me, personally, this is most unique feature of Log4Shell Sentinel and the one that took the most effort to implement. Not only does it perform the lookup, but it also removes superfluous matches that would drive an analyst insane. For example, these two matches:

/var/lib/docker/overlay2/192768f471818601094bf4edd96d14bfc0e2b178a04a2efd00b2231ad4e46b33/merged/app/spring-boot-application.jar
/var/lib/docker/overlay2/9e570f0cec8dcff5662a940f205600b541f82bd7d5d9c9bea8975ecb072506f4/diff/app/spring-boot-application.jar

point to the same container. The vulnerable JAR file is detected at both the diff and merged layers of the container but Log4Shell Sentinel understands this and will only show you a single entry. For more on container layers, refer to this article.

## Sample Finding

A sample finding would look like this:

IP,Hostname,AppName,Team,Ignore (Y/N),Comments,MD5Hash,Timestamp,Container,ContainerImage,FullPath,Version

A breakdown of the fields is as follows:

FieldExampleDescription
IP192.168.121.121If the instance has multiple IPs, the primary IP is added
Hostnameserver3Hostname
AppName This is left to the user to complete after the scan is completed
Team This is left to the user to complete after the scan is completed
Ignore (Y/N) This is left to the user to complete after the scan is completed
Comment This is left to the user to complete after the scan is completed
MD5Hash4e615cd580758b70c49ade1f79103328A unique fingerprint of our application
Timestamp2021-12-21T07:38:09ZA timestamp when the scan was performed. This is useful if you want to aggregate multiple scans of the same host
ContainertrueTrue = this is a container
ContainerImageghcr.io/christophetd/log4shell-
vulnerable-app:latest
If a container was detected, this is the corresponding image
FullPath/run/containerd/io.containerd.
The full path of the finding. In this example, the vulnerable JAR file is part of a fat / uber jar
Versionlog4j-core-2.14.1.jarThe lo4j-core version detected

# Running Log4Shell Sentinel

Running Log4Shell Sentinel is straight-forward. As it is a single statically compiled binary, all you need is to download it on the target machine and then run it. No configuration file(s) is required (unless you want to pass in an ignore list). You simply point it to the directory where your jar files are located and it does the rest. NOTE For the best coverage, I would recommend passing in / and running it as root to ensure that you do actually cover your entire filesystem. A system scan typically takes a few seconds and it scans about 100K files / second. During this time, CPU usage for a single core will spike so you probably want to run it during off-peak hours or if your current CPU utilization is low:

Here the scanner detected a possibly vulnerable version of:

• Logstash
• Elasticsearch
• awspx

We can select to show only the CSV lines and import them into Excel and start analyzing them. For a more thorough example, we’ll scan our environment.

# Workflow & Mass ScanningOur Environment

While it is perfectly fine to run Log4Shell Sentinel on a single server, it really shines when combined with your favorite configuration management tool (Ansible, Chef, Puppet, Salt, AWS SSM, etc.) or even simple parallel SSH tools such as parellel-ssh.

This gives you numerous benefits including:

• finding duplicate instances of your applications and containers and treating these findings as a single finding at the analysis phase
• scanning your entire environment in minutes

To really benefit from this tool, we want to run it across our servers and aggregate the results. In our example, we’ll use Ansible. Ansible is fantastic and easy to start using. All it requires is SSH access to the target servers (and ideally an account on the target servers that supports passwordless sudo). We won’t go into the details of settings things up as this is out of scope but an illustration will show how useful this is. The inventory parameter mentioned in the commands below is simply a file with the servers we wish to SSH to and scan. In our case, it points to 3 servers:

[all]
server1
server2
server3

In our environment, we’ll start by copying over the binary to our servers:

$ansible all -i inventory -m copy -a 'src=./log4shell_sentinel dest=$HOME/log4shell_sentinel' --become

The --become option tells it to sudo to the root user. After running the above, our binary is available under /root/ on all our servers. We then make it executable:

$ansible all -i inventory -a "chmod +x /root/log4shell_sentinel" --become  Finally, we run it: $ ansible all -i inventory -a "/root/log4shell_sentinel --p / --nb --nm --nh" --become

and get back our results:

server1 | CHANGED | rc=0 >>
192.168.1.110,server1,,,,,,2021-12-22T16:41:11+11:00,false,,/home/ubuntu/Apps/log4j-core-2.14.0.jar,log4j-core-2.14.0.jar
192.168.1.110,server1,,,,,,2021-12-22T16:41:11+11:00,false,,/home/ubuntu/logstash-6.8.0/logstash-core/lib/jars/log4j-core-2.9.1.jar,log4j-core-2.9.1.jar
192.168.1.110,server1,,,,,,2021-12-22T16:41:13+11:00,true,owasp/zap2docker-stable:2.10.0,/var/lib/docker/overlay2/07678b8899ca644697d67bd73092c72e974fdccc382ae26b4ac01c72b43972c4/merged/zap/lib/log4j-core-2.14.0.jar,log4j-core-2.14.0.jar
192.168.1.110,server1,,,,,c128eae8be5c9b5afcde153009474e88,2021-12-22T16:41:13+11:00,true,owasp/zap2docker-stable:2.10.0,/var/lib/docker/overlay2/07678b8899ca644697d67bd73092c72e974fdccc382ae26b4ac01c72b43972c4/merged/zap/webswing/webswing-server.war,log4j-core-2.13.2.jar
server2 | CHANGED | rc=0 >>
192.168.121.43,server2,,,,,,2021-12-22T05:41:16Z,false,,/home/vagrant/logstash-6.8.0/logstash-core/lib/jars/log4j-core-2.9.1.jar,log4j-core-2.9.1.jar
192.168.121.43,server2,,,,,,2021-12-22T05:41:21Z,true,docker.elastic.co/elasticsearch/elasticsearch:7.14.2,/var/lib/docker/overlay2/1a1a6aa868ce85f258c4a57e5d8523c83d484e2e324bcdd4c99a50d36331d121/merged/usr/share/elasticsearch/lib/log4j-core-2.11.1.jar,log4j-core-2.11.1.jar
192.168.121.43,server2,,,,,,2021-12-22T05:41:26Z,true,beatro0t/awspx:latest,/var/lib/docker/overlay2/c2ed81227ab6a9e33327459ea34db9ae151f0170e6b15a763785feb0db2f15f8/merged/var/lib/neo4j/lib/log4j-core-2.14.0.jar,log4j-core-2.14.0.jar
server3 | CHANGED | rc=0 >>

We find findings on all 3 of our servers. To remove the extra meta-data added by Ansible, we can re-run it and grep -v the extra meta-data:

$ansible all -i inventory -a "/root/log4shell_sentinel --p / --nb --nm --nh" --become | grep -v "| CHANGED |"  Another option is to simply redirect all output to a given directory. This is a cleaner option: $ mkdir results
$ansible all -i inventory -a "/root/log4shell_sentinel --p / --nb --nm --nh" --become -t results  The output is saved in JSON format and looks like this: { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python3" }, "changed": true, "cmd": [ "/root/log4shell_sentinel", "--p", "/", "--nb", "--nm", "--nh" ], "delta": "0:00:46.752778", "end": "2021-12-22 05:52:16.308776", "msg": "", "rc": 0, "start": "2021-12-22 05:51:29.555998", "stderr": "", "stderr_lines": [], "stdout": "192.168.121.121,server3,,,,,4e615cd580758b70c49ade1f79103328,2021-12-22T05:51:35Z,true,docker.io/mlinarik/log4j-log4shell-vulnerable-app:latest,/run/containerd/io.containerd.runtime.v2.task/k8s.io/ddd445b7143e5d11598ef476c4c7a1279d7a472576cd76542e4ed409b2f48564/rootfs/app/spring-boot-application.jar,log4j-core-2.14.1.jar", "stdout_lines": [ "192.168.121.121,server3,,,,,4e615cd580758b70c49ade1f79103328,2021-12-22T05:51:35Z,true,docker.io/mlinarik/log4j-log4shell-vulnerable-app:latest,/run/containerd/io.containerd.runtime.v2.task/k8s.io/ddd445b7143e5d11598ef476c4c7a1279d7a472576cd76542e4ed409b2f48564/rootfs/app/spring-boot-application.jar,log4j-core-2.14.1.jar" ] }  To extract only the stdout_lines, we simply: $ cat /tmp/ansible/*  | jq -r ".stdout_lines[]"
...

In practice, we would do the following to generate and header and add the results:

$./log4shell_sentinel --ph > results.csv$ cat result/* | jq -r ".stdout_lines[]" >> results.csv

We then open our findings in Excel:

As an analyst, we would then start to process the results. We’ll notice the following:

• the archives on server1 under /home/ubuntu/Apps/spring-* are all the same application (we determine this using the MD5 hash). We can treat them as a single entry. After a quick check, we determine that this isn’t currently being run and we choose to update the Ignore field with these entries. In future scans, we can simply use the MD5 hash to not see this in our results.
• by sorting by MD5 hashes, we notice that two different container images docker.io/mlinarik/log4j-log4shell-vulnerable-app:latest and ghcr.io/christophetd/log4shell-vulnerable-app are actually wrappers for the same application. We may decide to further scan one to determine if it is vulnerable or not by performing a source code audit or running one of the available SAST or DAST tools
• for the zap2docker-stable:2.10.0 and docker.elastic.co/elasticsearch/elasticsearch:7.14.2, we can try to determine the system owners by using a combination of the application name + the hostname and IP

We update our Excel sheet with this data and then use the Filter option to view only entries where ignore = Y and then copy the columns into a new Worksheet. We then save it as paths.csv which now looks like this:

/home/ubuntu/Apps/log4j-core-2.14.0.jar,None,Not an issue
/home/ubuntu/Apps/spring-boot-application.ear,Sample App,Not running
/home/ubuntu/Apps/spring-boot-application.jar,Sample App,Not running
/home/ubuntu/Apps/spring-boot-application.war,Sample App,Not running
/home/ubuntu/logstash-6.8.0/logstash-core/lib/jars/log4j-core-2.9.1.jar,Logstash,Run only from the CLI
/home/vagrant/logstash-6.8.0/logstash-core/lib/jars/log4j-core-2.9.1.jar,Logstash,Run only from the CLI

WARNING We have to be careful when configuring ignore lists. For example, if we used an MD5 hash instead for spring-boot-application.jar, our two containers running the application would have been added to the ignore list.

To re-run our scan, we would have to copy this file to our servers and then re-run our scan. This is simple:

$ansible all -i inventory -m copy -a 'src=./paths.csv dest=$HOME/paths.csv' --become

and then re-running our scan shows that they have been removed from the findings:

\$ ansible all -i inventory -a "/root/log4shell_sentinel --p / --nb --nm --nh --ip /root/paths.csv"  --become | grep -v '| CHANGED |'
192.168.121.43,server2,,,,,,2021-12-22T06:21:33Z,true,docker.elastic.co/elasticsearch/elasticsearch:7.14.2,/var/lib/docker/overlay2/1a1a6aa868ce85f258c4a57e5d8523c83d484e2e324bcdd4c99a50d36331d121/merged/usr/share/elasticsearch/lib/log4j-core-2.11.1.jar,log4j-core-2.11.1.jar
192.168.121.43,server2,,,,,,2021-12-22T06:21:35Z,true,beatro0t/awspx:latest,/var/lib/docker/overlay2/c2ed81227ab6a9e33327459ea34db9ae151f0170e6b15a763785feb0db2f15f8/merged/var/lib/neo4j/lib/log4j-core-2.14.0.jar,log4j-core-2.14.0.jar
192.168.1.110,server1,,,,,,2021-12-22T17:21:36+11:00,true,owasp/zap2docker-stable:2.10.0,/var/lib/docker/overlay2/07678b8899ca644697d67bd73092c72e974fdccc382ae26b4ac01c72b43972c4/merged/zap/lib/log4j-core-2.14.0.jar,log4j-core-2.14.0.jar
192.168.1.110,server1,,,,,c128eae8be5c9b5afcde153009474e88,2021-12-22T17:21:36+11:00,true,owasp/zap2docker-stable:2.10.0,/var/lib/docker/overlay2/07678b8899ca644697d67bd73092c72e974fdccc382ae26b4ac01c72b43972c4/merged/zap/webswing/webswing-server.war,log4j-core-2.13.2.jar


text:
# Is it possible to write explicitly the exact solution for forced damped harmonic oscillator?

Preamble

Consider a damped harmonic oscillator, with his well know differential equation \begin{equation*} m \ddot{x} + c \dot{x} + kx=0 \end{equation*} and let's find the solution that satisfies $x(0)=x_0$ and $\dot{x} (0) = v_0$. The problem admit a lovely exact solution (exploiting the considerations I found in books, I derived the complete explicit solution I write below). We have three cases. In the particular case in which $c=2\sqrt{mk}$, we have \begin{equation*} x(t) = \left[ x_0 + \left( v_0 + x_0 \sqrt{\frac{k}{m}} \right) t \right] e^{- \sqrt{\frac{k}{m}} t} \end{equation*} Otherwise we have to consider separately the two cases $c \gtrless 2\sqrt{mk}$, and to don't make heavier equations we have to introduce this parameters (we can observe that $\alpha$ and $\beta$ are length and depend to initial conditions too, while $\gamma$ e $\xi$ are adimensional and depend only by physical characteristics of the system) \begin{equation*} \alpha \equiv \frac{x_0}{2} \qquad \beta \equiv \frac{m v_0}{c} \qquad \gamma \equiv \frac{4mk}{c^2} \qquad \xi \equiv \frac{ct}{2m} \end{equation*} In the case $c>2\sqrt{mk}$ (i.e. $\gamma<1$) we have \begin{equation*} \begin{split} \displaystyle x(t) = & \frac{ \alpha \left(\sqrt{1 - \gamma } + 1 \right) + \beta}{\sqrt{1 - \gamma }} \cdot \exp \left[ {\left({-1 + \sqrt{1 - \gamma}} \right) \cdot \xi} \right] + \\ \displaystyle &\frac{ \alpha \left(\sqrt{1 - \gamma } - 1 \right) - \beta}{\sqrt{1 - \gamma }} \cdot \exp \left[ {\left({-1 - \sqrt{1 - \gamma}} \right) \cdot \xi} \right] \end{split} \end{equation*} While if $c<2\sqrt{mk}$ (i.e. $\gamma>1$) the solution is \begin{equation*} x(t) = 2 \alpha \cdot \frac{{\sin \left[ \tan^{-1} \left( \frac{\sqrt{\gamma - 1}}{1+\frac{\beta}{\alpha}} \right) + \sqrt{\gamma - 1} \cdot \xi \right]}} {\sin \left[ \tan^{-1} \left( \frac{\sqrt{\gamma - 1}}{1+\frac{\beta}{\alpha}} \right) \right]} \cdot {\exp(-\xi)} \end{equation*} Note that in this expressions, time dependence is included in $\xi$.

Question

Is it possible to do the same with the sinusoidal forced case? We have \begin{equation*} m \ddot{x} + c \dot{x} + kx= F \cos(\omega t + \phi) \end{equation*} but what is the solution of this differential equation that satisfies the condition $x(0)=x_0$ and $\dot{x} (0) = v_0$? I can't write it, even in the simpler case with $\phi = 0$.

You just need to find a particular solution of that equation, then general solution will be a linear combination of the particular solution and the general solution of the homogeneous differential equation. Well, let $\phi = 0$, to simplify.

Let a complex equation: $m\ddot z + c\dot z + kz = Fe^{i\omega t}$. Your equation is just the real part of this. If you make the substitution $z(t) = Ae^{i\omega t}$ in the differential equation, you will find the value of $A$.

Now you can write $A$ this way: $A = |A|e^{i\theta}$. Now your particular solution is just the real part of $z(t)$: $$x_p(t) = |A|\cos(\omega t + \theta).$$

Therefore, you can have a particular solution explicity using the values of $|A|$ and $\theta$ you have found. Now, do a linear combination of the general solution, and plug the initial condition values for the initial position and initial velocity. Then you have the general solution you are looking for.

• Thank you. Reflecting upon what you wrote I found that $\frac{ ( c \omega \sin ( \omega t ) + ( k-m {\omega}^{2} ) \cos ( \omega t ) ) F}{{ ( m {\omega}^{2}-k ) }^{2}+{c}^{2} {\omega}^{2}}$ is a particular solution of $m \ddot{x} + c \dot{x} + kx=F\cos(\omega t)$. The problem is virtually solved (if I'll write the complete solution in a decent form, I'll write here). – Fausto Vezzaro Jan 2 '15 at 18:21

I found expressions for the solution, and I write them below. With the help of a software I checked that they really are the solutions, I'm 100% sure: they solve the differential equation \begin{equation*} m \ddot{x} + c \dot{x} + kx= F \cos(\omega t ) \end{equation*} and satisfy the initial conditions (initial position $x_0$ and initial speed $v_0$). But obviously the job isn't done, for the simple reason that the solution I write are really ugly: it must be possible to write this formulas in a better way. We should do it for aesthetic reasons, obouvisly, but also to make them more easy to handle, and so more useful. The beautiful work I did with the not forced case (see the question) allow users to find easily the equation of motion of the particle (exploring limiting cases too is simple). I tried to do the same with the forced case but I wave the white flag, I can't do it (I won't work more about this problem). I hope someone will do. Anyway I write out the complete solution (althoung in this ugly form).

Case 1: $c=2\sqrt{m k}$

\begin{equation*} x(t) = \frac{e^{-\frac{c t}{2 m}} \left( A+B+C \right) }{B_2} \end{equation*} where \begin{equation*} \begin{split} &A= \left( A_1 + A_2 \right) F \\ &B= \left( B_1 + B_2 \right) x_0 \\ &C= 2 m (m \omega^2 + k)^2 t v_0 \\ &A_1= 2 m e^{\frac{c t}{2m}} \left( c \omega \sin \left( \omega t\right) -m \omega^2 \cos\left( \omega t\right) +k \cos\left( \omega t\right) \right) \\ &A_2 = -c \left( m \omega^2 + k \right) t+2 m^2 \omega^2-2 k m \\ &B_1 = c {\left( m \omega^2+k\right) }^2 t \\ &B_2 = 2 m ( m \omega^2 + k )^2 \end{split} \end{equation*}

Case 2: $c>2\sqrt{m k}$

\begin{equation*} x(t) = \frac{e^{-\frac{U}{2 m}-\frac{c t}{2 m}} \left( x_0 W \left( e^{\frac{U}{m}} +1\right) +\sqrt{c^2-4 k m} \left( F L +v_0 E+x_0 D\right) +F G\right) }{2W} \end{equation*} where \begin{equation*} \begin{split} & L = \left( c m \omega^2+c k\right) e^{\frac{U}{m}}-c m \omega^2-c k \\ & D = cV \left( 1-e^{\frac{U}{m}} \right) \\ & E = 2mV \left( 1-e^{\frac{U}{m}} \right) \\ & G = K e^{\frac{U}{m}}+K+G_2+G_1 \\ & K = O \left( m \omega^2-k\right) \\ & W = O V \\ & G_1 = 2 c O \omega \sin\left( \omega t\right) Z \\ & G_2 = -2 O \left( m \omega^2-k\right) \cos \left( \omega t\right) Z \\ & O = 4 k m-c^2 \\ & Z = e^{\frac{U}{2 m}+\frac{c t}{2 m}} \\ & U = \sqrt{c^2-4 k m} t \\ & V = {m}^2 \omega^{4}-2 k m \omega^2+c^2 \omega^2+{k}^2 \end{split} \end{equation*}

Case 3: $c<2\sqrt{m k}$

\begin{equation*} x(t) = \frac{e^{-\frac{c t}{2 m}} \left( S+R+\sqrt{4 k m-c^2} \left( Q+P \right) +N \right) }{\sqrt{4 k m-c^2} \left( m^2 \omega^4+\left( c^2-2 k m \right) \omega^2+k^2 \right) } \end{equation*} where \begin{equation*} \begin{split} P=&\left( c \omega e^{\frac{c t}{2 m}} \sin \left( \omega t \right) +\left( k-m \omega^2 \right) e^{\frac{c t}{2 m}} \cos \left( \omega t \right) +\left( m \omega^2-k \right) \cos \left( \frac{\sqrt{4 k m-c^2} t}{2 m} \right) \right) F \\ Q=&\left( m^2 \omega^4+\left( c^2-2 k m \right) \omega^2+k^2 \right) \cos \left( \frac{\sqrt{4 k m-c^2} t}{2 m} \right) x_0 \\ R=&-c\left( m \omega^2 + k \right) \sin \left( \frac{\sqrt{4 k m-c^2} t}{2 m} \right) F \\ S=&c \left( m^2 \omega^4+\left( c^2-2 k m \right) \omega^2+ k^2 \right) \sin \left( \frac{\sqrt{4 k m-c^2} t}{2 m} \right) x_0 \\ N=& m \left( 2 m^2 \omega^4+\left( 2 c^2 -4 k m \right) \omega^2+2 k^2 \right) \sin \left( \frac{\sqrt{4 k m-c^2} t}{2 m} \right) v_0 \end{split} \end{equation*}

## An example

This work look a mess but it isn't: it allow to get elegant solution for physical problems (provided you have a computer to help you, if expressions won't be simplified, as I hope someone will do, calculus by hands will be prohibitive!). But let's consider a concrete example. Suppose we have exactly (I don't transcribe units, simply suppose they are consistent) $c=1$, $k=2$, $\omega = 3$, $F=4$, $x_0 = 5$, $v_0 = 6$, $m=2{.}5$ we get this equation of motion (we are in the third case) \begin{equation*} \begin{split} x(t)=& \frac{59703 e^{-\frac{t}{5}} \sin \left( \frac{\sqrt{19} t}{5} \right) }{1717 \sqrt{19}}+\frac{8913 e^{-\frac{t}{5}} \cos \left( \frac{\sqrt{19} t}{5} \right) }{1717}+\\ & \frac{48 \sin \left( 3 t \right) }{1717}-\frac{328 \cos \left( 3 t \right) }{1717} \end{split} \end{equation*} We see that when $t$ is big (after transient) the motion is approximately given by \begin{equation*} x(t) = -\frac{8 }{\sqrt{1717}} \cos \left( 3 t+\tan^{-1} \left( \frac{6}{41}\right) \right) \end{equation*} I obtained this from $x(t) = \frac{48 \sin \left( 3 t \right) }{1717}-\frac{328 \cos \left( 3 t \right) }{1717}$, but looking the formula $x(t)$ of case 3 we can write a general formula for this motion after transient: I find strange that it is completely independent by initial condition: \begin{equation*} x_{at}(t) = \frac{\left( c \omega \sin \left( \omega t\right) +\left( k-m {\omega}^2\right) \cos \left( \omega t\right) \right) F}{m^2 {\omega}^{4}+\left( {c}^2 -2 k m\right) {\omega}^2 +{k}^2 } \end{equation*} But we know exactly all the motion, not only this limiting state: here I plot $x=x(t)$

If we wait in doing the final substitution $m=2{.}5$, we can get the two variable function that tell us how varies the motion if we vary the mass $m$ (the previous graph is the section of this below at $m=2{.}5$ and with $t$ until 25):

With derivative of $x(t)$ we can find speed and acceleration as function of $t$:

In short, knowing analytic solution allow us to find exactly any kind of information: for example we can find that after 8 seconds (or unit of time you are using) the position is about $1{.}727745920373746$ and after 15 seconds acceleration is $0{.}3102092667738571$, or more precisely \begin{equation*} \frac{72 \left( 41 \cos \left( 45\right) - 6 \sin \left( 45\right) \right) }{1717} - \frac{24 \left( 6133 \sin \left( 3 \sqrt{19}\right) +2332 \sqrt{19} \cos \left( 3 \sqrt{19}\right) \right) }{8585 \sqrt{19} e^3 } \end{equation*} We can also find exactly other kind of information, for example we can estimate (necessarily numerically in this case, but only because we have transcendental equations: errors are very small and we can estimate them) that the particle meet the $x=0$ position, for the first time, when $t \approx 2{.}9818321933898$ (and for the first time it is at rest when $t=0{.}90687408051175$). I defy anyone to find better data using a numerical ODE solver: with my formulas I can find exact position at any time, while solving ODE numerically give more approximate data than find the value of a formula (and it is not easy estimate the error). Of course all this digit have no sense in a real physical problem (physical constant and conditions are not exactly know, linear law for friction is only a rough approximation) but I feel that exact analytic solution of a model (a physical model with all its limits, like every other one) is very gratifying (what about the artificial but beautiful problem we can find in electrostatic for example?). I hope someone will write my exact but ugly solution, in the right way (it MUST exists a RIGHT way to write it).


text:
# Unity Networking Basics and Beginner Issues

While working on my multiplayer game project, I ran into some awkward issues with the Unity's networking system (UNET). I had some experience with the Photon Unity Networking from before, thus wrapping my head around and adapting my mind to Unity's newer native networking system took some time.

## Basics of UNET

If you (like me) try to go over the application tutorials about the networking system such as this, you will probably have a hard time understanding the basic consepts of the system, which is required to apply the things you learned to your own project that is different than a generic multiplayer shooter. Instead of going over Unity's tutorial, I highly recommend reading the concepts documentation which introduces the most basic logic behind the system.

Basically, you have a host and several guests who connect to the host. Host embodies both the server and its client, while guests are just clients. This structure can be interpreted as that the server is not on a remote machine but on the host itself. Nevertheless, since the host also is a client, you need to be aware of this seperation of concern on the host side. For instance, when you send a "ClientRpc" call (which runs only on the clients), this call will be triggered on the host as well as the guest clients. Conversely, the "Command" calls are only run on the host machine. The downside of this system is that, depending on your code structure, you may end up with a lot of "isServer" and "isLocalPlayer" checks. All things aside, what I am trying to say is don't be like me and be puzzled about why the rpc calls are run on the host machine.

When you wrap your mind around the basics and go into the more advanced stuff, you will come across some bumps and hills. There are some parts where Unity's documentation lacks or some unfixed bug emerges which you need to track its workaround from the internet. I will try to reference to a few of such situations I encountered, which made me lose a lot of time during my lovely sessions with the UNET. Bear in mind that the version of Unity I was using when I encountered these issues was 5.6.1.

## Unity's Editor Behaviour is Different Than Its Standalone Build

The first problem for me was that, when using network behaviours, the order of calling of the Start() and Awake() methods are different on standalone builds compared to when you run the game inside the editor. This runtime flow difference caused me to waste a lot of time. In the article "Base and Singleton Monobehaviour Classes in Unity", I wrote about how I use base classes for singleton game object components. I extended this method to use the same approach with the NetworkBehaviour classes and similarly created "BaseNetworkBehaviour" and "SingletonNetworkBehaviour":

public class BaseNetworkBehaviour : NetworkBehaviour
{
...
public static T GetNw<T>() where T : SingletonNetworkBehaviour
{
return SingletonNetworkBehaviour.get<T>();
}
...
void Awake()
{
WakeUp();
PostWakeUp();
}
public virtual void WakeUp()
{
}
...
}

public class SingletonNetworkBehaviour : BaseNetworkBehaviour
{

public static List<SingletonNetworkBehaviour> Instance = new List<SingletonNetworkBehaviour>();

public static T get<T>() where T : SingletonNetworkBehaviour
{
var instance = Instance.OfType<T>().FirstOrDefault();
if (instance == null)
{
instance = GameObject.FindObjectOfType<T>();
if (instance != null)
}
return instance;
}
}

The main idea for the singleton class is that I add the singleton instance to a list when the "Awake()" function is called. If I designate the singleton game object to be a network behaviour, then the Awake() function seems to be only triggered when the object is fully initialized over the network. Therefore, I cannot pull the instance of my singleton behaviour from my non-networked components. This actually sounds like the logical outcome to expect, you can't be sure when the networked component will be ready for use; but this flow is different when you run the code on the editor, regardless of the editor instance being designated as the host or the guest client. The build on the editor always runs the Awake() methods of the NetworkBehaviour classes before the Start() methods of the MonoBehaviour classes, while the standalone compiled build runs Awake() functions after the game object is initialized on the network. This inconsistency distracted me from seeing that the situation might be caused by the Unity's own behaviour.

## Secretly Dictated Way of Initializing The SyncListStruct

Although I did not dig its details, another weirdness I saw is that I needed to leave the initialization of the SyncListStruct variables on the variable decleration like this:

public class Player : NetworkBehaviour
{
...
public CardSyncList Deck = new CardSyncList();
public CardSyncList Hand = new CardSyncList();
...
}

If I do the initialization on a command, I get weird errors (invalid IL code errors that I refer to in the next paragraphs):

...
[Command]
public void InitializeDeck() {
Deck = new CardSyncList(); // This causes error
...
}
...

As far as I have seen, this is not mentioned on the SyncListStruct documentations, which is very disappointing since it looks like this usage dictation is a very fundamential part of the whole concept. The documentation page only has a working example where initialization is done the way it should be and a word about how it is the only allowed way to do it is nowhere to be found.

## Deep Into Unity with Invalid IL Code Errors

Third and maybe the most annoying issue with the system is that it sometimes gives very obscure low level errors, where you have no idea what it is talking about. One example is the following:

InvalidProgramException: Invalid IL code in Bs.TowerAttack.Game.CardSyncList:SerializeItem (UnityEngine.Networking.NetworkWriter,int): IL_0002: ldfld     0x0a0000bc

UnityEngine.Networking.SyncList1[System.Int32].SendMsg (Operation op, Int32 itemIndex, Int32 item) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/SyncList.cs:319)
Bs.TowerAttack.Game.PlayerIdentity.CmdSetPlayerDataToServer (System.Int32[] deck) (at Assets/Bs TowerAttack/Scripts/Bs/TowerAttack/Game/PlayerIdentity.cs:71)
Bs.TowerAttack.Game.PlayerIdentity.CallCmdSetPlayerDataToServer (System.Int32[] deck)
Bs.TowerAttack.Game.PlayerIdentity.RpcGetPlayerDataFromClient () (at Assets/Bs TowerAttack/Scripts/Bs/TowerAttack/Game/PlayerIdentity.cs:63)
UnityEngine.Networking.ClientScene.OnRPCMessage (UnityEngine.Networking.NetworkMessage netMsg) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/ClientScene.cs:739)
UnityEngine.Networking.NetworkConnection.InvokeHandler (UnityEngine.Networking.NetworkMessage netMsg) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:231)
UnityEngine.Networking.LocalClient.ProcessInternalMessages () (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/LocalClient.cs:141)
UnityEngine.Networking.LocalClient.Update () (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/LocalClient.cs:69)
UnityEngine.Networking.NetworkClient.UpdateClients () (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkClient.cs:947)
UnityEngine.Networking.NetworkIdentity.UNetStaticUpdate () (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkIdentity.cs:1091)

Apparently, this error is given when you use SyncListStruct directly with a basic type such as float or int like this:

public class SyncListFloat : SyncListStruct<float> { }

What you need to do is create a struct with a variable of the basic type that you want to hold:

public struct FloatStruct
{
public float Value;
}
public class SyncListFloat : SyncListStruct<FloatStruct> { }

The correct way of usage is actually the one mentioned in the documentation, but the fact that it only works with structs is not stressed enough. The documentation says "We allow the following types to be used in your struct" but it is left to the reader as an excersize to understand that the struct mentioned is the one you construct and not the SyncListStruct. That aside, if you understand it wrong (which is easy to do) and just use it with base types, you get the "invalid IL code" error and look at the screen confusedly and helplessly.

It is very easy to encounter these IL code errors while working on Unity. It seems like the error handling on the UNET system is poor, which results in seeing unmeaningful and nondirective error messages. At least, when you get these errors, you know that you are doing something wrong. Nonetheless, it is hard to guess where the error is and the investigation process is very time consuming.

All my rants aside, I am actually enjoying my time with UNET. It is quite a native-feeling and flexible system if you know what you are doing and plan your code accordingly. I am yet to dive into the potential nightmare of converting a multiplayer game to singleplayer, which I am planning to do. Since the ease of creating a singleplayer experience from a multiplayer game is one of the advertised features of UNET, I have been thinking about this, but I can not wrap my head around how the system will work easily, maybe by initializing a local client where the gameplay of that client is simulated by an AI. I am planning on writing more articles about the features and problems I come across in UNET, since I am working on a game project using it.


text:
# Tag Info

23

A colleague of mine benchmarked this and came to the conclusion that FPGAs would outperform a PC once you had more than about 100 independent, integer tasks that would fit in the FPGA. For floating point tasks GPGPU beat FPGA throughout. For narrow multithreading or SIMD operation then CPUs are extremely optimised and run at a higher clock speed than FPGAs ...

19

An FPGA works completely differently from a processor. For a processor you write software that tells the hardware what to do. On an FPGA you describe "what the hardware should look like" internally. It is as if you are making a chip specially made for your algorithm. This speeds up a lot of things and can bring down the power consumption. But it has its ...

13

It depends a lot on the algorithm, but the principle can be explained quite simply. Suppose that your algorithm has to sum a lot of 8-bit numbers. Your CPU will still need to fetch each instruction, get the operands from the RAM or the cache memory, execute the sum, store the result in cache, and go on with the next operation. The pipeline helps, but you ...

7

Without the code, you can only expect general advice. However the most likely scenario is that the outputs don't actually depend on the inputs, so that optimisation eliminates all the logic in between them and hardwires the outputs to '1', '0' or 'Z'. This can often be due to a mistake in your logic, or a reflection of the fact that you are trying out an ...

7

There are two ways of doing it. 1. Pin Planner The first approach is in the Pin Planner tool. This is the GUI that allows you to select which pin goes where. From the main window with your project open, go to the Assignments menu and select Pin Planner (or press Ctrl+Shift+N). In the pin planner window, in the All pins view at the bottom, right click on ...

6

A divider is a series of subtractions and multiplexers that select the value for the next step. If it is done purely combinatorially, then the critical path through all of this logic is quite long (even with carry lookahead on the subtractors) and the clock cycle must be very slow. But the process is easy to pipeline, and the number of pipeline stages you ...

6

There are roughly 3 levels of specialization of computing equipment: CPU (like in your laptop) is the most generic of them all. It can do everything, but this versatility comes at a price of slow speed and high power consumption. CPU is programmed on the go, the instructions come from RAM. Programs for CPU are quick, cheap and easy to write and very easy to ...

6

Add this tcl expression... set_global_assignment -name NUM_PARALLEL_PROCESSORS 4 ... to either assignment_defaults.qdf or the .qsf file. Both should be in the project's directory. The .qdf file may need to be created.

5

Yes, FPGA can outperform modern CPU (like Intel i7) in some specyfic task, but there are easier and cheaper methods to improve neural network performance. By cheaper - I mean total effort, not FPGA IC cost, but also very fast memory for FPGA (you would need it for neural network) and whole development process. Use SSE - I've seen pretty simple neural ...

5

For primitives, absolutely no benefit performance wise. The only use is it means you don't need to create files with your own primitives in, but if you rely on the Altera ones then migrating to something from another manufacturer would be harder. Some things like FIFOs may contain Altera specific inline timing constraints or other synthesis directives for ...

5

Just connect it up directly with a wire (you will see a little blob appear to show it is connected). Then, name the bus something like name[msb..lsb], and then name the wire name[whichbit]. That will tell Quartus to connect them because they both have the same name and tell it which bit it should connect to. You will get errors if you choose a whichbit which ...

5

I suspect the difference is due to the negative coefficient in the 2nd case (according to the order of your diagrams). Because your multiplying coefficients are all powers of 2, your multiplies can all be done by simple bit selects. For example, assuming you're doing 16-bit math, x*0.25 can be calculated as simply {2'b0, x[15:2]} (using Verilog notation). ...

4

Your schematic shows a T-type flip-flop, which toggles when its input is high. Your rtl code, on the other hand, implements a regular D-type flip-flop. Your module should instead read: always@(posedge clk, negedge clr) begin if(~clr) q <= 1'b0; else q <= q ^ t; end By XOR'ing the output with the input, you will toggle the ...

4

You can use the memory IP cores to create a memory with initial mif content. You can check the IP core user guide for more information. Another solution is to use VHDL attributes to initialize the content of your variable. You have to be confident that your code is indeed interpreted as a ROM by altera, otherwise the attribute will be ignored. This is the ...

4

It is not an 'error' to sample data from one clock domain in another. Quartus will not prevent you doing it at design entry/synthesis stage. When you later run timing analysis with quartus_sta you will find that the register path between the two clocks (if truly different) is unable to make timing. You are running timing analysis, right?

4

Seeing that you're using a Lite version of Quartus, maybe you don't actually are interested in Altera synthesis, but more in general Verilog analysis and clever code optimization. You might want to have a look at Yosys, which supports generating the graphs I think you want, is free, much easier on your RAM and CPU than Quartus and frankly, produces better ...

4

The difference between the two is not that compilation broke your design, but rather the first case is an RTL simulation (i.e. everything is ideal), whereas the second case is a Gate-Level simulation, which factors in the propagation delays estimated for the actual real implementation. Your circuit design works in the ideal case, however once you factor in ...

4

TL;DR; The answer may depend on the synthesis tools, but most likely the answer is no unless you use randomised seeds. Certainly for modern versions of Intel/Altera Quartus (since some time before 12.1), if you compile the exact same source files using the exact same software version (including subversion/patch level) for the same device, you will get the ...

4

Your switches will be active low (i.e. zero when pressed). Your LEDs will also be active low (i.e. zero will turn them on). If you invert the inputs and output of an AND gate, you get an OR gate, hence the behaviour you are seeing. There is nothing wrong with the FPGA.

4

Yes, there is "bouncing" — but in this context, we call them "glitches". The comparator (count > 26'd24999999) represents a rather large amount of combinatorial logic, and there's no chance that all paths through this logic (and the associated FPGA interconnect) will have exactly the same delay. Therefore, the output pulse will experience one or ...

3

you check the warnings when you are compiling your code. Mostly synthesis issuses can be solved if you correct those warnings.

3

The question doesn't contain near enough detail, so I'm mostly making assumptions here... Carry in is an input. I suspect you stop driving the carry-in input (so it "floats") when you switch to addition mode. There is a good discussion of this issue here.

3

I usually synchronise my async reset through a delay line of a few flipflops (relying on the FPGA configuration to have cleared them), and only use that synchronised reset (even if I'm using it as an asynchronous reset). In Xilinx-land, the tools can trace the timing through from the clock used in the delay line to the reset input (either sync or async) ...

3

Metastability? Highly unlikely. Unsynchronised inputs? Very probable and they can cause the symptoms you describe. So clock each SPI input from your fast clock, and route the clocked versions to the SPI core. (Unless you're already certain that it reclocks them already).

3

Use the "Netlist Viewers" in the "Tools"-menu. The RTL-Viewer creates a hierarchical expandable diagram. Layout can be horrible at times.

3

A safe state machine in Quartus is a state machine that if it reaches an illegal state (for any exceptional reason, such as glitch, metastability, etc.), it will reach the reset state after one clock cycle.

3

The reason for the latches is due to the fact that the outputs of your case statement are not assigned for every possible case selection. So you have created a storage element without a clock - which is the definition of a latch. What is ledOut when pr_state is state_Rx? It's not specified by your case statement, so the synthesizer assumes it needs to hold ...

3

From Modelsim, you should easily be able to click on the module that you want (Circle 1) and in Objects window (Circle 2) you will be able to see the signals within that module and you can then easily drag the signals you want to the Wave window. You shouldn't have to create IO ports just to view the signals on Modelsim.

3

I'm not a VHDL guru, but I think your comment -- increment index by one (automatically overflows back to 0) is misleading, and you have to explicitly reset the index after 12.

3

Quartus is synthesizing a separate mux for each bit of your output vector. The eight inputs to each mux are bit $N$ from each of the eight inputs. The output of each mux is bit $N$ of the output. The use of buses and ripping individual signals from each bus can be a little confusing and hard to read.

Only top voted, non community-wiki answers of a minimum length are eligible


text:
# Help limit problem multivariable!

1. Feb 25, 2008

### yaho8888

1. The problem statement, all variables and given/known data
lim (x^2+y^2)/((root(x^2+y^2+1) - 1)
(x,y)-->(0,0)
what is the limit

2. Relevant equations

none

3. The attempt at a solution
$$\lim_{(x,y) \to (0,0)} \frac {x^2 + y^2}{\sqrt{x^2 + y^2 + 1} - 1} = \lim_{r \to 0} \frac {r^2}{\sqrt{r^2 + 1} - 1}$$

I got this far the answer are 2 but i dont know how it is 2.

2. Feb 25, 2008

### yaho8888

how come no one is helping?

3. Feb 25, 2008

### HallsofIvy

Staff Emeritus
Perhaps because people are not sitting around with nothing to do but answer your questions! You waited a whole 29 minutes? Patience, grasshopper.

Switching to polar coordinates is a very good idea. That way, (x,y) going to (0,0) is the same as the single variable, r, going to 0. As long as the result is independent of the angle $\theta$, that is the limit. Now, the difficulty is that when you substitute r= 0 in the fraction, you get "0/0". Do you remember any methods from Calculus I for doing that? Perhaps L'Hopital's rule? Or maybe "rationalizing the denominator" by multiplying both numerator and denominator by $\sqrt{r^2+ 1}+ 1$

4. Feb 25, 2008

### yaho8888

thanks for the help. I got it! (one more thing, I am a grasshopper!) :)


text:
# Echophone Radio Corp. 12 Schematic

Get a print!
Price: \$8.00
In stock
 Model: 12 Manufacturer: Echophone Radio Corp. (Hallicrafters)

## Schematics Content:

Please note: this content is a computer-generated interpretation of the above schematic and is provided only to help assist you in locating this schematic. For the actual text, please consult the schematic above. Thank you.

. m 0*th Nam NH
.Uno FWD

#### Page 2:

PAGE 3-8 ECHO.

Model 12 Superheterodyne

CIRCUIT DESCRIPTION

The Echophone Model 12 is a 5-tube Superheterodyne employing the new types 57 and 58
tubes. The circuit consists of a pre-selector; combined first detector and oscillator, employing
a type 57 tube; a 175 KC I. F. stage employing a type 58 tube; a second detector employing a
.type 57 tube; an output stage employing a type 247 tube and a rectifier and filter system em-
ploying a type 280 tube.

The oscillator is tuned by a special section of the three gang condenser and no series
padding condenser is used. The I.F. stage is single tuned, the plate coil being made self resonant
at 175 KC. The second detector is a resistance coupled power detector obtaining its screen grid
voltage from its plate thru a 1 Meg. resistor.

The filter circuit consists of an 8 MF and a 4 MF electrolytic condenser and the speaker
field. Part of the drop across the Held, which is in the negative side of the filter circuit, is used
to bias the grid of the 247 tube.

The volume control operates by varying the bias on the 58 tube and by limiting the an-
tenna in-put to the pre-selector.

VOLTAGE TESTS

All D. C. voltages given were tested on 250V scale of a 1000 ohms per volt meter with
volume on full and no signal in the receiver, line voltage 115.

 Fil. 280 tube t0 ground 240-250V
Plate oscillator and I. F. tubes to ground 240-250V
Screen oscillator and I. F. tubes to ground 90-100
Cathode I. F. tube to ground 2-3
Cathode oscillator tube to ground 4-10
Plate of second detector to ground 30-45
Screen of second detector to ground 20-30
Cathode of second detector to ground 5-10
Across speaker field 90-100
Plates 280 to center tap of high voltage 350-370V AG
All heaters 2.4-2.6V AC

Fil. 280 tube 4;9-5.1V AC

Please note: we carry a wide range of products which will fulfill the specifications above. Please use our search function or browse our products to find what you need!


text:
# How to enable subsection numbering in documentclass "memoir"

in General

I tried \setcounter{secnumdepth}{3} and \setcounter{secnumdepth}{2} to enable subsection numbering for documentclass "memoir", but it did not work. The subsection is still displayed without numbers (e.g. 1.1.1).

How can I turn on subsection numbering?

by (33.7k points)

Try the following:

\setsecnumdepth{subsection}

It turns on the numbering for subsection in documentclass "memoir"


text:
## Seminars and Colloquia by Series

### TBA

Series
Geometry Topology Seminar
Time
Monday, February 14, 2022 - 14:00 for 1 hour (actually 50 minutes)
Location
Online
Speaker
Erik LindellUniversity of Stockholm

### Stochastic and Convex Geometry for the Analysis of Complex Data

Series
Job Candidate Talk
Time
Thursday, February 10, 2022 - 11:00 for 1 hour (actually 50 minutes)
Location
https://gatech.bluejeans.com/532559688
Speaker
Eliza O’ReillyCalifornia Institute of Technology

Many modern problems in data science aim to efficiently and accurately extract important features and make predictions from high dimensional and large data sets. While there are many empirically successful methods to achieve these goals, large gaps between theory and practice remain.  A geometric viewpoint is often useful to address these challenges as it provides a unifying perspective of structure in data, complexity of statistical models, and tractability of computational methods.  As a consequence, an understanding of problem geometry leads both to new insights on existing methods as well as new models and algorithms that address drawbacks in existing methodology.

In this talk, I will present recent progress on two problems where the relevant model can be viewed as the projection of a lifted formulation with a simple stochastic or convex geometric description. In particular, I will first describe how the theory of stationary random tessellations in stochastic geometry can address computational and theoretical challenges of random decision forests with non-axis-aligned splits. Second, I will present a new approach to convex regression that returns non-polyhedral convex estimators compatible with semidefinite programming. These works open a number of future research directions at the intersection of stochastic and convex geometry, statistical learning theory, and optimization.

### TBA by Michael Roysdon

Series
Analysis Seminar
Time
Wednesday, February 9, 2022 - 14:00 for 1 hour (actually 50 minutes)
Location
Speaker
Michael RoysdonTel Aviv University

### TBA by Elizabeth Field

Series
Geometry Topology Seminar
Time
Monday, February 7, 2022 - 14:00 for 1 hour (actually 50 minutes)
Location
Speaker
Elizabeth FieldUniversity of Utah

### Understanding Statistical-vs-Computational Tradeoffs via Low-Degree Polynomials

Series
Job Candidate Talk
Time
Thursday, February 3, 2022 - 11:00 for 1 hour (actually 50 minutes)
Location
https://bluejeans.com/500115320/1408
Speaker
Alex WeinUC Berkeley/Simons Institute

A central goal in modern data science is to design algorithms for statistical inference tasks such as community detection, high-dimensional clustering, sparse PCA, and many others. Ideally these algorithms would be both statistically optimal and computationally efficient. However, it often seems impossible to achieve both these goals simultaneously: for many problems, the optimal statistical procedure involves a brute force search while all known polynomial-time algorithms are statistically sub-optimal (requiring more data or higher signal strength than is information-theoretically necessary). In the quest for optimal algorithms, it is therefore important to understand the fundamental statistical limitations of computationally efficient algorithms.

I will discuss an emerging theoretical framework for understanding these questions, based on studying the class of "low-degree polynomial algorithms." This is a powerful class of algorithms that captures the best known poly-time algorithms for a wide variety of statistical tasks. This perspective has led to the discovery of many new and improved algorithms, and also many matching lower bounds: we now have tools to prove failure of all low-degree algorithms, which provides concrete evidence for inherent computational hardness of statistical problems. This line of work illustrates that low-degree polynomials provide a unifying framework for understanding the computational complexity of a wide variety of statistical tasks, encompassing hypothesis testing, estimation, and optimization.

### TBA by Naomi Feldheim

Series
Analysis Seminar
Time
Wednesday, February 2, 2022 - 14:00 for 1 hour (actually 50 minutes)
Location
Speaker
Naomi FeldheimBar-Ilan University

### The role of social force dynamics in crowd-induced bridge instabilities

Series
Mathematical Biology Seminar
Time
Wednesday, February 2, 2022 - 10:00 for 1 hour (actually 50 minutes)
Location
ONLINE
Speaker
Igor BelykhNeuroscience Institute, Georgia State University

### How to Break the Curse of Dimensionality

Series
Applied and Computational Mathematics Seminar
Time
Monday, January 31, 2022 - 14:00 for 1 hour (actually 50 minutes)
Location
https://bluejeans.com/457724603/4379
Speaker
Ming-Jun LaiUniversity of Georgia

We first review the problem of the curse of dimensionality when approximating multi-dimensional functions. Several approximation results from Barron, Petrushev,  Bach, and etc . will be explained.

Then we present two approaches to break the curse of the dimensionality: one is based on probability approach explained in Barron, 1993 and the other one is based on a deterministic approach using the Kolmogorov superposition theorem.   As the Kolmogorov superposition theorem has been used to explain the approximation of neural network computation, I will use it to explain why the deep learning algorithm works for image classification.
In addition, I will introduce the neural network approximation based on higher order ReLU functions to explain the powerful approximation of multivariate functions using  deep learning algorithms with  multiple layers.

### Stein property of complex-hyperbolic Kleinian groups

Series
Geometry Topology Seminar
Time
Monday, January 31, 2022 - 14:00 for 1 hour (actually 50 minutes)
Location
Online
Speaker

Let M be a complex-hyperbolic n-manifold, i.e. a quotient of the complex-hyperbolic n-space $\mathbb{H}^n_\mathbb{C}$ by a torsion-free discrete group of isometries, $\Gamma = \pi_1(M)$. Suppose that M is  convex-cocompact, i.e. the convex core of M is a nonempty compact subset. In this talk, we will discuss a sufficient condition on $\Gamma$ in terms of the growth-rate of its orbits in $\mathbb{H}^n_\mathbb{C}$ for which M is a Stein manifold. We will also talk about some interesting questions related to this result. This is a joint work with Misha Kapovich.

https://bluejeans.com/196544719/9518

### On Gapped Ground State Phases of Quantum Lattice Models

Series
Job Candidate Talk
Time
Monday, January 31, 2022 - 11:00 for 1 hour (actually 50 minutes)
Location
ONLINE
Speaker
Amanda YoungTechnical University Munich

Quantum spin systems are many-body physical models where particles are bound to the sites of a lattice. These are widely used throughout condensed matter physics and quantum information theory, and are of particular interest in the classification of quantum phases of matter. By pinning down the properties of new exotic phases of matter, researchers have opened the door to developing new quantum technologies. One of the fundamental quantitites for this classification is whether or not the Hamiltonian has a spectral gap above its ground state energy in the thermodynamic limit. Mathematically, the Hamiltonian is a self-adjoint operator and the set of possible energies is given by its spectrum, which is bounded from below. While the importance of the spectral gap is well known, very few methods exist for establishing if a model is gapped, and the majority of known results are for one-dimensional systems. Moreover, the existence of a non-vanishing gap is generically undecidable which makes it necessary to develop new techniques for estimating spectral gaps. In this talk, I will discuss my work proving non-vanishing spectral gaps for key quantum spin models, and developing new techniques for producing lower bound estimates on the gap. Two important models with longstanding spectral gap questions that I recently contributed progress to are the AKLT model on the hexagonal lattice, and Haldane's pseudo-potentials for the fractional quantum Hall effect. Once a gap has been proved, a natural next question is whether it is typical of a gapped phase. This can be positively answered by showing that the gap is robust in the presence of perturbations. Ensuring the gap remains open in the presence of perturbations is also of interest, e.g., for the development of robust quantum memory. A second topic I will discuss is my research studying spectral gap stability.

URL for the talk: https://bluejeans.com/602513114/7767


text:
# Ramanujan : essays and surveys

## 書誌事項

Ramanujan : essays and surveys

Bruce C. Berndt, Robert A. Rankin, editors

（History of mathematics, v. 22）

American Mathematical Society , London Mathematical Society, c2001

## 注記

Includes bibliographical references

## 内容説明・目次

This book contains essays on Ramanujan and his work that were written especially for this volume. It also includes important survey articles in areas influenced by Ramanujan's mathematics. Most of the articles in the book are nontechnical, but even those that are more technical contain substantial sections that will engage the general reader. The book opens with the only four existing photographs of Ramanujan, presenting historical accounts of them and information about other people in the photos. This section includes an account of a cryptic family history written by his younger brother, S. Lakshmi Narasimhan. Following are articles on Ramanujan's illness by R. A. Rankin, the British physician D. A. B. Young, and Nobel laureate S. Chandrasekhar. They present a study of his symptoms, a convincing diagnosis of the cause of his death, and a thorough exposition of Ramanujan's life as a patient in English sanitariums and nursing homes.Following this are biographies of S. Janaki (Mrs. Ramanujan) and S. Narayana Iyer, Chief Accountant of the Madras Port Trust Office, who first communicated Ramanujan's work to the "Journal of the Indian Mathematical Society". The last half of the book begins with a section on 'Ramanujan's Manuscripts and Notebooks'. Included is an important article by G. E. Andrews on Ramanujan's lost notebook. The final two sections feature both nontechnical articles, such as Jonathan and Peter Borwein's 'Ramanujan and pi', and more technical articles by Freeman Dyson, Atle Selberg, Richard Askey, and G. N. Watson. This volume complements the book "Ramanujan: Letters and Commentary, Volume 9", in the AMS series, "History of Mathematics". For more on Ramanujan, see these AMS publications, "Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, Volume 136", "H, and Collected Papers of Srinivasa Ramanujan, Volume 159", "H", in the AMS Chelsea Publishing series.

Commentary (by R. A. R.) by R. A. Rankin The life of Ramanujan: The four photographs of Ramanujan The books studied by Ramanujan in India The influence of Carr's synopsis on Ramanujan The notebooks of Srinivasa Ramanujan A recently discovered letter giving Ramanujan's examination scores On Ramanujan The Ramanujan family record Ramanujan's illness: Ramanujan as a patient Ramanujan's illness An incident in the life of S. Ramanujan, F.R.S.: Conversations with G. H. Hardy, F.R.S. and J. E. Littlewood, F.R.S. and their sequel S. Janaki: S. Janaki Ammal (Mrs. Ramanujan) Conversation "I didn't understand his work, but I knew his worth" S. Narayana Iyer: A short biography of S. Narayana Iyer The distribution of primes Some theorems in summation E. H. Neville: Srinivasa Ramanujan University lectures in Madras Ramanujan's manuscripts and notebooks: Ramanujan's manuscripts and notebooks Ramanujan's manuscripts and notebooks, II An overview of Ramanujan's notebooks An introduction to Ramanujan's "lost" notebook Nontechnical articles on Ramanujan's work: Ramanujan and pi $\pi$ related developments since 1988 Reflections around the Ramanujan centenary The problems submitted by Ramanujan to the Journal of the Indian Mathematical Society Somewhat more technical articles on Ramanujan's work: A walk through Ramanujan's garden Ramanujan and hypergeometric and basic hypergeometric series The final problem: An account of the mock theta functions.

「Nielsen BookData」 より

## 詳細情報

• NII書誌ID(NCID)
BA54135164
• ISBN
• 0821826247
• 出版国コード
us
• タイトル言語コード
eng
• 本文言語コード
eng
• 出版地
[Providence, R.I.],[London]
• ページ数/冊数
xvi, 347 p.
• 大きさ
26 cm
• 件名
• 親書誌ID

ページトップへ


text:
I'm interested in designing new distributed and parallel algorithms, the distributed processing of big data, achieving fault-tolerance in networks, and secure distributed computing in dynamic environments such as peer-to-peer networks and mobile ad-hoc networks.

## Publications tagged with "Mobile Ad-Hoc Network" (Show all)

2011
• Optimal Regional Consecutive Leader Election in Mobile Ad-Hoc Networks PDF DOI
Hyun Chul Chung, Peter Robinson, Jennifer L. Welch. 7th ACM SIGACT/SIGMOBILE International Workshop on Foundations of Mobile Computing (part of FCRC 2011).
Abstract...
The regional consecutive leader election (RCLE) problem requires mobile nodes to elect a leader within bounded time upon entering a specific region. We prove that any algorithm requires $\Omega(Dn)$ rounds for leader election, where D is the diameter of the network and $n$ is the total number of nodes. We then present a fault-tolerant distributed algorithm that solves the RCLE problem and works even in settings where nodes do not have access to synchronized clocks. Since nodes set their leader variable within $O(Dn)$ rounds, our algorithm is asymptotically optimal with respect to time complexity. Due to its low message bit complexity, we believe that our algorithm is of practical interest for mobile wireless ad-hoc networks. Finally, we present a novel and intuitive constraint on mobility that guarantees a bounded communication diameter among nodes within the region of interest.
2010
• Regional Consecutive Leader Election in Mobile Ad-Hoc Networks
Hyun Chul Chung, Peter Robinson, Jennifer L. Welch. 6th ACM SIGACT/SIGMOBILE Workshop on Foundations of Mobile Computing (DIALM-POMC 2010).

## Code

I'm interested in parallel and distributed programming and related technologies such as software transactional memory. Below is a (non-comprehensive) list of software that I have written.
• I extended Haskell's Cabal, for using a "world" file to keep track of installed packages. (Now part of the main distribution.)
• data dispersal: an implementation of an (m,n)-threshold information dispersal scheme that is space-optimal.
• secret sharing: an implementation of a secret sharing scheme that provides information-theoretic security.
• dice-entropy: a library that provides cryptographically secure dice rolls implemented by bit-efficient rejection sampling.
• TSkipList: a data structure with range-query support for software transactional memory.
• stm-io-hooks: An extension of Haskell's Software Transactional Memory (STM) monad with commit and retry IO hooks.
• Mathgenealogy: Visualize your (academic) genealogy! A program for extracting data from the Mathematics Genealogy project.
• In my master thesis I developed a system for automatically constructing events out of log files produced by various system programs. One of the core components of my work was a part-of-speech (POS) tagger, which assigns word classes (e.g. noun, verb) to the previously parsed tokens of the log file. To cope with noisy input data, I modeled the POS tagger as a hidden Markov model. I developed (and proved the correctness of) a variant of the maximum likelihood estimation algorithm for training the Markov model and smoothing the state transition distributions.

## Misc

• Program committee membership: BGP 2017, ICDCN 2016, SPAA 2016, SIROCCO 2016, ICDCN 2015, SIROCCO 2014, FOMC 2014
• DBLP entry. (Shows a subset of my publications.)
• Google Scholar profile.
• Profile on StackExchange.