Hot answers tagged

76 votes

Why is the time constant 63.2% and not 50% or 70%?

Other answers haven't yet hit upon what makes e special: defining the time constant as the time required for something to drop by a factor of e means that at any moment of time, the rate of change ...
user avatar
  • 44.5k
50 votes

Why is the time constant 63.2% and not 50% or 70%?

It's built into the mathematics of exponential decay associated with first-order systems. If the response starts at unity at t=0, then after one "unit of time", the response is \$e^{-1} = 0.36788\$. ...
user avatar
  • 165k
37 votes
Accepted

Why does hardware division take much longer than multiplication?

A divider maps much less elegantly to typical hardware. Take Lattice ICE40 FPGAs as examples. Let us compare two cases: this 8x8 bit to 16 bit multiplier: ...
user avatar
33 votes
Accepted

Why is impedance represented as a complex number rather than a vector?

Complex numbers are similar to vectors, but have some extra mathematical properties that make them useful. Most notably, using the complex exponential \$e^{j\omega t}\$ instead of sines and cosines ...
user avatar
  • 20.6k
32 votes
Accepted

How do computers calculate sin values?

Typically high resolution sin(x) functions would be implemented with a CORDIC (COrdiate Rotation DIgital Computer) algorithm, which can be accomplished with a small number of iterations using only ...
user avatar
27 votes
Accepted

Order of operations and rounding for microcontrollers

