NEDC ;

cycle = powerProfile( nedc ) ;

w = 10.^[-3:0.1:1]' ;
V = 1/3 * ( i*w + 0.01 ) ./ ( i*w .* (i*w+0.5) ) .* ( 881.5 * (i*w).^2 + 1376.3*i*w +995.1 ) ./ ( 864.9114 * (i*w).^2 + 101.742 * i*w +1 ) ;

F = V .* ( i*w ./ ( i*w + 0.01 ) ) .* ( 555.2 * (i*w).^2 + 102.8 * i*w + 0.9037 ) ./ ( (i*w).^3 + 2.463 * (i*w).^2 + 1.401 * i*w + 0.02101 ) ; 

% Plotting section
subplot( 2,2,1 )
loglog( cycle.v_w, abs( cycle.v_fou ), w, abs( V ) )
legend('Data','Approximation',3)
xlabel('Frequency, rad/s')
grid
title('Absolute value of the FFT of velocity in the NEDC')

subplot( 2,2,3 )
semilogx( cycle.v_w, angle( cycle.v_fou )*180/pi, w, angle(V)*180/pi )
xlabel('Frequency, rad/s')
grid
axis([min(w), max(w), -180 +180])
title('Argument of the FFT of velocity in the NEDC')

subplot( 2,2,2 )
loglog( cycle.F_w, abs( cycle.F_fou ), w, abs( F ) )
xlabel('Frequency, rad/s')
grid
title('Absolute value of the FFT of force in the NEDC')


subplot( 2,2,4 )
semilogx( cycle.F_w, angle( cycle.F_fou )*180/pi, w, angle( F )*180/pi )
xlabel('Frequency, rad/s')
grid
axis([min(w), max(w), -180 +180])
title('Argument of the FFT of force in the NEDC')
