text:
# Abstract

In this paper a mathematical model was found, and numerical results obtained for the pendulum behavior when coupled to a DC generator. A simple pendulum is vertically excited on its support and consequently exhibiting oscillations and rotations. The motion of the pendulum spins the axis of a DC generator and inducing a current. The dynamic model involving the generator and the pendulum dynamics is developed and analyzed in this article. Bifurcation diagrams demonstrate doubling-period and saddle-node bifurcations with the chaos. The presence of chaos is verified by the Lyapunov exponents applied on the time series of the pendulum speed and position. Nonideal interactions of a DC motor with a pendulum by a crank-shaft-slider mechanism is analyzed and compared with an ideal excitation of the pendulum.

Keywords
Energy harvesting; DC generator; pendulum; chaos

# 1 INTRODUCTION

The main aim in this paper is the analysis of types of motion of the parametric pendulum coupled to a DC generator. The mathematical modeling was firstly obtained and described in Avanço et al. (2017Avanço, R.H., Tusset, A.M., Suetake, M., Navarro, H., Balthazar, J.M, Nabarrete, A. (2017) The pendulum dynamic analysis with DC motors and generators for sea waves energy harvest, DSTA2017 Vibration, Control and Stability of Dynamical Systems, ISBN 839353125X, 9788393531257, Lodz, Poland, 2017.) where the results demonstrated that the pendulum may exhibit both oscillations and rotations. In the present paper a deeper analysis will be performed.

The first analyses of the parametric excited chaotic pendulum are in Leven and Koch (1981Leven, R.W., Koch, B.P. Chaotic Behavior of a Parametrically-Excited Pendulum, Physics Letters A, vol.86, 1981.) where the chaos was verified with Lyapunov exponents and the appearance of a strange attractor in the Poincaré section. A clear analysis of rotating orbits of the classic parametric pendulum is presented in Xu et al. (2005Xu, X.; Wiercogroch, M.; Cartmell, M.P. Rotating Orbits of a Parametrically-excited pendulum, Chaos Solitons and Fractals, v.23, pp.1537-1548, 2005.), at that moment the study of the parametric pendulum dynamics was already justified with the possibility of energy harvesting from sea waves. Also, in Xu et al. (2005), perturbation methods are applied on order to find the motion for small angles of oscillation. Basins of attractions demonstrated that the same conditions of damping, frequency and amplitude of oscillations may lead the pendulum to either oscillations or rotations, depending on initial conditions of position and velocity of the pendulum.

The classic parametric pendulum exhibits different types of motion depending on initial position and velocity, damping, length of pendulum, natural frequency, amplitude and frequency of excitation and the mass in the tip of the pendulum.

The parametric pendulum excited by a crank-shaft-slider mechanism was firstly studied taking into account the geometric complexity of the mechanism in Avanço et al. (2014Avanço, R.H., Navarro, H.A., Brasil, R.M.L.R.F., Balthazar, J.M. (2014) Nonlinear Dynamics of a Pendulum excited by a crank-shaft-slider mechanism. ASME International Mechanical Engineering Congress and Exposition, Volume 4B: Dynamics, Vibration, and Control (4B): V04BT04A025. doi:10.1115/IMECE2014-36643.
https://doi.org/10.1115/IMECE2014-36643...
). Commonly, the slider was considered to move according to a harmonic oscillator. This approach is reasonable only when the crank is sufficiently smaller than the shaft linked to the slider. In the comparison of the classical parametric pendulum and the pendulum vibrated by the crank-shaft-slider mechanism using parameter plots with frequency and amplitude of excitation, it was seen that the chaos occurs in wider regions of crank-slider than in the harmonic classical parametric pendulum.

The classical parametric pendulum is defined by a rigid simple pendulum with a bob in the extreme vibrated vertically on the support by a harmonic motion. The pendulum vibrated vertically by a crank-shaft-slider is also considered a parametric pendulum, since the joint of pendulum is moved in the vertical direction, not in the horizontal.

A horizontal excitation of the pendulum by limited power supply was performed in Krasnopolskaya and Shvets (1993Krasnopolskaya, T.S. and Shvets, A.Y. Chaos in vibrating systems with a limited power-supply, Chaos, Vol.3, n.3, American Institute of Physics, 1993.) and in Belato et al. (2001Belato, D.; Weber, H.I.; Balthazar, J.M.; Mook, D.T. Chaotic Vibrations of a nonideal eletro-mechanical system, International Journal of Solids and Structures, Vol.38, pp. 1699-1706, 2001.). The conclusion was that the consideration of the limited power supply was important to identify the chaos. An approach to an ideal model would hide the chaotic motion of the pendulum.

Figure 1
Schematic representation of the classic parametric pendulum

Figure 2
Representation of crank-shaft-slider mechanism coupled to the pendulum

A pendulum horizontally driven by a DC motor was studied in Kazmierczak et al. (2015Kazmierczak, M., Kudra, G., Awrejcewicz, J., Wasilewski, G. Mathematical modelling, numerical simulations and experimental verification of bifurcation dynamics of a pendulum driven by a dc motor. Eur. J. Phys. 36 (2015) 055028 (13pp) doi:10.1088/0143-0807/36/5/055028, 2015
https://doi.org/10.1088/0143-0807/36/5/0...
). A mathematical modeling, numerical simulation and experimental verification of bifurcation dynamics of the pendulum were performed. The theoretical considerations include constant angular velocity of the crank and the parameters of the model estimated using experimental data obtained from five different solutions for five different voltages. An approach to a single degree was carried out with different models of resistance in the pendulum joint. The results considered a combination of dry friction and viscous damping which yielding to better solutions.

A small voltage was set in the experiments studied in Wasilewski et al. (2015Wasilewski, G., Kudra, G., Awrejcewicz, J., Kazmierczak, M., Tyborowski, M., Kazmierczak, M. Experimental and numerical investigations of a pendulum driven by a low-powered DC motor. Dynamical System-Mathematical and Numerical Approaches, TU of Lodz, NUM305-15, 2015. ) and Wasilewski et al. (2016) where the pendulum was horizontally moved by a low-powered DC motor. The power supplied by the motor was maintained small to allow the return influence of the pendulum dynamics on the motor velocity. Numerical solutions and experimental data demonstrated a good agreement for stable attractors. In the chaotic zone, the numerical and experimental results diverge, as expected, due to the sensibility of initial conditions. The chaotic behavior is verified by the strange attractor in the Poincaré section. In Wasilewski et al. (2016), a new model for the resistance in the joint was developed. The sign functions in the dry model was identified by experimental data instead of a smooth approximation of the sign function. This model leads to advantages in the sense of accuracy and speed of simulation. Another good aspect is the avoidance of stiffness in the differential equation.

Over one hundred fifty variations concepts of Wave Energy Converter (WEC) exist and new ones continue to appear (Falcão, 2010Falcão, A.F. O., Wave energy utilization: a review of the Technologies, Renew. Sustain. Energy Rev., 14, 2010, 899-918.). Some of them are in the commercialization stage and, but despite of this, the costs keep considerable high compared to coal and wind energy. A new wave energy converter based on the parametrically excited pendulum was presented in Yurchenko and Alevras (2018Yurchenko, D. and Alevras, P. Parametric pendulum based wave energy converter. Mechanical Systems and Signal Processing 99 504-515, 2018. Doi: http://dx.doi.org/10.1016/j.ymssp.2017.06.026
http://dx.doi.org/10.1016/j.ymssp.2017.0...
). This mechanism reduces the influence of the gravity force and achieves a dominant rotational motion without any active control. The design which reduces the gravity influence consists of a pendulum suspended on an inclined plane. Experimental results confirmed the numerical results and power harvesting potential is also analyzed.

The parametric excited pendulum was studied for oscillatory motion for energy harvesting using a DC generator in Marszal et al. (2017Marszal, M., Witkowski, B., Jankowski, K., Perlikowski, P., Kapitaniak, T. Energy Harvesting from Pendulum Oscillations. International Journal of Non-Linear Mechanics, 94, 2017. http://dx.doi.org/10.1016/j.ijnonlinmec.2017.03.022
http://dx.doi.org/10.1016/j.ijnonlinmec....
). The numerical studies analyzed the oscillatory motion in 2:1 resonance verified with experimental results. In comparison with the present article, this numerical analysis brings oscillatory and rotational motion, but without the experimental results. The results from Marszal et al. (2017) allowed to conclude that the energy harvesting is more efficient for shorter reduced length of pendulum, which provides low natural periods and larger angular velocity, what is important for increasing the angular velocity of the pendulum acting on the generator.

Concerning rotational solution of the classic parametric pendulum, it was executed successfully an experiment in Lenci et al. (2011) and Lenci (2014). The intention was to verify experimentally the rotational solutions for different amplitudes and frequency of excitation with waves in a tank showing the feasibility of energy harvesting through the pendulum.

A system with two pendulums has been analyzed with a view of energy harvesting in Wiercigroch et al. (2009Wiercigroch, M., Najdecka, A., Vazirii, V., Nonlinear dynamics of pendulums system for energy harvesting, in: Vibration Problems ICOVP 2009, Springer, 2009, pp. 35-42.). Some experiments have been executed with a shaker vibrating the two pendulums under the same support. The control applied successfully could maintain both pendulums under rotational motion synchronized.

In Horton et al. (2008Horton, B.W., Wiercigroch, M., Xu, X. Transient tumbling chaos and damping identification for parametric pendulum. Philos. Tran. R. Soc. A 366, 767-784 (2008)) a solution for the friction was performed based on the decrement parameter found with the experimental results of the damped pendulum. According to Paula et al. (2006Paula, A. S., Savi, M. A. & Pereira-Pinto, F. H. I. 2006 Chaos and transient chaos in na experimental nonlinear pendulum. J. Sound Vib.294, 585-595. (doi:10.1016/j.jsv.2005.11.015)
https://doi.org/10.1016/j.jsv.2005.11.01...
), viscous damping is more relevant when larger angles are present in oscillations. Horton et al. (2008) considered for small oscillations dry friction becomes prevalent and neglect this could lead to out of phase motions when comparing experimental and numerical results. These assumptions allowed to reduce errors and better predict amplitude oscillations when the pendulum approaches to the resting position.

Xu et al. (2007Xu, X., Pavlovskaia, E., Wiercigroch, M., Romeo, F., Lenci, S.: Dynamic interactions between parametric pendulum and electro-dynamical shaker. Z. Angew. Math. Mech. 87, 172-186 (2007).) studied the interactions between the parametric pendulum and a shaker. Quasiperiodic rotations were found experimentally where this type of motion could not be predicted by ideal excitation. Afterwards, the nonideal consideration of a two and a half degree of freedom allowed to properly find these kinds of motion.

A dynamical integrity analysis was performed in Lenci and Rega (2011) considering the basins of attraction. In experimental results, it was verified that rotating solutions could be performed only when the attractor is enough robust and basins large enough.

Alevras et al. (2015) analyzed the dynamics of a tri-pendulum. The reason presented is that the simple pendulum provides rotating solutions only for low frequencies of ocean waves. Some advantages are multiplicity of configurations, it means one may change its size without changing the tri-pendulum behavior.

Stochastic dynamics of a rotating pendulum is investigated in Andreeva et al. (2015Andreeva, T., Alevras, P., Naess, A., Yurchenko, D., Dynamics of a parametric rotating pendulum under a realistic wave profile, Int. J. Dynam. Control (2015). https://doi.org/10.1007/s40435-015-0168-z
https://doi.org/10.1007/s40435-015-0168-...
). The assumptions were based on a realistic wave profile acting on the parametric pendulum. It was verified that the wave asymmetry influences significantly the rotational potential of the pendulum, causing sometimes oscillatory responses.

Two pendulums were mounted on a mutual elastic single degree-of-freedom in Alevras et al. (2014). The response was analyzed with the base externally excited by a random phase sinusoidal force. The goal was to preserve the rotary response. In results it was observed rotations with synchronizations.

## 2.2 Mathematical modeling

