Showing posts with label thermal noise. Show all posts
Showing posts with label thermal noise. Show all posts

Thursday, April 9, 2015

HP 50g: Bolt Pattern, Solar Irradiance, Thermal Noise, Regular Polygons, Center of Mass (Matrix of Masses)

HP 50g:   Bolt Pattern, Solar Irradiance, Thermal Noise, Regular Polygons,

Center of Mass (Matrix of Masses)



Bolt Pattern: BOLTPAT



Input:
4:  xc:   x coordinate, center
3:  yc:   y coordinate, center
2:  n:  number of bolts
1:  d:  diameter of the circle

Program:
<< DEG OVER 1 – → xc yc n d k
<< { } 0 k FOR I 360 I * n / DUP COS d 2 / * xc +
SWAP SIN d 2 / * yc + (0,1) * + + NEXT
DUPDUP 2 GET SWAP 1 GET – ABS >> >>

Output: 
2:  list of bolts (x+yi)
1:  OC-Distance

Solar Irradiance:  IRRAD


Input:
5:  es:   elevation of the sun (as decimal degrees)
4:  as:   azimuth of the sun from south going east (as decimal degrees)
3:  ep:   elevation of the panel (as decimal degrees)
2:  ap:   azimuth of the panel from south going east (as decimal degrees)
1:  ib:  the sun’s power or irradiance (usually 1,000 or 1,367 W/m^2)

Program:
<< → es as ep ap ib
<< DEG ep COS es SIN * ep SIN es COS * as ap – COS *
+ ACOS DUP COS ib * >> >>

Output:
2:  incidence angle
1:  surface radiance

Thermal Noise:  THNOISE


Input:
3:  R:  resistance (Ω)
2:  T:   temperature (K)
1:  B:   noise bandwidth (Hz)

Program:
<< → R T B
<< T R * B * 4 * 1.3806488E-23 * √
T B * LOG 10 * 198.599167802 -  >> >>

Output:
2:  Voltage (Volts)
1:  Noise Power (dB)

Regular Polygon:  Internal Angle and Area:  RPOLYG


Input:
2:  s:  side length
1:  n:  number of sides


Program: 
<< DEG DUP INV 360 * NEG 180 + UNROT 4 / SWAP SQ * SWAP DUP UNROT 2 / TAN * >>

Output:
2:  Interior Angle
1:  Area

Center of Mass using Matrix:  CENTERMTX


Input:
1:  Matrix of Masses

Program:
<< DUP SIZE OBJ→ DROP → M R C
<< M 1  C START 1 NEXT C →ARRY * AXL ∑LIST

M 1 C FOR I I NEXT C 1 2 →LIST →ARRY * TRAN
1 R START 1 NEXT R 1 2 →LIST →ARRY * OBJ→ DROP

M TRAN 1 R FOR I I NEXT R 1 2 →LIST →ARRY * TRAN
1 C START 1 NEXT C 1 2  →LIST →ARRY * OBJ→ DROP

→ tm rw cw
<< rw tm / cw tm  / {1,2} →ARRY >> >> >>

Output:
[[ x center of mass point,  y center of mass point ]]



Special Note:  April 11 will mark the fourth anniversary of this blog.  I appreciate the readers and followers of this blog and thank you for that, and the comments.  Best always,  Eddie!


This blog is property of Edward Shore.  2015.

Wednesday, February 18, 2015

HP Prime & TI-84+: Thermal Noise (Johnson-Nyquist Noise)

Introduction

The following program calculates the RMS (root-mean-square) voltage of a resistor at a certain temperature.  Thermal noise, also known as Johnson-Nyquist Noise is generated when the resistor has a temperature above absolute zero.  The equation to calculate the voltage is:

V = √(4*k*T*R*B) where

k = Boltzmann’s Constant = 1.3806488 * 10^-23 J/K
T = temperature in degrees Kelvin (K)
R = resistance in ohms (Ω)

B = noise bandwidth (Hz)

This program also calculates the noise power in decibels.  Yes, the power for most calculations for this application will be a negative quantity.   (I did a double take when I first learned about noise power.)   The equation for the noise power is:

P = −198.599167802+10*LOG(T*B)

where -198.599167802 = 10*LOG(k*1000) (see above)

HP Prime:  THNOISE

EXPORT THNOISE(R,T,B)
BEGIN
// 2015-2-18
// R = resistor (ohms)
// T = temp (°K)
// B = bandwidth (Hz)
LOCAL V,P;
// Boltzmann′s constant:
// can get retrieved by pressing Shift, Units, Const, 2, 2
V:=√(4*1.3806488ᴇ−23*T*R*B);
// volts
P:=−198.599167802+10*LOG(T*B);
// dBs
RETURN {V,P}; 
END;

TI-84+:  THNOISE

Disp "R=RESIS. (OHM)"
Disp "T=TEMP. (°K)"
Disp "B=BANDWIDTH (HZ)"
Prompt R,T,B
√(4*1.3806488ᴇ−23*T*R*B)→V
−198.599167802+10*LOG(T*B)→P
Disp "V=VOLTAGE"
Pause V
Disp "P = POWER"
Pause P


Example:

R = 1040 Ω
T = 300 K
B = 19000 Hz

Results:
V » 5.721708 * 10^-7 V
P » -131.040419 dB


Sources:  

John A. Ball.  "Algorithms for RPN Calculators"  John Wiley & Sons, Inc.  New York.  1978.  pg. 267

Johnson-Nyquist Noise.  http://en.wikipedia.org/wiki/Johnson%E2%80%93Nyquist_noise  Retrieved 2015-2-15



This blog is property of Edward Shore - 2015. 






HP 71B Basic and Casio fx-CG 100: Weighted Random Sample

HP 71B Basic and Casio fx-CG 100: Weighted Random Sample Introduction In calculators, it is fairly easy to generate a rand...