text:
Open access peer-reviewed chapter

# Achievable Energy Efficiency and Spectral Efficiency of Large‐ Scale Distributed Antenna Systems

By Wei Feng, Ning Ge and Jianhua Lu

Submitted: April 19th 2016Reviewed: September 28th 2016Published: December 14th 2016

DOI: 10.5772/66049

## Abstract

In the large‐scale distributed antenna system (LS‐DAS), a large number of antenna elements are densely deployed in a distributed way over the coverage area, and all the signals are gathered at the cloud processor (CP) via dedicated fiber links for globally joint processing. Intuitively, the LS‐DAS can inherit the advantage of both large‐scale multiple‐input‐multiple‐output (MIMO) and network densification; thus, it offers enormous gains in terms of both energy efficiency (EE) and spectral efficiency (SE). However, as the number of distributed antenna elements (DAEs) increases, the overhead for acquiring the channel state information (CSI) will increase accordingly. Without perfect CSI at the CP, which is the majority situation in practical applications due to limited overhead, the claimed gain of LS‐DAS cannot be achieved. To solve this problem, this chapter considers a more practical case with only the long‐term CSI including the path loss and shadowing known at the CP. As the long‐term channel fading usually varies much more slowly than the short‐term part, the system overhead can be easily controlled under this framework. Then, the EE‐oriented and SE‐oriented power allocation problems are formulated and solved by fractional programming (FP) and geometric programming (GP) theories, respectively. It is observed that the performance gain with only long‐term CSI is still noticeable and, more importantly, it can be achieved with a practical system cost.

### Keywords

• large‐scale distributed antenna system (LS‐DAS)
• energy efficiency (EE)
• spectral efficiency (SE)
• long‐term channel state information (CSI)
• fractional programming (FP)
• geometric programming (GP)

## 1. Introduction

The large‐scale distributed antenna system (LS‐DAS) is a promising candidate technology for the future 5G wireless network. In a LS‐DAS, as shown in Figure 1, a large number of distributed antenna elements (DAEs) are densely scattered over the coverage area, and the signals from/to all the DAEs are gathered via dedicated fiber links, at the cloud processor (CP), where the globally joint processing is performed [1, 2]. On one hand, the LS‐DAS can be regarded as a special large‐scale multiple‐input‐multiple‐output (MIMO) system, as shown in Figure 2, with distributed deployment of antenna elements. On the other hand, it can be regarded as a special heterogeneous small‐cell network, as shown in Figure 3, with global intercell coordination. As a consequence, the LS‐DAS can inherit the advantage of both large‐scale MIMO and network densification. Notably, existing studies have already shown that it can offer enormous gains in terms of both energy efficiency (EE) [3, 4] and spectral efficiency (SE) [5, 6].

Due to the distributed deployment of antenna elements, the average access distance of all the mobile terminals (MTs) is reduced. Moreover, due to the global coordination among all the DAEs, the multiplexing gain and diversity gain offered by multiple antenna elements can be obtained [79]. These are the main reasons for high EE and SE offered by a LS‐DAS. However, to exploit the benefit of LS‐DASs, the channel state information (CSI) is crucially required at the CP [10, 11]. Without perfect CSI, the interference among different DAEs will become intractable, and accordingly the system performance will be severely degraded.

In practical applications, the acquisition of full CSI would require an overwhelming amount of system overhead, including the training symbols for channel estimation, the system backhaul for CSI exchanging, and so on. Due to this point, in the literature, some researchers have shown that the system cost of CSI is quite an important issue for evaluating and designing multi‐antenna systems. For example, in [12], it has been proved that the optimal number of transmit antennas is equal to the channel coherence interval (CCI). Thus, it will become useless to utilize more antennas than CCI under given channel dynamics. The authors of [13] particularly focused on the cost of CSI for network MIMO systems; they have shown that the optimal number of base stations that can be coordinated exists, which is mainly determined by the CCI in both time and frequency domains. Particularly, for the massive MIMO in frequency division duplex (FDD) mode, it is also very challenging to acquire full CSI at the base station side. In [14], a one‐bit feedback scheme was proposed by using a set of predefined precoding vectors. The scheme only performs well in some specific cases, e.g., the multi‐antenna channel following one‐ring model.

In this chapter, we try to liberate the implementation of LS‐DAS from the acquisition of full CSI. We note that the channel of a LS‐DAS usually consists of path loss, shadowing, and Rayleigh fading [79]. Compared with Rayleigh fading, path loss and shadowing vary much more slowly and can be estimated in a much longer interval than CCI. Thus, it requires a controllable system overhead. In some of the existing studies, path loss and shadowing are classified as large‐scale CSI [4, 6]. To distinguish from the largescale in LS‐DAS, for clarity, we here use long‐term CSI to identify path loss and shadowing. With the knowledge of long‐term CSI, the achievable EE and SE will be particularly investigated in the sequel. Different from the reported EE and SE with perfect CSI assumption, which actually cannot be achieved in most practice, our results can be approached with a limited system cost; thus, it is of great significance for the realistic implementation of LS‐DASs.

In order to control the computational complexity at the CP, we first divide the whole system into a number of virtual cells (VCs) [5, 15]. As shown in Figure 4, the VC is established in a user‐centric manner, i.e., each MT chooses only a subset of the surround DAEs for its data transmission. Then, each MT is served by its own VC under the interference from other VCs. To control the interference, the signals of all the VCs are designed in a coordinated fashion at the CP while maximizing the EE or SE of the system. Given VCs, the EE‐oriented and the SE‐oriented power allocation problems are formulated based on long‐term CSI only, both of which are non‐convex problems, and thus are difficult to solve. By adopting the fractional programming (FP) theory and the geometric programming (GP) theory, we propose two iterative power allocation algorithms. These algorithms can derive the locally optimal EE and SE of the system, respectively. It is further observed from the simulation results that the performance gain with only long‐term CSI is still remarkable, while it can be achieved with a practical system cost.

The rest of this chapter is organized as follows. The system model of a multiuser LS‐DAS is described in Section 2. In the subsequent Sections 3 and 4, the achievable EE and SE are discussed, respectively. Then, we show the simulation results to verify the superiority of the proposed schemes in Section 5. Finally, the conclusion of this chapter is drawn in Section 6.

Notations: Indenotes an identity matrix with a dimension of n, and Ois a zero matrix. (.)Hrepresents the conjugate transpose operation. M×Ndenotes the set of complex M×Nmatrices, and CNrepresents a complex Gaussian distribution. E(.)represents the expectation operator, and tr()represents the trace operator.

## 2. System Model

We consider a LS‐DAS with KMTs. Without loss of generality, all the VCs consist of NDAEs, and the number of antenna elements equipped at each MT is M.

For MT k, the received signal is

y(k)=H(k)x(k)+i=1,ikKH(k,i)x(i)+n(k),E1

where H(k)M×N,k=1,2,…,K,represents the channel between the DAEs in VC kand MT k, H(k,i)M×N,k=1,2,…,K,i=1,2,…,K,denotes the channel between the DAEs in VC iand MT k, x(i)N×1,i=1,2,…,K, is the transmitted signal vector for MT i, and n(k)M×1,k=1,2,…,K, denotes the additive white Gaussian noise with distribution CN(0,σ2IM).

E[x(k)x(k)H]=P(k)=[p1(k)pN(k)],k=1,…,K.E2

Assuming a total transmit power constraint Pmax(k)for MT k, we set

n=1Npn(k)Pmax(k).E3

The channel matrix can be modeled as

H(k,i)=S(k,i)L(k,i),E4

where S(k,i)and L(k,i)reflect the short‐term fading and the long‐term fading, respectively. Particularly, the entries of S(k,i)are all independent and identically distributed (i.i.d.) circular symmetric complex Gaussian variables following CN(0,1)distribution.

L(k,i)=[l1(k,i)lN(k,i)],E5

with

ln(k,i)=(Dn(k,i))γSn(k,i),n=1,2,…,N,E6

where Dn(k,i)is the transmission distance between the DAE nin VC iand MT k, and γis the path loss exponent, and Sn(k,i)represents the shadow fading caused by large objects such as tall buildings or walls.

## 3. Achievable Ee

Given perfect CSI, the authors of [16] have proposed an energy‐efficient power allocation scheme for traditional DASs. In [17], further taking the inter‐VC interference into consideration, an iterative power allocation scheme was presented to improve the EE of a LS‐DAS, via applying the successive Taylor expansion method. In contrast, we investigate the achievable EE with the long‐term CSI only in this section.

First of all, the sum rate of the system can be derived according to Eq. (1) as

R=k=1Klog2det(IM+H(k)P(k)H(k)Hσk2),E7

where

σk2=i=1,ikKn=1N[ln(k,i)]2pn(i)+σ2,E8

is the total interference‐plus‐noise power at MT k.

When only the long‐term CSI is known, the average sum rate can be calculated via taking expectation over the short‐term channel fading Ω={S(k)|k=1,,K}as

R¯=k=1KEΩ[log2det(IM+H(k)P(k)H(k)Hσk2)].E9

Then, the EE of the system, denoted as η, can be derived as

η=R¯ρk=1Kn=1Npn(k)+Pc,E10

where

ρ=εγ,E11

with εand γdenoting the peak‐to‐average power ratio and the power amplifier efficiency, respectively, and Pcdenotes the circuit power consumption [4].

In order to investigate the achievable EE under this framework, we formulate the following optimization problem:

maxηE12a
s.t.n=1Npn(k)Pmax(k),E12b
pn(k)0,k=1,,K,n=1,,N.E12c

Because of the non‐convexity of R¯, the problem shown in Eq. (12) is a complicated non‐convex problem [18]. To simplify it, we introduce an upper bound to the objective function as

η^=k=1Klog2det(IN+MP(k)(L(k))2σk2)ρk=1Kn=1Npn(k)+Pc,E13

the numerator of which is an upper bound to R¯[10]. Accordingly, the problem in Eq. (12) can be reformulated as

maxη^E14a
s.t.n=1Npn(k)Pmax(k),E14b
pn(k)0,k=1,,K,n=1,,N.E14c

which is simpler than Eq. (12). However, it is still non‐convex [18]. To further solve the problem in Eq. (14), we express

η^=f1f2ρk=1Kn=1Npn(k)+Pc,E15

where

f1=k=1Klog2det(σk2IN+MP(k)L(k)2),E16a
f2=k=1KNlog2(σk2),E16b

both of which are clearly concave functions.

We find that if the numerator of η^, i.e., f1f2, can be transformed into a concave form, the problem in Eq. (14) can be recast as a quasi‐concave fractional programming problem, further considering the linearity of its denominator [19]. Toward this end, we linearize f2by applying the first‐order Taylor expansion at a given point P¯as

f˜2(P|P¯)=k=1KNlog2(σk2(P¯))+log2(e)k=1KNσk2(P¯)tr(Gk[PP¯]),E17

where P={P(1),,P(k)}and

Gk=diag{G(k,1),,G(k,K)},E18a
G(k,i)=(L(k,i))2,ki,k,i=1,,K,E18b
G(k,k)=O.E18c

By substituting f˜2(P|P¯)for f2(P), the problem in Eq. (14) can be approximated as

maxη¯=f1(P)f˜2(P|P)ρk=1Kn=1Npn(k)+PcE19a
s.t.n=1Npn(k)Pmax(k),E19b
pn(k)0,k=1,,K,n=1,,N,E19c

whose objective function is fortunately fractional with concave numerator and convex denominator [18]. Adopting the FP theory, the problem in Eq. (19) can be optimally solved in an iterative way. In our previous paper [4], we have shown in detail how to solve the problem in Eq. (19). In the following, for brevity, we just present the basic idea and procedure of the iterative algorithm.

We use t1and s1to denote the successive Taylor expansion iteration step and the FP iteration step, respectively. After introducing a positive variable ω, the following concave optimization problem can be formulated

maxv(P|Pt1,s1,ω)E20a
s.t.n=1Npn(k)Pmax(k),E20b
pn(k)0,k=1,,K,n=1,,N,E20c

where

v(P|Pt1,s1,ω)=f1(P)f˜2(P|Pt1,s1)ωρk=1Kn=1Npn(k)ωPc.E21

Further define

V(ω)=maxv(P|Pt1,s1,ω),E22

Algorithm 1 Iterative power allocation for maximizing EE.

