text:
Tag Info

10

First proof Suppose $\mathbb{Z}^n\cong\mathbb{Z}^m$, with $m\ne n$. Then you can find a set of $m$ free generators in $\mathbb{Z}^n$, say $\{f_1,f_2,\dots,f_m\}$. Then, for some integers $a_{ij}$, $b_{ij}$, you have \begin{align} f_j&=\sum_{i=1}^n a_{ij} e_i &&j=1,\dots, m\\ e_i&=\sum_{j=1}^m b_{ij} f_j &&i=1,\dots, n \end{align} ...

7

$K(\alpha, \beta)$ is Galois over $K$ and the corresponding Galois group is a subgroup of $\text{Gal}(K(\alpha)/K)\times \text{Gal}(K(\beta)/K)$. So $K(\alpha, \beta)/K$ is abelian. Thus, any intermediate Galois extension must be abelian since the corresponding Galois group would be a quotient of $\text{Gal}(K(\alpha,\beta)/K)$

6

$\mathbb{Z}^n \cong \mathbb{Z}^m$ implies $(\mathbb{Z}/2)^n \cong \mathbb{Z}^n / 2 \mathbb{Z}^n \cong \mathbb{Z}^m / 2 \mathbb{Z}^m \cong (\mathbb{Z}/2)^m$. By comparing the number of elements, we get $2^n=2^m$, i.e. $n=m$. (No linear algebra is necessary here!)

3

Whenever you have a condition $g^2=e$ in a group, it's equivalent to $g=g^{-1}$ (multiply both sides by $g^{-1}$). In this case, it applies to every element of the group, so you can add or remove inverses from any expression freely. So the proof is simply $$ab=(ab)^{-1}=b^{-1}a^{-1}=ba.$$

3

This is known as Smith normal form, and you can find lots of references on Google books. In particular, this textbook has exhaustive coverage of Smith normal form and all of its consequences.

3

You can simplify things a lot by noting that $|a|$ divides $K$ iff $a^K=1$. Using this, verifying that $H$ is a subgroup is easy. If you can use homomorphisms, then it is easier because $H=\ker\phi$, where $\phi(x)=x^K$. Since $G$ is Abelian, $\phi$ is a homomorphism.

2

A way that doesn't use group actions (which are awesome, by the way, so try to use them when you can): We want to know the order of the centralizer of $g,\ |C(g)|$. Now $x \in C(g)$ means that $xgx^{-1} = g$. Since $x(1\ 2\ 3)x^{-1} = (x(1)\ x(2)\ x(3))$ we can immediately see two things: $x$ must map $\{1,2,3\} \to \{1,2,3\}$ and thus $\{4,5\} \to ... 2 Let$G$acts on itself by conjugation. Consider the orbit of$g$, it's the conjugacy class of$g$in$S_{5}$, so the set of$3$cycles. Now,$H$is the stabilizer of$g$. If$x \in H$, then$xg=gx$so$xgx^{-1}=g$. And if$x \in Stab(g)$, then$xgx^{-1}=g$so$xg=gx$so$x \in H$. Now the orbit stabilizer theorem tells us that$|G|=|Orb(g)||Stab(g)|$, so ... 2 use the fundamental theorem of finitely generated Abelian groups: The invarint factor version. G is nothing but a k finite direct sum of Z_n's ordered in an ascending order of divisibility of the n's. Then certainly there is a summant Z_n. Now take a k-tuple with all entries 0 except one entry corresponding to Z_n in which it is 1. 2 The statement you want to prove is false in general. Let$k=1$for example, and let $$G = \langle x,y,z \mid x^3 = y^3 = z^3 = 1, yz = zyx, xy = yx, xz = zx\rangle$$ be the group found in this answer. Then$G$is not abelian, but$G$has exponent three. It thus holds that$(ab)^3 = e = a^3 b^3$for all$a,b \in G$, and moreover it obviously holds that ... 1 Doesn't the first nontrivial case, with$k=2$,$m_1=2$, and$m_2=3$, give a counterexample? EDIT: User64726 has pointed out that this counterexample doesn't work if one allows$1$to be among the$d_i$'s. Under that convention, the problem becomes whether we can always take the number of nontrivial$d$'s to be$\leq k$, where$k$is the number of$m$'s; if ... 1 @Egreg's answer above is very complete and concise, but I thought I'd add another answer just for the heck of it. Suppose toward a contradiction that there exist distinct natural numbers$m,n\in\Bbb{N}$with$\Bbb{Z}^n=\Bbb{Z}^m$. Let$m\in\Bbb{N}$the least natural number for which there exists$n\in\Bbb{N}$with$m\neq n$such that ... 1 Every group homomorphism$\phi: \mathbb Z^n \to \mathbb Z^m$extends (uniquely) to a linear transformation$T: \mathbb Q^n \to \mathbb Q^m$of vector spaces over$\mathbb Q$. Moreover,$\phi$is injective iff$T$is injective. But$T$injective implies$n \le m$. Applying this to both$\phi$and$\phi^{-1}$, we conclude that$n \le m \le n$. 1 You want to prove that the map $$x \mapsto (\chi \mapsto \chi(x))$$ is injective. I assume that you have already proved that this is a homomorphism. So all you need to show is that the kernel of this map is trivial. That is, you want to show that $$\ker (x \mapsto (\chi \mapsto \chi(x))) = \{e\}$$ where$e$is the identity in$G$. Now the kernel is ... 1 Given that$(a\cdot b)^{n+2}=a^{n+2}\cdot b^{n+2}$we can multiply by$a^{-1}$and$b^{-1}$on the left and right to get $$(b\cdot a)^{n+1}=a^{n+1}\cdot b^{n+1}=(a\cdot b)^{n+1},$$ the latter equality holding by assumption. Repeating this trick we get $$(b\cdot a)^n=a^n\cdot b^n=(a\cdot b)^n,$$ and dividing these two left hand sides and right hand sides of ... 1 All you have done is correct. However it seems you made some claims which at first sight are correct, but in fact they could be based on some confusion. One of them is the following: when$G=\mathbb Z/p^{\alpha}\mathbb Z\times\mathbb Z/p^{\beta}\mathbb Z$you said that$\mathbb Z/p\mathbb Z\subset G$. This is right up to isomorphism: we identify$\mathbb ...

1

The map $f:G \to G$ given by \begin{align*} f(g_i) &= \begin{cases} g_i & \text{if}\;\; i \leq r; \\ 0 & \text{if}\;\; i > r \end{cases} \end{align*} has kernel $\langle{g_{r+1}, \dots, g_k\rangle} = H$ (since $G$ is free). Hence $G/H = f(G) = \langle g_1, \dots, g_r\rangle\subset G$.

1

You can take $v_1=(1,4)$, $k_1=1$, $v_2=(0,1)$, $k_2=7$.

1

Another way to see that $|zw| = |z||w|$: Let $z = a+ib$, and $w = c + id$. Then: $|zw| = |(a+ib)(c+id)| = |(ac-bd) + i(ad+bc)| = \sqrt{(ac-bd)^2 + (ad+bc)^2}$ $= \sqrt{a^2c^2 - 2abcd + b^2d^2 + a^2d^2 + 2abcd + b^2c^2}$ $= \sqrt{a^2c^2 + a^2d^2 + b^2c^2 + b^2d^2} = \sqrt{a^2(c^2 + d^2) + b^2(c^2 + d^2)}$ $= \sqrt{(a^2 + b^2)(c^2 + d^2)} = ... 1$\mathbb C^{\times}$is an Abelian group. The map$z \mapsto |z|$is a group homomorphism$\mathbb C^{\times} \to \mathbb R^{\times}$. The circle is the kernel of this map and so is a subgroup of$\mathbb C^{\times}$. The crucial point is that$|zw|=|z|\ |w|$and this can be proved as follows:$$|zw|^2=(zw)(\overline{zw})=z w \bar z \bar w=z \bar z w \bar ... 1 Hint: if$z\in G$, there exists$\varphi\in(-\pi,\pi]$with$z=e^{i\varphi}$. (Of course one can choose$\varphi \in [0,2\pi)$or$\varphi \in I$for any half closed intervall$I$of length$2\pi\$).

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