This is not a compiler issue: doing the division first here is the legal behaviour, as division and multiplication have equal precedence and are evaluated left-to-right. (Also, when in doubt: use ...
user avatar
  • 4,291
19 votes

Do working electrical engineers in circuit design ever use textbook formulas for rise time, peak time, settling time, etc

These calculations are absolutely used by professional EEs, for some on a daily basis. However, for many this job has been given to simulation software, such as LTSpice, which is also used on a daily ...
user avatar
  • 20.3k
18 votes

Acceleration when device is on tilt

Only a sketch of a solution. Take all 3 axes into consideration. Acceleration due to gravity, regardless of tilt, will always be 1G, as a vector sum of X,Y,Z, no matter what the tilt. You can ...
user avatar
17 votes
Accepted

Solving an ideal opamp-circuit leads to a contradiction

The error is in the assumption the I2 = I1. The OpAmp can (in general) sink and source current. When it would be sourcing current, this current would have to go to ground, either through R2 or through ...
user avatar
  • 10.4k
14 votes

How do computers calculate sin values?

Most computer trig libraries are based on polynomial approximations, which gives the best balance between speed an accuracy. For example, a dozen or so multiplication and add/subtract operations is ...
user avatar
  • 165k
14 votes

Order of operations and rounding for microcontrollers

This is a fundamental C issue: you need to be extremely clear whether you're doing integer or floating-point arithmetic. uint16_t temperature = reading*0.076295; ...
user avatar
  • 45k
13 votes

Performing FFT at low frequencies but high resolution?

I assume for "high speed" you mean a small delay from data collection to the resultant FFT. With a low sample rate, your computational ability isn't the limiting factor, given modern computers. The ...
user avatar
  • 2,798
13 votes

Do working electrical engineers in circuit design ever use textbook formulas for rise time, peak time, settling time, etc

You refer to these basic formulae at first and then find the real world has a lot of non-linear characteristics like XOR phase detectors in a second PLL loop response when you exceed the phase limit ...
user avatar
13 votes

Why is impedance represented as a complex number rather than a vector?

Why are complex numbers used and not Vectors? simply because there is no vector division defined in vector algebra, so simply you cannot use Ohm's law in division form, thereby making calculations ...
user avatar
12 votes
Accepted

converting watt values over time to kWh

If you can only take measurement at discrete times, then summing up and dividing by the time between measurements is the only way possible – the integral $$E_\text{total}=\int\limits_{T_\text{start}}...
user avatar
11 votes

Under what conditions does jw equal the laplace variable s in an electrical circuit?

The Laplace variable \$s\$ relates to Fourier's \$j\omega\$ as follows: $$ s = \sigma + j\omega $$ Fourier transform can be seen as a Laplace transform when \$\sigma=0\$. The \$\sigma\$ allows the ...
user avatar
11 votes
Accepted

Performing FFT at low frequencies but high resolution?

One usually needs to acquire multiple samples per waveform period to get good results from an FFT. The Nyquist limit of 2 samples per period is a lower bound but usually 10 samples per period or more ...
user avatar
  • 9,745
11 votes

Why is the time constant 63.2% and not 50% or 70%?

The decay of an RC parallel circuit with capacitor charged to Vo v(t) = \$Vo(1-e^{-t/\tau})\$ , where \$\tau\$ is the time constant R\$\cdot\$C. So v(\$\tau\$)/Vo is approximately 0....
user avatar
11 votes

Implementing an absolute value function in C

The standard C library is providing the optimized solutions for many problems with considerations based on the architecture, compiler in use and others. The abs() ...
user avatar
  • 9,642
11 votes

Why is impedance represented as a complex number rather than a vector?

Just to remark on that you can represent impedance as a matrix: $$ R + \mathrm j X \leftrightarrow \begin{bmatrix} R & X \\ -X & R \end{bmatrix} $$ This is in fact the matrix ...
user avatar
  • 219
10 votes

Why does hardware division take much longer than multiplication?

We can have multiple layers of logic per clock cycle but there is a limit, exactly how many layers of logic we can have an how complex those layers can be will depend on our clock speed and our ...
user avatar
  • 19.3k
10 votes
Accepted

how to solve this op-amp circuit?

Your circuit doesn't have negative feedback: - Therefore it acts as a comparator with hysteresis and hence, the output changes state when the input voltage passes the hysteresis threshold points ...
user avatar
  • 384k
9 votes

Why does the base-emitter voltage of a BJT decrease with temperature?

"So, how can vBE be inversely proportional to VT?" I think, this leads to a false understanding of the effect to be observed. With other words: Base-emitter voltage does NOT decrease (automatically) ...
user avatar
  • 22.6k
9 votes

Why does the complex representation of a voltage \$V\cdot\cos(\omega t + \phi)\$ use the cosine function?

Both sin and cos are considered sinusoidal waveforms. As a practical matter, sin and cos are essentially the same thing, just offset by 90 degrees.Since "time 0" is arbitrary, the distinction between ...
user avatar
  • 13.4k
9 votes

Why does hardware division take much longer than multiplication?

Slow division is inherently iterative so it tends to take longer. There are somewhat faster slow division algorithms than the simple ones, using lookup tables. The SRT algorithm produces two bits per ...
user avatar
9 votes

Acceleration when device is on tilt

Your main mistake is in not treating acceleration as a single vector. When the car is at rest, that vector will always be 1 g upwards. Don't look at just the X component of the raw accelerometer ...
user avatar
9 votes
Accepted

Is a CPU declarative?

Aren't you both wrong? To me this sounds like arguing that if someone thinks in English then their neurons are wired in English, which is nonsensical. If you actually want to force application of the ...
user avatar
  • 47.1k
9 votes

Conundrum: High pass filter passes DC?

The resolution to the conundrum is that there really is no conundrum. Your input, a step function, has infinite dc component (its Laplace Transform, \$1/s\$, goes to infinity as \$s\rightarrow 0\$). ...
user avatar
  • 2,487
9 votes

Conundrum: High pass filter passes DC?

You're confusing the steady-state response with the total response. The transfer function for that circuit is: $$H(s)=\frac{s}{s+\frac{1}{RC}}$$ and if you solve for the step response: $$h(t)=\text{e}^...
user avatar
9 votes
Accepted

Using a PCB trace as a heater / Hilbert Curves

I have some experience with PCB heaters using copper traces on polyimide (flex circuit) substrate. My goal has always been to use uniform copper trace width with consistent trace-to-trace spacing so ...
user avatar
  • 24.4k

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