david1412 / Time-varying--MIMO

Time varying system identification of MIMO Acoustics systems
0 stars 0 forks source link

example simulated IR.py #4

Closed david1412 closed 6 years ago

david1412 commented 7 years ago

The h values are zero in the simulated_iR.py .. where the SISO.py has h = impulse responses array values ..

  1. i cannot compare the impulse responses .

https://github.com/david1412/Time-varying--MIMO/blob/8a2d27ce9b7567ad1e803a41dc4292f7efc7be31/example_simulate_IRs.py#L29

narahahn commented 7 years ago

Are you sure? I got these impulse responses!

irs

david1412 commented 7 years ago

I got the same plot

but in kernel :

h Out[4]: array([[ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], ..., [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.], [ 0., 0., 0., ..., 0., 0., 0.]])

narahahn commented 7 years ago

It only shows that the first and last three elements of each column are zeros. There are nonzero elements somewhere in the middle.

This is also shown In the 2D plot above. Most of the elements in each column are zeros and only a few elements are nonzero (red).

david1412 commented 7 years ago

i used this format to compare the impulse responses .. plt.figure(figsize=(10,4)) plt.subplot(121) plt.imshow(impulse_response) # I got the plot

plt.subplot(122) plt.imshow(np.rad2deg(phi_target),time.h.T) # in your code , you used pcolormesh , cmap, and h.T( what is T in simulated IR.py) as i observed time = np.arange(0, N) / fs * 1000 ( simulated IR.py code) time = time = np.arange(np.ceil(L)) / fs ( SISO.py code)

I am little bit confused with the time ? and comparison. System identification is in process , i will send by evening .

david1412 commented 7 years ago

system distance about to complete the task ,( system identification)*

narahahn commented 7 years ago

If you make changes to a file, please push the change to the repository rather than create a new file and add it. This would make it more easy to track the changes you made.

2D Plot The difference between imshow and pcolormesh is briefly explained here. For more details, check the Matplotlib docuements: imshow and pcolormesh.

Transpose h.T is the transpose of the array h, so the column and row indices are switched. I did this in order to have the angle in the horizontal axis and the time in the vertical axis in my plot.

Time axes The former is the time in ms (millisecond) while the latter in s (second). See the axis label in the above plot.