The first mechanism in Figure 1 is the classical parametric pendulum. A harmonic motion is present on the pivot causing different types of motion in the pendulum. It may be observed rotational motion in the pendulum, simple oscillations or a mix between them, what is called oscillation-rotation. The dynamics in steady state may also be a fixed point, the pendulum at rest, and the tumbling chaos. The pendulum rotates and inverts the velocity in a chaotic way.

The length of the pendulum is given by the term $l$, the mass of the bob by $m$. The term $u$ stands for the harmonic displacement which causes the resonance in the pendulum. The position of the bob in the extreme of the pendulum is given in cartesian coordinates x and y.

$x = l sin α y = − l cos α − u$ (1)

The derivatives in time of x and y are written in Equation (2) where the dots mean the derivatives with respect to the physical time t:

$x ˙ = l α ˙ cos α y ˙ = l α ˙ sin α − u ˙$ (2)

The reference for the gravitational potential energy is the point of suspension of the pendulum, so the Kinetic and Potential Energies are written in Equation (3):

$T = 1 2 m ( x ˙ 2 + y ˙ 2 ) = 1 2 m l 2 α ˙ 2 + 1 2 m u ˙ 2 − m l α ˙ u ˙ sin α V = m g y = − m g l cos α − m g u$ (3)

The Lagrangian function based on the Kinect and Potential energies is written as:

$L = 1 2 m l 2 α ˙ 2 + 1 2 m u ˙ 2 − m l α ˙ u ˙ s i n α + m g l cos α + m g u$ (4)

Considering the dissipative forces due to the viscous friction in the joint, the generalized dissipative force related to the coordinate $α$ has a dimension of torque:

$Q α N C = − c l 2 α ˙$ (5)

The frequency of the harmonic oscillation of $u$ is given by the term Ù and the amplitude by the term $a$:

$u = a cos ( Ω t ) u ˙ = − a Ω sin ( Ω t ) u ¨ = − a Ω 2 cos ( Ω t )$ (6)

The differential equation for the mechanism in Figure 1 is given in Equation (7):

$m l 2 α ¨ + c l 2 α ˙ + m g l s i n α + m a l Ω 2 cos ( Ω t ) sin α = 0$ (7)

In order to perform a dimensionless analysis, it is introduced dimensionless parameters, similarly to that carried out in Xu et al. (2005Xu, X.; Wiercogroch, M.; Cartmell, M.P. Rotating Orbits of a Parametrically-excited pendulum, Chaos Solitons and Fractals, v.23, pp.1537-1548, 2005.).

$τ = ω 0 t α ′ = d α d τ = 1 ω 0 d α d t α '' = d 2 α d τ 2 = 1 ω 0 2 d 2 α d t 2 ω = Ω ω 0 p = a Ω 2 l ω 0 2 γ = c m ω 0$ (8)

The prime represents the derivatives related to the dimensionless time $τ$ and the dots the derivatives related to the physical time $t$. After substituting the dimensionless parameters, the final dimensionless equation is obtained as in Xu et al. (2005Xu, X.; Wiercogroch, M.; Cartmell, M.P. Rotating Orbits of a Parametrically-excited pendulum, Chaos Solitons and Fractals, v.23, pp.1537-1548, 2005.):

$α '' + γ α ′ + sin α ( 1 + p cos ( ω τ ) ) = 0$ (9)

The presence of the DC generator in the system demands the usage of one more equation. The generator is coupled to the pendulum and, consequently, they rotate at the same speed $α'$ or $α˙$. The electric equation of the generator is given by:

$L d i d t = − ( R a + R L ) i + K E α ˙$ (10)

The letter $L$ stands for the inductance in the generator, $RL$ is internal resistance of the inductor and $Ra$ any other resistance present. The term i is the electric current, $KE$ is the constant of speed and $KT$ the constant of torque.

When the DC generator is coupled to the mechanism the dynamical equation of the pendulum includes the opposing force of the generator using the constant of torque $KT$ and the electric current $i$:

$m l 2 α ¨ + c l 2 α ˙ + m g l s i n α + m a l Ω 2 cos ( Ω t ) s i n α = − K T i$ (11)

In the interest of obtain the nondimensional version of Equations (10) and (11), some more dimensionless parameters were proposed:

$β = K T Q m l 2 ω 0 I = i Q ω 0 Ω = K E Q ω 0 L Ω = R a + R L ω 0 L$ (12)

The term Q represents any arbitrary value for electric charge allowing the obtainment of dimensionless term for the generator in Equation (13). The term $ω0$ is the natural frequency of the pendulum determined by the length of the pendulum and gravitational acceleration.

$d I d τ = − ζ I+ λ α '$ (13)

Including the DC generator effect in the pendulum, the equation of motion such as Equation (9) turns into:

$α ″ + γ α ′ + s i n α ( 1 + p cos ( ω τ ) ) + β I = 0$ (14)

The value of â, æ and ë , along this paper will be equal to 1. The value of ã will always be 0.1 and other values may change according to what is being specified. The term I represents a dimensionless current which interferes in the pendulum dynamics. Despite this, electric current and electric energy will not be studied in the present analyses.

The modeling in Figure 2 considers a DC motor coupled to a crank-shaft-slider mechanism moving the point of suspension of the pendulum. The main difficulty in this mechanism is to take into account the complexity of the geometry of the crank-slider. When you consider the crank rotating with a constant speedy, you are considering the ideal mechanism explored in Avanço et al. (2016Avanço, R.H., Navarro, H.A., Brasil, R.M.L.R.F., Balthazar, J.M., Bueno, A.M., Tusset, A.M. (2016) Statements on nonlinear dynamics behavior of a pendulum, excited by a crank-shaft-slider mechanism, Meccanica 51, 1301-1320.), where the influence of different crank length is studied. In this article we are going to study this mechanism but considering the nonideal excitation. It means the pendulum may affect the dynamics of the crank powered by the DC motor.

Following the steps to determine the Lagrangian function, the Kinect and potential energies in this case include de inertia of the disc, in addition to the pendulum. Looking at the Figure 2, it is written the position of the bob in the extreme through the angles.

$x p = l s i n α y p = − a cos θ − b cos φ − l cos α$ (15)

Kinect and potential energies are written in terms of the coordinates $α$ and $θ$. In this model the crank speedy is not constant. The disc is powered by the DC motor and the disc rotation moves the suspension of the pendulum through the crank-slider.

Using trigonometry, the value of $cosφ$ may be determined in terms of è.

$cos φ = ( 1 − a 2 b 2 s i n 2 θ ) 1 / 2$ (16)

The Kinect energy of the system includes the moment of the inertia of the disc plus the rotor of the DC motor. The sum of them is given by $J$ where their speedy are the same given by $θ˙$.

$T = 1 2 J θ ˙ 2 + 1 2 m ( x ˙ p 2 + y ˙ p 2 )$ (17)

The derivatives of the cartesian coordinates in terms of $α$ and $θ$ are given in Equation (18), where it uses an auxiliary function $F$ described in Equation (19). This function is a consequence of the geometry of the crank-slider mechanism.

$x ˙ p = l α ˙ cos α y ˙ p = a θ ˙ F + l α ˙ s i n α$ (18)

$F = s i n θ + a s i n θ cos θ b ( 1 − a 2 b 2 s i n 2 θ ) 1 / 2$ (19)

The Lagrangian function obtained by the Kinect and potential energies in terms of $α$ and $θ$ is given by:

$L = 1 2 J θ ˙ 2 + 1 2 m [ l 2 α ˙ 2 cos 2 α + ( a θ ˙ F + l α ˙ s i n α ) 2 ] + m g l cos α + m g b ( 1 − a 2 b 2 s i n 2 θ ) 1 / 2 + m g a cos θ$ (20)

The dissipative generalized forces are:

$G α N C = − c l 2 α ˙ G θ N C = M M o t o r − c m θ ˙$ (21)

The symbol $c$ represents the viscous friction coefficient in the joint where the pendulum is suspended. The $MMotor$is the torque provided by the DC motor to the disc. The term $cm$ represents the viscous friction in the center of the disc. This friction due to $cm$ is neglected.

Deriving the Lagrangian function through the Lagrange equations, we found the two differential Equations (21) and (22). The obtainment of Equation (22) began by the Equation (10), if one can consider the electric constant of the motor L/R is smaller than the $RJ/ KE KT$, the electric equation of the motor allow us to determine the torque supplied through the voltage set and calculate by the Equation (24).

$J θ ¨ + m a 2 F 2 θ ¨ + m a 2 F F ˙ θ ˙ + m a F l cos ( α ) α ˙ 2 + m a F l s i n ( α ) α ¨ + m g a F = M M o t o r − c m θ ˙$ (22)

$m l 2 α ¨ + m a l s i n ( α ) F θ ¨ + m a l s i n α F ˙ θ ˙ + m g l s i n ( α ) = − c l 2 α ˙$ (23)

$M M o t o r = K T R V − K E K T R θ ˙$ (24)

Using the dimensionless terms, based mainly in the dimensionless time, the Equations (22), (23) and (24) were rewritten as in Equations (25), (26) and (27). The auxiliary function F derived with respect to the dimensionless time $τ$ is presented in Equation (28).

$J ω 0 θ ″ + m a 2 F 2 ω 0 2 θ ″ + m a 2 F F ′ θ ′ ω 0 2 + m a F l cos ( α ) ω 0 2 α ' 2 + m a F l s i n ( α ) ω 0 2 α ″ + m g a F = M m o t o r − c m θ ′ ω 0$ (25)

$α ″ + γ α ' + a s i n ( α ) F θ ″ l + a s i n ( α ) F ' θ ' l + s i n ( α ) = 0$ (26)

$M m o t o r = K T V R − K E K T R ω 0 θ '$ (27)

$F ' = θ ' cos θ + ϵ θ ′ cos ( 2 θ ) ( 1 − ϵ 2 s i n 2 θ ) 1 2 + ϵ 3 θ ′ s i n 2 ( 2 θ ) 4 ( 1 − ϵ 2 s i n 2 θ ) 3 2$ (28)

# 3 RESULTS

The presence of the DC generator modifies the dynamics of the pendulum. However, the kinds of motion are the same. A shift took place when we compare the types of motion. The dynamic behavior depends on the parameter of the generator. A generator designed to produces a bigger power will be a device that has a greater torque opposing to the pendulum motion.

## 3.1 Bifurcation diagrams and results for the pendulum coupled to the DC generator

The bifurcation diagrams were constructed based on the resonance zones. They are the same present in Xu et al. (2005Xu, X.; Wiercogroch, M.; Cartmell, M.P. Rotating Orbits of a Parametrically-excited pendulum, Chaos Solitons and Fractals, v.23, pp.1537-1548, 2005.). Those resonance regions in the parametric pendulum were $ω$ equal to 1.8 in Figure 3, 0.9 in Figure 4 and 0.575 in Figure 5. The values of the Lyapunov exponent indicated chaos when the values are positive. Considering the graphics of Lyapunov exponents, one can affirm that they point the chaos in the same regions of that observed in the bifurcation diagrams. The time elapsed for the obtainment of bifurcation diagrams was $τ$ equal to 300. It was plotted only the Poincaré sections between 150 and 300 of the time history.

Figure 3
(a) Bifurcation diagram for $ω=1.8$ (b) Lyapunov exponents for $ω=1.8$

Figure 4
(a) Bifurcation diagram for $ω=0.9$ (b) Lyapunov exponents for $ω=0.9$

Figure 5
(a) Bifurcation diagram for $ω=0.575$ (b) Lyapunov exponents for $ω=0.575$

In the Figure 6(b) the Poincaré section shows a strange attractor with fractal appearance, which indicates the presence of chaos. The pendulum dynamics was, in this case, a tumbling chaos. Hence, the plot of the phase portrait in Figure 6(a) is performed after undo the laps so that the pendulum is in an interval of -$π$ to $π$.

The two-period oscillation in Figure 7 demonstrated that cause of rising of chaos as a doubling period cascade for the bifurcation diagram associated with $ω$ equal to 1.8. Whilst, the one-period attractor in Figure 8 occurs after a saddle-node bifurcation.

