« first day    last day (18 days later) » 

07:46
So I was basically wondering what is wrong with the theoretical value of D and why is it so off from the actual experimental value and was wondering how to implement the code if I cannot use the theoretical value for others plots.
08:10
def simulate_dc_current(i_dc, N, dt, beta_c, Gamma, Ic, R):
# Initialize variables
delta = np.zeros(N)
u = np.zeros(N)
eta = np.random.normal(0, 1, N)

# Euler-Maruyama method for SDE
for t in range(1, N):
du = (1 / beta_c) * (-u[t-1] - np.sin(delta[t-1]) + i_dc / Ic) * dt + (1 / beta_c) * np.sqrt(4 * Gamma * dt) * eta[t]
delta[t] = delta[t-1] + u[t-1] * dt
u[t] = u[t-1] + du

# Calculate the average dimensionless voltage
mean_u = np.mean(u)
# Convert to actual voltage
mean_voltage = mean_u * R * Ic
 
10 hours later…
18:37
@LPZ got any suggestions ?
LPZ
LPZ
18:56
I should test the code to make sure. But a good place to start if you have different experimental data is to check whether the difference in $\Gamma$ is systematic or not (there could be just a prefactor missing or somthing). Furthermore, as the slides later explain, the white noise spectrum may not be realistic for experiments. To reproduce the 1/f spectrum, you’ll need to apply a low pass filter
But before all of that, a pretty obvious starting point is to look at the SDE solver. How did you choose dt and did you try with other methods? (Euler is pretty basic after all)
Well my solver is pretty basic tbh, this is the entire code
import numpy as np
import matplotlib.pyplot as plt

# Constants
e = 1.602e-19 # Elementary charge in coulombs
hbar = 1.055e-34 # Reduced Planck constant in Js
kb = 1.381e-23 # Boltzmann constant in J/K

# Given parameters
Ic = 180e-6 # Critical current in amperes
R = 5 # Resistance in ohms
C = 1e-14 # Capacitance in farads (1 pF)
T = 70 # Temperature in Kelvin

# Define constants
beta_c = (2 * e * (R**2) * C * Ic) / hbar # Moment of inertia
@LPZ have a look at it and tell me what can I improve to get some better correlation.
LPZ
LPZ
19:20
Once again, the most obvious improvement is the SDE solver, you can try using smaller dt to see if it changes anything. The best way would be to use ready coded package with adaptative time steps. But once again, matching experimental data is actual research. I have no idea where your data comes from so the assumptions may not hold. Depending on it, you may not have the correct noise modeling or the entire model may not be appropriate.
@LPZ Okay, I understand. How do you think I could implement the 1/f noise term ? Would you have any resources/references.
 
4 hours later…
23:42
First thing I would check is if your numerics are converged; have you tried plotting the theory graph for various values of dt and checking how small dt has to be before they agree? Note the required times step depends on how strong the noise is
There are lots of ways to simulate 1/f noise. Here's a cnceptually very simple one scicomp.stackexchange.com/questions/18987/…
One other issue I see is that you're averaging over the entire time trace U(t). Have you checked U(t) to make sure that it has relaxed to its steady-state value? Maybe the capacitor takes some time to charge and so the behavior near t=0 is throwing off your result. Easy to fix by just throwing away the initial time points (though do actually plot U(t) so you know what time window to average over)
But I guess none of the above explain why you see such strong disagreement between theory and experiment. I haven't checked your code or formulas carefully, especially the formula for noise power, so I would double-check that. But navely, it looks like there is some other noise source that is much stronger than the Johnson noise. If you're using a standard current source, there's a very good chance that's the case. Check the spec sheet and estimate how much noise thats generating?

« first day    last day (18 days later) »