miércoles, 23 de julio de 2014
Apartment finder
So I decided, after having to look for apartments in the US, that there is no suitable tool to do this. So I wrote my own service which helps you find an apartment by maximizing whatever features you are looking for. Have a look at www.apartmentsml.com and tell me what you think!
Etiquetas:
apartments,
condominiums,
condos,
find,
finder,
for-rent,
forrent,
lease,
money,
real estate,
real-estate,
rent,
rent low,
rental,
search,
sqft,
square footage,
sub-lease,
sublease
martes, 3 de septiembre de 2013
Vacuum tube modeling
After doing some research into vacuum tubes I actually found out that TINA has some models for some basic vacuum tubes. So using the spice model of the WE300B vacuum tube:
* Connections: Plate
* | Grid
* | | Cathode
* | | |
.SUBCKT WE300B P G K
E1 2 0 VALUE={V(P,K)+3.87*V(G,K)}
Gp P K VALUE={119.5E-6*(PWR(V(2),1.5)+PWRS(V(2),1.5))/2}
Cgk G K 9.0P
Cgp G P 15P
Cpk P K 4.3P
.ENDS WE300B
I managed to crunch the numbers for a simple circuit

yielding the following equation:
y+y^(2/3)/0.242-67.8-3.87x=0
where x is the input voltage and y the output voltage. After putting this into wolframalpha (http://www.wolframalpha.com/input/?i=y%2By^%282%2F3%29%2F0.242-300%2B232.2-3.87x%3D0) I got the following graph:
To my surprise it is exactly what I expected. Namely to have a nonlinear function which when plotted would seem almost linear. After running the model in TINA with a 5V pure sine input and doing a fourier series analysis on the output a 2.63% harmonic distortion can be observed. Another interesting and expected fact is that this distortion increases with the amplitude of the signal. Now I have built my own kit and have set it up:

I should start soon the analysis of the signal in Matlab and see if it checks with my observations. It should be noted however that the circuit for the real tube amplifier is much more complex. Simply by adding a rectified DC source introduces a new noise which would be very difficult to model mathematically. So I would expect a qualitative similarity rather than a quantitative one.
* Connections: Plate
* | Grid
* | | Cathode
* | | |
.SUBCKT WE300B P G K
E1 2 0 VALUE={V(P,K)+3.87*V(G,K)}
Gp P K VALUE={119.5E-6*(PWR(V(2),1.5)+PWRS(V(2),1.5))/2}
Cgk G K 9.0P
Cgp G P 15P
Cpk P K 4.3P
.ENDS WE300B
I managed to crunch the numbers for a simple circuit
yielding the following equation:
y+y^(2/3)/0.242-67.8-3.87x=0
where x is the input voltage and y the output voltage. After putting this into wolframalpha (http://www.wolframalpha.com/input/?i=y%2By^%282%2F3%29%2F0.242-300%2B232.2-3.87x%3D0) I got the following graph:
To my surprise it is exactly what I expected. Namely to have a nonlinear function which when plotted would seem almost linear. After running the model in TINA with a 5V pure sine input and doing a fourier series analysis on the output a 2.63% harmonic distortion can be observed. Another interesting and expected fact is that this distortion increases with the amplitude of the signal. Now I have built my own kit and have set it up:

I should start soon the analysis of the signal in Matlab and see if it checks with my observations. It should be noted however that the circuit for the real tube amplifier is much more complex. Simply by adding a rectified DC source introduces a new noise which would be very difficult to model mathematically. So I would expect a qualitative similarity rather than a quantitative one.
Etiquetas:
amplificador,
amplificador de bulbos,
amplifier,
amplifiers,
bulbos,
spice,
TINA,
vacuum tube amplifier,
Vacuum tubes,
valve amplifier,
valve tube,
wolfram
sábado, 6 de julio de 2013
viernes, 22 de febrero de 2013
Javascript animation
Siguiendo el aprendizaje de js con typescript y html5 ahora les presento una animación hecha en javascript. Se trata de un simulador de "tiro libre" donde se encuentra numéricamente el mejor ángulo de disparo: CLICK AQUI PARA VER ANIMACIÓN
Etiquetas:
angulo,
angulodedisparo,
animación,
animation,
bestangle,
browser,
explorador,
física,
html5,
javascript,
programación,
Programming,
tirolibre,
typescript
lunes, 18 de febrero de 2013
Javesp traductor
Acabo de terminar mi traductor de javesp a Java. ¿Qué es javesp? Javesp es código en Java pero donde todas las palabras clave como this, double, long, public están escritas en español: esto, doble, largo, publico... Aquí les dejo el editor hecho en javascript.
domingo, 11 de noviembre de 2012
Master Prog
Para todos aquellos que perdieron su disco del famosísimo programador para pics Master Prog, y están buscando dónde descargar o bajar el Master Prog, acabo e encontrar dónde bajarlo. Sólo hay que resolver un acertijo... Si alguien lo puede resolver avise para que se pase el programa:
http://mindflow.hostzi.com/
jueves, 1 de diciembre de 2011
Rotate array k times in linear time
int gcd ( int a, int b )
{
int c;
while ( a != 0 ) {
c = a; a = b%a; b = c;
}
return b;
}
void shift(volatile int*arr, int len, int k){
int i,j,c;
int t1,t2;
printf("gcd:%d\n",gcd(len,k));
for(i=0;i<gcd(len,k);i++){
j=k+i;
if(j>=len)
j-=len;
t1 = arr[j];
arr[j]=arr[i];
while(j!=i){
j+=k;
if(j>=len)
j-=len;
t2 = arr[j];
arr[j]=t1;
t1=t2;
printf("j:%d\n",j);
for(c=0;c<len;c++)printf("%d,",arr[c]);
printf("\n");
}
printf("i:%d\n",i);
}
}
Suscribirse a:
Entradas (Atom)