For the frequency of excitation when $ω$ is equal to 0.575, the bifurcation diagram in Xu et al.(2005Xu, X.; Wiercogroch, M.; Cartmell, M.P. Rotating Orbits of a Parametrically-excited pendulum, Chaos Solitons and Fractals, v.23, pp.1537-1548, 2005.) exhibited the chaos due to a doubling-period cascade. In the present analysis, when the generator is present, for $ω$ equals to 0.575 the chaos appeared after a saddle-node bifurcation, what one can see in the one-period attractor in the Figure 9.

Figure 6
Strange attractor for: p=9.0; $ω=1.8$ (a) Phase portrait and (b) Poincaré section

Figure 7
Two-period oscillation for: p=2.1; $ω=1.8$ (a) Phase portrait and (b) Poincaré section

Figure 8
One-period oscillation for: p=2.0; $ω=0.9$ (a) Phase portrait and (b) Poincaré section

Figure 9
One-period oscillation for: p=2.55 and $ω=0.575$ (a) Phase portrait and (b) Poincaré section

## 3.2 Dynamical results for the pendulum vibrated by the DC motor

The parameter of control is the voltage set on the motor. The values used in this nonideal mechanism were: a$=0.12m$, b=0.3m, g=9.81m/s2, c=0.32 Ns/m, $l$=0.25m, m=0.5 kg, $KT=127.10-3Nm/A$, $KE=KT$, $J=0.5 kg m2$, $L$=0,161 Henry, R=0,365 Ω.

In the Figure 10, it is possible to see a synchronization between the pendulum and the motor. The pendulum speedy is in the Figure 10(b) and the motor speedy in the Figure 10(c). In the same interval of time, the pendulum completed two cycles of oscillation, while the motor executed four cycles of rotation.

Trying to reproduce the same conditions in the ideal model we found a completely different result. The mean value of the motor was worked out and used for an ideal excitation with constant crank speedy $θ˙$. The respective dimensionless parameters are$: a/l=0.03$, $ε=0.4$, $θ˙/ω0$=4,918 and ã = 0,1022. The result was a two-period rotation for the ideal situation, while the nonideal model resulted in oscillations of the pendulum. The rotating behavior for the ideal excitation is verified by the time history present in Figure 11(a) and the two-period feature by the Poincaré section in Figure 11(b).

Figure 10
Results for V=4.5 Volts (a) Time history of the pendulum position (b) Pendulum speedy (c) Motor speedy

Figure 11
Results for ideal pendulum $p=11.61$, ù=4.918 ; å=0.4, ã=0.1022 (a) Time history of the pendulum position (b) Poincaré section

# 4 CONCLUSIONS

The results presented in Xu et al. (2005Xu, X.; Wiercogroch, M.; Cartmell, M.P. Rotating Orbits of a Parametrically-excited pendulum, Chaos Solitons and Fractals, v.23, pp.1537-1548, 2005.) demonstrated rising of chaos due to cascate of doubling period bifurcation in diagrams of $ω$ equal to 1.8 and 0,575. The saddle-node bifurcation caused the chaos in the bifurcation diagram for $ω$ equal to 0.9. In the results of the present paper, after the inclusion of the DC generator the types of bifurcation were saddle-node for $ω$ equal to 0.575 and 0.9. With the DC generator, the doubling-period cascade occurred for $ω$ equals to 1.8. These results demonstrate that for these mechanism, the types of bifurcation may not be associated only with the excitation frequency. The presence of the generator causes changes in these types of bifurcations and causes a shift of where the chaotic regions take place in different ranges in the bifurcation diagrams.

About the analysis of the nonideal excitation of the pendulum by the DC motor, it is possible to state that in this situation of pendulum excitation, the results may be very different if you consider or not the conditions of limited power supply. The result of ideal considerations led to rotational motions, while the nonideal model pointed an oscillation of the pendulum. As affirmed in Kononenko (1969Kononenko, V.O. Vibrating Systems with a Limited Power-Supply, Ed. Ilife, London. (1969)), the nonideal or the limited power supply considerations are important when the energy supplied is next to the energy consumed. The analysis in Kazmierczak et al. (2015Kazmierczak, M., Kudra, G., Awrejcewicz, J., Wasilewski, G. Mathematical modelling, numerical simulations and experimental verification of bifurcation dynamics of a pendulum driven by a dc motor. Eur. J. Phys. 36 (2015) 055028 (13pp) doi:10.1088/0143-0807/36/5/055028, 2015
https://doi.org/10.1088/0143-0807/36/5/0...
) used a single degree to successfully predict a nonideal model for the pendulum horizontally excited, whilst the present analysis maintained a two-degree model to verify the synchronizations in different types of motion. In Wasilewski et al. (2016Wasilewski G., Kudra G., Awrejcewicz J., Kazmierczak M., Tyborowski M., Kazmierczak, M. A Pendulum Driven by a Crank-Shaft-Slider Mechanism and a DC Motor-Mathematical Modeling, Parameter Identification, and Experimental Validation of Bifurcational Dynamics. Dynamical Systems: Theoretical and Experimental Analysis, Springer Proceedings in Mathematics & Statistics 182, 2016, DOI 10.1007/978-3-319-42408-8_31
https://doi.org/10.1007/978-3-319-42408-...
), a new model for the resistance was developed based on a mixture of dry friction and viscous damping, what allowed a good approach to experimental results. Comparing Marszal et al. (2017Marszal, M., Witkowski, B., Jankowski, K., Perlikowski, P., Kapitaniak, T. Energy Harvesting from Pendulum Oscillations. International Journal of Non-Linear Mechanics, 94, 2017. http://dx.doi.org/10.1016/j.ijnonlinmec.2017.03.022
http://dx.doi.org/10.1016/j.ijnonlinmec....
) with the present analysis, the previous used a freewheel to obtain the rotation in the DC generator through pure oscillation in the pendulum where a better efficiency was found for smaller reduced lengths in the pendulum. This analysis verified the types of motion where the pendulum exhibits different types of motion, where oscillations, rotations and tumbling chaos in the pendulum are directly transmitted to the DC generator yielding to the conclusion that energy harvesting may be performed in different types of motion since the pendulum does not stop in the vertical position. For this reason, maintain higher angular velocities are recommended.

# References

• Alevras, P., Yurchenko, D., Naess, A., Stochastic synchronization of rotating parametric pendulums, Meccanica 49 (2014) 1945-1954.
• Alevras, P.,Brown, I., Yurchenko, D. Experimental investigation of a rotating parametric pendulum, Nonlin. Dyn. 81 (2015) 201-213.
• Andreeva, T., Alevras, P., Naess, A., Yurchenko, D., Dynamics of a parametric rotating pendulum under a realistic wave profile, Int. J. Dynam. Control (2015). https://doi.org/10.1007/s40435-015-0168-z
» https://doi.org/10.1007/s40435-015-0168-z
• Avanço, R.H., Navarro, H.A., Brasil, R.M.L.R.F., Balthazar, J.M. (2014) Nonlinear Dynamics of a Pendulum excited by a crank-shaft-slider mechanism. ASME International Mechanical Engineering Congress and Exposition, Volume 4B: Dynamics, Vibration, and Control (4B): V04BT04A025. doi:10.1115/IMECE2014-36643.
» https://doi.org/10.1115/IMECE2014-36643
• Avanço, R.H., Navarro, H.A., Brasil, R.M.L.R.F., Balthazar, J.M., Bueno, A.M., Tusset, A.M. (2016) Statements on nonlinear dynamics behavior of a pendulum, excited by a crank-shaft-slider mechanism, Meccanica 51, 1301-1320.
• Avanço, R.H., Tusset, A.M., Suetake, M., Navarro, H., Balthazar, J.M, Nabarrete, A. (2017) The pendulum dynamic analysis with DC motors and generators for sea waves energy harvest, DSTA2017 Vibration, Control and Stability of Dynamical Systems, ISBN 839353125X, 9788393531257, Lodz, Poland, 2017.
• Belato, D.; Weber, H.I.; Balthazar, J.M.; Mook, D.T. Chaotic Vibrations of a nonideal eletro-mechanical system, International Journal of Solids and Structures, Vol.38, pp. 1699-1706, 2001.
• Falcão, A.F. O., Wave energy utilization: a review of the Technologies, Renew. Sustain. Energy Rev., 14, 2010, 899-918.
• Horton, B.W., Wiercigroch, M., Xu, X. Transient tumbling chaos and damping identification for parametric pendulum. Philos. Tran. R. Soc. A 366, 767-784 (2008)
• Kazmierczak, M., Kudra, G., Awrejcewicz, J., Wasilewski, G. Mathematical modelling, numerical simulations and experimental verification of bifurcation dynamics of a pendulum driven by a dc motor. Eur. J. Phys. 36 (2015) 055028 (13pp) doi:10.1088/0143-0807/36/5/055028, 2015
» https://doi.org/10.1088/0143-0807/36/5/055028
• Kononenko, V.O. Vibrating Systems with a Limited Power-Supply, Ed. Ilife, London. (1969)
• Krasnopolskaya, T.S. and Shvets, A.Y. Chaos in vibrating systems with a limited power-supply, Chaos, Vol.3, n.3, American Institute of Physics, 1993.
• Lenci, S., Brocchini, M., Lorenzoni, C. Experimental rotations of a Pendulum on Water Waves. J. Comput. Nonlinear Dynam 7(1), 011007 (Aug 15, 2011) DOI: 10.1115/1.4004547
» https://doi.org/10.1115/1.4004547
• Lenci, S., Rega, G. Experimental versus theoretical robustness of rotating solutions in a parametrically excited pendulum: a dynamical integrity perspective, Physica D: Nonlin. Phenom. 240 (2011) 814-824.
• Leven, R.W., Koch, B.P. Chaotic Behavior of a Parametrically-Excited Pendulum, Physics Letters A, vol.86, 1981.
• Marszal, M., Witkowski, B., Jankowski, K., Perlikowski, P., Kapitaniak, T. Energy Harvesting from Pendulum Oscillations. International Journal of Non-Linear Mechanics, 94, 2017. http://dx.doi.org/10.1016/j.ijnonlinmec.2017.03.022
» http://dx.doi.org/10.1016/j.ijnonlinmec.2017.03.022
• Paula, A. S., Savi, M. A. & Pereira-Pinto, F. H. I. 2006 Chaos and transient chaos in na experimental nonlinear pendulum. J. Sound Vib.294, 585-595. (doi:10.1016/j.jsv.2005.11.015)
» https://doi.org/10.1016/j.jsv.2005.11.015
• S. Lenci, On the production of energy from sea waves by a rotating pendulum: a preliminary experimental study, J. Appl. Nonlin. Dyn. 3 (2014) 187-201.
• Wasilewski G., Kudra G., Awrejcewicz J., Kazmierczak M., Tyborowski M., Kazmierczak, M. A Pendulum Driven by a Crank-Shaft-Slider Mechanism and a DC Motor-Mathematical Modeling, Parameter Identification, and Experimental Validation of Bifurcational Dynamics. Dynamical Systems: Theoretical and Experimental Analysis, Springer Proceedings in Mathematics & Statistics 182, 2016, DOI 10.1007/978-3-319-42408-8_31
» https://doi.org/10.1007/978-3-319-42408-8_31
• Wasilewski, G., Kudra, G., Awrejcewicz, J., Kazmierczak, M., Tyborowski, M., Kazmierczak, M. Experimental and numerical investigations of a pendulum driven by a low-powered DC motor. Dynamical System-Mathematical and Numerical Approaches, TU of Lodz, NUM305-15, 2015.
• Wiercigroch, M., Najdecka, A., Vazirii, V., Nonlinear dynamics of pendulums system for energy harvesting, in: Vibration Problems ICOVP 2009, Springer, 2009, pp. 35-42.
• Xu, X., Pavlovskaia, E., Wiercigroch, M., Romeo, F., Lenci, S.: Dynamic interactions between parametric pendulum and electro-dynamical shaker. Z. Angew. Math. Mech. 87, 172-186 (2007).
• Xu, X.; Wiercogroch, M.; Cartmell, M.P. Rotating Orbits of a Parametrically-excited pendulum, Chaos Solitons and Fractals, v.23, pp.1537-1548, 2005.
• Yurchenko, D. and Alevras, P. Parametric pendulum based wave energy converter. Mechanical Systems and Signal Processing 99 504-515, 2018. Doi: http://dx.doi.org/10.1016/j.ymssp.2017.06.026
» http://dx.doi.org/10.1016/j.ymssp.2017.06.026
• Available online: November 22, 2018