1. Initialization: P0=diag{P0(1),,P0(K)}with P0(k)=Pmax(k)NIN, k=1,…,K, P0,0(k)=P0(k), k=1,…,K, ω=0, and ξ=1×103, δ=1×103, t=1,s=1;

2. Solve Eq. (20), and denote the obtained power matrix by P0,1(k), k=1,…,K, set P1(k)=P0,1(k), k=1,…,K, and P1=diag{P1(1),,P1(K)};

3. while |η^(Pt)η^(Pt1)|/η^(Pt1)>ξdo

4. t=t+1, s=1, and ω=0;

5. Pt1,0(k)=Pt1(k), k=1,…,K;

6. Solve Eq. (20), derived V(ω)and denote the obtained power matrix by Pt1,1(k), k=1,…,K;

7. while V(ω)>δdo

8. ω=η¯(Pt1,s(k)|Pt1(k));

9. s=s+1;

10. Solve Eq. (20), derived V(ω)and denote the obtained power matrix by Pt1,s(k), k=1,…,K;

11. end while

12. Pt(k)=Pt1,s(k), k=1,…,K, and Pt=diag{Pt(1),,Pt(K)};

13. end while

14. Output: Pt.

we can propose an iterative power allocation algorithm for maximizing EE, as described in Algorithm 1. By adopting Algorithm 1, the achievable EE with long‐term CSI only can be derived with low computational complexity [4].

## 4. Achievable Se

For traditional single‐cell DASs, the achievable SE was studied in [20, 21], which by considering the general DAS with random antenna layout has identified that DAS outperforms colocated multi‐antenna systems. In [22], the authors have taken the inter‐cell interference into consideration, and they have presented a close‐form expression for the achievable EE in a multi‐cell environment. However, this work has not considered interference coordination. The authors of [23] took a step further; they have put forward a coordinated power allocation scheme for dealing with the inter‐cell interference. Nevertheless, the result was derived by approximately treating the inter‐cell interference as Gaussian noise, and thus it is only applicable to the low signal‐to‐noise‐ratio (SNR) situation. In a recent work, the SE of single‐cell multiuser LS‐DAS was studied [24]. It however also has not considered interference coordination, which is in general inevitable in most practical applications. Different from all the above existing studies, in this section, we investigate the achievable SE of a LS‐DAS with long‐term CSI only.

With the target of average system sum rate maximization, the problem of SE‐oriented power allocation can be formulated as

maxR¯E23a
s.t.n=1Npn(k)Pmax(k),E23b
pn(k)0,k=1,…,K,n=1,…,N.E23c

As R¯is non‐convex, this problem is complicatedly non‐convex [18]. Besides, the objective function is actually in an integral form as a result of the expectation operator in R¯, and it cannot be directly expressed in a compact closed form, which renders it even more challenging to obtain the optimal solution of Eq. (23).

We try to simplify the formulated problem. To this end, a closed‐form approximation for the average system sum rate R¯is leveraged as

R¯ap=k=1Kn=1Nlog2(1+[ln(k)]2pn(k)ϒk1Mσk2)+Mk=1Klog2(ϒk)Mk=1Klog2e(1ϒk1),E24

where ϒksatisfies

ϒk=1+n=1N[ln(k)]2pn(k)σk2+[ln(k)]2pn(k)ϒk1M,k=1,..,K.E25

This approximation can be derived through using the random matrix theory [10], and the introduced parameter ϒkcan be calculated in an iterative way as shown in the following Algorithm 2.

According to the existing studies [10], R¯apis quite a precise approximation for R¯. Therefore, we directly use it as the objective function, and the joint power allocation problem can be recast as

maxR¯apE26a
s.t.n=1Npn(k)Pmax(k),E26b
pn(k)0,k=1,…,K,n=1,…,N,E26c

which is much simplified. However, due to the non‐convexity of R¯ap[18], the new problem in Eq. (26) is still non‐convex. In the following, we explore the achievable SE of the system by contriving an iterative algorithm, which can find a locally optimal solution of Eq. (26) efficiently.

To eliminate the effect of the introduced parameters ϒ1, ϒ2, , ϒK, we first fix ϒ1, ϒ2, , ϒKas constants. Then we can equivalently simplify the objective function in Eq. (26) as

R¯ap'=k=1Kn=1Nlog2(1+[ln(k)]2pn(k)ϒk1Mσk2).E27

As log2()is monotonically increasing, the problem shown in Eq. (26) can be equivalently transformed into

mink=1Kn=1Nσk2σk2+[ln(k)]2pn(k)ϒk1ME28a
s.t.n=1Npn(k)Pmax(k),E28b
pn(k)0,k=1,…,K,n=1,…,N.E28c

Define

fn,k(P)=σk2(P)+[ln(k)]2pn(k)ϒk1M=i=1,ikKj=1Ngj(k,i)(P)+gn(k)(P)+σ2,n=1,…,N,k=1,…,K,E29

where

gj(k,i)(P)=[lj(k,i)]2pj(i),ki,E30
gn(k)(P)=[ln(k)]2pn(k)ϒk1M,E31

and then, given a feasible point P¯, an approximation of fn,k(P)can be obtained as

f˜n,k(P|P¯)=(i=1,ikKj=1N(gj(k,i)(P)αn,j(k,i))αn,j(k,i))×(gn(k)(P)αn,n(k))αn,n(k)×(σ2αn,k0)αn,k0,E32

where

αn,j(k,i)=gj(k,i)(P¯)/fn,k(P¯),E33
αn,n(k)=gn(k)(P)/fn,k(P¯),E34
αn,k0=σ2/fn,k(P¯).E35

By using the inequality of arithmetic and geometric means, it is easy to obtain that

fn,k(P)f˜n,k(P|P¯).E36

The equality holds if and only if

P=P¯.E37

By replacing fn,k(P)with f˜n,k(P|P¯), the problem in Eq. (28) can be recast as

mink=1Kn=1Nσk2f˜n,k(P)E38a
s.t.n=1Npn(k)Pmax(k),E38b
pn(k)0,k=1,…,K,n=1,…,N,E38c

which is a good approximation for the original problem in the neighborhood of P¯. More importantly, it is a standard GP problem [25]; thus, it can be efficiently solved via convex optimization tools, e.g., the interior point algorithm [18].

We use t1and s1to denote the updating iteration step of ϒkand the arithmetic‐to‐geometric approximation iteration step, respectively. Then the following convex optimization problem is derived

mink=1Kn=1Nσk2f˜n,k(P|Ps1,ϒkt)E39a
s.t.n=1Npn(k)Pmax(k),E39b
pn(k)0,k=1,…,K,n=1,…,N.E39c

Accordingly, we propose an iterative power allocation algorithm for maximizing SE as described in Algorithm 2. In the algorithm, ϒk,k=1,…,Kand Pare updated in an alternate way. By adopting the algorithm, the achievable SE with long‐term CSI only can be derived with low computational complexity [6].

## 5. Simulation Results

In this section, we illustrate the EE and SE performance of the proposed schemes by simulations. To be general, we consider a circular coverage area with a radius of 500 m. There are 20 DAEs randomly deployed in the coverage area with a two‐dimension uniform distribution. The number of MTs is set as K=3. The number of antenna elements equipped at each MT is set as M=3. In order to fully exploit the spatial degree of freedom of each MT and, in the meantime, well control the system complexity, we set the size of each VC as N=M=3. As for the channel parameters, we set γ=4(path loss exponent), σ2=107dBm (noise power), and the shadowing standard deviation is 8 dB. Without loss of generality, we consider the same transmit power constraint for all MTs, i.e., Pmax(1)=Pmax(2)=Pmax(3). Particularly, 100 randomly selected system topologies are considered in the simulation, and the averaged results are shown in the following.

First, the achievable EE of different schemes is compared in Figure 5. Both the scheme presented in reference [16] and the simplest equal power allocation scheme are considered. It can be seen from Figure 5 that the proposed scheme outperforms the other ones, especially when the transmit power constraint goes larger. The scheme proposed in [16] has not considered interference coordination; thus, in a multi‐VC setting, its performance is worse than the proposed scheme, although it has assumed the perfect CSI as the CP. In contrast, although using the long‐term CSI only, the proposed scheme can still offer the highest EE performance. We can also observe from Figure 5 that the key point for high EE is to set proper transmit power, i.e., when the transmit power has reached a corresponding point, it should no longer be increased even though the power consumption constraint goes larger. Intuitively, this observation can be explained by the fact that when the transmit power goes larger, the sum rate gain will become smaller and smaller due to the impact of interference; thus, the EE of the scheme will fall instead of rising.

Algorithm 2 Iterative power allocation for maximizing SE.

1. Initialization: Set P0={[p1(1)]0,[p2(1)]0,…,[pN(K)]0}, where [pn(k)]0=Pmax(k)N, k=1,…,K, n=1,…,N, and ε=1×104, δ=1×103, s=1;

2. for k=1to Kdo

3. t=1;

4. ϒk0=1;

5. ϒk1=1+n=1N[ln(k)]2[pn(k)]0σk2(P0)+[ln(k)]2[pn(k)]0[ϒk0]1M;

6. while |ϒktϒkt1|>εdo

7. t=t+1;

8. ϒkt=1+n=1N[ln(k)]2[pn(k)]0σk2(P0)+[ln(k)]2[pn(k)]0[ϒkt1]1M;

9. end while

10. Output ϒk'=ϒkt,k=1,…,K.

11. end for

12. Solve Eq. (39) with ϒk=ϒk',k=1,…,K, and denote the obtained power matrix by P1;

13. while |R¯ap(Ps)R¯ap(Ps1)|/R¯ap(Ps1)>δdo

14. for k=1to Kdo

15. t=1;

16. ϒk0=1;

17. ϒk1=1+n=1N[ln(k)]2[pn(k)]sσk2(Ps)+[ln(k)]2[pn(k)]s[ϒk0]1M;

18. while |ϒktϒkt1|>ϵdo

19. t=t+1;

20. ϒkt=1+n=1N[ln(k)]2[pn(k)]sσk2(Ps)+[ln(k)]2[pn(k)]s[ϒkt1]1M;

21. end while

22. Output ϒk'=ϒkt,k=1,…,K.

23. end for

24. s=s+1;

25. Solve Eq. (39) with ϒk=ϒk',k=1,…,K, and denote the obtained power matrix by26: Ps;

26. end while

27. Output: Ps.

Then, we evaluate the performance of the proposed scheme in terms of achievable SE. The scheme presented in reference [23] and equal power allocation scheme are taken into comparison. The results are shown in Figure 6. We can find that the proposed scheme performs the best among the three schemes. The scheme presented in [23] is only applicable to the low SNR condition; thus, the performance gas between it and the proposed scheme goes larger when the transmit power constraint increases, which implies that the impact of inter‐VC interference becomes bigger. The results identify that it is still effective for enhancing the SE of the system when only the long‐term CSI is available.

According to the discussion in [4, 6], the proposed Algorithms 1 and 2 are assured to converge to a local optimum. The histogram of the number of iteration steps is illustrated in Figures 7 and 8, for Algorithms 1 and 2, respectively. We can observe from the figures that 15 iteration steps are enough for the convergence of Algorithm 1 and that for Algorithm 2 is 11.

## 6. Conclusions

The LS‐DAS is a promising candidate technology for the future 5G wireless network, due to its remarkable gains in terms of both EE and SE. In this chapter, we try to liberate the implementation of LS‐DAS from the acquisition of full CSI. With the knowledge of long‐term CSI, including the path loss and shadow fading, the achievable EE and SE have been investigated. Different from the reported EE and SE with perfect CSI condition, which actually cannot be achieved in most practice, our results can be achieved with a limited system cost; thus, it is of great significance for the realistic implementation of LS‐DASs. We also use the concept of VC to control the computational complexity at the CP. Accordingly, we design the transmit power of all the VCs in a coordinated fashion, to control the interference and finally maximize EE or SE of the system. Particularly, the EE‐oriented and the SE‐oriented power allocation problems are formulated based on long‐term CSI only, both of which are non‐convex problems, and thus are difficult to solve. By adopting the FP theory and the GP theory, we propose two iterative power allocation algorithms. These algorithms can derive the locally optimal EE and SE of the system, respectively. It is further observed from the simulation results that the performance gain with only long‐term CSI is still remarkable, while it can be achieved with a practical system overhead.