text:
# Dimensions of modules of the maximal compact subrings of locally compact fields

I have checked the list of similar titles, proposed by the site. I hope this is not a repetition.
This question arises from a proof of a proposition in the book Basic Number Theory, as follows.

Proposition
Every finitely generated $R$-module $M$ is the direct sum of finitely many summands, each of which is isomorphic either to R or to a module R/$P^v$, $v$>0.
Proof
Let M be generated by elements $m_1,...,m_n$. Take a vector-space $v$ of dimension n over $K$, with a basis $v_1,...v_n$; put $L$=$\Sigma$ $Rv_i$. Then the formula
$\Sigma$ $x_iv_i$=$\Sigma$ $x_im_i$,
where the $x_i$ are taken in $R$ for i from 1 to n, defines a morphism of $L$ onto $M$; therefore $M$ is isomorphic to $L/M'$, where $M'$ is the kernel of that morphism. Apply now corollary 1 to $L$ and $M$; as $M$ is a subset of $L$, we have $v_j$is positive for j from 1 to r, and r=s.

Question
After that proof, Weil then defines $n_i$ as the dimension of $R_i=M_i/M_{i+1}$, where $M_i$:=$\pi^iM$, over the residual field $k=R/P$; moreover, after the proposition is set up, one can define the number$N_v$ as $N_0$=the number of times R appears in the summands, and $N_v$=the number of times R/$P^v$ appears in the summands. Now, Weil asserts that $n_i$=$N_0$+$\Sigma_{v>i}N_v$. And my question is why is this true.
Supplement
Here, R is the maximal compact subring of a p-field $k$, in which $P$ is the maximal ideal, where a $p$-field is a non-discrete locally compact field, either of characteristic $p$, or a finite extension of $Q_p$ the completion of $Q$ with respect to the $p$-adic valuation.
I may not exprese my question explicitly enough, so feel free to ask for explanations, and I will do my best to clarify things.
Thanks and regards here.

-
Hi. Just as a note, the kernel "M" is different from the module "M". And $R_i=M_i/M_{i+1}$. –  John M Jul 25 '11 at 15:06
Note: this is on pg. 30 of Weil's book. I'll try to have a look at your question later, but I'm sure that John's answer is great. –  Dylan Moreland Jul 25 '11 at 16:25
@Dylan Moreland - don't assume it's great! My first answer was bogus. –  John M Jul 25 '11 at 16:30
Here's a question to anyone who has Weil's book: what are the actual conditions on the ring $R$ here? Does $R$ merely have to be Noetherian, and $P$ can be any maximal ideal? –  John M Jul 25 '11 at 16:42
Also, Weil's proposition is also a corollary of the usual structure theorem for finite modules over a principal ring, isn't it? –  Dylan Moreland Jul 26 '11 at 3:27

Here's my stab at this: Here I assume $R$ is a DVR with max ideal $P=(\pi)$. If this isn't correct, let me know.
If the module $M \cong R^{N_0} \oplus (R/P)^{N_1}\oplus\dots$, then $M_i=\pi^iM \cong(P^i)^{N_0}\oplus(P^i/P^{i+1})^{N_{i+1}}\oplus(P^i/P^{i+2})^{N_{i+2}}\oplus\dots$, since the rest of the terms with index less than or equal to $i$ are trivial.
So then we have $M_i/M_{i+1}\cong (P^i/P^{i+1})^{N_0}\oplus(P^i/P^{i+1})^{N_{i+1}}\oplus(P^i/P^{i+1})^{N_{i+2}}\oplus\dots$.
Note that $\text{dim}_{R/P}(P^i/P^{i+1})=1$, so $$n_i=\text{dim}_{R/P}(M_i/M_{i+1})=N_0+\sum_{\nu>i}N_i$$
In fact, one of the main problems I encountered before is that, although I decomposed the ring, I do not know why we can view as trivial those terms with index less than $i$; this is suddenly solved. Thank you. –  awllower Jul 26 '11 at 11:21

format: plain


text:
45 views

### What are the general rules to follow if I want to design a block cipher suitable for file encryption? [duplicate]

Can you please tell me what should be the quality of an encryption function using a key size of 256 bits... I realized from my previous question that a simple XOR of plaintext (256 bits) with a ...
31 views

### What are some good softwares to help create block ciphers? [duplicate]

I'm working on my own unnamed block cipher currently. It uses permutation networks, rotations (bitwise and quitwise) and bitwise operators. Are there any good softwares and/or libraries to program in ...
19 views

### Check linear and differential cryptanalysis of a new block cipher [duplicate]

I am developing a new block cipher primitive. I would like to test its robustness against attacks of linear and differential cryptanalysis. Is there a tool to evaluate this using only plaintext and ...
7k views

### Reason why “XOR” is a linear operation, but ordinary “addition” isn’t?

I'm new in cryptography and try to read some articles in this field. Many of these articles talk about non-linear S-boxes, and nothing more on what they mean by their non-linearity. I have a simple ...
9k views

### Why do block ciphers need a non-linear component (like an S-box)?

Why is there a requirement of "Non-Linear functions" as a component of many popular block ciphers (e.g. the S-box in DES or 3DES)? How does it make the cipher more secure? The only intuition I have ...
20k views

### Can you explain “weak keys” for DES?

A weak key for DES is a key $K$ such that $DES_{k_1}(DES_{k_2}(x))=x$ for all $x$. I don't get why are the 4 keys $k_1||k_2$: $1^{112}$, $0^{112}$, $0^{56}||1^{56}$, $1^{56}||0^{56}$ considered as ...
6k views

### Why are bitwise rotations used in cryptography?

Any understanding I have of cryptography stops right around the cipher level. As such, I'm just curious as to why bit shifts and moreover circular bit shift are so prevalent in cryptography.
5k views

### What does Maj and Ch mean in SHA-256 algorithm?

I'm guessing they're some kind of standard function but what do they do and what do the names mean? A little explaination or link me to an article would be great.
2k views

### What are the requirements of a key schedule?

In the first block cipher I designed I used a CSPRNG to generate the round keys. The purpose was to at least have a chance of creating a (hopefully!) secure cipher on the first try (but please don't ...
1k views

### What are the qualities of a good block cipher? Beginner, Intermediate, Advanced, Expert [closed]

Notice: I'm doing this to learn. I know not to use a homemade cipher for anything that requires security. I also have heard before I'm not supposed to be trying this, but I learn best through trying ...
2k views

I was looking at the algorithm for Twofish, and I noticed that in some places a XOR is used, but in others, they use "addition modulo-32." What makes modulo-32 special? Why not always use XOR? Why not ...
4k views

### AES timing attacks

I'm just interested in cryptography, so please don't expect me to be an expert. ;) I recently read about AES cache timing attacks and found it very interesting. I read the article Cache-timing attacks ...
2k views

### How does ROTL work?

what does ROTL stand for? I know it does left shifting but what about the acronym? When we do a left shift, do we take the leftmost bit and add it at the end, by making the second bit the first, and ...


text:
## Introduction

The United States Midwest supplies about a third of the world’s corn (Zea mays) and soybean (Glycine max L [Merr.])1, but more frequent weather extremes—including excessive rainfall and drought conditions—increasingly threaten crop yields2,3. Indeed, analyses of crop production aggregates for the region have indicated substantial yield losses not only during drought, but also in years with excess rainfall4,5,6. Both water deficits and water excess constitute severe stresses that limit crop growth and yield. Plant physiological mechanisms for conserving water and maintaining turgor during drought inhibit photosynthesis and leaf area expansion, while extreme heat that can develop under drought conditions results in wasteful respiration, accelerates phenological development and can cause irreversible damage to plant tissues7,8,9. Waterlogging following the occurrence of heavy rains decreases seedling emergence, suppresses root growth as a consequence of oxygen deficit and reduces crop nutrient uptake10,11,12. These crop stresses can be expected to intensify as climate becomes more variable.