# Publication Dates

• Publication in this collection
2019


text:
# Find the roots of the quadratic equations by using the quadratic formula in each of the following:$2 x^{2}-3 x-5=0$

#### Complete Python Prime Pack

9 Courses     2 eBooks

#### Artificial Intelligence & Machine Learning Prime Pack

6 Courses     1 eBooks

#### Java Prime Pack

9 Courses     2 eBooks

To do:

We have to find the roots of the given quadratic equations.

Solution:

(i) $2x^2-3x - 5 = 0$

The above equation is of the form $ax^2 + bx + c = 0$, where $a = 2, b = -3$ and $c = - 5$

Discriminant $\mathrm{D} =b^{2}-4 a c$

$=(-3)^{2}-4 \times 2(-5)$

$=9+40$

$=49$

$\mathrm{D}>0$

Let the roots of the equation are $\alpha$ and $\beta$

$\alpha =\frac{-b+\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-(-3)+\sqrt{49}}{2(2)}$

$=\frac{3+7}{4}$

$=\frac{10}{4}$

$=\frac{5}{2}$

$\beta =\frac{-b-\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-(-3)-\sqrt{49}}{2(2)}$

$=\frac{3-7}{4}$

$=\frac{-4}{4}$

$=-1$

Hence, the roots of the given quadratic equation are $\frac{5}{2}, -1$.

(ii) $5x^2+13x + 8 = 0$

The above equation is of the form $ax^2 + bx + c = 0$, where $a = 5, b = 13$ and $c = 8$

Discriminant $\mathrm{D} =b^{2}-4 a c$

$=(13)^{2}-4 \times 5\times8$

$=169-160$

$=9$

$\mathrm{D}>0$

Let the roots of the equation are $\alpha$ and $\beta$

$\alpha =\frac{-b+\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-13+\sqrt{9}}{2(5)}$

$=\frac{-13+3}{10}$

$=\frac{-10}{10}$

$=-1$

$\beta =\frac{-b-\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-13-\sqrt{9}}{2(5)}$

$=\frac{-13-3}{10}$

$=\frac{-16}{10}$

$=-\frac{8}{5}$

Hence, the roots of the given quadratic equation are $-\frac{8}{5}, -1$.

(iii) $-3x^2+5x + 12 = 0$

The above equation is of the form $ax^2 + bx + c = 0$, where $a = -3, b = 5$ and $c = 12$

Discriminant $\mathrm{D} =b^{2}-4 a c$

$=(5)^{2}-4 \times (-3)\times12$

$=25+144$

$=169$

$\mathrm{D}>0$

Let the roots of the equation are $\alpha$ and $\beta$

$\alpha =\frac{-b+\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-5+\sqrt{169}}{2(-3)}$

$=\frac{-5+13}{-6}$

$=\frac{8}{-6}$

$=-\frac{4}{3}$

$\beta =\frac{-b-\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-5-\sqrt{169}}{2(-3)}$

$=\frac{-5-13}{-6}$

$=\frac{-18}{-6}$

$=3$

Hence, the roots of the given quadratic equation are $-\frac{4}{3}, 3$.

(iv) $-x^2+7x - 10 = 0$

The above equation is of the form $ax^2 + bx + c = 0$, where $a = -1, b = 7$ and $c =-10$

Discriminant $\mathrm{D} =b^{2}-4 a c$

$=(7)^{2}-4 \times (-1)\times(-10)$

$=49-40$

$=9$

$\mathrm{D}>0$

Let the roots of the equation are $\alpha$ and $\beta$

$\alpha =\frac{-b+\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-7+\sqrt{9}}{2(-1)}$

$=\frac{-7+3}{-2}$

$=\frac{-4}{-2}$

$=2$

$\beta =\frac{-b-\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-7-\sqrt{9}}{2(-1)}$

$=\frac{-7-3}{-2}$

$=\frac{-10}{-2}$

$=5$

Hence, the roots of the given quadratic equation are $2, 5$.

(v) $x^{2}+2 \sqrt{2} x-6=0$

The above equation is of the form $ax^2 + bx + c = 0$, where $a = 1, b = 2 \sqrt{2}$ and $c =-6$

Discriminant $\mathrm{D} =b^{2}-4 a c$

$=(2 \sqrt{2})^{2}-4 \times (1)\times(-6)$

$=8+24$

$=32$

$\mathrm{D}>0$

Let the roots of the equation are $\alpha$ and $\beta$

$\alpha =\frac{-b+\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-2 \sqrt{2}+\sqrt{32}}{2(1)}$

$=\frac{-2 \sqrt{2}+4\sqrt2}{2}$

$=\frac{2\sqrt2}{2}$

$=\sqrt2$

$\beta =\frac{-b-\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-2 \sqrt{2}-\sqrt{32}}{2(1)}$

$=\frac{-2 \sqrt{2}-4\sqrt{2}}{2}$

$=\frac{-6\sqrt{2}}{2}$

$=-3\sqrt2$

Hence, the roots of the given quadratic equation are $\sqrt2, -3\sqrt2$.

(vi) We know that for a quadratic equation $ax^{2} +bx+c=0$

$x=\frac{-b\pm \sqrt{b^{2} -4ac}}{2a}$

On comparing it to the given quadratic equation $a=1,b=-3\sqrt{5} \ and\ c=10$

On substituting these values of $\displaystyle a,\ b\ and\ c$

$x=\frac{-( -3\surd 5) \pm \sqrt{( -3\surd 5)^{2} -4\times 1\times 10}}{2\times 1}$

$x=\frac{3\sqrt{5} \pm \sqrt{( 45-40)}}{2}$

$x=\frac{\left( 3\sqrt{5} \pm \sqrt{5}\right)}{2}$

If $x=\frac{\left( 3\sqrt{5} +\sqrt{5}\right)}{2}$

$\Rightarrow x=\frac{4\sqrt{5}}{2}$

$\Rightarrow x=2\sqrt{5}$

If $x=\frac{\left( 3\sqrt{5} -\sqrt{5}\right)}{2}$

$\Rightarrow x=\frac{\left( 2\sqrt{5}\right)}{2}$

$\Rightarrow x=\sqrt{5}$

$\therefore x=2\sqrt{5}, \ \sqrt{5}$

(vii) $\frac{1}{2} x^{2}-\sqrt{11} x+1=0$

The above equation is of the form $ax^2 + bx + c = 0$, where $a = \frac{1}{2}, b = -\sqrt{11}$ and $c =1$

Discriminant $\mathrm{D} =b^{2}-4 a c$

$=(-\sqrt{11})^{2}-4 \times \frac{1}{2} \times 1$

$=11-2$

$=9$

$\mathrm{D}>0$

Let the roots of the equation are $\alpha$ and $\beta$

$\alpha =\frac{-b+\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-(-\sqrt{11})+\sqrt{9}}{2(\frac{1}{2})}$

$=\frac{\sqrt{11}+3}{1}$

$=3+\sqrt{11}$

$\beta =\frac{-b-\sqrt{\mathrm{D}}}{2 a}$

$=\frac{-(-\sqrt{11})-\sqrt{9}}{2(\frac{1}{2})}$

$=\frac{\sqrt{11}-3}{1}$

$=-3+\sqrt{11}$

Hence, the roots of the given quadratic equation are $3+\sqrt{11}, -3+\sqrt{11}$.

Updated on 10-Oct-2022 13:27:26

format: plain


text:
×

# Gcd needs help

Find the number of positive gcd of $$5n+1$$ and $$17n+1$$where $$n$$ is a positive integer.

Note by William Isoroku
11 months, 1 week ago

Sort by:


text:
stats (version 3.6.2)

# anova.lm: ANOVA for Linear Model Fits

## Description

Compute an analysis of variance table for one or more linear model fits.

## Usage

# S3 method for lm
anova(object, …)# S3 method for lmlist
anova(object, …, scale = 0, test = "F")

## Arguments

object, …

objects of class lm, usually, a result of a call to lm.

test

a character string specifying the test statistic to be used. Can be one of "F", "Chisq" or "Cp", with partial matching allowed, or NULL for no test.

scale

numeric. An estimate of the noise variance $$\sigma^2$$. If zero this will be estimated from the largest model considered.

## Value

An object of class "anova" inheriting from class "data.frame".

## Warning

The comparison between two or more models will only be valid if they are fitted to the same dataset. This may be a problem if there are missing values and R's default of na.action = na.omit is used, and anova.lmlist will detect this with an error.

## Details

Specifying a single object gives a sequential analysis of variance table for that fit. That is, the reductions in the residual sum of squares as each term of the formula is added in turn are given in as the rows of a table, plus the residual sum of squares.

The table will contain F statistics (and P values) comparing the mean square for the row to the residual mean square.

If more than one object is specified, the table has a row for the residual degrees of freedom and sum of squares for each model. For all but the first model, the change in degrees of freedom and sum of squares is also given. (This only make statistical sense if the models are nested.) It is conventional to list the models from smallest to largest, but this is up to the user.

Optionally the table can include test statistics. Normally the F statistic is most appropriate, which compares the mean square for a row to the residual sum of squares for the largest model considered. If scale is specified chi-squared tests can be used. Mallows' $$C_p$$ statistic is the residual sum of squares plus twice the estimate of $$\sigma^2$$ times the residual degrees of freedom.

## References

Chambers, J. M. (1992) Linear models. Chapter 4 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.

The model fitting function lm, anova.

drop1 for so-called ‘type II’ anova where each term is dropped one at a time respecting their hierarchy.

## Examples

Run this code
# NOT RUN {
## sequential table
fit <- lm(sr ~ ., data = LifeCycleSavings)
anova(fit)

## same effect via separate models
fit0 <- lm(sr ~ 1, data = LifeCycleSavings)
fit1 <- update(fit0, . ~ . + pop15)
fit2 <- update(fit1, . ~ . + pop75)
fit3 <- update(fit2, . ~ . + dpi)
fit4 <- update(fit3, . ~ . + ddpi)
anova(fit0, fit1, fit2, fit3, fit4, test = "F")

anova(fit4, fit2, fit0, test = "F") # unconventional order
# }

Run the code above in your browser using DataCamp Workspace


text:
## Model uncertainty in deep learning with Monte Carlo dropout in keras

Deep learning models have shown amazing performance in a lot of fields such as autonomous driving, manufacturing, and medicine, to name a few. However, these are fields in which representing model uncertainty is of crucial importance.

## Interpretable named entity recognition with keras and LIME

In the previous posts, we saw how to build strong and versatile named entity recognition systems and how to properly evaluate them. But often you want to understand your model beyond the metrics. So in this tutorial I will show you how you can build an explainable and interpretable NER system with keras and the LIME algorithm.

## Introduction to entity embeddings with neural networks

Since a lot of people recently asked me how neural networks learn the embeddings for categorical variables, for example words, I’m going to write about it today. You all might have heard about methods like word2vec for creating dense vector representation of words in an unsupervised way.

## Learn to identify ingredients with neural networks

Today we want to build a model, that can identify ingredients in cooking recipes. I use the “German Recipes Dataset”, I recently published on kaggle. We have more than 12000 German recipes and their ingredients list.

## How to use magnitude with keras

This time we have a look into the magnitude library, a feature-packed Python package and vector storage file format for utilizing vector embeddings in machine learning models in a fast, efficient, and simple manner developed by Plasticity.

## Named entity recognition with Bert

In 2018 we saw the rise of pretraining and finetuning in natural language processing. Large neural networks have been trained on general tasks like language modeling and then fine-tuned for classification tasks. One of the latest milestones in this development is the release of BERT.

## LSTM with attention for relation classification