## Acknowledgments

This work was supported in part by the National Science Foundation of China for Young Scholars under grant no. 61201186 and the National Basic Research Program of China under grant no. 2013CB329001 and the National Science Foundation of China under grant no. 61132002.

## How to cite and reference

### Cite this chapter Copy to clipboard

Wei Feng, Ning Ge and Jianhua Lu (December 14th 2016). Achievable Energy Efficiency and Spectral Efficiency of Large‐ Scale Distributed Antenna Systems, Towards 5G Wireless Networks - A Physical Layer Perspective, Hossein Khaleghi Bizaki, IntechOpen, DOI: 10.5772/66049. Available from:

### Related Content

Next chapter

#### Energy Efficiency for 5G Multi-Tier Cellular Networks

By Md. Hashem Ali Khan and Moon Ho Lee

First chapter

#### Advanced MIMO Techniques: Polarization Diversity and Antenna Selection

By Kosai Raoof, Maha Ben Zid, Nuttapol Prayongpun and Ammar Bouallegue

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

View all books


text:
The semiclassical limit of a weakly coupled nonlinear focusing Schrodinger system in presence of a nonconstant potential is studied. The initial data is of the form $(u_{1},u_{2})$ with $u_{i}=r_{i}\big( \frac{x-\tilde x}{\vep}\big)e^{\frac{{\rm i}}{\vep} x\cdot \tilde{\xi}}$, where $(r_{1},r_{2})$ is a real ground state solution, belonging to a suitable class, of an associated autonomous elliptic system. For $\vep$ sufficiently small, the solution $(\phi_{1},\phi_{2})$ will been shown to have, locally in time, the form $(r_{1}\big(\frac{x- x(t)}{\vep}\big) e^{\frac{{\rm i}}{\vep} x\cdot {\xi}(t)},r_{2}\big(\frac{x- x(t)}{\vep}\big) e^{\frac{{\rm i}}{\vep} x\cdot {\xi}(t)})$, where $(x(t),\xi(t))$ is the solution of the Hamiltonian system $\dot x(t)=\xi(t)$, $\dot \xi(t)=-\nabla V(x(t))$ with $x(0)=\tilde{x}$ and $\xi(0)=\tilde{\xi}$.

### Soliton dynamics for CNLS systems with potentials

#### Abstract

The semiclassical limit of a weakly coupled nonlinear focusing Schrodinger system in presence of a nonconstant potential is studied. The initial data is of the form $(u_{1},u_{2})$ with $u_{i}=r_{i}\big( \frac{x-\tilde x}{\vep}\big)e^{\frac{{\rm i}}{\vep} x\cdot \tilde{\xi}}$, where $(r_{1},r_{2})$ is a real ground state solution, belonging to a suitable class, of an associated autonomous elliptic system. For $\vep$ sufficiently small, the solution $(\phi_{1},\phi_{2})$ will been shown to have, locally in time, the form $(r_{1}\big(\frac{x- x(t)}{\vep}\big) e^{\frac{{\rm i}}{\vep} x\cdot {\xi}(t)},r_{2}\big(\frac{x- x(t)}{\vep}\big) e^{\frac{{\rm i}}{\vep} x\cdot {\xi}(t)})$, where $(x(t),\xi(t))$ is the solution of the Hamiltonian system $\dot x(t)=\xi(t)$, $\dot \xi(t)=-\nabla V(x(t))$ with $x(0)=\tilde{x}$ and $\xi(0)=\tilde{\xi}$.
##### Scheda breve Scheda completa Scheda completa (DC)
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: http://hdl.handle.net/11367/20506
• ND
• 12
• 10

format: plain


text:
# Decomposition of real number into elements of null measure sets

Are there sets A and B such that any $x \in \mathbb{R}$ can be decomposed as $x = a+b$, $a \in A$ and $b \in B$, where the Lebesgue measure of $A$ and of $B$ is null.

There is an indication that this should follow from the fact that $C_q = \{z \in[0,1]; z_i\in\{0,2,\cdots,q-1\}\}$ has null measure for every $q \in \mathbb{N}$, where $z_i$ are the numbers in the q-adic expansion of $z$, that is $$z=\sum_{i=1}^{\infty}\frac{z_i}{q^i}$$

• This was asked recently on this site. Anyway, let $A=\bigcup_{n\in\mathbb Z}(C+2n)$ and $B=C$, where $C$ is the Cantor set, and use that $C+C=[0,2]$. Aug 31, 2017 at 15:09
• I finally found the question I had in mind. It is not the same, but one of the answers addresses your question. See here. Aug 31, 2017 at 16:43

Yes. The following example was given here by Davide Giraudo.

If $A$ is the set of real numbers such that in their proper binary expansion, the even terms are $0$, and $B$ the same with odd numbers, then $A$ and $B$ have measure $0$ but their sum is the whole real line