Regional-level assessments are instrumental to understanding the magnitude and extent of climate-driven impacts on crop productivity, but they cannot capture important field-to-field or sub-field variability. In fact, recent high-resolution crop yield estimates derived from satellite imagery13 have indicated that about 28% of all corn and soybean cropland in the Midwest is temporally unstable, meaning that yields in these zones tend to fluctuate between high and low, depending on the year. These shifts between favorable and unfavorable growing conditions in unstable subfield zones could be explained by patterns of overland water flow and accumulation14,15. While soil physical properties regulate water infiltration and soil water holding capacity, position in the landscape influences the amount of water that is lost through runoff and gained through run-on, creating areas that are more inclined to become water limited or waterlogged11. This dynamic has been widely documented in field experiments, where areas with higher relative elevation or slope generally yield less in normal or dry years15,16,17,18,19, whereas areas that collect overland runoff show suppressed yields during wet years15,18,20,21.

While the weather-landscape position interaction is widely recognized as a major driver of crop yield spatio-temporal variability14,22,23, its importance relative to other sources of variation such as soil type or previous yield history remains unclear. In addition, the extent and magnitude of the associated yield gaps have not been examined in a systematic manner. Therefore, here we use observational data from a large sample of commercial crop fields (Fig. 1a) to examine the hypothesis that landscape position is the primary mediator of crop yield responses to weather within unstable field zones, leading to contrasting responses within the same field. We then combine large-scale spatial datasets with subfield designations of yield stability classes and landscape positions to identify and quantify cropland that is most vulnerable to hydric stresses (i.e., too little or too much water) and estimate yield gaps and scale up impacts. Our aim is to provide a baseline for the potential improvements in yield and resilience that may be achieved by site-specific implementation of management or genetic adaptations.

## Results

### Landscape position as mediator of crop yield responses to weather in unstable zones

To test the hypothesis that landscape position is the primary mediator of crop yield responses to weather within unstable field zones, we examine a set of 305 corn and soybean fields in five Midwestern states (Fig. 1a; Table S1), segmented according to site-specific yield stability and landscape position classifications (Fig. 1b,c). These sample fields encompass a wide heterogeneity of landscape positions (Fig. S1). Unstable zones across all fields represented 27% of all grid cells, which is remarkably similar to the satellite-derived estimate of 28% for the entire Midwest13.

We identify four sources of variation in our dataset that may explain spatial patterns of temporal crop yield responses: field, soil type, landscape position and weather-year. Variance decomposition with hierarchical linear models indicate that the greatest share of the non-error variance in stable zones can be attributed to soil type within fields whereas other sources of variation play minor roles (Fig. 2a). In unstable zones, soil type within fields accounts for only 10% of the total variance, while the interaction of weather-year within landscape position becomes much more important. Yield history (i.e., whether the grid cell-wise mean is above or below the field mean22) as explanatory variable captures the variance associated with space (i.e., field, soil type and landscape position), but not spatiotemporal responses (i.e., weather-year and landscape position interactions; Fig. 2a). The decrease in the usefulness of yield history as explanatory variable in unstable zones is clearly related to variance captured by the interaction of weather-year and landscape position. When variance components are calculated for each field independently, we find that those fields where soil explains little of the variance are in those where the weather-year and landscape position interactions hold the greatest explanatory power (Fig. S2).

Further analysis shows that crop yield stability differs significantly among landscape positions (p < 0.001; Table S2). In the sample fields examined, the proportion of unstable grid cells (i.e., high temporal variation) are greatest in the depression and summit positions, followed by shoulder, midslope and toeslope positions, and then flat cropland (Fig. 2b). The same general pattern was observed when the data was analyzed by region (Fig. S3). This provides evidence that unstable zones are also common in higher elevation areas and not just in depressional areas14.

In unstable zones, crop plants exhibit high yields in dry years and low yields in wet years if located in depressional areas, whereas the opposite is true for summit and sloping areas. This contrasting response becomes evident when examining site-specific yield responses to weather during critical periods of crop growth (i.e., May and July). In the Midwest, the month of May represents the period of corn and soybean planting and seedling emergence, and July encompasses the period around flowering. Greater rainfall in May and July is associated with increases in standardized yield per unit of mm in the summit and shoulder positions, although the response is much greater for July rainfall (Fig. 2c; Table S3). In contrast, increases in rainfall both in May and July are associated with large negative departures from the field mean yield in the toeslope and depression positions. On the other hand, higher daily temperatures in July are related to a positive standardized yield response in the lowland portions relative to the field mean, and to negative responses in the upland positions. Not surprisingly, crop plants in the flat areas are the most resilient, showing to be the least sensitive to weather variability (Fig. 2c). The same general pattern is observed when the data are analyzed by region and crop (Figs. S4 and S5).

In addition, we examine aerial thermal imagery (2 m resolution) of crop canopies collected during the month of July for 60 of the sample fields (Fig. S6a). These data indicate significantly warmer crop canopy temperatures in July in the upland positions, whereas flat and lowland positions tend to have cooler canopies (Fig. S6b; Table S4). The warmer canopy temperatures could suggest that upland positions show greater signs of stress related to water-deficits occurring during this critical period of crop yield determination24. It should be noted, however, that most of the fields with canopy temperature measurements in our dataset are located in Michigan (57 out of 60), which tend to have low quality, predominantly sandy soils (Figs. S7S9). It is possible that in more productive fields (e.g., Iowa), depressions may also experience a high departure from mean canopy temperature, especially in years with wet May-June, and dry July-August.

### Yield gaps in water-stress prone landscape positions

Relative to the field average yield, the unstable areas in upland positions (summit, shoulder and midslope) seem to be the most prone to yield losses during dry years, whereas excess rainfall years are corelated to yield decline in unstable lowland positions (toeslope and depression; Fig. 3; Figs. S10 and S11). Yields in zones prone to water deficits can be as low as 23–33% below the field average in years of low rainfall (−2σ rainfall anomally; Fig. 3) but are comparable to the mean in extremely wet years (+3σ; Fig. 3). This is almost the reverse in zones prone to excess water, with yields 26–33% below the field average in wet years (+3σ).

### Extent of landscape-mediated impacts

Using subfield designations of yield stability classes and landscape positions for Midwestern corn and soybean fields (Fig. S12), we estimate that in the Midwest there are roughly 2.7 million ha (~10% of total area) which are highly sensitive to excess water or water deficits, though these are clustered in a few areas in the northern and eastern Corn Belt (Fig. 4a). Assuming that our sample fields are broadly representative of Midwestern cropland (Fig. S11), we estimate that during 2007–2016, yield in water stress-prone cropland lagged on average 15% of county-level yields (Table 1; Fig. 4b). On the aggregate this amounted to 2.8 and 0.4 million tons yr−1 of lost corn and soybean grain production for the whole region, with an estimated economic impact of \$536M USD yr−1.

Based on the yield losses associated to site-specific responses to drought and deluge, the environmental impacts amount to roughly 4.0 million tons yr−1 of CO2 that were not fixed in crop biomass and returned to soils, and 52.6 Gg yr−1 of reactive N that was not taken up by crops and was likely lost to the environment (Table 1). Here these impacts are estimated relative to the field or county average yield, which is likely a conservative estimate as the actual water-limited yield potentials are probably higher, particularly in lowland areas.

## Discussion

Enhancing the resilience of agricultural production to weather variability and climate change requires a better understanding of the underlying processes that drive weather-induced crop stress and yield loss. While temperature and precipitation trends in the US Midwest have so far been beneficial for corn and soybean production (accounting for about a quarter of the yield-increase trend in recent decades25,26,27), regional yields are also simultaneously becoming more vulnerable to weather shocks4,5,6,28. The trend of intensifying rainfall in the Midwest3,29, in particular, poses a critical threat as extreme rainfall can also result in significant production losses4,30. In fact, a recent study that examined long-term (1981–2016) trends for corn production records and insurance data in the US4 indicated that excessive rainfall reduced yields up to 34%, which were comparable to those due to extreme drought (37%). Yet, yield losses due to excess water remain much less studied than drought stress factors4,31, which is a crucial gap and limits our ability to adapt crop production systems.