Once named entities have been identified in a text, we then want to extract the relations that exist between them. As indicated earlier, we will typically be looking for relations between specified types of named entity.

## Image segmentation with test time augmentation with keras

In the last post, I introduced the U-Net model for segmenting salt depots in seismic images. This time, we will see how to improve the model by data augmentation and especially test time augmentation (TTA). You will learn how to use data augmentation with segmentation masks and what test time augmentation is and how to use it in keras.

## U-Net for segmenting seismic images with keras

Today I’m going to write about a kaggle competition I started working on recently. In the TGS Salt Identification Challenge, you are asked to segment salt deposits beneath the Earth’s surface. So we are given a set of seismic images that are $101 \times 101$ pixels each and each pixel is classified as either salt or sediment.

## State-of-the-art named entity recognition with residual LSTM and ELMo

This is the sixth post in my series about named entity recognition. This time I’m going to show you some cutting edge stuff. We will use a residual LSTM network together with ELMo embeddings, developed at Allen NLP. You will learn how to wrap a tensorflow hub pre-trained model to work with keras. The resulting model with give you state-of-the-art performance on the named entity recognition task.

## Explain neural networks with keras and eli5

In this post, I’m going to show you how you can use a neural network from keras with the LIME algorithm implemented in the eli5 TextExplainer class. For this we will write a scikit-learn compatible wrapper for a keras bidirectional LSTM model. The wrapper will also handle the tokenization and the storage of the vocabulary.


text:
My Math Forum Derivatives: Chain Rule - Marginal Revenue Product

 Calculus Calculus Math Forum

 June 11th, 2017, 11:04 PM #1 Newbie   Joined: Jun 2017 From: vancouver Posts: 3 Thanks: 0 Derivatives: Chain Rule - Marginal Revenue Product All answers involve a unit of dollars, so you must enter your answers accurate to two decimal places! A factory owner who employs m workers finds that they produce q = 1.8m(1.8m+18)^3/2 units of product per day. The total revenue R in dollars is R=1544q / (344448+4q)^1/2 (a) From the fact that revenue = (price per unit)*(number of units) it follows that R=(price per unit)*q So when there are 10 workers, the price per unit is 2.5733 dollars. (b) When there are 10 workers, the marginal revenue is 2.52 dollars/(one unit of product). (c) The marginal-revenue product is defined as the rate of change of revenue with respect to the number of employees. Therefore, marginal-revenue product=dR/dm If q and R are given as above then, when m = 10, the marginal-revenue product is ? dollars/(one worker). This means that if employee number 11 is hired, revenue will increase by approximately ? dollars per day. Can't seem to find the answer for c. Last edited by skipjack; June 12th, 2017 at 09:55 AM.
 June 12th, 2017, 09:48 AM #2 Senior Member   Joined: May 2016 From: USA Posts: 1,047 Thanks: 430 Are you sure that a calculus answer is even wanted? I would probably attack this with difference equations rather than derivatives.
June 15th, 2017, 07:15 AM   #3
Math Team

Joined: Jan 2015
From: Alabama

Posts: 3,240
Thanks: 884

