Mar 03

Learning a new language

I admit it, I sucked at French in high school. I did not like reading it, I did not like speaking it and I certainly did not like learning it. But now I look back at those years in regret, wishing I had put more effort in it. Luckily the internet came up with a solution which my brain seems to enjoy.

One word: Gamification. Whatever is a chore to you, turn it into a game (like an RPG where you get points as rewards) and chances are you will do them without much hesitation. The newcomer on the scene who just had a Kickstarter is HabitRPG, its simplicity is astounding but it has an incredible effect on your habits.

There’s a ton of sites out there to learn languages but so far I’m the happiest with DuoLingo (for learning words in context and sentence translation) and Memrise (for pronunciation and vocabulary). I easily spend 30 minutes a day on both Spanish and French since I’ve started using those sites.

These sites managed to turn something that felt like a chore in something my brain wants and needs to do before it feels satisfied with my day. Pretty incredible if you ask me.

Mar 01

Copper Line Attenuation MAR1 Model

One of the homeworks I had to do during my Communication Systems course at the PoliTO was calculating some attenuation values of a copper line in function of distance and frequence, based on the MAR1 model. Oddly enough, Googling MAR1 I couldn’t find a single thing about the model so I decided to post my work here so people can take a look at how it works. I’ve made this in Matlab.

The following function computes the attenuation:

function [att] = mar1(d, f)
% mar1(d, f)    Calculates the attenuation in dB
%               depending on length d (in km) and
%               frequency f (in Hz)
 
 mu0 = 4*pi*10^-4;
 R0 = 277.623806;
 Lalpha = 421.576013 * 10^-6;
 Linf = Lalpha;
 a = 1.470148;
 b = 2;
 c = 2.765;
 delta = 0.001123;
 C1Mhz = 49.792437 * 10^-9;
 
 Zl = 100;
 Zs = Zl;
 
 Cf = C1Mhz * (f / 10^6)^-(2*delta/pi) * cos(delta);
 sf = (mu0 * 1i * f) / ((0.75^2) * R0);
 
 Zf = 1i * 2 * pi * f * Linf + R0 * ((1/4) + (3/4) * sqrt(1 + (a*sf*(sf+b))/(sf+c)));
 Yf = 2*pi*f*Cf*(1i+tan(delta));
 
 Z0 = sqrt(Zf/Yf);
 gamma = sqrt(Zf * Yf);
 
 A = cosh(gamma*d);
 B = Z0*sinh(gamma*d);
 C = (1/Z0) * sinh(gamma*d);
 D = cosh(gamma*d);
 
 ratio = Zl / (A*Zl + B + C * Zl * Zs + D * Zs);
 att=20*log10(abs(1/ratio));

If you put this in a nested loop that iterates over some distances and frequencies and plot it afterwards, you get a nice result such as this.

MAR1 Copper Line Attenuation

MAR1 Copper Line Attenuation

This shows you why ADSL is slower than for example internet access by cable. A reason why more recent versions of ADSL and VDSL are faster is because the line length is shortened and thus the frequency can be raised, and in turn so is the symbol rate.

Jan 29

Communication Systems Exam ’12-’13

Today I had my first exam at PoliTO. When I first came to Torino in September there were also exams going on and they seemed to be pretty organised. People were called by their name to be able to enter the room, they told us you needed to use the terminals in the hallways to print some kind of “entry ticket” which you had to show as your name was called.

Fast forward to today, we could just enter the room where we had exam, everyone was just talking until the professor arrived. People just had to sit at both ends of a row and one in the middle, didn’t matter if your coat and backpack were next to you. Nothing was said about having your wallet or a cellphone in your pocket but to be sure I turned it off and put it away.

The professor came around during the exam, writing down your name on a paper to ‘register’ your attendance. That’s about all the formalities there were today, no papers or name calling at all!

For those who want to know which questions we got on the first exam day of Communication Systems, feel free to download the list of all possible questions: List of questions 2012 2013

The ones asked on the exam were questions 2, 5, 7, 14, 18 and 21.