• I do not understand the definition of sets $A$ and $B$. Can you give an example? Aug 31, 2017 at 13:15
• Can you give an indication of the proof of this fact? Aug 31, 2017 at 13:38
• For $n>0$ let $D(2n)$ be the set of finite binary sequences of length $2n.$ For $z\in \mathbb Z$ and $d\in D(n)$ let $R(z,d)$ be the set of $x\in [z,z+1)$ that have $d$ as their first $2n$ binary digits to the right of the decimal point. For distinct $d,d'\in D(2n)$ the sets $R(z,d'),R(z,d')$ are disjoint and each is a translate of the other so each has measure $4^{-n}.$ CONTINUED IN NEXT COMMENT. Aug 31, 2017 at 17:27
• CONTINUED. Let $E(2n)$ be the set of members of $D(2n)$ with $0$ in all even places. $E(2n)$ has $2^n$ members. Now $A\cap [z,z+1))\subset \cup_{d\in E(2n)}R(z,d)$ and the measure $m(\cup_{d\in E(2n)}R(z,d))=2^n4^{-n}=2^{-n}.$ So $m(A\cap [z,z+1)\leq 2^{-n}$ for all $n\in \mathbb N.$ Aug 31, 2017 at 17:35
• Intuitively the probability that a sequence of $2n$ coin-tosses will come up heads on every even-numbered toss is $2^{-n}$ so the probability that any $x\in [z,z+1)$ belongs to A should be less than $2^{-n}$ for all $n.$..... I am taking $A$ as those reals that have $0$ in every even binary digit to the right of the decimal point. Aug 31, 2017 at 17:40

Consider the classical cantor set $C$, then $$C-C = \{x-y\mid x,y\in C\} = [-1,1]$$

• Sure, this is very easy to see. But I want it to form the Real Line, not the unitary interval. Aug 31, 2017 at 13:39
• @FranciscoMaion You can extend $C$ to all of $\mathbb{R}$ by making it periodic with period 1. Then after extension, $C-C = \mathbb{R}$. Aug 31, 2017 at 15:53


text:
# Does the parameter change during data generation in Bayesian Inference?

Let's assume that we have the following graphical model:

This graph encodes the joint distribution $P(p,x_1,x_2,x_3,x_4) = P(p)\prod_{i=1}^{4}P(x_i|p)$. In the Bayesian inference, if we know $x_1,x_2,x_3$ then a full Bayesian predictive posterior for $x_4$ is given as:

$$P(x_4|x_3,x_2,x_1) = \int_{p}P(x_4|p)P(p|x_3,x_2,x_1)dp$$

I used to interpret a model like in the above as follows: Some probabilistic system picks a $p$ from $P(p)$. Then this picked $p$ generates data as $x_1\sim P(x_1|p),x_2\sim P(x_2|p),x_3\sim P(x_3|p)$. We do not know the true value of $p$ and therefore we integrate over all possible values of $p$ using its posterior distribution given the data in order to obtain the posterior predictive distribution of $x_4$.

In this interpretation, the value of $p$ stays the same once it is picked from the prior, during the data generation. But our lack of knowledge about it leads us to integrate over its all possible values in order to infer $x_4$. This can be considered as a generative model.

My question is, is my interpretation correct here? I am asking this, because I have seen some sources on web which imply that $p$ changes during generating $x_i$s. If it were that way, shouldn't each of these different values be named as different random variables like $p_1$ for $x_1$, $p_2$ for $x_2$, etc. ?

This has greatly confused me. I appreciate any comments.

• Just to clarify - is $P(p)$ your prior? Or are you assuming there is a true data generating process for $p$ with associated distribution? Aug 19, 2014 at 17:01
• Yes, it is just the prior distribution for the parameter $p$. Aug 19, 2014 at 17:12
• If you'd like to share the sources that led to confusion, I'll take a look and see if I might be able to address more in my answer. Aug 19, 2014 at 21:03
• Thanks for the great answer. The primary source which led me to confusion is the presentation at: stat.ufl.edu/archived/casella/Talks/BayesRefresher.pdf Here, an example is given for Bayesian inference. In pages 6 and 8, if I understood correctly, three different protocols have been applied for a case of toxification. For each protocol, different studies have been conducted: In each study $j$, there is the total number of toxicity incidences, $n_j$, and the number of incidences which is determined to be linked to something called as "AAN", which is $X_j$. Aug 19, 2014 at 21:11
• Quite welcome! Sorry to say I share your confusion and can't help further. I think he might intend that $p_i$ is drawn from a different distribution for each cohort $j$. Meaning, each cohort might be analogous to a mint from which studies, or coins, are drawn. (I expect it would all be very clear if we heard the talk the slides are meant to support.) You might have some luck if you check and see if there are any code samples to support the book the slides mention. Model descriptions can be ambiguous; code cannot. Hope this helps! Aug 20, 2014 at 0:33

I believe your interpretation is correct. (Though without knowing the context the author intended for the graphic, I suppose anything is possible.) Likewise, your point about adding subscripts to $p$ seems right: if the model assumes different parameters drawn from some distribution, then those values would generally appear with subscripts. I'm not sure this is a strict convention, but it's used in practice, and arguably clearer. See for example formula (3) in the latent Dirichlet allocation paper, p. 996.
A specific example might help illustrate the difference. See p. 3 of this tutorial based on a chapter from Doing Bayesian Data Analysis. In short, it imagines a group of coins produced by the same mint, and theorizes that each coin from the same mint has a $p_i$ drawn from a beta distribution specific to the mint; each flip of a coin is assumed Bernoulli generated using that coin's $p_i$. Put more simply, it assumes variation in the probabilities of coins produced by a mint, and models that variation by way of the hierarchy.
That's the sort of model described by your second interpretation. In your first interpretation, there's only one coin, and $x_4$ could represent the next, unseen flip.


text:
Curious Cheetah

# Double u Substitution: ∫tan³θ dθ

## Introduction

$$u$$ substitution is an important technique in integration. In the problem explored in this article, we look at a moderately advanced example in which $$u$$ substitution is performed twice; it also involves trigonometric and logarithmic functions, as well as several other key issues in integration.

## Problem

$\tag{1}\int \tan^3\theta\,d\theta$

## Background Information

In order to complete this problem, we need two related pieces of information: \begin{align} \tag{2a} d(\tan \theta) = \frac{1}{\cos^2 \theta}\,d\theta \\ \tag{2b} \cos^2 \theta = \frac{1}{1+\tan^2 \theta} \end{align}
Note that (2a) is a rephrasing of the standard formula $$d(\tan \theta) = \sec^2 \theta\,d\theta$$. The calculus texts with which Iʼm familiar tend to simply present that and the formulae for $$d(\cot \theta)$$, $$d(\sec \theta)$$, $$d(\csc \theta)$$ as formulae to memorize. However, itʼs important that students do actually work these out; indeed, the derivatives of all six of the main trigonometric functions are based on the simple pair: $$d(\sin \theta) = \cos \theta\,d\theta; d(\cos \theta) = -\sin \theta\,d\theta$$. Memorize that pair, and everything else can be generated as needed.
In this case, we need $$d(\tan \theta)$$. This is derived as follows:
\begin{align} \tag{3a} d(\tan \theta) &= d\left(\frac{\sin \theta}{\cos \theta}\right)\\ \tag{3b} &= \frac{\cos \theta\cdot d(\sin \theta) - \sin \theta\cdot d(\cos \theta)}{\cos^2 \theta}\\ \tag{3c} &= \frac{\cos \theta\cdot\cos \theta\,d\theta - \sin \theta\cdot(-\sin \theta\,d\theta)}{\cos^2\theta}\\ \tag{3d} &= \frac{\cos^2 \theta + \sin^2 \theta}{\cos^2 \theta}\, d\theta \\ \tag{3e} &= \frac{1}{\cos^2 \theta}\, d\theta \end{align}
(3b) follows from the Quotient Rule:$\tag{4} d\left(\frac{f(x)}{g(x)}\right) = \frac{g(x)\cdot f'(x) - f(x)\cdot g'(x)}{g(x)^2}$
(3e) follows from the Pythagoran Theorem. Since $$\sin \theta = \frac{a}{c}$$ and $$\cos \theta = \frac{b}{c}$$ (where $$a, b, c$$ are the sides of a right triangle), we can calculate:
\begin{align} \tag{5a} \sin^2 \theta + \cos^2 \theta &= \frac{a^2}{c^2} + \frac{b^2}{c^2} \\ \tag{5b} &= \frac{a^2 + b^2}{c^2} \\ \tag{5c} &= \frac{c^2}{c^2} \\ \tag{5d} &= 1 &c \not= 0 \end{align}
Hence the important identity: $\tag{6} \sin^2 \theta + \cos^2 \theta = 1$
(2b) can be demonstrated as follows: \begin{align} \tag{7a} \tan\theta &= \frac{\sin\theta}{\cos\theta} \\ \tag{7b} \tan^2 \theta &= \frac{\sin^2 \theta}{\cos^2 \theta} & a=\frac{b}{c} &\Rightarrow a^2=\frac{b^2}{c^2} \\ \tag{7c} 1 + \tan^2 \theta &= \frac{\sin^2 \theta}{\cos^2 \theta} + 1 \\ \tag{7d} &= \frac{\sin^2 \theta}{\cos^2 \theta} + \frac{\cos^2 \theta}{\cos^2 \theta} & \cos\theta=0 &\Rightarrow \theta=\pm90^\circ \\ \tag{7e} &= \frac{\sin^2 \theta + \cos^2 \theta}{\cos^2 \theta} \\ \tag{7f} &= \frac{1}{\cos^2 \theta} \\ \tag{7g} \cos^2 \theta &= \frac{1}{1 + \tan^2 \theta} \end{align}

## Solution

For the first $$u$$ substitution, we have three obvious candidates: $$\tan\theta$$, $$\tan^2\theta$$, and $$\tan^3\theta$$. Letʼs use the first one: \begin{align} \tag{8a} u &= \tan\theta \\ \tag{8b} du &= \frac{d\theta}{\cos^2\theta} \\ \tag{8c} d\theta &= \cos^2\theta \,du \\ \tag{8d} &= \frac{du}{1 + \tan^2\theta} \end{align}
Substituting $$du$$ and then $$u$$ gives us: \begin{align} \tag{9a} \int\tan^3\theta\,d\theta &= \int\frac{\tan^3\theta}{1 + \tan^2\theta}\,du & \text{(8d)} \\ \tag{9b} &= \int\frac{u^3}{1+u^2}\,du & \text{(8a)} \end{align}
We canʼt perform this integration as is, so we have to do another substitution. Letʼs call the second new variable $$v$$. There are several possible substitutions we could try, but letʼs use the denominator: \begin{align} \tag{10a} v &= 1+u^2 \\ \tag{10b} dv &= 2u\,du \\ \tag{10c} du &= \frac{dv}{2u} \end{align}
We substitute $$dv$$ and then $$v$$, and then simplify: \begin{align} \tag{11a} \int \frac{u^3}{1+u^2}\,du &= \int \frac{u^3}{(1+u^2) \cdot 2u}\,dv & \text{(10c)} \\ \tag{11b} &= \int \frac{u^2}{(1+u^2) \cdot 2}\,dv \\ \tag{11c} &= \int \frac{(1+u^2)-1}{2\cdot (1+u^2)}\,dv \\ \tag{11d} &= \int \frac{v - 1}{2v}\,dv & \text{(10a)} \\ \tag{11e} &= \frac{1}{2} \left(\int \frac{v}{v}\,dv - \int \frac{1}{v}\,dv\right) \\ \tag{11f} &= \frac{1}{2} \left(\int 1\,dv - \int \frac{1}{v}\,dv\right) \end{align}
At this point, we can easily integrate (11e): $\tag{12} \frac{1}{2} \left(\int 1\,dv - \int \frac{1}{v}\,dv = \frac{v}{2} - \frac{\ln v}{2}\right) + c$
and then reverse the substitutions: \begin{align} \tag{12a} \frac{1}{2} \left(\int 1\,dv - \int \frac{1}{v}\,dv \right) &= \frac{1}{2}(v - \ln v) + c \\ \tag{12b} &= \frac{v}{2} - \frac{\ln v}{2} + c \end{align}
(7f) (that is, the inverse of (2b)) then gives us: \begin{align} \tag{14a} \frac{1 + \tan^2 \theta}{2} - \frac{\ln(1 + \tan^2\theta)}{2} + c &= \frac{1}{2\cdot\cos^2\theta} - \frac{1}{2}\ln\left(\frac{1}{\cos^2\theta}\right) + c \\ \tag{14b} &= \frac{\sec^2\theta}{2} + \ln((\cos^{-2}\theta)^{-\frac{1}{2}}) + c \\ \tag{14c} &= \frac{\sec^2\theta}{2} + \ln(\cos\theta) + c \end{align}
The second term in (14b) is the result of applying the following property of logarithms: $$a\cdot\log_n c = \log_n c^a$$. Meanwhile, (14c) results from the application of this property of exponents: $$(x^a)^b = x^{(a\cdot b)}$$.
This gives us our final answer (confirmed by Wolfram Alpha):
$\tag{15}\boxed{\int \tan^3\theta\,d\theta = \frac{\sec^2\theta}{2} + \ln(\cos\theta) + c}$


text:
# How to know in which quadrant is the RAAN?

Having found the right ascension of the node, for example,

\begin{align*} \boldsymbol{\Omega} &= cos^{-1}\frac{N_X}{N} \\ &= \underline{15.60^\circ} \end{align*}

How do we know in which quadrant does this lies?

• Can you add the definition of the terms $N_X$ and $N$ and cite the source of that equation? Thanks!
– uhoh
Jan 24 at 23:22
• @uhoh Those are respectively the X component and the magnitude of the cross product between the unit vector pointing along the positive Z axis and the specific angular momentum vector, which in turn is the cross product between the position and velocity vectors. Jan 25 at 6:50
• @uhoh The formula posted in the question is all over the internet, and also in many textbooks. I don't understand why the much cleaner two argument arctangent calculation isn't widely taught. That simple one-liner (see my answer) eliminates calculating an unneeded vector ($\vec N$), eliminates calculating the magnitude of that unneeded vector ($N$), and finally eliminates an if statement to handle cases where the result of the inverse cosine calculation needs to be adjusted. Jan 25 at 6:58
• @DavidHammen you may be able to find it all over the internet because you know what you are looking for, but I and likely many other readers won't know what it is or where it comes from. Is there any way to get at least a hint please? Does it have a name?
– uhoh
Jan 25 at 14:21
• @uhoh I don't think it has a name. You can find it by searching for "Cartesian to Keplerian orbital elements." Jan 25 at 14:53

The specific orbital angular momentum vector, $$\vec h$$, is the cross product of the position vector $$\vec r$$ and velocity vectors $$\vec v$$. After too much mathematical drudgery to reproduce here, the result of this cross product is $$\vec h = r^2\dot\theta \left( \sin\Omega \sin I \hat x -\cos\Omega \sin I \hat y +\cos I \hat z \right)$$ There is no reason to introduce the vector $$\vec N$$ defined by $$\vec N \equiv \hat z \times \vec h = r^2\dot\theta\left(\cos\Omega \sin I \hat x + \sin\Omega \sin I \hat y\right)$$ Simply use the specific orbital angular momentum vector $$\vec h$$ and the two argument arctangent function. Note that $$\frac{h_x}{-h_y} = \tan\Omega$$. The $$r^2\dot\theta\sin I$$ term cancels in this division, and each term is non-negative. With most computer languages, the two argument arctangent function is of the form atan2(numerator,denominator). Denoting the $$x$$ and $$y$$ components of the specific orbital angular momentum vector as h_x and h_y, one can thus use Omega=atan2(h_x,-h_y).
Note very well: some languages and most spreadsheets reverse the arguments to their implementations of the two argument arctangent function, in which case you'll have to use Omega=atan2(-h_y,h_x). Note also that some languages and most spreadsheets use a name other than atan2. But the function will still be there. That function is far too useful to not be there. If the function doesn't exist in your tool of choice, choose a different tool.
• If you feel compelled to introduce the vector $N$, even though there is no reason to do so, you can still use the two argument arctangent function with Omega=atan2(N_y,N_x). Jan 25 at 6:47


text:
## Basic College Mathematics (9th Edition)

1. Simplify the square roots. $\sqrt 16$ = 4, $\sqrt 9$ = 3 Equation becomes 6 * 4 - 6 * 3 2. Multiply. 6 * 4 = 24, 6 * 3 = 18 Equation becomes 24 - 18 3. Add. 24 - 18 = 6


text:
## Dual Ramsey, an introduction – Ramsey DocCourse Prague 2016

The following notes are from the Ramsey DocCourse in Prague 2016. The notes are taken by me and I have edited them. In the process I may have introduced some errors; email me or comment below and I will happily fix them.

Title: Dual Ramsey, the Gurarij space and the Poulsen simplex 1 (of 3).

Lecturer: Dana Bartošová.

Date: December 12, 2016.

Main Topics: Comparison of various Fraïssé settings, metric Fraïssé definitions and properties, KPT of metric structures, Thick sets

Definitions: continuous logic, metric Fraïssé properties, NAP (near amalgamation property), PP (Polish Property), ARP (Approximate Ramsey Property), Thick, Thick partition regular.

Lecture 1 – Lecture 2 – Lecture 3

Ramsey DocCourse Prague 2016 Index of lectures.

## Facts about the Urysohn Space – Some useful, some cool

(This is almost verbatim the talk I gave recently (Feb 23, 2012) at the Toronto Student Set Theory and Topology Seminar. I will be giving this talk again on April 5, 2012)

I have been working on a problem involving the Urysohn space recently, and I figured that I should fill people in with the basic facts and techniques involved in this space. I will give some useful facts, a key technique and 3 cool facts. First, the definition!

Definition: A metric space $U$ has the Urysohn property if

• $U$ is complete and separable
• $U$ contains every separable metric space as an isometric copy.
• $U$ is ultrahomogeneous in the sense that if $A,B$ are finite, isometric subspaces of $U$ then there is an automorphism of $U$ that takes $A$ to $B$.

You might already know a space that satisfies the first two properties – The Hilbert cube $[0,1]^\omega$ or $C[0,1]$ the continuous functions from $[0,1]$ to $[0,1]$. However, these spaces are not ultrahomogeneous. Should a Urysohn space even exist? It does, but the construction isn’t particularly illuminating so I will skip it.


text:
Home > Error Code > Batch Catch Error Code

# Batch Catch Error Code

## Contents

Is this safe to display MySQL query error in webpage if something went wrong? Checking Return Codes In Your Script Commands The environmental variable %ERRORLEVEL% contains the return code of the last executed program or script. It isn’t always pretty, but, it gets the job done. In a GNU C macro envSet(name), what does (void) "" name mean? get redirected here

up vote 54 down vote favorite 5 Inside a batch file on Windows, I use 7-zip like this: ...\right_path\7z a output_file_name.zip file_to_be_compressed How could I check the exit code of 7z Thanks very much! –The Mask May 28 '14 at 0:56 1 Another reason why it might not work (always zero) is when it's inside an if or for. wscript.quit will return custom return codes from the script Example: vb script for Copying File to a Folder dim filesys set filesys=CreateObject("Scripting.FileSystemObject") If filesys.FileExists("c:\samplefile.txt") Then filesys.CopyFile "c:\samplefile.txt", "C:\manageengine" American English: are [ə] and [ʌ] different phonemes?

## Batch File Catch Error

Trying start /wait didn't work. You have to code for halting on error. myProgram.exe || PAUSE would cause the batch file to pause if myProgram.exe returns a non-zero error level. Using Map to convert Feet + Inches to Inches in a List of Lists How to make different social classes look quite different?

The positive values are a good idea because other callers may use the IF ERRORLEVEL 1 syntax to check your script. Thanks] Related stuff • Use EXIT in Windows 2000 (and later) to set errorlevels. • See how errorlevels are used to check the availability of third party tools, and how For simple logging, the “>” instruction will start a new log and “>>” will append to it. Batch File Error Code 3 But since the DOS command to determine the return code is IF ERRORLEVEL, most people use the name errorlevel.