Quote:
 Originally Posted by theguest All answers involve a unit of dollars, so you must enter your answers accurate to two decimal places! A factory owner who employs m workers finds that they produce q = 1.8m(1.8m+1^3/2 units of product per day. The total revenue R in dollars is R=1544q / (344448+4q)^1/2 (a) From the fact that revenue = (price per unit)*(number of units) it follows that R=(price per unit)*q
So $\frac{1544q}{(344448+ 4q)^{1/2}= 1.8m(1.8m+ 1^{3/2} P" /> where P is the "price per unit".

Quote:
 So when there are 10 workers, the price per unit is 2.5733 dollars.
Well, the formula above says that $\frac{15440}{(34448^{1/2}}= 18(36)^{3/2}P" /> or $26.306= 108P$ so that P= 0.24357 not 2.5733.

 Tags chain, derivatives, marginal, product, revenue, rule

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post green21317 Calculus 1 February 3rd, 2014 03:05 AM li1995717 Calculus 2 October 2nd, 2013 07:31 PM Oranges'n'Lemons Calculus 2 February 17th, 2013 10:18 PM pomazebog Calculus 3 February 7th, 2012 11:52 PM Oranges'n'Lemons Economics 0 December 31st, 1969 04:00 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top


text:
### Home > CALC > Chapter 1 > Lesson 1.5.1 > Problem1-203

1-203.

Reflective symmetry across the y-axis means that f(x) is an even function. The definition of even functions is f(x) = f(−x).

Evaluate f(−x)...


text:
# Radio DMG Episode 041: “Uniquely Random”

Click on through.
You know what to do.
Make it happen.

In This Episode: We have Raj Ramayya, Tia Ballard, and David Vincent. The middle interview with Tia Ballard is weirdly chaotic and bizarre. There is audio I had to censor and then ridiculous klaxons. My apologies and maybe you could enjoy it. Actually, you will enjoy it. Just be warned. Okay?

MP3(68MB): Thank you for your co-operation.

Time Stamps are just something we feel we need because of White Guilt.

This entry was posted in Radio Dmg Shows and tagged , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.


text:
<meta http-equiv="refresh" content="1; url=/nojavascript/">
You are viewing an older version of this Concept. Go to the latest version.

# One-Step Equations and Inverse Operations

%
Progress
Practice One-Step Equations and Inverse Operations
Progress
%
Equations with Variables on One Side

Erin, Jillian, Stephanie and Jacob went to the movies. The total bill for the tickets and snacks came to $72.00. What is an equation that represents this situation? How much should each teen pay to split the bill evenly? ### Watch This ### Guidance When solving any equation, your job is to find the value for the letter that makes the equation true. Solving equations with variables on one side can be done with the help of models such as a balance or algebra tiles. When solving equations with variables on one side of the equation there is one main rule to follow: whatever you do to one side of the equals sign you must do the same to the other side of the equals sign. For example, if you add a number to the left side of an equals sign, you must add the same number to the right side of the equals sign. #### Example A $5a + 2 = 17$ Solution: The problem can be solved if you think about the problem in terms of a balance. You know that the two sides are equal so the balance has to stay horizontal. You can place each side of the equation on each side of the balance. In order to solve the equation, you have to get the variable $a$ all by itself. Always remember that you need to keep the balance horizontal. This means that whatever you do to one side of the equation, you have to do to the other side. First subtract 2 from both sides to get rid of the 2 on the left. Since 5 is multiplied by $a$ , you can get $a$ by itself (or isolate it) by dividing by 5. Remember that whatever you do to one side, you have to do to the other. If you simplify this expression, you get: Therefore $a = 3$ . You can check your answer to see if you are correct by substituting your answer back into the original equation. $5a + 2 &= 17\\5({\color{red}3}) + 2 &= 17\\15 + 2 &= 17\\17 &= 17 \ \$ #### Example B $7b - 7 = 42$ Solution: Again, you can solve the problem if you think about the problem in terms of a balance (or a seesaw). You know that the two sides are equal so the balance has to stay horizontal. You can place each side of the equation on each side of the balance. In order to solve the equation, you have to get the variable $b$ all by itself. Always remember that you need to keep the balance horizontal. This means that whatever you do to one side of the equation, you have to do to the other side. First add 7 from both sides to get rid of the 7 on the left. Since 7 is multiplied by $b$ , you can get $b$ by itself (or isolate it) by dividing by 7. Remember that whatever you do to one side, you have to do to the other. If you simplify this expression, you get: Therefore $b = 7$ . You can check your answer to see if you are correct. $7b - 7 &= 42\\7({\color{red}7}) - 7 &= 42\\49 - 7 &= 42\\42 &= 42 \ \$ #### Example C This same method can be extended by using algebra tiles. If you let rectangular tiles represent the variable, square tiles represent one unit, green tiles represent positives numbers, and white tiles represent the negative numbers, you can solve the equations using an alternate method. The green algebra $x-$ tiles represent variables; therefore, there are 3 $c$ blocks for the equation. The other green blocks represent the numbers or constants. There is a 2 on the left side of the equation so there are 2 square green blocks. There is an 11 on the right side of the equation so there are 11 square green blocks on the right side of the equation. Solution: To solve, add two negative tiles to the right and left hand sides. The same rule applies to this problem as to all of the previous problems. Whatever you do to one side you have to do to the other. This leaves us with the following: You can reorganize these to look like the following: Organizing the remaining algebra tiles allows us to realize the answer to be $x = 3$ or for your example $c = 3$ . Let’s do your check as with the previous two problems. $3c + 2 &= 11\\3({\color{red}3}) + 2 &= 11\\9 + 2 &= 11\\11 &= 11 \ \$ #### Concept Problem Revisited There are four teens going to the movies (Erin, Jillian, Stephanie, and Jacob). The total bill was$72.00. Therefore your equation is $4x = 72$ . you divide by 4 to find your answer.

$x &= \frac{72}{4}\\x &= 18$

Therefore each teen will have to pay \$18.00 for their movie ticket and snack.

### Vocabulary

Constant
A constant is a numerical coefficient. For example in the equation $4x + 72 = 0$ , the 72 is a constant.
Equation
An equation is a mathematical statement with expressions separated by an equals sign.
Numerical Coefficient
In mathematical equations, the numerical coefficients are the numbers associated with the variables. For example, with the expression $4x$ , 4 is the numerical coefficient and $x$ is the variable.
Variable
A variable is an unknown quantity in a mathematical expression. It is represented by a letter. It is sometimes referred to as the literal coefficient.

### Guided Practice

1. Use a model to solve for the variable in the equation $x-5=12$ .

2. Use a different model to solve for the variable in the equation $3y+9=12$ .

3. Solve for $x$ in the equation $3x-2x+16=-3$ .

1. $x-5=12$

Therefore, $x=17$ .

2. $3y+9=12$

First you have to subtract 9 from both sides of the equation in order to start to isolate the variable.

Now, in order to get $y$ all by itself, you have to divide both sides by 3. This will isolate the variable $y$ .

Therefore, $y=1$ .

3. $3x-2x+16=-3$

You can use any method to solve this equation. Remember to isolate the $x$ variable. You will notice here that there are two $x$ values on the left. First let’s combine these terms.

$3x-2x+16 &= -3\\x+16 &= -3$

Now you can use any method to solve the equation. You now should just have to subtract 16 from both sides to isolate the $x$ variable.

$x+16 {\color{red}-16} &= -3 {\color{red}-16}\\x &= -19$

### Practice

Use the models that you have learned to solve for the variables in the following problems.

1. $a+3=-5$
2. $2b-1=5$
3. $4c-3=9$
4. $2-d=3$
5. $4-3e=-2$
1. $x+3=14$
2. $2y-7=5$
3. $3z+6=9$
4. $5+3x=-3$
5. $2x+2=-4$
1. $-4x+13=5$
2. $3x-5=22$
3. $11-2x=5$
4. $2x-4=4$
5. $5x+3=28$

For each of the following models, write a problem involving an equation with a variable on one side of the equation expressed by the model and then solve for the variable.

1. .

1. .

1. .

1. .

1. .

### Vocabulary Language: English

constant

constant

A constant is a value that does not change. In Algebra, this is a number such as 3, 12, 342, etc., as opposed to a variable such as x, y or a.
Equation

Equation

An equation is a mathematical sentence that describes two equal quantities. Equations contain equals signs.
Numerical Coefficient

Numerical Coefficient

In mathematical expressions, the numerical coefficients are the numbers associated with the variables. For example, in the expression $4x$, 4 is the numerical coefficient and $x$ is the variable.
Variable

Variable

A variable is a symbol used to represent an unknown or changing quantity. The most common variables are a, b, x, y, m, and n.


text:
## Intermediate Algebra (12th Edition)

The commutative properties hold that $a+b=b+a$ and $ab=ba$ (for real numbers $a$ and $b$). Therefore, the commutative property is used to change the order of two terms or factors. For example, the commutative property holds that $4+6=6+4=10$.


text:
# NDSolve problems of convergence

I have a big function that I have to maximize, so I have to evaluate some equation with thousands of different values of the parameter. But the FindMaximum returns me many errors. I have traced the cause down to a differential equation that is part of the calculation. This differential equation has to be solved as function of the parameter (called "sup" in this case) and even though it is a seemingly "easy" function and I don't need a very high precision, in many points it does not converge and reaches the maximum number of steps. The following is a simplified sample code to view the problem with a Manipulate: as you slide the cursor with the Sup variable the NDsolve produces errors.

     Manipulate[
Module[{pend, tmax}, tmax = 30;
pend = NDSolve[{1.1089 \[Alpha]''[t] + 1.2936 Sin[\[Alpha][t]] +
210*sup*
(0.33 Sin[\[Alpha][t]] + (
0.33^2 Cos[\[Alpha][t]] Sin[\[Alpha][t]])/Sqrt[
1 - 0.33^2 Sin[\[Alpha][t]]^2]) *
UnitStep[Sin[\[Alpha][t] + Pi*UnitStep[-\[Alpha]'[t]]]] ==
0, \[Alpha][0] == -Pi/3, \[Alpha]'[0] == 0}, \[Alpha], {t, 0,
tmax}, MaxSteps -> 10^5, PrecisionGoal -> 8,
AccuracyGoal -> acc];
Plot[\[Alpha][x] /. pend, {x, 0, tmax}]], {{sup, 0.01, "Sup"}, 0.01,
0.1, Appearance -> "Labeled"}, {{acc, 8, "Acc"}, 6, 10, 1,
Appearance -> "Labeled"}, Bookmarks -> {
"Error1" :> {sup = 0.0577, acc = 7},
"Error2" :> {sup = 0.0413, acc = 8},
"Error3" :> {sup = 0.0351, acc = 6}}]

I have tried with increasing the MaxSteps and reducing the AccuracyGoal/PrecisionGoal, but it seems that there are always points in which the NDSolve does not return a good solution. And thus I cannot execute the FindMaximum to maximize my function.

Any hint on how to avoid this kind of problem and get NDSolve to return a correct result? Is there a way to trace down why NDSolve has this problems of convergence with this function?

Thanks for any help,

JBB

PD: Code update to define tmax. In the manipulate Bookmarks I have placed some examples of errors.

-
It works without problems for me. –  b.gatessucks Dec 22 '12 at 7:57
Sorry, I made a mistake, tmax is undefined in this sample code, so it gives the error you show. I correct it. –  user1084363 Dec 22 '12 at 10:58

A higher WorkingPrecison will somewhat help:

Manipulate[Module[{pend, tmax}, tmax = 30;
pend = Quiet@
NDSolve[{1.1089 \[Alpha]''[t] + 1.2936 Sin[\[Alpha][t]] +
210*sup*(0.33 Sin[\[Alpha][
t]] + (0.33^2 Cos[\[Alpha][t]] Sin[\[Alpha][t]])/
Sqrt[1 - 0.33^2 Sin[\[Alpha][t]]^2])*
UnitStep[Sin[\[Alpha][t] + Pi*UnitStep[-\[Alpha]'[t]]]] ==
0, \[Alpha][0] == -Pi/3, \[Alpha]'[0] == 0}, \[Alpha], {t, 0,
tmax}, MaxSteps -> 10^5, PrecisionGoal -> 8,
AccuracyGoal -> acc, WorkingPrecision -> 32];
Plot[\[Alpha][x] /. pend, {x, 0, tmax}]], {{sup, 0.01, "Sup"}, 0.01,
0.1, Appearance -> "Labeled"}, {{acc, 8, "Acc"}, 6, 10, 1,
Appearance -> "Labeled"},
Bookmarks -> {"Error1" :> {sup = 0.0577, acc = 7},
"Error2" :> {sup = 0.0413, acc = 8},
"Error3" :> {sup = 0.0351, acc = 6}}]

Notice that here I use Quiet to quit the warning message because the warning generates just for those decimates (their Precisions are MachinePrecision) in the equation and it doesn't influence the result. If the equation isn't in Manipulate you can also Rationalize all the decimates in the equation to avoid the warning.

For more information about the reason why I change WorkingPrecision, you can have a look at the following questions (there may be more, but at the moment I just remember these):

Funny behaviour when plotting a polynomial of high degree and large coefficients

FindRoot errors

NSolve gives additional solutions that don't satisfy the equations!

-

I finally found a "dirty" patch that I'm using and I leave here in case it is of use to someone else. Augmenting the WorkingPrecision is a good solution but makes the program extremely slow, thanks to xzczd in any case.

So I'm using some "knowledge" of the function:

• I know that the function is a decreasing oscillation and if it "shoots up" it is because of an integration problem, but not a real data,
• and also as I don't need a very high precision

What I do is to detect that there has been an integration problem (because the integration time does not reach the specified one) and if this is the case, then change a little bit the input parameter and repeat the integration until I get a "good" solution. It's not an elegant solution, but it works for me.

Here is the code:

    Module[{pend, tmax, supTemp},
Manipulate[
supTemp = sup;
Label[repeatChangingSup]; (*If NDSolve has errors returns here and \
tries again with a slightly different surface *)
tmax = 100;
pend = Quiet@
NDSolve[{1.1089 \[Alpha]''[t] + 1.2936 Sin[\[Alpha][t]] +
210*supTemp*
(0.33 Sin[\[Alpha][t]] + (
0.33^2 Cos[\[Alpha][t]] Sin[\[Alpha][t]])/Sqrt[
1 - 0.33^2 Sin[\[Alpha][t]]^2]) *
UnitStep[Sin[\[Alpha][t] + Pi*UnitStep[-\[Alpha]'[t]]]] ==
0, \[Alpha][0] == -Pi/3, \[Alpha]'[0] == 0}, \[Alpha], {t, 0,
tmax}];
If[tmax == pend[[1]][[1]][[2]][[1]][[1]][[2]],(*
If tmax is the same as the last value of the interp function,
the NDSolve has finished succesfully*)
pend, (*if everything OK return pend*)
supTemp = supTemp*1.0001; Print[supTemp];
Goto[repeatChangingSup];]; (*
Else there was an error in NDSolve and we try with a sligthly \
different sup *)
Plot[\[Alpha][x] /. pend, {x, 0, tmax}],
{{sup, 0.01, "Sup"}, 0.01, 0.1, Appearance -> "Labeled"}]]

-


text:
## Remarks on Privileged Words

Michael Forsyth, Amlesh Jayakumar, Jarkko Peltomäki, Jeffrey Shallit, Remarks on Privileged Words. International Journal of Foundations of Computer Science 27(4), 431–442, 2016.

http://dx.doi.org/10.1142/S0129054116500088

### Abstract:

We discuss the notion of privileged word, recently introduced by Kellendonk, Lenz and Savinien. A word $w$ is privileged if it is of length $\leq 1$, or has a privileged border that occurs exactly twice in $w$. We prove the following results: (1) if $w^k$ is privileged for some $k \geq 1$, then $w^j$ is privileged for all $j \geq 0$; (2) the language of privileged words is not context-free; (3) there is a linear-time algorithm to check if a given word is privileged; and (4) there are at least $2^{n-4}/n^2$ privileged binary words of length $n$.

### BibTeX entry:

@ARTICLE{jFoJaPeSh16a,  title = {Remarks on Privileged Words},  author = {Forsyth, Michael and Jayakumar, Amlesh and Peltomäki, Jarkko and Shallit, Jeffrey},  journal = {International Journal of Foundations of Computer Science},  volume = {27},  number = {4},  pages = {431–442},  year = {2016},  keywords = {privileged word,regular language,linear-time algorithm,context-free language,enumeration},  ISSN = {0129-0541},}

Belongs to TUCS Research Unit(s): FUNDIM, Fundamentals of Computing and Discrete Mathematics

Publication Forum rating of this publication: level 2

Edit publication


text:
State Estimation

The module provides a state estimation for pandapower networks.

Theoretical Background

State Estimation is a process to estimate the electrical state of a network by eliminating inaccuracies and errors from measurement data. Various measurements are placed around the network and transferred to the operational control center via SCADA. Unfortunately measurements are not perfect: There are tolerances for each measurement device, which lead to an inherent inaccuracy in the measurement value. Analog transmission of data can change the measurement values through noise. Faulty devices can return completely wrong measurement values. To account for the measurement errors, the state estimation processes all available measurements and uses a regression method to identify the likely real state of the electrical network. The output of the state estimator is therefore a set of voltage absolutes and voltage angles for all buses in the grid. The input is the network in pandapower format and a number of measurements.

Amount of Measurements

There is a minimum amount of required measurements necessary for the regression to be mathematically possible. Assuming the network contains $$n$$ buses, the network is then described by $$2n$$ variables, namely $$n$$ voltage absolute values and $$n$$ voltage angles. A slack bus serves as the reference, its voltage angle is set to zero or the value provided in the corresponding net.ext_grid.va_degree entry (see init parameter) and is not altered in the estimation process. The voltage angles of the other network buses are relative to the voltage angles of the connected slack bus. The state estimation therefore has to find $$2n-k$$ variables, where $$k$$ is the number of defined slack buses. The minimum amount of measurements $$m_{min}$$ needed for the method to work is therefore:

$$m_{min} = 2n-k$$

To perform well however, the number of redundant measurements should be higher. A value of $$m \approx 4n$$ is often considered reasonable for practical purposes.

Standard Deviation

Since each measurement device may have a different tolerance and a different path length it has to travel to the control center, the accuracy of each measurement can be different. Therefore each measurement is assigned an accuracy value in the form of a standard deviation. Typical measurement errors are 1 % for voltage measurements and 1-3 % for power measurements.

For a more in-depth explanation of the internals of the state estimation method, please see the following sources:

• Power System State Estimation: Theory and Implementation by Ali Abur, Antonio Gómez Expósito, CRC Press, 2004.

• State Estimation in Electric Power Systems - A Generalized Approach by A. Monticelli, Springer, 1999.

Defining Measurements

Measurements are defined via the pandapower “create_measurement” function. There are different physical properties, which can be measured at different elements. The following lists and table clarify the possible combinations.

Types of Measurements

• “v” for voltage measurements (in per-unit)

• “p” for active power measurements (in MW)

• “q” for reactive power measurements (in MVar)

• “i” for electrical current measurements at a line (in kA)

Element Types

• “bus” for bus measurements

• “line” for line measurements

• “trafo” for transformer measurements

• “trafo3w” for three-winding-transformer measurements

Available Measurements per Element

Element Type

Available Measurement Types

bus

v, p, q

line

i, p, q

trafo

i, p, q

trafo3w

i, p, q

The “create_measurement” function is defined as follows:

pandapower.create.create_measurement(net, meas_type, element_type, value, std_dev, element, side=None, check_existing=True, index=None, name=None, **kwargs)

Creates a measurement, which is used by the estimation module. Possible types of measurements are: v, p, q, i, va, ia

INPUT:

meas_type (string) - Type of measurement. “v”, “p”, “q”, “i”, “va”, “ia” are possible

element_type (string) - Clarifies which element is measured. “bus”, “line”, “trafo”, and “trafo3w” are possible

value (float) - Measurement value. Units are “MW” for P, “MVar” for Q, “p.u.” for V, “kA” for I. Bus power measurement is in load reference system, which is consistent to the rest of pandapower.

std_dev (float) - Standard deviation in the same unit as the measurement

element (int) - Index of the measured element (either bus index, line index, trafo index, trafo3w index)

side (int, string, default: None) - Only used for measured lines or transformers. Side defines at which end of the branch the measurement is gathered. For lines this may be “from”, “to” to denote the side with the from_bus or to_bus. It can also the be index of the from_bus or to_bus. For transformers, it can be “hv”, “mv” or “lv” or the corresponding bus index, respectively

OPTIONAL:

check_existing (bool, default: None) - Check for and replace existing measurements for this bus, type and element_type. Set it to false for performance improvements which can cause unsafe behavior

index (int, default: None) - Index of the measurement in the measurement table. Should not exist already.

name (str, default: None) - Name of measurement

OUTPUT:

(int) Index of measurement

EXAMPLES:

2 MW load measurement with 0.05 MW standard deviation on bus 0: create_measurement(net, “p”, “bus”, 0, 2., 0.05.)

4.5 MVar line measurement with 0.1 MVar standard deviation on the “to_bus” side of line 2 create_measurement(net, “q”, “line”, 2, 4.5, 0.1, “to”)

Running the State Estimation

The state estimation can be used with the wrapper function “estimate”, which prevents the need to deal with the state_estimation class object and functions. It can be imported from “estimation.state_estimation”.

pandapower.estimation.estimate(net, algorithm='wls', init='flat', tolerance=1e-06, maximum_iterations=10, calculate_voltage_angles=True, zero_injection='aux_bus', fuse_buses_with_bb_switch='all', **opt_vars)

Wrapper function for WLS state estimation.

INPUT:

net (pandapowerNet) - The net within this line should be created

init (string) - Initial voltage for the estimation. ‘flat’ sets 1.0 p.u. / 0° for all buses, ‘results’ uses the values from res_bus if available and ‘slack’ considers the slack bus voltage (and optionally, angle) as the initial values. Default is ‘flat’

OPTIONAL:

tolerance (float) - When the maximum state change between iterations is less than tolerance, the process stops. Default is 1e-6

maximum_iterations (integer) - Maximum number of iterations. Default is 10

calculate_voltage_angles (boolean) - Take into account absolute voltage angles and phase shifts in transformers, if init is ‘slack’. Default is True

zero_injection (str, iterable, None) - Defines which buses are zero injection bus or the method to identify zero injection bus, with ‘wls_estimator’ virtual measurements will be added, with ‘wls_estimator with zero constraints’ the buses will be handled as constraints

• “auto”: all bus without p,q measurement, without p, q value (load, sgen…) and aux buses will be identified as zero injection bus

• “aux_bus”: only aux bus will be identified as zero injection bus

• None: no bus will be identified as zero injection bus

• iterable: the iterable should contain index of the zero injection bus and also aux bus will be identified as zero-injection bus

fuse_buses_with_bb_switch (str, iterable, None) - Defines how buses with closed bb switches should be handled, if fuse buses will only fused to one for calculation, if not fuse, an auxiliary bus and auxiliary line will be automatically added to the network to make the buses with different p,q injection measurements identifieble

• “all”: all buses with bb-switches will be fused, the same as the default behaviour in load flow

• None: buses with bb-switches and individual p,q measurements will be reconfigurated by auxiliary elements

• iterable: the iterable should contain the index of buses to be fused, the behaviour is contigous e.g. if one of the bus among the buses connected through bb switch is given, then all of them will still be fused

OUTPUT:

successful (boolean) - Was the state estimation successful?

Note

The bad data removal is not very robust at this time. Please treat the results with caution!

The state estimation class allows additionally the removal of bad data, especially single or non-interacting false measurements. For detecting bad data the Chi-squared distribution is used to identify the presence of them. Afterwards follows the largest normalized residual test that identifys the actual measurements which will be removed at the end. Both methods are combined in the perform_rn_max_test function that is part of the state estimation class. To access it, the following wrapper function remove_bad_data has been created.

pandapower.estimation.remove_bad_data(net, init='flat', tolerance=1e-06, maximum_iterations=10, calculate_voltage_angles=True, rn_max_threshold=3.0)

Wrapper function for bad data removal.

INPUT:

net - The net within this line should be created

init - (string) Initial voltage for the estimation. ‘flat’ sets 1.0 p.u. / 0° for all buses, ‘results’ uses the values from res_bus_est if available and ‘slack’ considers the slack bus voltage (and optionally, angle) as the initial values. Default is ‘flat’

OPTIONAL:

tolerance - (float) - When the maximum state change between iterations is less than tolerance, the process stops. Default is 1e-6

maximum_iterations - (integer) - Maximum number of iterations. Default is 10

calculate_voltage_angles - (boolean) - Take into account absolute voltage angles and phase shifts in transformers, if init is ‘slack’. Default is True

rn_max_threshold (float) - Identification threshold to determine if the largest normalized residual reflects a bad measurement (default value of 3.0)

OUTPUT:

successful (boolean) - Was the state estimation successful?

Nevertheless the Chi-squared test is available as well to allow a identification of topology errors or, as explained, false measurements. It is named as chi2_analysis. The detection’s result of present bad data of the Chi-squared test is stored internally as bad_data_present (boolean, class member variable) and returned by the function call.

pandapower.estimation.chi2_analysis(net, init='flat', tolerance=1e-06, maximum_iterations=10, calculate_voltage_angles=True, chi2_prob_false=0.05)

Wrapper function for the chi-squared test.

INPUT:

net - The net within this line should be created.

init - (string) Initial voltage for the estimation. ‘flat’ sets 1.0 p.u. / 0° for all buses, ‘results’ uses the values from res_bus_est if available and ‘slack’ considers the slack bus voltage (and optionally, angle) as the initial values. Default is ‘flat’

OPTIONAL:

tolerance - (float) - When the maximum state change between iterations is less than tolerance, the process stops. Default is 1e-6

maximum_iterations - (integer) - Maximum number of iterations. Default is 10

calculate_voltage_angles - (boolean) - Take into account absolute voltage angles and phase shifts in transformers, if init is ‘slack’. Default is True

chi2_prob_false (float) - probability of error / false alarms (default value: 0.05)

OUTPUT:

• Power System State Estimation: Theory and Implementation by Ali Abur, Antonio Gómez Expósito, CRC Press, 2004.

• Power Generation, Operation, and Control by Allen J. Wood, Bruce Wollenberg, Wiley Interscience Publication, 1996.

Example

As an example, we will define measurements for a simple pandapower network net with 4 buses. Bus 4 is out-of-service. The external grid is connected at bus 1.

There are multiple measurements available, which have to be defined for the state estimator. There are two voltage measurements at buses 1 and 2. There are two power measurements (active and reactive power) at bus 2. There are also line power measurements at bus 1. The measurements are both for active and reactive power and are located on the line from bus 1 to bus 2 and from bus 1 to bus 3. This yields the following code:

pp.create_measurement(net, "v", "bus", 1.006, .004, bus1)  # V at bus 1
pp.create_measurement(net, "v", "bus", 0.968, .004, bus2)  # V at bus 2

pp.create_measurement(net, "p", "bus", 501, 10, bus2)     # P at bus 2
pp.create_measurement(net, "q", "bus", 286, 10, bus2)     # Q at bus 2

pp.create_measurement(net, "p", "line", 888, 8, element=line1, side="from")   # P_line (bus 1 -> bus 2) at bus 1
pp.create_measurement(net, "p", "line", 1173, 8, element=line2, side="from")  # P_line (bus 1 -> bus 3) at bus 1
# you can either define the side with a string ("from" / "to") or
# using the bus index where the line ends and the measurement is located
pp.create_measurement(net, "q", "line", 568, 8, element=line1, side=bus1)     # Q_line (bus 1 -> bus 2) at bus 1
pp.create_measurement(net, "q", "line", 663, 8, element=line2, side=bus1)     # Q_line (bus 1 -> bus 3) at bus 1

Now that the data is ready, the state_estimation can be initialized and run. We want to use the flat start condition, in which all voltages are set to 1.0 p.u..

success = estimate(net, init="flat")
V, delta = net.res_bus_est.vm_pu, net.res_bus_est.va_degree

The resulting variables now contain the voltage absolute values in V, the voltage angles in delta, an indication of success in success. The bus power injections can be accessed similarly with net.res_bus_est.p_mw and net.res_bus_est.q_mvar. Line data is also available in the same format as defined in res_line.

If we like to check our data for fault measurements, and exclude them in in our state estimation, we use the following code:

success_rn_max = remove_bad_data(net, init="flat")
V_rn_max, delta_rn_max = net.res_bus_est.vm_pu, net.res_bus_est.va_degree

In the case that we only like to know if there is a likelihood of fault measurements (probabilty of fault can be adjusted), the Chi-squared test should be performed separatly. If the test detects the possibility of fault data, the value of the added class member variable bad_data_present would be true as well as the boolean variable success_chi2 that is used here:

success_chi2 = chi2_analysis(net, init="flat")

Further Algorithms and Estimators

Since Pandapower 2.0.1 further algorithms and estimators (robust estimators) are available for the state estimation module, these include:

Algorithm

Available Estimators

wls (Newton-Gauss)

wls with zero injection constraints

lp

lav

irwls

wls, shgm

Scipy Optimization Tool

wls, lav, ql, qc

Most of the algorithms and estimators are implemented as explained in the Power System State Estimation: Theory and Implementation by Ali Abur, Antonio Gómez Expósito, CRC Press, 2004. While the QC and QL estimators are adjusted mathematically for a better convergence of scipy optimization tool.

For SHGM: Please see “Robust state estimation based on projection statistics,” IEEE Trans. Power Syst, vol. 11, no. 2, pp. 1118–1127, 1996. by L. Mili, M. Cheniae, N. Vichare, and P. Rousseeuw. The projection statistics was rewritten in Python based on the code published by original authors of the paper.

Example of using extra estimators:

# Using shgm
success = estimate(net, algorithm="irwls", estimator='shgm', a=5)

# Using lav
success = estimate(net, algorithm="lp")

# Using ql
success = estimate(net, algorithm="opt", estimator="ql", a=3)

Note that: The state estimation with Scipy Optimization Tool could collapse in some cases with flat start, it’s suggested to give the algorithm a warm start or try some other optimization’s methods offered by scipy, which preserves the effects of the estimator while helps the convergence.

Example for chained estimation (warm start for SciPy Optimization Tool):

# Initialize eppci for the algorithm which contains pypower-grid,
# measurements and estimated grid state (initial value)
net, ppc, eppci = pp2eppci(net)

# Initialize algorithm
estimation_wls = WLSAlgorithm(1e-3, 5)
estimation_opt = OptAlgorithm(1e-6, 1000)

# Start Estimation with specified estimator
eppci = estimation_wls.estimate(eppci)
# for some estimators extra parameters must be specified
eppci = estimation_opt.estimate(eppci, estimator="ql", a=3)

# Update the pandapower network with estimated results
net = eppci2pp(net, ppc, eppci)


text:
# Deformation of Rational Curves Along Foliations

Abstract : Deformation of morphisms along leaves of foliations define the tangential foliation on the corresponding space of morphisms. We prove that codimension one fo-liations having a tangential foliation with at least one non-algebraic leaf are transversely homogeneous with structure group determined by the codimension of the non-algebraic leaf in its Zariski closure. As an application, we provide a structure theorem for degree three foliations on $P^3$ .
Document type :
Preprints, Working Papers, ...
Domain :

Cited literature [11 references]

https://hal.archives-ouvertes.fr/hal-01671053
Contributor : Frank Loray <>
Submitted on : Thursday, December 21, 2017 - 5:56:21 PM
Last modification on : Monday, February 25, 2019 - 5:16:03 PM

### Files

deg3v1.pdf
Files produced by the author(s)

### Identifiers

• HAL Id : hal-01671053, version 1
• ARXIV : 1712.08330

### Citation

Frank Loray, Jorge Pereira, Frédéric Touzet. Deformation of Rational Curves Along Foliations. 2017. ⟨hal-01671053v1⟩

Record views


text:
# Tooling Up - Implementing test && commit || revert (TCR) In IntelliJ

This post shows how I implemented a minimal test && commit || revert inside InelliJ - and when I say minimal I mean minimal.

Like many others, I have been reading about the new programming workflow introduced by Kent Beck called test && commit || revert (TCR)

When I first heard about it I had much the same response as Kent - why the hell would you want to do something like that? That can’t possibly work, my tests don’t always pass when I am experimenting - I would lose my code if I did this.

## So what is test && commit || revert anyway?

The concept is extremely simple. When your tests run successfully your code is committed, if your tests fail for any reason, your code is automatically reverted back to the state where the tests last passed. Yes, this means that you can (and probably will) lose code - especially in the beginning when you are still playing around with this.

The easiest way to get your head around it is to watch it in action. Take a look at this video by Kent Beck demonstrating TCR

So, what’s the point ? The idea is to make everything smaller - the amount of code you write between green test runs, your iterations around the test/dev/commit cycle and bigger problems broken down into smaller parts. Of course, writing tests is a given here because it is what the whole workflow is based on but they don’t always have to come first.

Most of the TCR implementations I have seen so far have been like in the video linked above, a single file implementation where the tests and the code are in the same file. The problem I had is that I don’t work like that. I am a Java developer so most of my projects are based on Maven where the ‘code’ and the tests are kept in separate directories. I also use IntelliJ as my main IDE so I wanted something that worked in that environment and not have to use a different editor and/or keep switching to the commandline.

On the flip side I didn’t want to invest too much time in tooling up while I was still only playing with the workflow. I effectively wanted as little as I could get away with so I could get up and running. I then found another video by Kent Beck where he walks you through his minimal TCR setup in VS Code. That video ultimately gave me all I needed to set this up in IntelliJ.

## My minimal TCR implementation in IntelliJ

The first step was to find a way to get feedback on the success or failure of a test run. As I said above, most of my day to day coding is done using Java and maven. I can easily run my test suite using mavan on the command line so this is where I started looking first. Well, it turns out that the maven command line (mvn) returns different status codes based on the success or failure of your tests. This means I can run mvn test on a project where the tests all pass and see the following:

[INFO] Tests run: 42, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.509 s
[INFO] Finished at: 2019-01-17T21:54:57Z
[INFO] Final Memory: 11M/309M
[INFO] ------------------------------------------------------------------------
>  night-fever git:(master) echo $? 0  And on a project where there are failing tests and see this: [ERROR] Tests run: 42, Failures: 1, Errors: 0, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.085 s [INFO] Finished at: 2019-01-17T22:03:32Z [INFO] Final Memory: 11M/309M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-test) on project nightfever: There are test failures. > night-fever git:(master) echo$?
1

This means I can now use that status code to chain together a command much like the one Kent Beck uses in his VS Code video:

mvn test && git commit -am working || git reset --hard

OK, good start, I now have a command line TCR implementation working with maven. Next step, how do I execute this from within IntelliJ?

My first try at this was to setup an external tool within IntelliJ. This wasn’t as easy as it sounds due to IntelliJ only accepting one command along with parameters. There was also no way to chain multiple external tools together. After a little bit of Googling I found an IntelliJ support article that talked about calling bash directly and passing the commands you want to call as a parameter. The external tool edit window looks like this:

This worked pretty well, as you can see from the screen shot you can even set it to synchronise the files after execution of the tool so IntelliJ picks up any reverts that might have happened.

That in and of itself would probably be enough for a minimal TCR implementation inside IntelliJ. However, there are other options along the same theme which might work better for you depending on how you prefer to code. There is a plugin written by Jet Brains called File Watchers that allows you to automatically run a command when you change or save a file. This is how I ultimately had this setup:

You will notice that I un-ticked the option Auto-save edited files to trigger the watcher. I turned that off so the File Watcher starts upon save (File | Save All) or when you move the focus from IntelliJ IDEA (on frame deactivation). The main reason being that I didn’t want the File Watcher to kick in when I was part way through a change and IntelliJ decided to auto-save the file.

## What Next ?

All of the above works really well but it obviously has some downsides. I am effectively running the whole test suite via maven and although this ran pretty fast on my machine with a relatively small project, it would really slow things down when the project grew to any reasonable size. That would make this solution effectively unusable at that point. Thankfully IntelliJ was quite quick at syncing with the file system when a revert happened so hopefully that won’t be a problem moving forwards.

My ultimate solution would be to have this type of functionality integrated with the Run/Debug test runner inside IntelliJ. I could then use my standard keyboard shortcuts to run individual test methods, a whole test class or a whole test suite and it would trigger the test && commit || revert workflow based on the results in a much more integrated way. I imagine this would require a plugin to make this happen.

I’ll be continuing to play with TCR to see how far I can stretch it and whether is it applicable to all types of projects. That is the topic for another article though.

Image by Free-Photos from Pixabay


text:
# Difference between revisions of "2012 AMC 8 Problems/Problem 21"

## Problem

Marla has a large white cube that has an edge of 10 feet. She also has enough green paint to cover 300 square feet. Marla uses all the paint to create a white square centered on each face, surrounded by a green border. What is the area of one of the white squares, in square feet? $\textbf{(A)}\hspace{.05in}5\sqrt2\qquad\textbf{(B)}\hspace{.05in}10\qquad\textbf{(C)}\hspace{.05in}10\sqrt2\qquad\textbf{(D)}\hspace{.05in}50\qquad\textbf{(E)}\hspace{.05in}50\sqrt2$

## Solution

If Marla evenly distributes her $300$ square feet of paint between the 6 faces, each face will get $300\div6 = 50$ square feet of paint. The surface area of one of the faces of the cube is $10^2 = 100$ square feet. Therefore, there will be $100-50 = \boxed{\textbf{(D)}\ 50}$ square feet of white on each side.


text:
## Intermediate Algebra (6th Edition)

Published by Pearson

# Chapter 5 - Section 5.4 - Multiplying Polynomials - Exercise Set - Page 290: 110

#### Answer

The FOIL method can be used in multiplying two binomials.

#### Work Step by Step

Using the acronym of FOIL (First, Outer, Inner, Last), then the product of $(a+b)(c+d)$, for example, is $ac+ad+bc+bd$.

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
# Banach–Mazur game

In general topology, set theory and game theory, a BanachMazur game is a topological game played by two players, trying to pin down elements in a set (space). The concept of a Banach–Mazur game is closely related to the concept of Baire spaces. This game was the first infinite positional game of perfect information to be studied. It was introduced by Mazur as problem 43 in the Scottish book, and Mazur's questions about it were answered by Banach.

## Definition and properties

In what follows we will make use of the formalism defined in Topological game. A general Banach–Mazur game is defined as follows: we have a topological space $Y$, a fixed subset $X \subset Y$, and a family $W$ of subsets of $Y$ that satisfy the following properties.

• Each member of $W$ has non-empty interior.
• Each non-empty open subset of $Y$ contains a member of $W$.

We will call this game $MB(X,Y,W)$. Two players, $P_1$ and $P_2$, choose alternatively elements $W_0$, $W_1$, $\cdots$ of $W$ such that $W_0 \supset W_1 \supset \cdots$. The player $P_1$ wins if and only if $X \cap (\cap_{n<\omega} W_n) \neq \emptyset$.

The following properties hold.

• $P_2 \uparrow MB(X,Y,W)$ if and only if $X$ is of the first category in $Y$ (a set is of the first category or meagre if it is the countable union of nowhere-dense sets).
• Assuming that $Y$ is a complete metric space, $P_1 \uparrow MS(X,Y,W)$ if and only if $X$ is comeager in some nonempty open subset of $Y$.
• If $X$ has the Baire property in $Y$, then $MB(X,Y,W)$ is determined.
• Any winning strategy of $P_2$ can be reduced to a stationary winning strategy.
• The siftable and strongly-siftable spaces introduced by Choquet can be defined in terms of stationary strategies in suitable modifications of the game. Let $BM(X)$ denote a modification of $MB(X,Y,W)$ where $X=Y$, $W$ is the family of all nonempty open sets in $X$, and $P_2$ wins a play $(W_0, W_1, \cdots)$ if and only if $\cap_{n<\omega} W_n \neq \emptyset$. Then $X$ is siftable if and only if $P_2$ has a stationary winning strategy in $BM(X)$.
• A Markov winning strategy for $P_2$ in $BM(X)$ can be reduced to a stationary winning strategy. Furthermore, if $P_2$ has a winning strategy in $BM(X)$, then she has a winning strategy depending only on two preceding moves. It is still an unsettled question whether a winning strategy for $P_2$ can be reduced to a winning strategy that depends only on the last two moves of $P_1$.
• $X$ is called weakly $\alpha$-favorable if $P_2$ has a winning strategy in $BM(X)$. Then, $X$ is a Baire space if and only if $P_1$ has no winning strategy in $BM(X)$. It follows that each weakly $\alpha$-favorable space is a Baire space.

Many other modifications and specializations of the basic game have been proposed: for a thorough account of these, refer to [1987]. The most common special case, called $MB(X,J)$, consists in letting $Y = J$, i.e. the unit interval $[0,1]$, and in letting $W$ consist of all closed intervals $[a,b]$ contained in $[0,1]$. The players choose alternatively subintervals $J_0, J_1, \cdots$ of $J$ such that $J_0 \supset J_1 \supset \cdots$, and $P_1$ wins if and only if $X \cap (\cap_{n<\omega} J_n) \neq \emptyset$. $P_2$ wins if and only if $X\cap (\cap_{n<\omega} J_n) = \emptyset$.

## A simple proof: winning strategies

It is natural to ask for what sets $X$ does $P_2$ have a winning strategy. Clearly, if $X$ is empty, $P_2$ has a winning strategy, therefore the question can be informally rephrased as how "small" (respectively, "big") does $X$ (respectively, the complement of $X$ in $Y$) have to be to ensure that $P_2$ has a winning strategy. To give a flavor of how the proofs used to derive the properties in the previous section work, let us show the following fact.

Fact: $P_2$ has a winning strategy if $X$ is countable, $Y$ is T1, and $Y$ has no isolated points.

Proof: Let the elements of $X$ be $x_1, x_2, \cdots$. Suppose that $W_1$ has been chosen by $P_1$, and let $U_1$ be the (non-empty) interior of $W_1$. Then $U_1 \setminus \{x_1\}$ is a non-empty open set in $Y$, so $P_2$ can choose a member $W_2$ of $W$ contained in this set. Then $P_1$ chooses a subset $W_3$ of $W_2$ and, in a similar fashion, $P_2$ can choose a member $W_4 \subset W_3$ that excludes $x_2$. Continuing in this way, each point $x_n$ will be excluded by the set $W_{2n}$, so that the intersection of all the $W_n$ will have empty intersection with $X$. Q.E.D

The assumptions on $Y$ are key to the proof: for instance, if $Y=\{a,b,c\}$ is equipped with the discrete topology and $W$ consists of all non-empty subsets of $Y$, then $P_2$ has no winning strategy if $X=\{a\}$ (as a matter of fact, her opponent has a winning strategy). Similar effects happen if $Y$ is equipped with indiscrete topology and $W=\{Y\}$.

A stronger result relates $X$ to first-order sets.

Fact: Let $Y$ be a topological space, let $W$ be a family of subsets of $Y$ satisfying the two properties above, and let $X$ be any subset of $Y$. $P_2$ has a winning strategy if and only if $X$ is meagre.

This does not imply that $P_1$ has a winning strategy if $X$ is not meagre. In fact, $P_1$ has a winning strategy if and only if there is some $W_i \in W$ such that $X \cap W_i$ is a comeagre subset of $W_i$. It may be the case that neither player has a winning strategy: when $Y$ is $[0,1]$ and $W$ consists of the closed intervals $[a,b]$, the game is determined if the target set has the property of Baire, i.e. if it differs from an open set by a meagre set (but the converse is not true). Assuming the axiom of choice, there are subsets of $[0,1]$ for which the Banach–Mazur game is not determined.

## References

• [1957] Oxtoby, J.C. The Banach–Mazur game and Banach category theorem, Contribution to the Theory of Games, Volume III, Annals of Mathematical Studies 39 (1957), Princeton, 159–163
• [1987] Telgársky, R. J. Topological Games: On the 50th Anniversary of the Banach–Mazur Game, Rocky Mountain J. Math. 17 (1987), pp. 227–276.[1] (3.19 MB)
• [2003] Julian P. Revalski The Banach–Mazur game: History and recent developments, Seminar notes, Pointe-a-Pitre, Guadeloupe, France, 2003–2004 [2]


text:
# How I can use FindFit to simultaneously fit two data sets to two equations having shared parameters? [duplicate]

I think that FindFit package with the method Nminimize yields global minimum if initial values of adjustable parameters are chosen properly with some constraints. I did use it to fit one data set to one formula but I wonder if one can hint to me how I can make a simultaneous fit to two different data sets and two different equations with some shared parameters.