Critically, weather cannot be assumed to impact crop stand uniformly because, as demonstrated here, position in the landscape mediates the microenvironment that plants experience, which can substantially mitigate or accentuate weather-induced crop stress (Figs. 2c and 3; Fig. S6b). Indeed, the evidence provided by our large sample of Midwestern fields supported our hypothesis that the contrasting crop responses to weather across landscape positions are the primary drivers of yield variability in unstable zones (Fig. 2a), which represent more than a quarter of cropland in the Midwestern US13. The 2.7 million hectares of cropland identified as most prone to water stress are estimated to lag as much as 23–33% below the field average during drought years and 26–33% during deluge years compared to the field average yield on a given year, amounting to substantial environmental and economic cost (Table 1). This might suggest that a sizable portion of yield loss during years of extreme weather-induced stress might originate from these most vulnerable zones, and that stable, mostly flat cropland might be better able to withstand weather variability shocks (Figs. 2b,c and S10). Nevertheless, it is important to highlight that yields in unstable zones appear to be limited by water-stress even under nonextreme rainfall (~mean seasonal rainfall; Fig. 3), implying that situations where fields are simultaneously affected by excess water in certain areas and by water deficits in other areas, might be more common than what is generally assumed.

An important uncertainty in our analysis is the effect of artificial subsurface tile drainage systems on the yield stability and landscape-mediated yield responses, given that no information was available for our sample fields on which had tiles and their location within the field. Yet, subsurface drainage is a widespread practice in the Midwest32. It may be expected that fields in our dataset located in regions where tile drainage is more prevalent (e.g., Minnesota and Iowa) would tend to have greater stability in depressions than in regions with less tile drainage (e.g., Michigan), perhaps comparable to that of flat cropland. At the very least, we might expect yield responses to excessive rainfall in depressions to be less pronounced. The former does not seem to be the case (Fig. S3), whereas for the latter, it is unclear if the muted landscape-mediated yield responses in Minnesota and Iowa (Fig. S4) are due to tile drainage, or to the overall larger proportion of unstable pixels in those fields (Fig. S3). In fact, it has been previously shown that tile drainage is not a major factor when determining the regional variations in excessive rainfall impact4 because regions that tend to have poorly drained soils, and thus are more vulnerable to waterlogging, are also those that have greater proportion of land under artificial drainage. Therefore, grouping fields by region to evaluate the effect of tile drainage here should be interpreted with caution because of many confounding factors (e.g., soil hydrology, productivity level, etc.).

It should also be noted that not all unstable field zones are located in upland or lowland positions. In fact, nearly one third of unstable zones in our dataset occur in flat areas. This may indicate that factors such as intermittent disease, weeds or planting errors are also important to consider when establishing the causes for the lack of site-specific yield stability. Additionally, the influence of soil characteristics cannot be completely separated from position in the landscape. For example, long-term soil erosion and deposition dynamics can cause soils in the upland and sloping positions to be of lower soil organic matter and soil microbial function33, coarser texture and occasionally shallower depth (Figs. S7S9). These factors substantially influence components of water budgets (e.g., runoff, depth to water tables, and drainage), nutrient budgets (e.g., mineralization, losses and gains) and the plant physical environment (e.g., rooting depth)11,31, all of which affect yield potential and variability. Thus, landscape position should be thought of as an integrative characteristic that encompasses complex interactions between water and nutrient cycling, allowing us to infer and predict responses to environmental variability. It is then that by coupling data on landscape position with spatial yield variability analysis (i.e., site-specific information of past yields), it is possible to identify areas where potential yields are high but are often suppressed by excessive or deficient water. In this sense, crops themselves are the best indicators of field areas that would most benefit from adaptations.

### A framework for adapting crop production landscapes

The expected increase in climate variability with future climate change can be used to estimate the risk probability of reduced yields and identify possible strategic and tactical adaptations34 for distinct landscape positions (some examples are summarized in Fig. 5). For instance, increasing plant densities in excess water-prone zones might help mitigate the negative effects of poor stand establishment during wet years10 while still supporting high yields under dry years. Drainage can also be improved in many of the poorly drained soils of the Midwest to increase yield and reduce waterlogging with its associated negative effects32 (e.g., effects on germination, denitrification, anoxia). This is crucial as the design of current drainage systems may not be adequate to accommodate increases in drainage requirements due to intensifying rainfall in the region35. On the other hand, drought-adaptation strategies that decrease the crop water demand during peak summer temperatures such as lower plant densities, later planting or faster-development (shorter duration growth period) varieties might help prevent water stress in upland areas26, but likely at the cost of lowering yield potential in these zones. Tactical management approaches such as in-season adjustment of N fertilizer inputs guided by weather forecasting, remote sensing and crop modeling34,36 can also help support higher yields in zones that are likely to benefit under favorable weather, and improve N-use efficiency in these zones under unfavorable weather.

The development of flood- and drought-tolerant genotypes also offers promising options for enhancing the resilience of crops to weather variability. Improvements in tolerance to short-term soil water saturation are tapping into known plant mechanisms to withstand root anoxic conditions such as aerenchyma formation, greater activity of the glycolytic pathway and fermentation enzymes, and antioxidant defense compounds12, while drought tolerance seeks to enhance stomatal regulation, osmotic adjustment, root architecture and plasticity8,9,11. However, crop traits for tolerance to flood and drought may not co-occur in the same genotype due to fitness tradeoffs37. Hence, coupling yield stability and landscape position information offers a spatial framework for experimentally testing novel germplasm in breeding programs or agronomic management, and ultimately for climate adaptation. In this sense, this proposed approach would allow matching genotypes or management adaptations to specific subfield microenvironments in which given weather-induced stresses are expected to be most pronounced or frequent. Therefore, integrated research is urgently needed to examine the feasibility of such strategies for climate-adaptation, and more broadly to determine its significance for crop production.

## Methods

### Sample fields and crop measurements

We used yield monitor datasets (i.e., yield maps) for 305 sample fields in Illinois, Indiana, Iowa, Michigan and Minnesota (Fig. 1a). The fields were cropped primarily with corn and soybeans, with a small number also including wheat in rotation. Field size ranged from 10 to 184 ha (34 ha on average), representing a total area of 10,544 ha (Table S1). Each unique field contained at least 3 years of end-of-season yields, collected within 2004–2017. Raw monitor yield data was adjusted to standard grain moisture (15.5% and 13% corn and soybean moisture, respectively) and cleaned as described in a previous study14.

Crop canopy thermal imagery during the month of July were collected at 60 of the fields (Fig. S6a) by a commercial provider (AirScout Inc., Monee, IL, USA) using the aircraft-mounted 9640P thermal sensor (Infrared Cameras Inc., Beaumont, TX, USA). Canopy temperature readings from the thermal band (7–14 µm) were reported as °C (range 12–46 °C) at a 2 m resolution. The georeferenced point-based yield and canopy data were transformed into raster format and resampled to 1-arc second (~30 m) resolution, so that it matched that of the digital elevation model (see below).

For further analysis, we standardized the absolute raster values of yield (Mg ha−1) and canopy temperature (°C) by subtracting the site-year wise mean value and dividing by the standard deviation. In these cases, the standardized values had a mean of zero and standard deviations (σ) as units.

### Landscape position classification

For each field, we obtained Digital Elevation Models (DEMs) at 1-arc second resolution (~30 m) from the National Elevation Dataset (NED)38. DEMs were used to calculate local topographic slope and topographic position index (TPI) for each pixel. Topographic slope was computed using the vector-based algorithm39 (i.e., 4 neighbors). Topographic position index (TPI) was calculated with the following equation:

$$TPI={Z}_{i}-{\bar{Z}}_{n}$$
(1)

where Zi is the elevation for the ith pixel, and $${\bar{Z}}_{n}$$ is the mean elevation for the surrounding neighborhood. Here, we used a neighborhood of 9 × 9 pixels (~7.3 ha). The computed slope and TPI were used to classify each field pixel into five landscape positions (Fig. 1b): summit (TPI ≥ 1SD), shoulder (1SD > TPI ≥ 0.5SD), midslope (0.5SD > TPI ≥ −0.5SD & Slope ≥ 2%), toeslope (−0.5SD > TPI ≥ −1SD), depression (TPI < −1SD) and flat (0.5SD > TPI ≥ −0.5SD & Slope < 2%), where SD is the standard deviation of TPI values for our entire dataset (0.6 m).

Summit is the uppermost position on a hillslope. It represents a local interfluve, meaning that it receives little overland flow and contributes runoff to downslope positions. The shoulder position is a convex transitional zone at the base of the summit and above the midslope. The footslope lays at the base of hillslopes. Depressions are concave regions that receive most of overland upslope flow. Flat positions show very low local variation in elevation and are not located within sloping terrain.

### Temporal stability classification

We followed an established protocol for yield stability analysis40 to partition fields into stable and unstable zones (Fig. 1c). For every pixel of every field, we calculated the mean (µ) standard deviation (σ) of the standardized yields across all the years available for that field. Then each pixel was recoded as stable if σ < 0.75 and unstable if σ ≥ 0.75. Likewise, yield history of each pixel was deemed as low-yielding if µ < 0 and high-yielding if µ ≥ 0. Yield map pixels which had at least one missing value across the different years were excluded from the computation.

### Weather and soils

Historical daily weather observations (1988–2017) were extracted for each field from the Daymet dataset41, downscaled to a 1 × 1 km resolution. Daily rainfall and temperature were aggregated to monthly values. Local soil information was retrieved from the Soil Survey Geographic (SSURGO) database42. Each field intersected 2 to 11 map unit polygons, with each map unit including several components. Soil type and properties for the map units’ major components were extracted at each yield map pixel. Then, soil profile data including texture and organic carbon was integrated to 1 m depth for analysis.

### Tests of hypotheses

We calculated variance components with hierarchical linear models with all random factors, to quantify the share of the variance in standardized yield (sY) that is accounted by four explanatory variables:

$$sY=\mu +{u}_{F}+{u}_{ST(F)}+{u}_{LP(ST(F))}+{u}_{WY(LP(ST(F)))}+\varepsilon$$
(2)

where μ is the overall mean, uF is the random effect of field, uST(F) is the random effect of soil type (i.e., SSURGO map unit) within each field, uLP(ST(F)) is the random effect of landscape position within soil type-field combination, uWY(LP(ST(F))) is the random effect of weather year within landscape position-soil type-field combination, and ε is the residual error. The analysis was then repeated by also including yield history as explanatory variable (YH).

To test the hypothesis that yield stability differs among landscape positions, we fitted the following linear mixed effects model to the binomial response of yield stability classification (YSC; i.e., stable or unstable):

$$\log \,it(YSC)=\mu +{\alpha }_{LP}+{u}_{S}+{u}_{S(F)}+{u}_{ST(S(F))}+\varepsilon$$
(3)

where αLP are parameters depending on a pixel’s position in the landscape (summit, shoulder, midslope, toeslope, depression and flat), uS is the random effect of state, uF(S) is the random effect of field within state, and uST(F(S)) is the random effect of soil type within field and state. We applied the logit function to generalize the binomial response to a linear model, and back transformed the results using the inverse logit function.

We also tested whether standardized yields in unstable pixels across landscape positions responded differently to May cumulative rainfall (MCR; mm), July cumulative rainfall (JCR; mm), and July mean daily maximum temperature (JMT, °C), using the following model:

$$sY=\mu +{\alpha }_{LP}\ast ({\beta }_{1}\ast MCR+{\beta }_{2}\ast JCR+{\beta }_{3}\ast JMT)+{u}_{F}+{u}_{ST(F)}+\varepsilon$$
(4)

where β1, β2 and β3 are regression slope coefficients. Finally, we tested differences in the standardized canopy temperatures (sCT) in unstable pixels among landscape positions:

$$sCT=\mu +{\alpha }_{LP}+{u}_{F}+\varepsilon$$
(5)

Differences among the six levels of landscape position were tested using the Tukey adjustment to correct for multiple comparison. In all tests, we rejected the null hypothesis (i.e., no effect) if the estimated probability was lower than 0.05. All test used the corn and soybean crop years only.

Given similar responses to weather (Fig. 2c), we pooled landscape positions into three classes: upland (summit, shoulder and midslope), lowland (toeslope and depression) and flat. We considered to be areas prone water deficit as those that exhibited unstable yields and were located in the upland position, whereas excess water-prone areas as those lowland positions with unstable yields. Then for every field and year, we computed their mean yield relative to the field-year mean yield.

To estimate yield penalty as a function of seasonal rainfall, we fitted OLS regression to the relative yield in areas prone to excess and deficit water, independently for each zone type and crop, with seasonal rainfall anomaly as the independent variable. This was computed by subtracting the site’s long-term (1988–2017) mean rainfall and scaling by the standard deviation.

We modeled the response of field mean yield ($$\bar{y}$$) to seasonal (May—Sep) rainfall using Rickter’s curve43:

$$\bar{y}=a\ast (x-c)\ast {\exp }(-b\ast (x-c))$$
(6)

where x is independent variable of seasonal rainfall anomaly, and a, b, and c, are the fitted constants. The models were computed independently for corn and soybean. Finally, we linked the OLS regressions with the non-linear model, so that the idealized response of yield (y′) in drought- or flood prone areas was:

$$y{\prime} =({\beta }_{0}+{\beta }_{1}\ast x)\ast \bar{y}$$
(7)

where β0, and β1 are the OLS regression parameters.

### Up-scaling to regional-level impacts

To assess regional-level yield gaps in drought and flood-prone subfield zones and associated impacts, we use a satellite-derived yield stability classification of corn and soybean cropland for 10 Midwestern states13 (Fig. S12). This yield stability classification is based on temporal variability in NDVI derived from Landsat 5, 7, and 8 images (30 m resolution) collected between 2010 and 2017. Details about the image classification procedure, as well as ground-truth validation, are provided by a previous study13. Yield stability classifications were laid over regional NED-DEMs to determine the share of unstable yield zones in upland, lowland or flat areas. Total cropland area and the percentage of cropland in unstable lowland and upland was aggregated for each county. We excluded urban counties (population > 100,000) and those with <1,000 ha under corn or soybean cultivation.

We estimated county-level yields in water-excess and water-deficit prone cropland (y′) for the period 2007 to 2016 using Eq. (7). In this case, $$\,\bar{y}$$ is the average county yield as reported by the National Agricultural Statistic Service44 (NASS; Figs. S13 and S14), and x is the seasonal (May-Sep) rainfall anomaly for each US climate division (Fig. S15). Monthly rainfall values for each climate division are averages computed using daily observations from individual weather stations. Climate data was accessed through the Iowa Environmental Mesonet Climodat web portal45.

### Software

All data processing and analysis was conducted in R (version 3.5.2) extended with the following packages: daymetr to query Daymet data; FedData to access NED and SSURGO databases; sp and raster to process spatial data and terrain analysis; dplyr and tidyr for all other data wrangling; lme4 for linear-mixed effects model fitting; emmeans for post-hoc mean comparison; nlme for non-linear model fitting; and rasterVis and ggplot2 for data visualization.


text:
# Math Help - A word Problem

1. ## A word Problem

Hi, I'm new here. Nobody in my pr-calc class could figure out how to do this problem, so hopefully you can.

Calvin wants to make a gutter with a rectangular cross section by folding up strips of equal width on a long sheet of metal that is 26cm wide. The larger the cross sectional dimensions, the greater the capacity of the gutter. Find the dimensions that will maximize the gutter's capacity.