The last command executed in the function or the script determines the exit status. Batch Error Code 1 Note: Environment variables are a set of dynamic named values that can affect the way, running processes will behave on a computer. Cheers, Paul Reply aleksandar says: February 20, 2012 at 7:18 pm Can you tell me how to specify command if connect to ftp fail or files could not be copied? Limit involving exponentials and arctangent without L'Hôpital GTIN validation Subtraction with a negative result How to handle spending money for extended trip to Europe?

A small Kix "one liner" can be used too: EXIT $ErrLev If called by a batch like this: KIX32 ERRORLEVEL.KIX$ErrLev=23 it will return an errorlevel 23 (ERRORLEVEL.KIX would be the Batch Return Error Code share|improve this answer answered Feb 28 '15 at 19:33 jonretting 35415 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign windows-xp batch share|improve this question asked Oct 1 '10 at 4:47 Misha Moroshko 1,63861628 1 Also asked on Stackoverflow: How do I get the application exit code from a Windows up vote 465 down vote favorite 95 I am running a program and want to see what its return code is (since it returns different codes based on different errors).

## Batch Error Code 1

This would imply that "%time:~0,2%" is coming out as null or it may contain, say, a comma? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Batch File Catch Error What matters is did the script work or not? Batch File Error Code 2 Is the standard Canon 18-55 lens the same as 5 years ago?

What is the sh -c command? Get More Info Try it without them or try the other versions I added. –Dennis Williamson Oct 1 '10 at 5:24 Great, thanks a lot !! –Misha Moroshko Oct 1 '10 at Reply Paul Adams (ex-MSFT) says: October 2, 2016 at 1:52 am Hi Kevin, My initial thought is the system locale. otherwise .bat eats the errorlevel and app1 never knows. Batch File Error Code 255

thank you Reply Baljeet says: July 23, 2012 at 8:08 am Hi, I have a batch file which is calling a exe file..When exe file execution completes I want to check If executed from outside a batch script, it will quit CMD.EXE. Reply Kevin says: October 24, 2012 at 5:25 am Hi Paul, would you have any hint that, I have a scheduled task (bat) to compress a folder with 7z and then useful reference Logged Where's MagicSpeed?Quote from: 'matt'He's playing a game called IRL.

Steps Exit codes for batch files Use the command EXIT /B %ERRORLEVEL% at the end of the batch file to return the error codes from the batch file EXIT /B at Windows Batch Error Code Why? up vote 17 down vote favorite 2 Basically, let's say that I have a batch file that calls myapp1.exe and myapp1.exe exits with Exit Code 1.

## Windows 2000 and later: In Windows 2000 & XP a new /B switch has been added to the EXIT command, enabling the batch file to quit with a return code: EXIT

Trying start /wait didn't work. XCOPY, for instance can fail with errorlevels 1 to 5. Windows NT4 and later: In NT4 use either COLOR00 or VERIFYOTHER2>NUL to set an errorlevel 1. Batch Check Error Code Mencken fireballsApprentice Code:TerminalThanked: 3 Re: How to return success/failure from a batch file? « Reply #7 on: September 09, 2008, 06:57:18 PM » Quote from: Sidewinder on September 09, 2008, 06:51:56

How could banks with multiple branches work in a world without quick communication? To check errorlevels during batch file development, use either COMMAND/Zyourbatch.bat to display the errorlevel of every command executed in MS-DOS 7.* (Windows 95/98), or PROMPTErrorlevel$Q$R$_$P\$G in OS/2 Warp (DOS) sessions. Remember, this is duct tape programming. this page Skeletal formula for carbon with two double bonds How to deal with a very weak student?

Example @echo off my_nify_exe.exe if errorlevel 1 ( echo Failure Reason Given is %errorlevel% exit /b %errorlevel% ) Warning: If you set an environment variable name errorlevel, %errorlevel% will return that Assuming your executable returns a non-0 exit code on failure, you do something like: myProgram.exe if errorlevel 1 goto somethingbad echo Success! Related 457Batch file to delete files older than N days471Windows batch files: .bat vs .cmd?465How do I get the application exit code from a Windows command line?22How to get the exit I have a program that returns -1 on errors).

In Windows NT4 (and 2000?) this won't work, since the SET command itself will set an errorlevel (usually 0)! (As I learned from Charles Long, in XP the SET command no


text:
# Zero-temperature phase of the XY spin glass in two dimensions: Genetic embedded matching heuristic

@article{Weigel2008ZerotemperaturePO,
title={Zero-temperature phase of the XY spin glass in two dimensions: Genetic embedded matching heuristic},
author={Martin Weigel and Michel J. P. Gingras},
journal={Physical Review B},
year={2008},
volume={77},
pages={104437}
}
• Published 1 June 2007
• Physics
• Physical Review B
For many real spin-glass materials, the Edwards-Anderson model with continuous-symmetry spins is more realistic than the rather better understood Ising variant. In principle, the nature of an occurring spin-glass phase in such systems might be inferred from an analysis of the zero-temperature properties. Unfortunately, with few exceptions, the problem of finding ground-state configurations is a non-polynomial problem computationally, such that efficient approximation algorithms are called for…
10 Citations

## Figures and Tables from this paper

One-dimensional infinite-component vector spin glass with long-range interactions
• Physics
• 2012
We investigate zero and finite temperature properties of the one-dimensional spin-glass model for vector spins in the limit of an infinite number m of spin components where the interactions decay
Domain-wall excitations in the two-dimensional Ising spin glass
• Physics
• 2018
The Ising spin glass in two dimensions exhibits rich behavior with subtle differences in the scaling for different coupling distributions. We use recently developed mappings to graph-theoretic
Monte Carlo Studies of the Ordering of the One-Dimensional Heisenberg Spin Glass with Long-Range Power-Law Interactions
• Physics
• 2010
The nature of the ordering of the one-dimensional Heisenberg spin-glass model with a long-range power-law interaction is studied by extensive Monte Carlo simulations, with particular attention to the
Spin stiffness of vector spin glasses
• Physics, Computer Science
Comput. Phys. Commun.
• 2011
Abstract We study domain-wall excitations for O ( m ) vector spin glasses in the limit m → ∞ , where the energy landscape is simplified considerably compared to XY or Heisenberg models due to the
Ordering of magnetic impurities and tunable electronic properties of topological insulators.
• Physics, Medicine
Physical review letters
• 2011
It is found that the magnetic ordering is suppressed by potential scattering, and the ordered phase breaks time-reversal symmetry spontaneously, driving the surface states into a gapped state, which exhibits an anomalous quantum Hall effect and provides a realization of the parity anomaly.
Domain walls and chaos in the disordered SOS model
• Mathematics, Physics
• 2009
Domain walls, optimal droplets and disorder chaos at zero temperature are studied numerically for the solid-on-solid model on a random substrate. It is shown that the ensemble of random curves
The role of crossover operator in the genetic optimization of magnetic models
• T. Gwizdalla
• Mathematics, Computer Science
Appl. Math. Comput.
• 2011
This paper presents an analysis of the effect of different crossover operators on the efficiency of genetic algorithm used to minimize energy in the Ising model and hopes it may be interesting as a testing tool.
Chirality Scenario of the Spin-Glass Ordering
Detailed account is given of the chirality scenario of experimental spin-glass transitions. In this scenario, the spin glass order of weakly anisotropic Heisenberg-like spin-glass magnets including
Error estimation and reduction with cross correlations.
• Mathematics, Physics
Physical review. E, Statistical, nonlinear, and soft matter physics
• 2010
A covariance analysis allows for the formulation of optimal estimators with often significantly reduced variance as compared to more conventional averages.

## References

SHOWING 1-10 OF 105 REFERENCES
Spin and chiral stiffness of the XY spin glass in two dimensions
• Physics
• 2007
We analyse the zero-temperature behaviour of the XY Edwards–Anderson spin glass model on a square lattice. A newly developed algorithm combining exact ground-state computations for Ising variables
Possible two-dimensional XY spin/gauge glasses on periodic and quasiperiodic lattices
• Physics
• 1997
Via Monte Carlo studies of the frustrated XY or classical planar model we demonstrate the possibility of a finite (nonzero) temperature spin/gauge glass-like phase in two dimensions. Examples of both
Ground states and defect energies of the two-dimensional XY spin glass from a quasiexact algorithm.
• Physics, Medicine
Physical review letters
• 2006
We employ a novel algorithm using a quasiexact embedded-cluster matching technique as minimization method within a genetic algorithm to reliably obtain numerically exact ground states of the
Chaotic nature of the spin-glass phase.
• Physics, Medicine
Physical review letters
• 1987
There is no hidden order pattern for spin glasses at all T less than T(C), the ordered-phase spin correlations being chaotic functions of spin separation at fixed temperature or of temperature at scale lengths L greater than (T delta T) exp -1/zeta.
Low-temperature behavior of two-dimensional Gaussian Ising spin glasses
• Physics
• 2004
We perform Monte Carlo simulations of large two-dimensional Gaussian Ising spin glasses down to very low temperatures $\beta=1/T=50$. Equilibration is ensured by using a cluster algorithm including
Evidence for a trivial ground-state structure in the two-dimensional Ising spin glass
• Physics
• 1999
We study how the ground state of the two-dimensional Ising spin glass with Gaussian interactions in zero magnetic field changes on altering the boundary conditions. The probability that relative spin
Morphology of ground states of two-dimensional frustration model
• Physics
• 1982
The problem of generating ground states of a quenched random Ising spin system with variable concentration of mixed-neighbour exchange couplings (Jij()0) on a planar lattice (frustration model) is
Bond-disordered spin systems: Theory and application to doped high-Tc compounds
• Physics
• 2002
We examine the stability of magnetic order in a classical Heisenberg model with quenched random exchange couplings. This system represents the spin degrees of freedom in high-T c compounds with
Computer search for defects in a D = 3 Heisenberg spin glass
Abstract A computer study of T = 0 metastable states (local minima) of a Heisenberg spin glass (1728 fixed-length spins on a simple cubic latice with random nearest-neighbor bonds) is reported, in
Nonvanishing spin-glass transition temperature of the +-J XY model in three dimensions
• Physics
• 2004
A three-dimensional $\pm J$ XY spin-glass model is investigated by a nonequilibrium relaxation method. We have introduced a new criterion for the finite-time scaling analysis. A transition


text:
Table of dates for planet retrograde motion

Is there a table which shows the dates of the planets retrograde motion? I want to know at which date a certain planet will start the retrograde motion.

• This might be a duplicate - check this out: physics.stackexchange.com/questions/249493/… – MystaryPi Aug 26 '18 at 21:56
• @MystaryPi Unlike Physics and Chemistry, the rest of Stack Exchange does not consider a question to be a duplicate if it is asked in another community. It may be considered a cross-site duplicate if it is asked by the same user, but there is no path to close such a question as a duplicate. In this case, this question has not been asked by this user before, so unless there is a duplicate on Astronomy this question should not be closed. – called2voyage Aug 28 '18 at 13:21
• Oh okay, thank you for informing me on that! I'm still getting used to how this site works (I've only been here for around 2 weeks). I'll be sure to see if it's an ACTUAL duplicate next time. – MystaryPi Sep 2 '18 at 15:29

There is an annual publication "Astronomical Phenomena for the Year YYYY" published by the United States Naval Observatory and United Kingdom Hydrogrphic Office. Page 6 of the 2018 edition gives a table of conjunctions, stationary, oppositions, etc. for the planets. See http://aa.usno.navy.mil/publications/reports/ap18_for_web.pdf

For the superior (outer) planets, the earlier stationary date is when it starts its retrograde motion. The second stationary date is when it ends its retrograde motion.

EDIT: It turns out calsky.com will do these calculations for several years out, including other calculations commonly found in almanacs. Sample page:

https://www.calsky.com/cs.cgi?cha=7&sec=6&sub=3

The best place to start on this site isn't the home page, but rather the TOC:

https://www.calsky.com/cs.cgi/TOC?&f=

I now consider my answer to be better than @JohnHoltz's :)

Note: I saw @JohnHoltz's answer while I was typing out my answer, so some of the below may be redundant. Upvote/checkmark his answer, not mine.

This isn't really an answer, but too long for a comment:

• I was disappointed how difficult it was to find this information, given how easy it is to calculate and how many other astronomical phenomena are listed in various places on the Internet.

• When a planet starts or ends retrograde motion, it is temporarily stationary before it "turns around". Thus, some astronomical sources will say "Jupiter stationary" instead of "Jupiter starts retrograde motion".

• Based on the above I google'd "jupiter stationary" "mars stationary" (as quoted; google tries to correct one of the stationary's to stationery, so I had to click one more time to do the search correctly), and finally found something: http://aa.usno.navy.mil/publications/docs/ap.php

• The publication doesn't mention retrograde, but it does mention when a given planet is stationary and provides a brief description of each planet's position in the sky for the given year.

Because this seems like a fairly easy calculation to make, I may do it myself and update this answer.

• I was looking for such a site to calculate the phenomena, but I could not find it. CalcSky is an obvious solution :-) – JohnHoltz Aug 27 '18 at 21:29

Check this website out - it has a table that might help you: Website

