Re: [Scilab-users] Plotting properties of digital audio filters

2015-12-14 Thread Arvid Rosén
Fred,

The first sample of your measured impulse starts with 0.0. That is, you have a 
delay of one sample in the system you are trying to identify (or maybe your 
input signal also starts with a zero). 1 sample of latency corresponds to 180 
degree phase shift at the Nyquist rate, so it all looks reasonable to me. If 
you don’t want that, you can use detrend as Rafael sugests, or remove any 
leading zeros in your input data.

Cheers,
Arvid

> On 14 Dec 2015, at 01:41, Rafael Guerra <jrafaelbgue...@hotmail.com> wrote:
> 
> Fred,
> 
> I have detrended the phase spectrum before plotting but not sure that it is 
> what
> you need.
> What result would you expect to obtain?
> 
> Regards,
> Rafael
> 
> -Original Message-
> From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of 
> fred_audio_dsp
> Sent: Sunday, December 13, 2015 9:33 PM
> To: users@lists.scilab.org
> Subject: Re: [Scilab-users] Plotting properties of digital audio filters
> 
> Hi Rafael, 
> 
> Would you mind sharing the code that produced these plots, or hinting at the
> method? 
> 
> Regards 
> 
> 
> 
> --
> View this message in context:
> http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp40
> 33198p4033217.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at
> Nabble.com.
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
> 
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plotting properties of digital audio filters

2015-12-13 Thread Rafael Guerra
Hi,
 
Assuming sr=5e-5 s, Scilab 5.5.2 gave me the following phase plot:
 

 
Regards,
 
Rafael
 
-Original Message-
From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of fred_audio_dsp
Sent: Sunday, December 13, 2015 6:22 PM
To: users@lists.scilab.org
Subject: Re: [Scilab-users] Plotting properties of digital audio filters
 
Hi,
 
By making the FFT size of the form 2*2^x, I managed to get more of an
expected result.
 
Still the phase response of the filters I analyze drops off to -180°
unexpectedly, as illustrated in the plot below (without frequency vector
applied because I'm just testing). This is a peak filter, -3dB@500Hz, Q=1.
Note that any kind of phase unwrapping did not produce any different result.
 
< <http://mailinglists.scilab.org/file/n4033215/plot3.png> 
http://mailinglists.scilab.org/file/n4033215/plot3.png> 
 
I have included a zip file of the captured impulse response.
response.zip < <http://mailinglists.scilab.org/file/n4033215/response.zip> 
http://mailinglists.scilab.org/file/n4033215/response.zip>  
 
Regards,
 
Frederik
 
 
 
--
View this message in context:  
<http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp4033198p4033215.html>
 
http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp4033198p4033215.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
 <mailto:users@lists.scilab.org> users@lists.scilab.org
 <http://lists.scilab.org/mailman/listinfo/users> 
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plotting properties of digital audio filters

2015-12-13 Thread fred_audio_dsp
Hi Rafael, 

Would you mind sharing the code that produced these plots, or hinting at the
method? 

Regards 



--
View this message in context: 
http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp4033198p4033217.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plotting properties of digital audio filters

2015-12-13 Thread fred_audio_dsp
Hi,

By making the FFT size of the form 2*2^x, I managed to get more of an
expected result.

Still the phase response of the filters I analyze drops off to -180°
unexpectedly, as illustrated in the plot below (without frequency vector
applied because I'm just testing). This is a peak filter, -3dB@500Hz, Q=1.
Note that any kind of phase unwrapping did not produce any different result.

 

I have included a zip file of the captured impulse response.
response.zip   

Regards,

Frederik



--
View this message in context: 
http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp4033198p4033215.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plotting properties of digital audio filters

2015-12-11 Thread fred_audio_dsp
Hi Rafael,

Thank you very kindly for your assistance so far!

If I understand correctly, the unwrap() macro quoted in your message has
been part of Scilab since somewhere in 2014, am I wrong?

Using scilab's phasemag() macro as suggested, I get the exact same output as
when plotting the phase with the code posted in my first message:

phi=(atan(imag(A),real(A)))*180/%pi


Kind regards,

Frederik



--
View this message in context: 
http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp4033198p4033204.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plotting properties of digital audio filters

2015-12-11 Thread Rafael Guerra
Hi Frederik,
 
The unwrapping shown does not look good, it seems that you need to play further
with the unwrap input parameters.
Check if Scilab's function gives same results as this one:
http://mailinglists.scilab.org/unwrap-improvements-td4026370.html
 
You can compare the results with those from Scilab's phasemag function:
clf();
[phi,db]=phasemag(A,'c');
subplot(1,2,1)
plot2d("ln",f,db)
subplot(1,2,2)
plot2d("ln",f,phi)
 
Regards,
Rafael
 
-Original Message-
From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of fred_audio_dsp
Sent: Friday, December 11, 2015 4:07 PM
To: users@lists.scilab.org
Subject: Re: [Scilab-users] Plotting properties of digital audio filters
 
Hi Rafael,
 
Thank you for your reply. I have tried unwrapping the phase for the 24dB/oct
low pass filter at 1kHz with scilab's unwrap() function. Plots included
below; I scaled the frequency axis linearily to better show what's going on.
 
without unwrap()
< <http://mailinglists.scilab.org/file/n4033202/plot1.png>
http://mailinglists.scilab.org/file/n4033202/plot1.png> 
 
with unwrap()
< <http://mailinglists.scilab.org/file/n4033202/plot2.png>
http://mailinglists.scilab.org/file/n4033202/plot2.png> 
 
Kind regards,
 
Frederik
 
 
 
--
View this message in context:
<http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp4
033198p4033202.html>
http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp40
33198p4033202.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at
Nabble.com.
___
users mailing list
 <mailto:users@lists.scilab.org> users@lists.scilab.org
 <http://lists.scilab.org/mailman/listinfo/users>
http://lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plotting properties of digital audio filters

2015-12-11 Thread fred_audio_dsp
Hi Rafael,

Thank you for your reply. I have tried unwrapping the phase for the 24dB/oct
low pass filter at 1kHz with scilab's unwrap() function. Plots included
below; I scaled the frequency axis linearily to better show what's going on.

without unwrap()
 

with unwrap()
 

Kind regards,

Frederik



--
View this message in context: 
http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp4033198p4033202.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plotting properties of digital audio filters

2015-12-11 Thread Serge Steer

Le 11/12/2015 18:03, fred_audio_dsp a écrit :

Hi Rafael,

Thank you very kindly for your assistance so far!

If I understand correctly, the unwrap() macro quoted in your message has
been part of Scilab since somewhere in 2014, am I wrong?

Using scilab's phasemag() macro as suggested, I get the exact same output as
when plotting the phase with the code posted in my first message:
take care of the second input argument of phasemag. To obtain an 
unwrapped phase you must pas "c" as the second argument.

Serge

phi=(atan(imag(A),real(A)))*180/%pi


Kind regards,

Frederik



--
View this message in context: 
http://mailinglists.scilab.org/Plotting-properties-of-digital-audio-filters-tp4033198p4033204.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users