Thanks!

2. You can do with or without calculus.

Without calculus method:

Let the lengths of the folded up sides be x.

Then the base will have width 26-2x

The area of the gutter is $x(26-2x) = -2x^{2}+26x$

Now you have a quadratic to solve.

To find the maximum capacity of the gutter, use x = -b/(2a).


text:
Project

# Make an LED Light Strip AHRS with Arduino and MPU-6050

4 years ago by Patrick Lloyd

## Use a WS2812 RGB LED strip to visualize the pose of an MPU-6050 6-degree-of-freedom IMU in three dimensional space.

Not your average LED lighting project.

### Technical Concepts

• Interfacing with devices on I2C bus

• Adding and utilizing external Arduino libraries

• Some embedded C/C++ concepts

• Cloning code repositories with Git

• Basic dynamics concepts like inertial reference frames and pose

### Introduction

What's do quadcopters, cell phones, nuclear warheads, and the Segway all have in common? If you guessed "the potential to destroy the world," you would be close but the answer I was looking for was "inertial measurement units", or IMU for short. While all these devices have IMU's made with varying levels of accuracy and precision, each of them uses an IMU in some form for the purposes of guidance, navigation, and orientation. A very common application of inertial measurement is to form an attitude and heading indication system, otherwise known as an AHRS (pronounced AY-harz). On aircraft, for example, the AHRS is integrated with an "artificial horizon" screen so that the pilot can determine his current pitch, roll, and yaw relative to straight and level flight.

An example AHRS with added altitude and ground speed indication

This project aims to create a basic AHRS which uses colored lights on a WS2812 RGB LED strip to indicate how an MPU-6050 IMU is oriented in three-dimensional space.

### What You Need for This Project

• #### Hardware

• Arduino Uno
• WS2812 Addressible RGB LED strip
• MPU-6050 breakout board

### Hello, MPU. How Do You Do?

The MPU-6050 from Invensense (full disclosure: I'm not affiliated with Invensense in any way) contains a three-axis accelerometer and three-axis gyroscope which respectively measure acceleration on and rate of rotation about three orthogonal axes. This brings your total variables in the system (or "degrees of freedom", if you prefer) to six. More degrees can be added with an additional GPS, real-time clock, barometer, magnetometer, or other spacial/inertial sensing device. Each additional degree of freedom increases the potential accuracy of the IMU, assuming the algorithms that read the sensors utilize the data effectively. Both the accelerometer and gyroscope in the MPU-6050 are made with MEMS technology which means they rely on the physical deflection of microscopic structures made out of silicon. An example of the beautiful intricacies of a MEMS gyroscope can be seen below:

MEMS gyroscope picture from www.geekmomprojects.com

#### Cast Away Your Inhibitions and Boogy with Some Crazy Rhythms... It's Time for Filter Algorithms!

Generally speaking, getting the raw data from an IMU is fairly trivial. The real challenge (and why they pay guidance and nav. engineers the big bucks) is figuring out ways of filtering and fusing the data such that they quickly, accurately, and precisely predict the orientation and/or "dead reckoned" position of the craft or device. When dealing with accel and gyro data, two major issues present themselves. The first is that accelerometers are inherently very noisy and will only provide an accurate picture of acceleration after many samples have been averaged over a period of time. The gyroscope, on the other hand, suffers from the opposite problem: at large time scales, the measurement is susceptible to "drift". There's a bunch of different factors that cause this phenomenon but the primary one being that a gyroscope only measures angular rate (d[theta]/dt) and not angular position (theta). When you take the indefinite integral of the rate to get the position, it creates a rogue constant term. That constant creates a bias, and since the bias is time varying, causes the drift.

Well isn't that just a pickle? How can one possibly overcome this limitation? Filter, baby, filter! Several very well known algorithms are used in this field like the complimentary filter, the Kalman Filter / Extended Kalman Filter (EKF), and particularly in hobbyist circles, the Mahony / Madgwick filter. OlliW does a nice comparison of the filter types on his blog and Mouser Electronics has a decent explanation on their website. The A Comparison of Complementary and Kalman Filtering by Walter T. Higgins Jr. (PDF linked below) also presents a very good description of Kalman and complimentary filters and how they differ.

A_comparison_of_complementary_and_kalman_filtering.pdf

With all that said, however, this project won't go into much depth about filtering the raw data... that's your homework for this evening. For this project however, the MPU-6050 provides us a very convenient shortcut. From the datasheet:

"Internal Digital Motion Processing™ (DMP™) engine supports 3D MotionProcessing and gesture recognition algorithms. The MPU-60X0 collects gyroscope and accelerometer data while synchronizing data sampling at a user defined rate. The total dataset obtained by the MPU-60X0 includes 3-Axis gyroscope data, 3- Axis accelerometer data, and temperature data. The MPU’s calculated output to the system processor can also include heading data from a digital 3-axis third party magnetometer."

What does all this gobbledygook mean? It means someone was paid the big bucks to do the hard work for us! The DMP engine filters and combines raw sensor data (even data from an external magnetometer) into a 3D representation and provides a very convenient interface for playing with the data. In addition, Jeff Rowberg's I2Cdev device library includes the algorithms to get that fused and filtered DMP data into useful quantites for navigation and orientation like Euler angles, quaternions, and pitch, roll, and yaw angles in an inertial reference frame, which is what we will be utilizing. Since this project only uses six degrees of freedom, the heading (yaw angle) is mostly just an "estimate." You'll see that it's a bit more prone to inaccuracy and drift in the video at the end. An external magnetometer or a 9-DOF IMU like the MPU-9250 would greatly mitigate that yaw error.

### Hardware

The hardware is pretty straightforward. The MPU-6050 connects to the Arduino's I2C bus through the SDA and SCL pins located just beyond AREF and GND on the top header row. One newer models, SCL and SDA are labeled on the side of the pin header itself. It also uses the external interrupt on Pin 2 in order to specify immediately when the data is ready for processing. The way the I2C network is set up, it requires pull-up resistors between VCC and the bus pins. I used 10K resistors and everything seemed hunky dory. Interestingly, while technically being specified as a 3.3V device in the datasheet, the MPU-6050 is more than happy to tolerate 5V signals and power without blowing up (or even getting damaged). Supply voltage can handle VDD = -0.5V to +6V and logic levels of  -0.5V to VDD + 0.5V. The RGB LED strip only has a single pin controlling the chain of LED's which is connected to Pin 4 in this case.

#### A Fritzing diagram can be seen below:

Here is my actual hardware setup. I just soldered on some extension wire to my light strip to make it a bit easier to keep in place while I jostled my breadboard around.

### Library Installation

After installing Git on your computer, find a nice project directory somewhere and in your terminal or command line type:

git clone --recursive https://github.com/swedishhat/yaaa

This will download the project files as well as the other repositories listed in the "What You Need" section. In order to get the sketch in yaaa/mpu6050-led-ahrs/ to compile, you need to copy the following directories to your "libraries" folder inside of your Arduino sketchbook directory. This can be found through the Arduino IDE by selecting File>Preferences.

• yaaa/tools-and-resources/i2cdevlib/Arduino/MPU6050/

Once this is all taken care of, load up your Arduino IDE, open yaaa/mpu6050-led-ahrs/mpu6050-led-ahrs.ino, upload, and away you go!

### Code

The following code is a quick and dirty visualization of 3D space using a one dimensional light strip and various colors / intensities. A large chunk of the code for this project was lovingly borrowed from the "MPU6050_DMP6 / "Teapot Demo" included in the examples for Jeff Rowberg's I2Cdevlib Arduino library. The demo code was stripped down to it's bare necessities and used to get yaw, pitch, and roll angle information. I then used Adafruit's NeoPixel library to generate colors and intensity values for the pitch and roll quadrants. You can think of it in the context of the image below where roll, pitch, and yaw axes correspond to the X, Y, and Z axes respectively:

Oooh... shiny. But what does it mean!?

As the IMU rotates about the yaw (Z) axis, a white indicator will point to the current heading. At straight and level operation (pitch and roll values are approximately zero) a "Great Circle" can be drawn around the green equator of the sphere, concentric to the line traced by the yaw heading indicator. If the roll (X) or pitch (Y) values go negative over their respective axes, the LED's corresponding to the "nose" and port (left) side will go from green to red while the "tail" and starboard (right) side LED's will go from green to blue. The opposite will happen if the pitch or roll values go positive. That Great Circle can then be visualized as tilting around the sphere, and wherever the circle touches are the colors of the LED's on the strip.

The full code can be found in the project repository on GitHub but my "value added" code snippet can be seen below:

// ================================================================
// ===                NEOPIXEL AHRS ROUTINE                     ===
// ================================================================

// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example in the lbrary folder for more information on possible values.

#define PIXELPIN       4        // Arduino pin connected to strip
#define NUMPIXELS      60       // Total number of RGB LEDs on strip

void update_led_ahrs(float yaw, float pitch, float roll) {
// Note: the YPR values are in DEGREES! not radians

// Clean slate.
pixels.clear();

// Determine the "nose" of the AHRS from yaw angle indication
int yaw_index = int(NUMPIXELS * (180.0 + yaw) / 360.0);

// Light intensity for pitch and roll quadrants
float roll_brightness = 255 * roll / 180.0;
float pitch_brightness = 255 * pitch / 180.0;

// Bread and butter: Counts through a quadrant's worth of NeoPixel indecies
// and determines the appropriate color for all four quadrants. The pitch and
// roll brightness values then scale how red, blue, or green each pixel. This
// emulates in admittedly simplistic fashion a Great Circle around an RGB
// sphere with red at the "South Pole", green at the "Equator", and blue at
// the "North Pole". Green values are inversely proportional to pitch and roll
int i;
for (i = 0; i < (NUMPIXELS / 4); i++){
if (pitch >= 0) {
pixels.setPixelColor((yaw_index - (NUMPIXELS/8) + i) % NUMPIXELS, pixels.Color(pitch_brightness, 255-2*pitch_brightness, 0));
pixels.setPixelColor((yaw_index + (3*NUMPIXELS/8) + i) % NUMPIXELS, pixels.Color(0, 255-2*pitch_brightness, pitch_brightness));
} else {
pixels.setPixelColor((yaw_index - (NUMPIXELS/8) + i) % NUMPIXELS, pixels.Color(0, 255 + 2*pitch_brightness, -1 * pitch_brightness));
pixels.setPixelColor((yaw_index + (3*NUMPIXELS/8) + i) % NUMPIXELS, pixels.Color(-1 * pitch_brightness, 255 + 2*pitch_brightness, 0));
}

if (roll >= 0) {
pixels.setPixelColor((yaw_index - (3*NUMPIXELS/8) + i) % NUMPIXELS, pixels.Color(roll_brightness, 255-roll_brightness, 0));
pixels.setPixelColor((yaw_index + (NUMPIXELS/8) + i) % NUMPIXELS, pixels.Color(0, 255-roll_brightness, roll_brightness));
} else {
pixels.setPixelColor((yaw_index - (3*NUMPIXELS/8) + i) % NUMPIXELS, pixels.Color(0, 255 + 2*roll_brightness, -1 * roll_brightness));
pixels.setPixelColor((yaw_index + (NUMPIXELS/8) + i) % NUMPIXELS, pixels.Color(-1 * roll_brightness, 255 + 2*roll_brightness, 0));
}
}

// Set the "nose indicator" and turn the device on
pixels.setPixelColor(yaw_index, pixels.Color(255,255,255)); // White as can be
pixels.show();
}

### AHRS in Action

Below you can see two videos of the device in action. The first one shows the LED's responding to yaw, pitch, and roll variations. The next one is a fairly dry video of serial data pouring out of the Arduino showing the YPR angles.

### Conclusion

This project isn't going to win any awards for code efficiency or practical AHRS design, but hopefully it serves as a reasonable primer for working with accelerometers and gyroscopes in your projects. This is the first step of implementing a quadcopter autopilot, exercise pedometer, autonomous Mars rover, or pretty much anything else that needs to measure movement in some way. Prices are falling every day for these devices and the barrier to use is falling with them. The field of inertial control systems is massive and there is a whole lot more that just determining your orientation in space. Control moment gyroscopes and reaction wheels can be used for actuation and movement, for example. A really neat application of this is concept is the Cubli robot from ETH Zurich's Institute for Dynamic Systems and Control (video below). It uses a full suite of IMU's and reaction wheels to balance, jump, move, and be all around cool. So now with your newfound IMU knowledge, it's your turn to do something amazing with it.

Give this project a try for yourself! Get the BOM.


text:
The WANALYZER_BUDDY_TEXT structure describes settings applied to a "buddy" text assigned to a graphic item, available on the Waveform Analyzer, through the WaveformAnalyzer.GraphicItemBuddyTextSet method. The current settings of the "buddy" text can be retrieved through the WaveformAnalyzer.GraphicItemBuddyTextParamsGet method and modified through the WaveformAnalyzer.GraphicItemBuddyTextParamsSet method.

For details about the use of the Waveform Analyzer refer to the How to use the Waveform Analyzer section.

For further details about methods of the Waveform Analyzer refer to the WaveformAnalyzer object section.

Visual C++ definition

typedef struct

{

OLE_COLOR

OLE_COLOR

short

short nTranspFactor;

long nAlignment;

short bKeepVisible;

} WANALYZER_BUDDY_TEXT;

This data structure is defined inside the AdjMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Editor\include).