This site is also a little sketchy (it's for horoscopes and stuff) - but it still has some accurate information on the exact dates of retrograde: Website

Hope that helps!

• I'm pretty sure Mercury has a retrograde period, so I'm curious about the empty entry. – barrycarter Aug 27 '18 at 16:46
• Yeah, I was confused about that too. That's why I added the other site for more info. – MystaryPi Aug 27 '18 at 18:14


text:
# Morse Code Timing

## The Basics

The timing in Morse code is based around the length of one "dit" (or "dot" if you like). From the dit length we can derive the length of a "dah" (or "dash") and the various pauses:

• Dit: 1 unit
• Dah: 3 units
• Intra-character space (the gap between dits and dahs within a character): 1 unit
• Inter-character space (the gap between the characters of a word): 3 units
• Word space (the gap between two words): 7 units

## Words per Minute

Proficiency in Morse code is measured in how many words per minute someone can send or receive. This seems a tricky concept given that you can send more short words per minute than long ones. The work-around is to standardise on the word "PARIS" as the standard word, so if Morse is being sent at 20 words per minute (or "20 wpm") then the word "PARIS" (or, more precisely "PARIS " with a space on the end) could be sent 20 times in a minute.

The neat thing about "PARIS " is that it's a nice even 50 units long. It translates to ".--. .- .-. .. .../" so there are:

• 10 dits: 10 units;
• 4 dahs: 12 units;
• 9 intra-character spaces: 9 units;
• 4 inter-character spaces: 12 units;
• 1 word space: 7 units.

A grand total of $10 + 12 + 9 + 12 + 7 = 50$ units.

Given this (and the fact that there are 60 seconds in a minute) we can therefore make a formula to find the length of a dit, $t_{dit}$ in seconds for a given wpm speed, $s_{wpm}$:

\begin{align} \text{words per minute} &= s_{wpm} \nonumber \\ \text{minutes per word} &= {1 \over s_{wpm}} \nonumber \\ \text{seconds per word} &= {60 \over s_{wpm}} \nonumber \\ \text{dits per word} &= 50 \nonumber \\ \text{seconds per dit} = t_{dit} &= {60 \over 50 s_{wpm}} \label{tdit} \end{align}

It's clear that this makes sense: we know that for 1 wpm (i.e. $s_{wpm} = 1$) you must fit 50 dits into a minute and the formula says $t_{dit} = 60/50$. As the speed ($s_{wpm}$) goes up, the length of $t_{dit}$ goes down (they are "inversely proportional") which also makes sense.

## Farnsworth Timing

People learning Morse code often use what is called "Farnsworth" timing to make recognising the sound patterns easier. Rather than slowing down the whole sound, it is better to keep the character sounds at a moderately fast speed and just increase the gaps between the characters and words to give more recognition time. The speed of the characters are determined by the normal WPM speed ($s_{wpm}$) but the Farnsworth speed ($s_{fwpm}$) determines the actual number of words per minute. That is:

• Dit: 1 unit (or $t_{dit}$)
• Dah: 3 units (or $3t_{dit}$)
• Intra-character space: 1 unit (or $t_{dit}$)
• Inter-character space: 3 Farnsworth-units (or $3t_{fdit}$)
• Word space: longer than 7 Farnsworth-units (or $7t_{fdit}$)

where one Farnsworth-unit is longer than the basic unit. How to calculate the inter-character space and the word space though?

Going back to the breakdown of "PARIS " above, we can see that given the characters stay at the $s_{wpm}$ speed, the part that we need to stretch out is the 4 inter-character spaces and the 1 word space (19 units) and the part that needs to stay at the same speed is 31 standard $t_{dit}$ units.

The length of a dit is therefore the same as before (see \eqref{tdit}):

$$t_{dit} = {60 \over 50 s_{wpm}} \nonumber$$

For the length of the word "PARIS " we use the slower Farnsworth words per minute speed, or $s_{fwpm}$. One word ("PARIS ") should take this many seconds:

$$\text{time to transmit PARIS '} = {60 \over s_{fwpm}} \text{ seconds} \label{paris}$$

The time for the 31 standard units in "PARIS " should be this many seconds:

$$\text{time for the 31 standard units in PARIS '} = 31 \times t_{dit} \text{ seconds} \label{paris31}$$

Subtracting \eqref{paris31} from \eqref{paris} leaves the amount of seconds for the inter-character spaces and the word space:

$$\text{time for 19 Farnsworth units} = {60 \over s_{fwpm}} - 31 t_{dit} \text{ seconds} \nonumber$$

There are 19 Farnsworth units, so each one takes this many seconds:

$$\text{time for 1 Farnsworth unit} = t_{fdit} = {(60 / s_{fwpm}) - 31 t_{dit} \over 19} \text{ seconds} \label{tfdit}$$

Using \eqref{tfdit} we can then look at the ratio of $t_{fdit} / t_{dit}$

\begin{align} {t_{fdit} \over t_{dit}} &= {(60 / s_{fwpm}) - 31 t_{dit} \over 19 t_{dit}} \nonumber \\ &= {60 / s_{fwpm} \over 19 t_{dit}} - {31 t_{dit} \over 19 t_{dit}} \nonumber \\ &= {60 \over 19 s_{fwpm} t_{dit}} - {31 \over 19} \label{ratio} \end{align}

Substituting \eqref{tdit} into \eqref{ratio}:

\begin{align} {t_{fdit} \over t_{dit}} &= {60 \times 50 s_{wpm} \over 19 s_{fwpm} \times 60} - {31 \over 19} \nonumber \\ &= {50 \over 19}\cdot{s_{wpm} \over s_{fwpm}} - {31 \over 19} \nonumber \\ &= {50s_{wpm} - 31s_{fwpm} \over 19s_{fwpm}} \label{ratio2} \end{align}

It's easy to check that if $s_{fwpm} = s_{wpm}$ then, using \eqref{ratio2} we see $t_{fdit} / t_{dit} = 1$ which makes sense.

Alternatively, we can substitute \eqref{tdit} into \eqref{tfdit} to get an expression for $t_{fdit}$ in terms of the two speeds:

\begin{align} t_{fdit} &= { {60 \over s_{fwpm}} - 31 t_{dit} \over 19} \nonumber \\ &= { {60 \over s_{fwpm}} - {31 \times {60 \over 50 s_{wpm}}} \over 19} \nonumber \\ &= {60 \times 50 s_{wpm} - 31 \times 60 s_{fwpm} \over 19 \times 50 s_{wpm} s_{fwpm}} \nonumber \\ &= {300 s_{wpm} - 186 s_{fwpm} \over 95 s_{wpm} s_{fwpm}} \text{ seconds}\label{tfdit2} \end{align}

We can check that if $s_{fwpm} = s_{wpm}$ then \eqref{tfdit2} works out the same as \eqref{tdit}.

Although this derivation is a little different, you will find it comes out the same as the equations described by Jon Booom (KE3Z) in an ARRL article which Ronald L. pointed me to and which is about as definitive as I can find. ARRL is the (USA) national association for Amateur Radio.


text:
# What's wrong with using a static class to load and expose all of my assets?

What are the pitfalls associated with loading and storing all references to all of your content/assets within a single static class?

I've been trying to ask myself why I would want to instantiate an assets bank and can not think of a good reason to do so.

I have made a static class which enumerates through my game assets and adds each one to a dictionary which I can access (safely exposed, of course) anywhere like so:

var tex = Assets.Image("folder\\easyaspie");
spriteBatch.DrawString(Assets.Font("font2"), new Vector2(100, 100), Color.White);

... you get the picture.

I appreciate that this gets much more complicated when you have so many assets that having them all loaded at once is not a good idea. However, there is nothing to stop you from including selective loading of assets in your static class, as well as having static methods to change the contents of the 'reference banks'.

What do you think?

Edit:

My examples are pretty shallow, I recognise it's not a good idea to attempt to grab the reference of an asset mid-draw and is much better stored locally.

• Dictionary is good, thats what resource managers do, however being able to access this from anywhere isnt going to be a great idea as it will introduce dependencies throughout your codebase, particularly when the code assumes something is loaded yet it is either not, or is still being read from disk. Its usually a better idea to use some kind of asynchronous messaging to ask for resources and be handed them when they are ready. Jan 2 '14 at 4:55
• Can this functionality be adequately provided by a static class though? Jan 2 '14 at 5:00
• You know, ContentManager is already a dictionary of loaded content (until you Unload it). So any implementation of this can simply use it directly, rather than creating and filling a separate dictionary. Jan 2 '14 at 6:46
• One way to do it is store a static reference to the AssetManager inside the AssetManager class, have a static getInstance() method that returns that instance. That way you have an API such hat you can access the AssetManager anywhere, but you can still control the lifespan and properly clean up when the application closes. Jan 3 '14 at 17:23

I would strongly recommend you do not do this.

Static classes are fine for things that lack state or data, especially in languages like C# where you cannot otherwise have free-standing (non-member) functions. Once a class has any kind of state or data, however, you should seriously re-evaluate the decision to make it static. A good rule of thumb is to prefer instance to static; it greatly improves the long-term quality and maintainability of your code if you do.

For a case like this, an asset bank, I don't think a static class is a good idea:

• There's only one asset bank. That means you forgo the possibility of multiple banks of assets (for example, allowing you to load an unload assets as they are needed to conserve memory, or for unit testing). Once you start building this "selective loading" into a single static bank as a way to bypass this problem, you're just engineering a shoddy mockery of what you could have done more simply as an instance class.

• Because there's only one, you have to either engineer to the lowest-common-denominator in terms of access control and safety (think cross-thread access issues), or throw such issues to the wind and demand that client code write and thread-safety wrappers needed. This results in poorly-performing code in many cases for the former option, and the latter option often leads to code duplication and the resulting bugs.

• Being able to easily access the resources anywhere is usually a disadvantage, not an advantage. It might seem the opposite at first, but unconstrained ubiquitous access means you either already have or will be easily able to create a mess of poorly-scoped dependencies on the assets. It's the same general principle behind why globals are generally undesirable constructs.

Instead, build your asset bank as a regular class, and create a single instance of it when the game loads. Pass references to that interface to methods or other interfaces that have a need to load or otherwise access assets.

This gives you the flexibility easily support multiple banks in the future, without constraining you a design that can be very hard to recover from. Making the class static is simple enough, but if you ever need to change that you may find yourself having to clean up a mess of dependencies in client code that assumed there would only ever been a single bank, rather than just working with the bank provided.

Further, this method makes it obvious when you start to introduce dependency creep: when you find that you need to pass the asset bank reference to everything in your game, that is what tells you that your game's subsystems are not well separable and you should consider redesign their API boundaries.

I don't really see any concrete benefits to using a static class for this sort of thing except, perhaps, in an extremely simple bit of tech demo code. Most of the things that appear to be advantages to the static class decision relate to "simplicity" but usually are anything but, in the long run (and simplicity at the expense of quality is not an advantage).

• Additional note, debugging statics and startup sequences can be very annoying and especially when one static class depends on another for services. You'll find at some point soon that you end up having to micromanage all the statics' lifespans anyways, thus reducing the quick and easy part of the whole idea. Jan 2 '14 at 5:14
• "this method makes it obvious when you start to introduce dependency creep: when you find that you need to pass the asset bank reference to everything in your game" This is exactly what I wanted to combat, what are the non-static ways of tackling this? Jan 2 '14 at 5:16
• You create your resource manager, and pass it as a parameter to only where it is needed. or, you use asynchronous messaging to communicate with it without needing to have direct access to it. Jan 2 '14 at 5:19
• @Joe "Don't do it" is the best way to combat it. It's unfortunately a really broad topic and can't reasonably be addressed here. Fixing the problem in existing code is usually very specific to the needs of the existing code, but preventing the problem is easier: you have to tightly control what has access to the resource in question, in this case the asset bank. For this it's pretty easy, it should be easy to draw the line between what actually needs the raw assets and what can make do with the things produced from the raw assets.
– user1430
Jan 2 '14 at 5:21
• I don't want to turn this into an extended comment discussion, but you can get in touch with me in the Game Development Chat at some point and we could discuss the topic further.
– user1430
Jan 2 '14 at 5:22

I actually don't have a problem with something like this:

spriteBatch.DrawString(StaticAssets.DefaultFont, new Vector2(100, 100), Color.White);

It's a fairly reasonable simplifying assumption to say that there is only one instance of the default font per program. The kind of scenarios where this breaks down are uncommon, complicated, and difficult to plan for in advance. YAGNI.

You wouldn't want to do this in a library for 3rd-party consumption. But for a small-to-medium-sized game, where you can easily modify your own code, it's not a problem. Make your code flexible. Do things that save development time.

When you break the rules like this, it's important to do it deliberately, and to have an easy "out". In the above case, you can right click DefaultFont, do a "Find All References" and change how it works in a matter of minutes.

The problem with the original code, doing a dictionary lookup by string like this:

spriteBatch.DrawString(Assets.Font("font2"), new Vector2(100, 100), Color.White);

Is that you can't as easily discover all the places where the rules are being broken to reliably fix them when and if the need arises.

To put it another way - you really don't want a static asset manager (and I think Josh Petrie did a good job of explaining why). But many times you do want static assets!

Usually such assets will be static to a particular class, not global. So instead of having a Draw method like this:

spriteBatch.Draw(Assets.Image("playerSprite"), position, Color.White);

Or this:

spriteBatch.Draw(StaticAssets.PlayerSprite, position, Color.White);

You should probably do something like this:

class Player
{
private static Texture2d playerSprite;

And then call each class's static LoadContent method in your game's LoadContent method. It's perfectly reasonable to assume that there will only ever be one instance of your Game class to be calling LoadContent.


text:
Label $\alpha$ $A$ $d$ $N$ $\chi$ $\mu$ $\nu$ $w$ prim $\epsilon$ $r$ First zero Origin
24-91e24-1.1-c1e12-0-0 $8.13$ $6.98\times 10^{21}$ $24$ $7^{24} \cdot 13^{24}$ 1.1 $$[1.0]^{12} 1 1 0 0.0628810 Modular form 8281.2.a.cq 24-91e24-1.1-c1e12-0-1 8.13 6.98\times 10^{21} 24 7^{24} \cdot 13^{24} 1.1$$ $[1.0]^{12}$ $1$ $1$ $0$ $0.196573$ Modular form 8281.2.a.cr
24-91e24-1.1-c1e12-0-2 $8.13$ $6.98\times 10^{21}$ $24$ $7^{24} \cdot 13^{24}$ 1.1 $$[1.0]^{12} 1 1 0 0.257444 Modular form 8281.2.a.cp 24-91e24-1.1-c1e12-0-3 8.13 6.98\times 10^{21} 24 7^{24} \cdot 13^{24} 1.1$$ $[1.0]^{12}$ $1$ $1$ $12$ $0.605813$ Modular form 8281.2.a.cn
24-91e24-1.1-c1e12-0-4 $8.13$ $6.98\times 10^{21}$ $24$ $7^{24} \cdot 13^{24}$ 1.1 $$[1.0]^{12} 1 1 12 0.760084 Modular form 8281.2.a.cm 24-91e24-1.1-c1e12-0-5 8.13 6.98\times 10^{21} 24 7^{24} \cdot 13^{24} 1.1$$ $[1.0]^{12}$ $1$ $1$ $12$ $0.812064$ Modular form 8281.2.a.co


text:
# iirlp2bp

Transform IIR lowpass filter to IIR bandpass filter

## Syntax

``````[num,den,allpassNum,allpassDen] = iirlp2bp(b,a,wo,wt)``````

## Description

example

``````[num,den,allpassNum,allpassDen] = iirlp2bp(b,a,wo,wt)``` transforms an IIR lowpass filter to an IIR bandpass filter.The `iirlp2bp` function returns the numerator and denominator coefficients of the transformed bandpass filter. The function transforms the real lowpass prototype filter, specified by the numerator coefficients `b` and denominator coefficients `a`, by applying a second-order real lowpass to real bandpass frequency mapping. For more information, see IIR Lowpass to IIR Bandpass Transformation.The function also returns the numerator and the denominator coefficients of the allpass mapping filter, `allpassNum` and `allpassDen` respectively.Frequencies must be normalized to be between 0 and 1, with 1 corresponding to half the sample rate.```

## Examples

collapse all

Transform a lowpass IIR filter to a bandpass filter using the `iirlp2bp` function.

Input Lowpass IIR Filter

Design a prototype real IIR lowpass elliptic filter using the `ellip` function. The filter has a gain of about –3 dB at 0.5π rad/sample.

```[b,a] = ellip(3,0.1,30,0.409); fvtool(b,a)```

Transform Filter Using `iirlp2bp`

Transform the prototype lowpass filter into a bandpass filter by placing the cutoff frequencies of the prototype filter at 0.25π and 0.75π.

Specify the prototype filter as a vector of numerator and denominator coefficients, `b` and `a` respectively.

`[num,den] = iirlp2bp(b,a,0.5,[0.25 0.75]);`

Compare the magnitude response of the filters using FVTool.

```hvft = fvtool(b,a,num,den); legend(hvft,"Prototype Filter (TF Form)","Transformed Bandpass Filter")```

You can also specify the input lowpass IIR filter as a matrix of coefficients. Pass the second-order section matrices as inputs. The transformed filter is a fourth-order section filter given by the numerator and the denominator coefficients `num2` and `den2`.

```ss = tf2sos(b,a); [num2,den2] = iirlp2bp(ss(:,1:3),ss(:,4:6),0.5,[0.25 0.75]);```

Compare the magnitude response of the filters using FVTool.

To visualize the magnitude response of the fourth-order section filter, first pass the filter coefficients to the `dsp.FourthOrderSectionFilter` object. Then, use this object as an input to the FVTool.

```fos = dsp.FourthOrderSectionFilter(Numerator=num2,... Denominator=den2); hvft = fvtool(ss,fos); legend(hvft,"Prototype Filter (SOS Form)",... "Transformed Bandpass Filter")```

## Input Arguments

collapse all

Numerator coefficients of the prototype lowpass IIR filter, specified as either:

• Row vector –– Specifies the values of [b0, b1, …, bn], given this transfer function form:

`$H\left(z\right)=\frac{B\left(z\right)}{A\left(z\right)}=\frac{{b}_{0}+{b}_{1}{z}^{-1}+\cdots +{b}_{n}{z}^{-n}}{{a}_{0}+{a}_{1}{z}^{-1}+\cdots +{a}_{n}{z}^{-n}},$`

where n is the order of the filter.

• Matrix –– Specifies the numerator coefficients in the form of an P-by-(Q+1) matrix, where P is the number of filter sections and Q is the order of each filter section. If Q = 2, the filter is a second-order section filter. For higher-order sections, make Q > 2.

`$b=\left[\begin{array}{ccccc}{b}_{01}& {b}_{11}& {b}_{21}& ...& {b}_{Q1}\\ {b}_{02}& {b}_{12}& {b}_{22}& ...& {b}_{Q2}\\ ⋮& ⋮& ⋮& \ddots & ⋮\\ {b}_{0P}& {b}_{1P}& {b}_{2P}& \cdots & {b}_{QP}\end{array}\right]$`

In the transfer function form, the numerator coefficient matrix bik of the IIR filter can be represented using the following equation:

`$H\left(z\right)=\prod _{k=1}^{P}{H}_{k}\left(z\right)=\prod _{k=1}^{P}\frac{{b}_{0k}+{b}_{1k}{z}^{-1}+{b}_{2k}{z}^{-2}+\cdots +{b}_{Qk}{z}^{-Q}}{{a}_{0k}+{a}_{1k}{z}^{-1}+{a}_{2k}{z}^{-2}+\cdots +{a}_{Qk}{z}^{-Q}},$`

where,

• a –– Denominator coefficients matrix. For more information on how to specify this matrix, see `a`.

• k –– Row index.

• i –– Column index.

When specified in the matrix form, b and a matrices must have the same number of rows (filter sections) Q.

Data Types: `single` | `double`
Complex Number Support: Yes

Denominator coefficients for a prototype lowpass IIR filter, specified as one of these options:

• Row vector –– Specifies the values of [a0, a1, …, an], given this transfer function form:

`$H\left(z\right)=\frac{B\left(z\right)}{A\left(z\right)}=\frac{{b}_{0}+{b}_{1}{z}^{-1}+\cdots +{b}_{n}{z}^{-n}}{{a}_{0}+{a}_{1}{z}^{-1}+\cdots +{a}_{n}{z}^{-n}},$`

where n is the order of the filter.

• Matrix –– Specifies the denominator coefficients in the form of an P-by-(Q+1) matrix, where P is the number of filter sections and Q is the order of each filter section. If Q = 2, the filter is a second-order section filter. For higher-order sections, make Q > 2.

`$a=\left[\begin{array}{ccccc}{a}_{01}& {a}_{11}& {a}_{21}& \cdots & {a}_{Q1}\\ {a}_{02}& {a}_{12}& {a}_{22}& \cdots & {a}_{Q2}\\ ⋮& ⋮& ⋮& \ddots & ⋮\\ {a}_{0P}& {a}_{1P}& {a}_{2P}& \cdots & {a}_{QP}\end{array}\right]$`

In the transfer function form, the denominator coefficient matrix aik of the IIR filter can be represented using the following equation:

`$H\left(z\right)=\prod _{k=1}^{P}{H}_{k}\left(z\right)=\prod _{k=1}^{P}\frac{{b}_{0k}+{b}_{1k}{z}^{-1}+{b}_{2k}{z}^{-2}+\cdots +{b}_{Qk}{z}^{-Q}}{{a}_{0k}+{a}_{1k}{z}^{-1}+{a}_{2k}{z}^{-2}+\cdots +{a}_{Qk}{z}^{-Q}},$`

where,

• b –– Numerator coefficients matrix. For more information on how to specify this matrix, see `b`.

• k –– Row index.

• i –– Column index.

When specified in the matrix form, a and b matrices must have the same number of rows (filter sections) P.

Data Types: `single` | `double`
Complex Number Support: Yes

Frequency value to transform from the prototype filter, specified as a scalar. Frequency `wo` must be normalized to be between `0` and `1`, with `1` corresponding to half the sample rate.

Data Types: `single` | `double`

Desired frequency locations in the transformed target filter, specified as a two-element vector. Frequencies in `wt` must be normalized to be between `0` and `1`, with `1` corresponding to half the sample rate.

Data Types: `single` | `double`

## Output Arguments

collapse all

Numerator coefficients of the transformed bandpass filter, returned as one of the following:

• Row vector of length 2n+1, where n is the order of the input filter. The `num` output is a row vector when the input coefficients `b` and `a` are row vectors.

• P-by-(2Q+1) matrix, where P is the number of filter sections and Q is the order of each section of the transformed filter. The `num` output is a matrix when the input coefficients `b` and `a` are matrices.

Data Types: `single` | `double`
Complex Number Support: Yes

Denominator coefficients of the transformed bandpass filter, returned as one of the following:

• Row vector of length 2n+1, where n is the order of the input filter. The `den` output is a row vector when the input coefficients `b` and `a` are row vectors.

• P-by-(2Q+1) matrix, where P is the number of filter sections and Q is the order of each section of the transformed filter. The `den` output is a matrix when the input coefficients `b` and `a` are matrices.

Data Types: `single` | `double`

Numerator coefficients of the mapping filter, returned as a row vector.

Data Types: `single` | `double`

Denominator coefficients of the mapping filter, returned as a row vector.

Data Types: `single` | `double`

collapse all

### IIR Lowpass to IIR Bandpass Transformation

IIR lowpass to IIR bandpass transformation effectively places one feature of the original filter, located at frequency −`wo`, at the required target frequency location `wt1`, and the second feature, originally at +`wo`, at the new location `wt2`. It is assumed that `wt2` is greater than `wt1`. This transformation implements the “DC Mobility,” meaning that the Nyquist feature stays at Nyquist, but the DC feature moves to a location dependent on the selection of `wt`s.

Relative positions of other features of the original filter do not change in the target filter. This means that it is possible to select two features of an original filter, F1 and F2, with F1 preceding F2. Feature F1 will still precede F2 after the transformation. However, the distance between F1 and F2 will not be the same before and after the transformation.

Choice of the feature subject to the lowpass to bandpass transformation is not restricted only to the cutoff frequency of an original lowpass filter. You can choose to transform any feature of the original filter like stopband edge, DC, deep minimum in the stopband, or others.

Real lowpass to bandpass transformation can also be used to transform other types of filters, for example, real notch filters or resonators can be doubled and positioned at two distinct desired frequencies.

## References

[1] Nowrouzian, B., and A.G. Constantinides. “Prototype Reference Transfer Function Parameters in the Discrete-Time Frequency Transformations.” In Proceedings of the 33rd Midwest Symposium on Circuits and Systems, 1078–82. Calgary, Alta., Canada: IEEE, 1991. https://doi.org/10.1109/MWSCAS.1990.140912.

[2] Nowrouzian, B., and L.T. Bruton. “Closed-Form Solutions for Discrete-Time Elliptic Transfer Functions.” In [1992] Proceedings of the 35th Midwest Symposium on Circuits and Systems, 784–87. Washington, DC, USA: IEEE, 1992. https://doi.org/10.1109/MWSCAS.1992.271206.

[3] Constantinides, A.G. “Design of Bandpass Digital Filters.” Proceedings of the IEEE 57, no. 6 (1969): 1229–31. https://doi.org/10.1109/PROC.1969.7216.

[4] Constantinides, A.G.“Spectral transformations for digital filters.” Proceedings of the IEEE, vol. 117, no. 8: 1585-1590. August 1970.

## Version History

Introduced in R2011a


text:
# large integer

## Definitions

• WordNet 3.6
• n large integer an integer equal to or greater than ten
• ***

## Usage

### In news:

The Prime Number theorem says that the probability P(x) that a large integer x is prime is about 1/log x.
***

### In science:

Fris] Fristedt, B., The structure of random partitions of large integers, Trans.
Random matrix theory over finite fields: a survey
Thus, not only large but also any positive integer values of N are meaningful. See, e.g., M. F.
Tails of probability density for sums of random independent variables
Fristedt, The structure of random partitions of large integers, Trans.
Random partitions with non negative rth differences
Hitczenko, P., Savage, C. D., On the multiplicity of parts in a random composition of a large integer, preprint, (1999). 10.
Expected number of distinct part sizes in a random integer composition
We then choose the linear size of our system, L, to be b to some integer power, n ≥ 2, depending on how large we want it to be.
Full reduction of large finite random Ising systems by RSRG
Proposition 19 Let k be a suﬃciently large positive integer and let A be a subset of an abelian group with |A| = k .
Counting sets with small sumset, and the clique number of random Cayley graphs
Corollary 20 Let k be a suﬃciently large positive integer and let A be a subset of an abelian group with |A| = k .
Counting sets with small sumset, and the clique number of random Cayley graphs
Indeed, the following lemma and its corollary show that for integer k ≥ γ + 1, and a large class of walks, G(k) t .
Degrees of transience and recurrence and hierarchical random walks
Let x ∈ E \ F be an integral element divisible by N ! (the product of the ﬁrst N integers) for a large rational integer N .
Generators for Arithmetic Groups
We may take N 0 = {n(y ) : yα ∈ pMα } for all α ∈ R(N ) for suﬃciently large integer vector M = (Mα )α∈R(N ) .
Generic Transfer for General Spin Groups
Choose vi ∈ Vσi , i = 1, 2 with Wvi (e) = 1 and let M be a large enough integer so that T 1 M ⊂ T ∩ Stab(vi ).
Generic Transfer for General Spin Groups
Let n be a large integer parameter, and let Mn denote a random n × n ±1 matrix (“random” meaning with respect to the uniform distribution, i.e., the entries of Mn are i.i.d.
On random $\pm 1$ matrices: Singularity and Determinant
As all large integers are in Γ, S is a ﬁnite set of non-negative integers.
A Minimal Groebner Basis for the Defining Ideals of Certain Affine Monomial Curves
Fristedt, The structure of random partitions of large integers, Trans.
The Limiting Distribution of the Trace of a Random Plane Partition
Mutafchiev, The size of the largest part of random plane partitions of large integers, Integers: Electron. J.
The Limiting Distribution of the Trace of a Random Plane Partition
***


text:
Last updated June 17, 2014. Created on February 14, 2012.

If you want to install a contributed module, which depends on an external library, and also depends on the Libraries API module, you are on the right page.

Note that installing the Libraries API module and installing an external library are two separate steps, that are independent of each other.

In detail, the steps you need to follow are the following:

### Install Libraries API

Install Libraries API just like you would any other contributed module. See this page for Drupal 7 and this page for Drupal 6.

Please note that, as is described on those pages, the Libraries API module directory should be inside the sites/all/modules directory (or sites/example.com/modules if you have a multi-site installation).

### Install the external library

2. Extract the files
If the file you downloaded is an archive, i.e. its file extension is .zip or .tar.gz, you will need to extract it first. On Windows, use a program like 7-zip to extract it. On the Mac, you can use Stuffit Expander. For *nix systems, use the command line: tar -zxvf modulename-drupalversionnumber.tar.gz. After extracting the file, you should see multiple files or a single folder with the library's name.
First you need to check if there is a libraries directory in one of three suitable spots. These are:
• sites/all/libraries directory or
• profiles/[yourprofilename]/libraries or
• sites/example.com/libraries if you have a multi-site installation

If not, create one. Then inside that directory create a new directory with the Drupal machine name of the library. The machine name should be provided by the module that requires it, sometimes implicitly as in "Install the foo library!" (in that case the machine name would be foo). Upload the library files into the directory you have just created. If the library consists of a directory, which you have just extracted, upload the entire directory into the sites/all/libraries/machine_name directory.

IMPORTANT: Do not put the external library in the sites/all/modules/libraries directory, which is the directory of Libraries API module (see above).

### Install the other module

Now you should be able to install the module that requires the external library just like you installed Libraries API above, or as you would install any other contributed module.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

### D'oh!

I just spent three hours figuring out that sites/all/libraries isn't the same as sites/all/modules/libraries.

Liz
Stumbling along.

### /sites/foo/libraries + /profile/foo/libraries

If not already - then ensure that /profiles/foo/libraries is supported too... not just /sites/foo/libraries as there are make Drush(make) based workflows that see sites as profiles (stepping outside the the whole multi-site /sites/x/.. structure) (see: here)

Web Deli™
www.webdeli.com.au
projects@webdeli.com.au
---------------------

### I think that is what you

I think that is what you meant by striking-through part of your comment, but just to make sure that there is no confusion: Yes, profiles/profile-name/libraries is supported, too.

Also a top-level libraries/ (next to the top-level modules/ and themes/) is supported as well, for distributions that want to ship with their own libraries. For 99% of users that should be irrelevant, though.

### Yes! - I picked it up later.

Strike-through is because after I posted this I saw it is supported.. so I update comment accordingly.

Web Deli™
www.webdeli.com.au
projects@webdeli.com.au
---------------------

### external library .info files?

Does anybody have a more or less complete example of a .info file that would be included with an external library? From the documentation, it's not exactly clear what gets included from the external library.

Dick Munroe

Richard Munroe
Cottage Software Works, Inc.
Our Motto: Cottage Software Works!

### test a module which requieres libraries

Hi

Perhaps the best idea is to try a module wich requieres libraries. I sugest you to try mathjax

IbK.

### Can't create libraries directory

I can't create libraries directory in site/all- Permission Denied. How I can create this?

http://ftp.drupal.org/files/projects/libraries-7.x-2.2.tar.gz - Libraries is already installed. But this is installed in site/all/modules/


text:
My watch list
my.chemeurope.com
Login

# Langevin equation

In statistical physics, a Langevin equation is a stochastic differential equation describing Brownian motion in a potential.

### Additional recommended knowledge

The first Langevin equations to be studied were those in which the potential is constant, so that the acceleration a of a Brownian particle of mass m is expressed as the sum of a viscous force which is proportional to the particles velocity v (Stokes' law), a noise term $\mathbf\eta(t)$ (the name given in physical contexts to terms in stochastic differential equations which are stochastic processes) representing the effect of a continuous series of collisions with the atoms of the underlying fluid and F(x) which is the systematic interaction force due to the intramolecular and intermolecular interactions:

$m\mathbf{a} = m\frac{d\mathbf{v}}{dt} = F(\mathbf{x}) - \beta \mathbf{v} + \eta(t).$

Essentially similar equations govern other Brownian systems, such as thermal noise in an electrical resistor:

$L \frac{d I(t)}{dt} = -R I(t) + v(t).$

Many interesting results can often be obtained without solving the Langevin equation, from the fluctuation dissipation theorem.

The main method of solution if a solution is required is by use of the Fokker-Planck equation, which provides a deterministic equation satisfied by the time dependent probability density. Alternatively numerical solutions can be obtained by Monte Carlo simulation. Other techniques, such as path integration have also been used, drawing on the analogy between statistical physics and quantum mechanics (for example the Fokker-Planck equation can be transformed into the Schrödinger equation by rescaling a few variables).

### Further reading

• W. T. Coffey (Trinity College, Dublin, Ireland), Yu P. Kalmykov (Université de Perpignan, France) & J. T. Waldron (Trinity College, Dublin, Ireland), The Langevin Equation, With Applications to Stochastic Problems in Physics, Chemistry and Electrical Engineering (Second Edition), World Scientific Series in Contemporary Chemical Physics - Vol 14. (The First Edition is Vol 10)
• Reif, F. Fundamentals of Statistical and Thermal Physics, McGraw Hill New York, 1965. See section 15.5 Langevin Equation

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Langevin_equation". A list of authors is available in Wikipedia.
Your browser is not current. Microsoft Internet Explorer 6.0 does not support some functions on Chemie.DE


text:
# Math Help - Maximal Ideals

1. ## Maximal Ideals

Prove <x^2+1> is maximal in R[x]

R[x] = {all polynomials with real coefficients}

<x^2+1> = {f(x)*(x^2+1) ; f(x) is from R[x]}

Could you guys give me some hints? I am not really sure how to even start this. This exact problem is actually an example in my book but I could not even follow it! (Gallian)

Thank you

2. One way (there is an immediate characterization in terms of irredutible polynomials):

$\;\textrm{maximal}\;\Leftrightarrow \mathbb{R}[x]/\;\textrm{is\:a\;field}$

and if $I\subset \mathbb{R}[x]$ is an ideal, then $\mathbb{R}/I$ is a commutative ring.

So, you only have to prove that

$ax+b+\;\;(ax+b\neq 0)$

is a unit in $\mathbb{R}[x]/$ .

Fernando Revilla

3. Thanks I was actually trying to prove that R[x]/<x^2+1> was a field by showing <x^2+1> was maximal but I guess showing that its all the elements are units would be easier

4. yes that is the easiest way to show that something is maximal. Think about what happens when you take the quotient R[x]/(x^2+1).

Remember when you mod out by an ideal you partion the ring into cosets: a+(x^2+1) for each a in R[x]. Something gets "squashed" to 0 iff it is in the ideal (x^2+1).

So what type of elements are left? What can you decide this quotient ring is isomorphic to? Think about this for a bit, you should be able to show it's a field without too much trouble.