Visual Basic definition

Public Type WANALYZER_BUDDY_TEXT

colorText As OLE_COLOR

colorTextOutline As OLE_COLOR

as Integer

nTranspFactor As Integer

bKeepVisible as Boolean

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

Member

Description

colorText

Text color

colorTextOutline

Text outline color. If this color is set to a value identical to the colorText field, no outline is rendered.

nOutlineWidth

Text outline width in pixels. If this field is set to 0, no outline is rendered.

nTranspFactor

Transparent factor. This value can range from 0 (total opacity) to 255 (total transparency). Values outside of this range will be automatically capped to the nearest valid value.

nAlignment

Alignment respect to the graphic item.

Supported values are the following:

 Mnemonic constant Value Meaning BUDDY_ALIGN_LEFT_TOP 0 Buddy element is left-top aligned BUDDY_ALIGN_CENTER_TOP 1 Buddy element is center-top aligned BUDDY_ALIGN_RIGHT_TOP 2 Buddy element is right-top aligned BUDDY_ALIGN_LEFT_MIDDLE 3 Buddy element is left-middle aligned BUDDY_ALIGN_CENTER_MIDDLE 4 Buddy element is center-middle aligned BUDDY_ALIGN_RIGHT_MIDDLE 5 Buddy element is right-center aligned BUDDY_ALIGN_LEFT_BOTTOM 6 Buddy element is left-bottom aligned BUDDY_ALIGN_CENTER_BOTTOM 7 Buddy element is center-bottom aligned BUDDY_ALIGN_RIGHT_BOTTOM 8 Buddy element is right-bottom aligned

bKeepVisible

Boolean value that specifies if the buddy text is kept visible when reaching the limits of the waveform visible range.

Supported values are the following:

 Mnemonic constant Meaning False The buddy text is not kept visible True The buddy text is kept visible


text:
• Corpus ID: 220495856

# Explaining the data or explaining a model? Shapley values that uncover non-linear dependencies

@article{Fryer2020ExplainingTD,
title={Explaining the data or explaining a model? Shapley values that uncover non-linear dependencies},
author={Daniel Vidali Fryer and Inga Str{\"u}mke and Hien Nguyen},
journal={ArXiv},
year={2020},
volume={abs/2007.06011}
}
• Published 12 July 2020
• Computer Science
• ArXiv
Shapley values have become increasingly popular in the machine learning literature thanks to their attractive axiomatisation, flexibility, and uniqueness in satisfying certain notions of `fairness'. The flexibility arises from the myriad potential forms of the Shapley value \textit{game formulation}. Amongst the consequences of this flexibility is that there are now many types of Shapley values being discussed, with such variety being a source of potential misunderstanding. To the best of our…
5 Citations

## Figures and Tables from this paper

### AggMapNet: enhanced and explainable low-sample omics deep learning with feature-aggregated multi-channel networks

• Computer Science
Nucleic acids research
• 2022
An unsupervised novel feature aggregation tool AggMap was developed to Aggregate and Map omics features into multi-channel 2D spatial-correlated image-like feature maps (Fmaps) based on their intrinsic correlations, exhibiting strong feature reconstruction capabilities on a randomized benchmark dataset, outperforming existing methods.

### Beyond Cuts in Small Signal Scenarios -- Enhanced Sneutrino Detectability Using Machine Learning

• Physics
• 2021
We investigate enhancing the sensitivity of new physics searches at the LHC by machine learning in the case of background dominance and a high degree of overlap between the observables for signal and

### Shapley values for feature selection: The good, the bad, and the axioms

• Economics
IEEE Access
• 2021
This paper calls into question the use of the Shapley value as a feature selection tool, using simple, abstract “toy” counterexamples to illustrate that the axioms may work against the goals of feature selection.

### Towards interpreting ML-based automated malware detection models: a survey

• Computer Science
ArXiv
• 2021
A new taxonomy towards malware detection interpretation method based on the taxonomy summarized by previous researches in the common field is provided, and the first to evaluate the state-of-the-art approaches by interpretation method attributes to generate the final score.

### SARGDV: Efficient identification of groundwater-dependent vegetation using synthetic aperture radar

• Environmental Science
• 2020
Groundwater depletion impacts the sustainability of numerous groundwater-dependent vegetation (GDV) globally, placing significant stress on their capacity to provide environmental and ecological

## References

SHOWING 1-10 OF 31 REFERENCES

### Measuring and testing dependence by correlation of distances

• Computer Science, Mathematics
• 2007
Distance correlation is a new measure of dependence between random vectors that is based on certain Euclidean distances between sample elements rather than sample moments, yet has a compact representation analogous to the classical covariance and correlation.

### A Unified Approach to Interpreting Model Predictions

• Computer Science
NIPS
• 2017
A unified framework for interpreting predictions, SHAP (SHapley Additive exPlanations), which unifies six existing methods and presents new methods that show improved computational performance and/or better consistency with human intuition than previous approaches.

### Algorithmic Transparency via Quantitative Input Influence: Theory and Experiments with Learning Systems

• Computer Science
2016 IEEE Symposium on Security and Privacy (SP)
• 2016
The transparency-privacy tradeoff is explored and it is proved that a number of useful transparency reports can be made differentially private with very little addition of noise.

### Handbook of the Shapley Value

• Economics
• 2019
This is an Accepted Manuscript of a book chapter published by Routledge/CRC Press in Handbook of the Shapley value on December 6, 2019, available online:

### Shapley value confidence intervals for variable selection in regression models

• Economics, Mathematics
• 2020
Multiple linear regression is a commonly used inferential and predictive process, whereby a single response variable is modeled via an affine combination of multiple explanatory covariates. The

### Shapley Value Confidence Intervals for Attributing Variance Explained

• Economics
Frontiers in Applied Mathematics and Statistics
• 2020
The coefficient of determination, the R 2 , is often used to measure the variance explained by an affine combination of multiple explanatory covariates. An attribution of this explanatory

### From local explanations to global understanding with explainable AI for trees

• Computer Science
Nat. Mach. Intell.
• 2020
An explanation method for trees is presented that enables the computation of optimal local explanations for individual predictions, and the authors demonstrate their method on three medical datasets.

### The Explanation Game: Explaining Machine Learning Models with Cooperative Game Theory

• Computer Science
ArXiv
• 2019
This work illustrates how subtle differences in the underlying game formulations of existing methods can cause large differences in attribution for a prediction, and proposes a general framework for generating explanations for ML models, called formulate, approximate, and explain (FAE).


text:
# Find formula for $f$ using Blaschke product

Let $f$ be analytic in $B_1(0)$ and suppose that $|f(z)| < M$ for all $z\in B_1(0)$ and $f^{-1}(0) = \{z_1, \ldots, z_k\}$

a) Show that $|f(z)| < M\cdot B(z)$, where $$B(z)=\prod_{i=1}^n\biggl|\frac{z_i-z}{1-\overline{z_i}z}\biggr|\,.$$

b) If $f(0) = Me^{ia}(z_1z_2\ldots z_n)$ is not zero ; find a formula for $f$.

I solved part (a) using maximum principle; however, when I defined new function $g=f/B$, the function is analytic on the unit disc, so why do we have in the question that $f(z_k)=0$ ? I don't think I've used it here.

Can you please help me with part (b)? I dont know how should I solve it.

Thanks,

-
Do you know any LaTeX? If so, I recommend editing this so that it's more clear. As it is, I'm having a hard time parsing it –  Bey Oct 30 '12 at 22:18
Im so sorry, but I really dont know how to do it. –  Danny Oct 30 '12 at 22:47
Heres the question, but it doesn`t contain part (b) math.stackexchange.com/questions/94122/… –  Danny Oct 30 '12 at 22:58
For (a), the whole point of defining the product $B(z)$ is that it has the same zeroes as $f$, whence $g(z)$ is analytic in $D$. (Also, I have submitted some edits to your post that will be peer-reviewed. If/when they go through, please double-check them to make sure I have no significantly altered what you intended to ask.) –  Bey Oct 30 '12 at 23:05
Thanks Bey for editing. I really appreciate it and thanks for answering my question. But what about part-b? –  Danny Oct 30 '12 at 23:33
show 1 more comment


text:
# A question on proof of Riesz Representation Theorem when p=1

by zzzhhh
Tags: proof, representation, riesz, theorem
 P: 39 This question comes from the proof of Riesz Representation Theorem in Bartle's "The Elements of Integration and Lebesgue Measure", page 90-91, as the image below shows. The equation (8.10) is $$G(f)=\int fgd\mu$$. The definition of $$L^\infty$$ space is as follows: My question is: why the g determined by Radon-Nikodym Theorem is in $$L^\infty$$? I can only prove that it is Lebesgue integrable, that is, belongs to $$L^1$$ space, but the proof mentions no word on why it is in $$L^\infty$$, that is, bounded a.e.. Could you please tell me how to prove this? Thanks!
P: 905
 Quote by zzzhhh I can only prove that it is Lebesgue integrable, that is, belongs to $$L^1$$ space
Suppose g is not a.e. bounded, then for every n we can find An with $0<\mu(A_n)<\infty$ such that for all $x\in A_n$ we have $|g(x)|>n$. Now take
$$f_0:=\frac{1_{A_n}|g|}{g}.$$
$$\|G\|=\sup\frac{|Gf|}{\|f\|}\geq \frac{|Gf_0|}{\|f_0\|}=\frac{1}{\mu(A_n)}\left|\int fg\right|=\frac{1}{\mu(A_n)}\int_{A_n} |g|>n,$$


text:
Lemma 70.18.9. Let $S$ be a scheme. Let $B$ be an algebraic space over $S$. Let $\mathcal{F}$ be a finite type quasi-coherent $\mathcal{O}_ B$-module. Let $Z_ k \subset S$ be the closed subscheme cut out by $\text{Fit}_ k(\mathcal{F})$, see Section 70.5. Let $B' \to B$ be the blowup of $B$ in $Z_ k$ and let $\mathcal{F}'$ be the strict transform of $\mathcal{F}$. Then $\mathcal{F}'$ can locally be generated by $\leq k$ sections.

Proof. Omitted. Follows from the case of schemes (Divisors, Lemma 31.35.1) by étale localization (Lemma 70.18.2). $\square$

There are also:

• 2 comment(s) on Section 70.18: Strict transform

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).